|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Theme
pivot.wtk.skin.terra.TerraTheme
public final class TerraTheme
Terra theme. The default color palette is shown below:
Field Summary |
---|
Fields inherited from class pivot.wtk.Theme |
---|
componentSkinMap |
Constructor Summary | |
---|---|
TerraTheme()
Creates a new theme using the default font and color palette. |
|
TerraTheme(java.net.URL location)
Constructs a theme, pulling the font and color palette from a JSON file at the specified location. |
Method Summary | |
---|---|
static java.awt.Color |
brighten(java.awt.Color color)
Returns a brighter version of the specified color. |
static java.awt.Color |
darken(java.awt.Color color)
Returns a darker version of the specified color. |
java.awt.Color |
getColor(int index)
Gets the color found at the specified index in the theme's color palette. |
java.awt.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. |
Image |
getSmallMessageIcon(MessageType messageType)
Gets the "small" image that this theme uses to represent messages of the specified type. |
protected void |
install()
|
protected void |
uninstall()
|
Methods inherited from class pivot.wtk.Theme |
---|
getSkinClass, getTheme, setTheme |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TerraTheme()
public TerraTheme(java.net.URL location)
Property: | Type: | Description: |
---|---|---|
font | String | The default theme font; must be understandable by java.awt.Font.decode(). |
colors | List<String> | This list should contain 8 colors in a form understandable by java.awt.Color.decode(). This list represents the theme's "base color palette", from which the full color palette is derived. Each of these 8 colors will be expanded to comprise 3 colors in the final palette: a darker version, the color itself, and a lighter version. Thus, the final color palette will contain 24 colors. For instance, in the default color palette the "base palette" colors are the colors in the middle column. |
location
- The location of the JSON file that defines the theme's font and colors.Method Detail |
---|
protected void install()
install
in class Theme
protected void uninstall()
uninstall
in class Theme
public java.awt.Font getFont()
getFont
in class Theme
public java.awt.Color getColor(int index)
index
- A color palette index, from 0 to 23.public Image getMessageIcon(MessageType messageType)
getMessageIcon
in class Theme
public Image getSmallMessageIcon(MessageType messageType)
getSmallMessageIcon
in class Theme
public static java.awt.Color brighten(java.awt.Color color)
public static java.awt.Color darken(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |