ggz.ui
Class CustomMetalTheme
java.lang.Object
javax.swing.plaf.metal.MetalTheme
javax.swing.plaf.metal.DefaultMetalTheme
ggz.ui.CustomMetalTheme
public class CustomMetalTheme
- extends javax.swing.plaf.metal.DefaultMetalTheme
Class used to provide a custom theme that reads it's values from applet
parameters.
The supported parameters are as follows.
Black White Primary1 Primary2 Primary3 Secondary Secondary2 Secondary3
ControlTextFont MenuTextFont SubTextFont SystemTextFont UserTextFont
WindowTitleFont
See the Integer.decode() and Font.decode() method to see what Color and Font
strings are supported.
- Author:
- Helg.Bredow
Field Summary |
protected static java.util.logging.Logger |
log
|
Method Summary |
protected javax.swing.plaf.ColorUIResource |
getBlack()
|
protected javax.swing.plaf.ColorUIResource |
getColorUIResource(java.lang.String name)
Gets the color resource based on the applet parameter. |
javax.swing.plaf.FontUIResource |
getControlTextFont()
|
protected javax.swing.plaf.FontUIResource |
getFontUIResource(java.lang.String name)
Gets the font resource based on the applet parameter. |
javax.swing.plaf.FontUIResource |
getMenuTextFont()
|
java.lang.String |
getName()
|
protected javax.swing.plaf.ColorUIResource |
getPrimary1()
|
protected javax.swing.plaf.ColorUIResource |
getPrimary2()
|
protected javax.swing.plaf.ColorUIResource |
getPrimary3()
|
protected javax.swing.plaf.ColorUIResource |
getSecondary1()
|
protected javax.swing.plaf.ColorUIResource |
getSecondary2()
|
protected javax.swing.plaf.ColorUIResource |
getSecondary3()
|
javax.swing.plaf.FontUIResource |
getSubTextFont()
|
javax.swing.plaf.FontUIResource |
getSystemTextFont()
|
javax.swing.plaf.FontUIResource |
getUserTextFont()
|
protected javax.swing.plaf.ColorUIResource |
getWhite()
|
javax.swing.plaf.FontUIResource |
getWindowTitleFont()
|
static void |
install(java.applet.Applet applet)
Sets the look and feel to Metal and installs this theme. |
static void |
removeInsideBorder(javax.swing.JComponent comp)
Utility function to remove the inside border from a compound border. |
Methods inherited from class javax.swing.plaf.metal.MetalTheme |
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, 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, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final java.util.logging.Logger log
CustomMetalTheme
public CustomMetalTheme(java.applet.Applet applet)
getName
public java.lang.String getName()
- Overrides:
getName
in class javax.swing.plaf.metal.DefaultMetalTheme
getBlack
protected javax.swing.plaf.ColorUIResource getBlack()
- Overrides:
getBlack
in class javax.swing.plaf.metal.MetalTheme
getWhite
protected javax.swing.plaf.ColorUIResource getWhite()
- Overrides:
getWhite
in class javax.swing.plaf.metal.MetalTheme
getPrimary1
protected javax.swing.plaf.ColorUIResource getPrimary1()
- Overrides:
getPrimary1
in class javax.swing.plaf.metal.DefaultMetalTheme
getPrimary2
protected javax.swing.plaf.ColorUIResource getPrimary2()
- Overrides:
getPrimary2
in class javax.swing.plaf.metal.DefaultMetalTheme
getPrimary3
protected javax.swing.plaf.ColorUIResource getPrimary3()
- Overrides:
getPrimary3
in class javax.swing.plaf.metal.DefaultMetalTheme
getSecondary1
protected javax.swing.plaf.ColorUIResource getSecondary1()
- Overrides:
getSecondary1
in class javax.swing.plaf.metal.DefaultMetalTheme
getSecondary2
protected javax.swing.plaf.ColorUIResource getSecondary2()
- Overrides:
getSecondary2
in class javax.swing.plaf.metal.DefaultMetalTheme
getSecondary3
protected javax.swing.plaf.ColorUIResource getSecondary3()
- Overrides:
getSecondary3
in class javax.swing.plaf.metal.DefaultMetalTheme
getMenuTextFont
public javax.swing.plaf.FontUIResource getMenuTextFont()
- Overrides:
getMenuTextFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getControlTextFont
public javax.swing.plaf.FontUIResource getControlTextFont()
- Overrides:
getControlTextFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getSubTextFont
public javax.swing.plaf.FontUIResource getSubTextFont()
- Overrides:
getSubTextFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getSystemTextFont
public javax.swing.plaf.FontUIResource getSystemTextFont()
- Overrides:
getSystemTextFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getUserTextFont
public javax.swing.plaf.FontUIResource getUserTextFont()
- Overrides:
getUserTextFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getWindowTitleFont
public javax.swing.plaf.FontUIResource getWindowTitleFont()
- Overrides:
getWindowTitleFont
in class javax.swing.plaf.metal.DefaultMetalTheme
getFontUIResource
protected javax.swing.plaf.FontUIResource getFontUIResource(java.lang.String name)
- Gets the font resource based on the applet parameter. If the parameter is
null or cannot be parsed then this method returns null.
- Parameters:
name
-
- Returns:
getColorUIResource
protected javax.swing.plaf.ColorUIResource getColorUIResource(java.lang.String name)
- Gets the color resource based on the applet parameter. If the parameter
is null or cannot be parsed then this method returns null.
- Parameters:
name
-
- Returns:
install
public static void install(java.applet.Applet applet)
- Sets the look and feel to Metal and installs this theme.
- Parameters:
applet
-
removeInsideBorder
public static void removeInsideBorder(javax.swing.JComponent comp)
- Utility function to remove the inside border from a compound border. This
is useful when a minimal button is required.
- Parameters:
comp
-