public class XPStyle
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
XPStyle.Skin |
A class which encapsulates attributes for a given part (component type) and which provides methods for painting
backgrounds and glyphs
|
Modifier and Type | Method | Description |
---|---|---|
javax.swing.border.Border |
getBorder(java.awt.Component c,
TMSchema.Part part) |
Get a named
Border value from the current style |
java.awt.Color |
getColor(XPStyle.Skin skin,
TMSchema.Prop prop,
java.awt.Color fallback) |
Get a named
Color value from the current style |
java.awt.Dimension |
getDimension(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop) |
Get a named
Dimension value from the current style |
int |
getInt(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop,
int fallback) |
Get a named
int value from the current style |
java.awt.Insets |
getMargin(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop) |
Get a named
Insets value from the current style |
java.awt.Point |
getPoint(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop) |
Get a named
Point (e.g. |
XPStyle.Skin |
getSkin(java.awt.Component c,
TMSchema.Part part) |
Get a
Skin object from the current style for a named part (component type) |
java.lang.String |
getString(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop) |
Get a named
String value from the current style |
TMSchema.TypeEnum |
getTypeEnum(java.awt.Component c,
TMSchema.Part part,
TMSchema.State state,
TMSchema.Prop prop) |
|
static XPStyle |
getXP() |
Get the singleton instance of this class
|
static void |
invalidateStyle() |
Static method for clearing the hashmap and loading the current XP style and theme
|
boolean |
isSkinDefined(java.awt.Component c,
TMSchema.Part part) |
|
static boolean |
isVista() |
public static void invalidateStyle()
public static XPStyle getXP()
public static boolean isVista()
public java.lang.String getString(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop)
String
value from the current stylepart
- a Part
state
- a String
prop
- a String
String
or null if key is not found in the current style
This is currently only used by WindowsInternalFrameTitlePane for painting title foreground and can be removed
when no longer neededpublic TMSchema.TypeEnum getTypeEnum(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop)
public int getInt(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop, int fallback)
int
value from the current stylepart
- a Part
int
or null if key is not found in the current stylepublic java.awt.Dimension getDimension(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop)
Dimension
value from the current styleDimension
or null if key is not found in the current style
This is currently only used by WindowsProgressBarUI and the value should probably be cached there instead of
here.public java.awt.Point getPoint(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop)
Point
(e.g. a location or an offset) value from the current stylePoint
or null if key is not found in the current style
This is currently only used by WindowsInternalFrameTitlePane for painting title foregound and can be removed when
no longer neededpublic java.awt.Insets getMargin(java.awt.Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop)
Insets
value from the current styleInsets
object or null if key is not found in the current style
This is currently only used to create borders and by WindowsInternalFrameTitlePane for painting title foregound.
The return value is already cached in those places.public java.awt.Color getColor(XPStyle.Skin skin, TMSchema.Prop prop, java.awt.Color fallback)
Color
value from the current styleColor
or null if key is not found in the current stylepublic javax.swing.border.Border getBorder(java.awt.Component c, TMSchema.Part part)
Border
value from the current stylepart
- a Part
Border
or null if key is not found in the current style or if the style for the particular
part is not defined as "borderfill".public boolean isSkinDefined(java.awt.Component c, TMSchema.Part part)
public XPStyle.Skin getSkin(java.awt.Component c, TMSchema.Part part)
Skin
object from the current style for a named part (component type)part
- a Part
Skin
object