Package com.jidesoft.plaf.windows
Class XPStyle
java.lang.Object
com.jidesoft.plaf.windows.XPStyle
Implements Windows XP Styles for the Windows Look and Feel.
- Author:
- Leif Samuelsson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A class which encapsulates attributes for a given part (component type) and which provides methods for painting backgrounds and glyphs -
Method Summary
Modifier and TypeMethodDescriptiongetBorder
(Component c, TMSchema.Part part) Get a namedBorder
value from the current stylegetColor
(XPStyle.Skin skin, TMSchema.Prop prop, Color fallback) Get a namedColor
value from the current stylegetDimension
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) Get a namedDimension
value from the current styleint
getInt
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop, int fallback) Get a namedint
value from the current stylegetMargin
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) Get a namedInsets
value from the current stylegetPoint
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) Get a namedPoint
(e.g.getSkin
(Component c, TMSchema.Part part) Get aSkin
object from the current style for a named part (component type)getString
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) Get a namedString
value from the current stylegetTypeEnum
(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) static XPStyle
getXP()
Get the singleton instance of this classstatic void
Static method for clearing the hashmap and loading the current XP style and themeboolean
isSkinDefined
(Component c, TMSchema.Part part) static boolean
isVista()
-
Method Details
-
invalidateStyle
public static void invalidateStyle()Static method for clearing the hashmap and loading the current XP style and theme -
getXP
Get the singleton instance of this class- Returns:
- the singleton instance of this class or null if XP styles are not active or if this is not Windows XP
-
isVista
public static boolean isVista() -
getString
Get a namedString
value from the current style- Parameters:
part
- aPart
state
- aString
prop
- aString
- Returns:
- a
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 needed
-
getTypeEnum
public TMSchema.TypeEnum getTypeEnum(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) -
getInt
public int getInt(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop, int fallback) Get a namedint
value from the current style- Parameters:
part
- aPart
- Returns:
- an
int
or null if key is not found in the current style
-
getDimension
public Dimension getDimension(Component c, TMSchema.Part part, TMSchema.State state, TMSchema.Prop prop) Get a namedDimension
value from the current style- Returns:
- a
Dimension
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.
-
getPoint
Get a namedPoint
(e.g. a location or an offset) value from the current style- Returns:
- a
Point
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 needed
-
getMargin
Get a namedInsets
value from the current style- Returns:
- an
Insets
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.
-
getColor
Get a namedColor
value from the current style- Returns:
- a
Color
or null if key is not found in the current style
-
getBorder
Get a namedBorder
value from the current style- Parameters:
part
- aPart
- Returns:
- a
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".
-
isSkinDefined
-
getSkin
Get aSkin
object from the current style for a named part (component type)- Parameters:
part
- aPart
- Returns:
- a
Skin
object
-