pivot.wtk.skin.terra
Class TerraPushButtonSkin

java.lang.Object
  extended by pivot.wtk.skin.ComponentSkin
      extended by pivot.wtk.skin.ButtonSkin
          extended by pivot.wtk.skin.PushButtonSkin
              extended by pivot.wtk.skin.terra.TerraPushButtonSkin
All Implemented Interfaces:
ButtonListener, ButtonPressListener, ButtonStateListener, ComponentKeyListener, ComponentLayoutListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ConstrainedVisual, Skin, Visual
Direct Known Subclasses:
TerraFrameSkin.FrameButtonSkin

public class TerraPushButtonSkin
extends PushButtonSkin

Terra push button skin.

Author:
gbrown

Field Summary
 
Fields inherited from class pivot.wtk.skin.PushButtonSkin
pressed
 
Fields inherited from class pivot.wtk.skin.ButtonSkin
highlighted
 
Fields inherited from class pivot.wtk.skin.ComponentSkin
SHOW_TOOLTIP_TIMEOUT
 
Constructor Summary
TerraPushButtonSkin()
           
 
Method Summary
 java.awt.Color getBackgroundColor()
           
 java.awt.Color getBorderColor()
           
 java.awt.Color getColor()
           
 java.awt.Color getDisabledBackgroundColor()
           
 java.awt.Color getDisabledBorderColor()
           
 java.awt.Color getDisabledColor()
           
 java.awt.Font getFont()
           
 Insets getPadding()
           
 float getPreferredAspectRatio()
           
 int getPreferredHeight(int width)
          Returns the visual's preferred height given the provided width constraint.
 Dimensions getPreferredSize()
          Returns the visual's unconstrained preferred size.
 int getPreferredWidth(int height)
          Returns the visual's preferred width given the provided height constraint.
 boolean isFocusable()
          By default, components are focusable.
 boolean isFontBold()
           
 boolean isToolbar()
           
 void paint(java.awt.Graphics2D graphics)
          Paints the visual.
 void setBackgroundColor(java.awt.Color backgroundColor)
           
 void setBackgroundColor(int backgroundColor)
           
 void setBackgroundColor(java.lang.String backgroundColor)
           
 void setBorderColor(java.awt.Color borderColor)
           
 void setBorderColor(int borderColor)
           
 void setBorderColor(java.lang.String borderColor)
           
 void setColor(java.awt.Color color)
           
 void setColor(int color)
           
 void setColor(java.lang.String color)
           
 void setDisabledBackgroundColor(java.awt.Color disabledBackgroundColor)
           
 void setDisabledBackgroundColor(int disabledBackgroundColor)
           
 void setDisabledBackgroundColor(java.lang.String disabledBackgroundColor)
           
 void setDisabledBorderColor(java.awt.Color disabledBorderColor)
           
 void setDisabledBorderColor(int disabledBorderColor)
           
 void setDisabledBorderColor(java.lang.String disabledBorderColor)
           
 void setDisabledColor(java.awt.Color disabledColor)
           
 void setDisabledColor(int disabledColor)
           
 void setDisabledColor(java.lang.String disabledColor)
           
 void setFont(java.awt.Font font)
           
 void setFont(java.lang.String font)
           
 void setFontBold(boolean fontBold)
           
 void setPadding(Dictionary<java.lang.String,?> padding)
           
 void setPadding(Insets padding)
           
 void setPadding(int padding)
           
 void setPadding(java.lang.Number padding)
           
 void setPreferredAspectRatio(float preferredAspectRatio)
           
 void setPreferredAspectRatio(java.lang.Number preferredAspectRatio)
           
 void setToolbar(boolean toolbar)
           
 
Methods inherited from class pivot.wtk.skin.PushButtonSkin
enabledChanged, focusedChanged, keyPressed, keyReleased, mouseClick, mouseDown, mouseOut, mouseUp
 
