|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.plaf.metal.MetalTheme
javax.swing.plaf.metal.DefaultMetalTheme
org.jcreme.swing.plaf.metal.XMLMetalTheme
This class enables to provide a MetalTheme to an application from an XML file. The XML file must conform the metaltheme schema.
| Field Summary | |
protected javax.swing.plaf.FontUIResource |
controlTextFont
The control text font of the theme. |
protected javax.swing.plaf.FontUIResource |
menuTextFont
The menu text font of the theme. |
protected java.lang.String |
name
The name of the theme. |
static java.lang.String |
PARAMETER_NAME
The name associated to the XMLMetalTheme object in the stylesheet. |
protected javax.swing.plaf.ColorUIResource |
primary1
The first primary color of the theme. |
protected javax.swing.plaf.ColorUIResource |
primary2
The second primary color of the theme. |
protected javax.swing.plaf.ColorUIResource |
primary3
The third primary color of the theme. |
protected javax.swing.plaf.ColorUIResource |
secondary1
The first secondary color of the theme. |
protected javax.swing.plaf.ColorUIResource |
secondary2
The second secondary color of the theme. |
protected javax.swing.plaf.ColorUIResource |
secondary3
The third secondary color of the theme. |
protected javax.swing.plaf.FontUIResource |
subTextFont
The sub text font of the theme. |
protected javax.swing.plaf.FontUIResource |
systemTextFont
The system text font of the theme. |
static java.lang.String |
TRANSFORMATION_FILE_NAME
The name of the stylesheet to use. |
protected static javax.xml.transform.Transformer |
transformer
For efficiency purpose, the transformer is instantiated only once. |
protected javax.swing.plaf.FontUIResource |
userTextFont
The user text font of the theme. |
protected javax.swing.plaf.FontUIResource |
windowTitleFont
The window title font of the theme. |
| Fields inherited from class javax.swing.plaf.metal.MetalTheme |
|
| Constructor Summary | |
XMLMetalTheme(java.lang.String sourceFileName)
Creates a new instance of XMLMetalTheme The object is created by transforming the provided file through the metaltheme stylesheet. |
|
| Method Summary | |
javax.swing.plaf.FontUIResource |
getControlTextFont()
Gives access to the control text font of the theme. |
javax.swing.plaf.FontUIResource |
getMenuTextFont()
Gives access to the menu text font of the theme. |
java.lang.String |
getName()
Gives access to the theme's name. |
javax.swing.plaf.ColorUIResource |
getPrimary1()
Gives access to the first primary color of the theme. |
javax.swing.plaf.ColorUIResource |
getPrimary2()
Gives access to the second primary color of the theme. |
javax.swing.plaf.ColorUIResource |
getPrimary3()
Gives access to the third primary color of the theme. |
javax.swing.plaf.ColorUIResource |
getSecondary1()
Gives access to the first secondary color of the theme. |
javax.swing.plaf.ColorUIResource |
getSecondary2()
Gives access to the second secondary color of the theme. |
javax.swing.plaf.ColorUIResource |
getSecondary3()
Gives access to the third secondary color of the theme. |
javax.swing.plaf.FontUIResource |
getSubTextFont()
Gives access to the sub text font of the theme. |
javax.swing.plaf.FontUIResource |
getSystemTextFont()
Gives access to the system text font of the theme. |
javax.swing.plaf.FontUIResource |
getUserTextFont()
Gives access to the user text font of the theme. |
javax.swing.plaf.FontUIResource |
getWindowTitleFont()
Gives access to the window title font of the theme. |
void |
setControlTextFont(java.lang.String font,
int style,
int size)
This method enables to set the control text font. |
void |
setMenuTextFont(java.lang.String font,
int style,
int size)
This method enables to set the menu text font. |
void |
setName(java.lang.String n)
This method enables to give a name to the theme. |
void |
setPrimary1(int red,
int green,
int blue)
This method enables to set the first primary color. |
void |
setPrimary2(int red,
int green,
int blue)
This method enables to set the second primary color. |
void |
setPrimary3(int red,
int green,
int blue)
This method enables to set the third primary color. |
void |
setSecondary1(int red,
int green,
int blue)
This method enables to set the first secondary color. |
void |
setSecondary2(int red,
int green,
int blue)
This method enables to set the second secondary color. |
void |
setSecondary3(int red,
int green,
int blue)
This method enables to set the third secondary color. |
void |
setSubTextFont(java.lang.String font,
int style,
int size)
This method enables to set the sub text font. |
void |
setSystemTextFont(java.lang.String font,
int style,
int size)
This method enables to set the system text font. |
void |
setUserTextFont(java.lang.String font,
int style,
int size)
This method enables to set the user text font. |
void |
setWindowTitleFont(java.lang.String font,
int style,
int size)
This method enables to set the window title font. |
| Methods inherited from class javax.swing.plaf.metal.DefaultMetalTheme |
|
| Methods inherited from class javax.swing.plaf.metal.MetalTheme |
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TRANSFORMATION_FILE_NAME
public static final java.lang.String PARAMETER_NAME
protected static javax.xml.transform.Transformer transformer
protected java.lang.String name
protected javax.swing.plaf.ColorUIResource primary1
protected javax.swing.plaf.ColorUIResource primary2
protected javax.swing.plaf.ColorUIResource primary3
protected javax.swing.plaf.ColorUIResource secondary1
protected javax.swing.plaf.ColorUIResource secondary2
protected javax.swing.plaf.ColorUIResource secondary3
protected javax.swing.plaf.FontUIResource controlTextFont
protected javax.swing.plaf.FontUIResource menuTextFont
protected javax.swing.plaf.FontUIResource subTextFont
protected javax.swing.plaf.FontUIResource systemTextFont
protected javax.swing.plaf.FontUIResource userTextFont
protected javax.swing.plaf.FontUIResource windowTitleFont
| Constructor Detail |
public XMLMetalTheme(java.lang.String sourceFileName)
sourceFileName - the name of the xml file containing the values for the theme.
The file must conform the metaltheme schema. The file will be
retrieved as a system property.| Method Detail |
public java.lang.String getName()
public javax.swing.plaf.ColorUIResource getPrimary1()
public javax.swing.plaf.ColorUIResource getPrimary2()
public javax.swing.plaf.ColorUIResource getPrimary3()
public javax.swing.plaf.ColorUIResource getSecondary1()
public javax.swing.plaf.ColorUIResource getSecondary2()
public javax.swing.plaf.ColorUIResource getSecondary3()
public javax.swing.plaf.FontUIResource getControlTextFont()
public javax.swing.plaf.FontUIResource getMenuTextFont()
public javax.swing.plaf.FontUIResource getSubTextFont()
public javax.swing.plaf.FontUIResource getSystemTextFont()
public javax.swing.plaf.FontUIResource getUserTextFont()
public javax.swing.plaf.FontUIResource getWindowTitleFont()
public void setName(java.lang.String n)
n - the name.
public void setPrimary1(int red,
int green,
int blue)
red - green - blue -
public void setPrimary2(int red,
int green,
int blue)
red - green - blue -
public void setPrimary3(int red,
int green,
int blue)
red - green - blue -
public void setSecondary1(int red,
int green,
int blue)
red - green - blue -
public void setSecondary2(int red,
int green,
int blue)
red - green - blue -
public void setSecondary3(int red,
int green,
int blue)
red - green - blue -
public void setControlTextFont(java.lang.String font,
int style,
int size)
font - style - size -
public void setMenuTextFont(java.lang.String font,
int style,
int size)
font - style - size -
public void setSubTextFont(java.lang.String font,
int style,
int size)
font - style - size -
public void setSystemTextFont(java.lang.String font,
int style,
int size)
font - style - size -
public void setUserTextFont(java.lang.String font,
int style,
int size)
font - style - size -
public void setWindowTitleFont(java.lang.String font,
int style,
int size)
font - style - size -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||