org.apache.pivot.wtk.skin.terra
Class TerraTheme

java.lang.Object
  extended by org.apache.pivot.wtk.Theme
      extended by org.apache.pivot.wtk.skin.terra.TerraTheme

public final class TerraTheme
extends Theme

Terra theme.


Field Summary
static String COMMAND_BUTTON_STYLE
           
static String LOCATION_PROPERTY
           
 
Fields inherited from class org.apache.pivot.wtk.Theme
BOLD_KEY, componentSkinMap, ITALIC_KEY, NAME_KEY, PROVIDER_NAME, SIZE_KEY
 
Constructor Summary
TerraTheme()
           
 
Method Summary
static Color brighten(Color color)
          Returns a brighter version of the specified color.
static Color brighten(Color color, float adjustment)
          Returns a brighter version of the specified color.
static Color darken(Color color)
          Returns a darker version of the specified color.
static Color darken(Color color, float adjustment)
          Returns a darker version of the specified color.
 Color getBaseColor(int index)
          Gets a base color from the theme's color palette.
 Color getColor(int index)
          Gets a value from the theme's color palette.
 Font getFont()
          Gets the theme's font.
 Image getMessageIcon(MessageType messageType)
          Gets the image that this theme uses to represent messages of the specified type.
 int getNumberOfColors()
          Gets the total number of Colors
 int getNumberOfPaletteColors()
          Gets the number of Palette Colors
 Image getSmallMessageIcon(MessageType messageType)
          Gets the small image that this theme uses to represent messages of the specified type.
 void setBaseColor(int index, Color baseColor)
          Sets a base color in the theme's color palette.
 void setColor(int index, Color color)
          Sets a value in the theme's color palette.
 void setFont(Font font)
          Sets the theme's font.
 void setMessageIcon(MessageType messageType, Image messageIcon)
          Sets the image that this theme uses to represent messages of the specified type.
 void setSmallMessageIcon(MessageType messageType, Image smallMessageIcon)
          Sets the small image that this theme uses to represent messages of the specified type.
 
Methods inherited from class org.apache.pivot.wtk.Theme
deriveFont, get, getSkinClass, getTheme, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_PROPERTY

public static final String LOCATION_PROPERTY
See Also:
Constant Field Values

COMMAND_BUTTON_STYLE

public static final String COMMAND_BUTTON_STYLE
See Also:
Constant Field Values
Constructor Detail

TerraTheme

public TerraTheme()
Method Detail

getFont

public Font getFont()
Gets the theme's font.

Specified by:
getFont in class Theme

setFont

public void setFont(Font font)
Sets the theme's font.

Specified by:
setFont in class Theme

getColor

public Color getColor(int index)
Gets a value from the theme's color palette.

Parameters:
index -

setColor

public void setColor(int index,
                     Color color)
Sets a value in the theme's color palette.

Parameters:
index -
color -

getBaseColor

public Color getBaseColor(int index)
Gets a base color from the theme's color palette.

Parameters:
index -

setBaseColor

public void setBaseColor(int index,
                         Color baseColor)
Sets a base color in the theme's color palette.

Parameters:
index -
baseColor -

getNumberOfPaletteColors

public int getNumberOfPaletteColors()
Gets the number of Palette Colors

Returns:
the number

getNumberOfColors

public int getNumberOfColors()
Gets the total number of Colors

Returns:
the number

getMessageIcon

public Image getMessageIcon(MessageType messageType)
Gets the image that this theme uses to represent messages of the specified type.

Parameters:
messageType -

setMessageIcon

public void setMessageIcon(MessageType messageType,
                           Image messageIcon)
Sets the image that this theme uses to represent messages of the specified type.

Parameters:
messageType -
messageIcon -

getSmallMessageIcon

public Image getSmallMessageIcon(MessageType messageType)
Gets the small image that this theme uses to represent messages of the specified type.

Parameters:
messageType -

setSmallMessageIcon

public void setSmallMessageIcon(MessageType messageType,
                                Image smallMessageIcon)
Sets the small image that this theme uses to represent messages of the specified type.

Parameters:
messageType -
smallMessageIcon -

brighten

public static Color brighten(Color color)
Returns a brighter version of the specified color. Specifically, it increases the brightness (in the HSB color model) by the colorMultiplier factor already set.


darken

public static Color darken(Color color)
Returns a darker version of the specified color. Specifically, it decreases the brightness (in the HSB color model) by the colorMultiplier factor already set.


brighten

public static Color brighten(Color color,
                             float adjustment)
Returns a brighter version of the specified color. Specifically, it increases the brightness (in the HSB color model) by the given adjustment factor (usually in the range ]0 .. 1[).


darken

public static Color darken(Color color,
                           float adjustment)
Returns a darker version of the specified color. Specifically, it decreases the brightness (in the HSB color model) by the given adjustment factor (usually in the range ]0 .. 1[).