Methods inherited from class pivot.wtk.skin.ButtonSkin
actionChanged, buttonDataChanged, buttonPressed, dataRendererChanged, groupChanged, install, layout, mouseOver, selectedKeyChanged, stateChanged, stateKeyChanged, toggleButtonChanged, triStateChanged, uninstall
 
Methods inherited from class pivot.wtk.skin.ComponentSkin
cursorChanged, decodeColor, displayableChanged, getComponent, getHeight, getWidth, invalidateComponent, keyTyped, locationChanged, mouseMove, mouseWheel, parentChanged, preferredSizeChanged, 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

TerraPushButtonSkin

public TerraPushButtonSkin()
Method Detail

getPreferredWidth

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

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.

Parameters:
width - The width by which to constrain the preferred height, or -1 for no constraint.

getPreferredSize

public Dimensions getPreferredSize()
Description copied from interface: ConstrainedVisual
Returns the visual's unconstrained preferred size.

Specified by:
getPreferredSize in interface ConstrainedVisual
Overrides:
getPreferredSize in class ComponentSkin

paint

public void paint(java.awt.Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Parameters:
graphics - The graphics context in which to paint the visual.

isFocusable

public boolean isFocusable()
Description copied from class: ComponentSkin
By default, components are focusable.

Specified by:
isFocusable in interface Skin
Overrides:
isFocusable in class ComponentSkin
Returns:
true if this skin is focusable; false, otherwise.

getFont

public java.awt.Font getFont()

setFont

public void setFont(java.awt.Font font)

setFont

public final void setFont(java.lang.String font)

isFontBold

public boolean isFontBold()

setFontBold

public void setFontBold(boolean fontBold)

getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color color)

setColor

public final void setColor(java.lang.String color)

setColor

public final void setColor(int color)

getDisabledColor

public java.awt.Color getDisabledColor()

setDisabledColor

public void setDisabledColor(java.awt.Color disabledColor)

setDisabledColor

public final void setDisabledColor(java.lang.String disabledColor)

setDisabledColor

public final void setDisabledColor(int disabledColor)

getBackgroundColor

public java.awt.Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)

setBackgroundColor

public final void setBackgroundColor(java.lang.String backgroundColor)

setBackgroundColor

public final void setBackgroundColor(int backgroundColor)

getDisabledBackgroundColor

public java.awt.Color getDisabledBackgroundColor()

setDisabledBackgroundColor

public void setDisabledBackgroundColor(java.awt.Color disabledBackgroundColor)

setDisabledBackgroundColor

public final void setDisabledBackgroundColor(java.lang.String disabledBackgroundColor)

setDisabledBackgroundColor

public final void setDisabledBackgroundColor(int disabledBackgroundColor)

getBorderColor

public java.awt.Color getBorderColor()

setBorderColor

public void setBorderColor(java.awt.Color borderColor)

setBorderColor

public final void setBorderColor(java.lang.String borderColor)

setBorderColor

public final void setBorderColor(int borderColor)

getDisabledBorderColor

public java.awt.Color getDisabledBorderColor()

setDisabledBorderColor

public void setDisabledBorderColor(java.awt.Color disabledBorderColor)

setDisabledBorderColor

public final void setDisabledBorderColor(java.lang.String disabledBorderColor)

setDisabledBorderColor

public final void setDisabledBorderColor(int disabledBorderColor)

getPadding

public Insets getPadding()

setPadding

public void setPadding(Insets padding)

setPadding

public final void setPadding(Dictionary<java.lang.String,?> padding)

setPadding

public final void setPadding(int padding)

setPadding

public final void setPadding(java.lang.Number padding)

getPreferredAspectRatio

public float getPreferredAspectRatio()

setPreferredAspectRatio

public void setPreferredAspectRatio(float preferredAspectRatio)

setPreferredAspectRatio

public final void setPreferredAspectRatio(java.lang.Number preferredAspectRatio)

isToolbar

public boolean isToolbar()

setToolbar

public void setToolbar(boolean toolbar)