pivot.wtk.skin.terra
Class TerraRollupSkin

java.lang.Object
  extended by pivot.wtk.skin.ComponentSkin
      extended by pivot.wtk.skin.ContainerSkin
          extended by pivot.wtk.skin.RollupSkin
              extended by pivot.wtk.skin.terra.TerraRollupSkin
All Implemented Interfaces:
ComponentKeyListener, ComponentLayoutListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ConstrainedVisual, ContainerListener, RollupListener, RollupStateListener, Skin, Visual

public class TerraRollupSkin
extends RollupSkin

Terra theme's rollup skin.

Author:
tvolkert

Nested Class Summary
protected  class TerraRollupSkin.RollupButton
          Component that allows the user to expand and collapse the Rollup.
protected  class TerraRollupSkin.RollupButtonSkin
          Skin for the rollup button.
 
Nested classes/interfaces inherited from class pivot.wtk.skin.ContainerSkin
ContainerSkin.IndexFocusTraversalPolicy
 
Nested classes/interfaces inherited from interface pivot.wtk.RollupStateListener
RollupStateListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentListener
ComponentListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter
 
Nested classes/interfaces inherited from interface pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter
 
Field Summary
 
Fields inherited from class pivot.wtk.skin.ComponentSkin
SHOW_TOOLTIP_TIMEOUT
 
Constructor Summary
TerraRollupSkin()
           
 
Method Summary
 void contentChanged(Rollup rollup, Component previousContent)
          Called when a rollup's content component changed.
 void expandedChanged(Rollup rollup)
          Called when a rollup's expanded state changed.
 void expandedChangeVetoed(Rollup rollup, Vote reason)
          Called when a rollup expansion event has been vetoed.
 int getBuffer()
           
 Color getButtonColor()
           
 boolean getHeadingToggles()
           
 boolean getJustify()
           
 int getPreferredHeight(int width)
          Returns the visual's preferred height given the provided width constraint.
 int getPreferredWidth(int height)
          Returns the visual's preferred width given the provided height constraint.
 int getSpacing()
           
 boolean getUseBullet()
           
 void headingChanged(Rollup rollup, Component previousHeading)
          Called when a rollup's heading component changed.
 void install(Component component)
          Associates a skin with a component.
 void layout()
          If the component on which the skin is installed is a container, lays out the container's children.
 Vote previewExpandedChange(Rollup rollup)
          Called to preview a rollup expansion event.
 void setBuffer(int buffer)
           
 void setButtonColor(Color buttonColor)
           
 void setButtonColor(String buttonColor)
           
 void setHeadingToggles(boolean headingToggles)
           
 void setJustify(boolean justify)
           
 void setSpacing(int spacing)
           
 void setUseBullet(boolean useBullet)
           
 void uninstall()
          Dissociates a skin from a component.
 
Methods inherited from class pivot.wtk.skin.ContainerSkin
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, paint, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint
 
Methods inherited from class pivot.wtk.skin.ComponentSkin
cursorChanged, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getPreferredSize, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerraRollupSkin

public TerraRollupSkin()
Method Detail

install

public void install(Component component)
Description copied from interface: Skin
Associates a skin with a component.

Specified by:
install in interface Skin
Overrides:
install in class RollupSkin
Parameters:
component - The component to which the skin is being attached.

uninstall

public void uninstall()
Description copied from interface: Skin
Dissociates a skin from a component.

Specified by:
uninstall in interface Skin
Overrides:
uninstall in class RollupSkin

getPreferredWidth

public int getPreferredWidth(int height)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred width given the provided height constraint.

Specified by:
getPreferredWidth in interface ConstrainedVisual
Overrides:
getPreferredWidth in class ContainerSkin
Parameters:
height - The height by which to constrain the preferred width, or -1 for no constraint.

getPreferredHeight

public int getPreferredHeight(int width)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred height given the provided width constraint.

Specified by:
getPreferredHeight in interface ConstrainedVisual
Overrides:
getPreferredHeight in class ContainerSkin
Parameters:
width - The width by which to constrain the preferred height, or -1 for no constraint.

layout

public void layout()
Description copied from interface: Skin
If the component on which the skin is installed is a container, lays out the container's children.


getButtonColor

public Color getButtonColor()

setButtonColor

public void setButtonColor(Color buttonColor)

setButtonColor

public final void setButtonColor(String buttonColor)

getSpacing

public int getSpacing()

setSpacing

public void setSpacing(int spacing)

getBuffer

public int getBuffer()

setBuffer

public void setBuffer(int buffer)

getJustify

public boolean getJustify()

setJustify

public void setJustify(boolean justify)

getHeadingToggles

public boolean getHeadingToggles()

setHeadingToggles

public void setHeadingToggles(boolean headingToggles)

getUseBullet

public boolean getUseBullet()

setUseBullet

public void setUseBullet(boolean useBullet)

headingChanged

public void headingChanged(Rollup rollup,
                           Component previousHeading)
Description copied from interface: RollupListener
Called when a rollup's heading component changed.

Specified by:
headingChanged in interface RollupListener
Overrides:
headingChanged in class RollupSkin

contentChanged

public void contentChanged(Rollup rollup,
                           Component previousContent)
Description copied from interface: RollupListener
Called when a rollup's content component changed.

Specified by:
contentChanged in interface RollupListener
Overrides:
contentChanged in class RollupSkin

previewExpandedChange

public Vote previewExpandedChange(Rollup rollup)
Description copied from interface: RollupStateListener
Called to preview a rollup expansion event.

Specified by:
previewExpandedChange in interface RollupStateListener
Overrides:
previewExpandedChange in class RollupSkin

expandedChangeVetoed

public void expandedChangeVetoed(Rollup rollup,
                                 Vote reason)
Description copied from interface: RollupStateListener
Called when a rollup expansion event has been vetoed.

Specified by:
expandedChangeVetoed in interface RollupStateListener
Overrides:
expandedChangeVetoed in class RollupSkin

expandedChanged

public void expandedChanged(Rollup rollup)
Description copied from interface: RollupStateListener
Called when a rollup's expanded state changed.

Specified by:
expandedChanged in interface RollupStateListener
Overrides:
expandedChanged in class RollupSkin