Package net.sf.freecol.client.gui.plaf
Class FreeColLookAndFeel
- java.lang.Object
-
- javax.swing.LookAndFeel
-
- javax.swing.plaf.basic.BasicLookAndFeel
-
- javax.swing.plaf.metal.MetalLookAndFeel
-
- net.sf.freecol.client.gui.plaf.FreeColLookAndFeel
-
- All Implemented Interfaces:
java.io.Serializable
public class FreeColLookAndFeel extends javax.swing.plaf.metal.MetalLookAndFeel
Implements the FreeCol look and feel.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FreeColLookAndFeel.FreeColMetalTheme
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
brightPanelUI
private static java.util.logging.Logger
logger
private static java.lang.String
transparentPanelUI
private static java.lang.Class[]
uiClasses
-
Constructor Summary
Constructors Constructor Description FreeColLookAndFeel()
Initiates a new FreeCol look and feel.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.UIDefaults
getDefaults()
Creates the look and feel specific defaults table.java.lang.String
getDescription()
Gets a one line description of this Look and Feel.java.lang.String
getName()
Gets the name of this Look and Feel.static void
install(FreeColLookAndFeel fclaf)
Installs a FreeColLookAndFeel as the default look and feel.static void
installFont(java.awt.Font defaultFont)
Set the default font in all UI elements.-
Methods inherited from class javax.swing.plaf.metal.MetalLookAndFeel
createDefaultTheme, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getControlTextFont, getCurrentTheme, getDesktopColor, getDisabledIcon, getDisabledSelectedIcon, getFocusColor, getHighlightedTextColor, getID, getInactiveControlTextColor, getInactiveSystemTextColor, getLayoutStyle, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getMenuTextFont, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSubTextFont, getSupportsWindowDecorations, getSystemTextColor, getSystemTextFont, getTextHighlightColor, getUserTextColor, getUserTextFont, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleFont, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground, initClassDefaults, initComponentDefaults, initSystemColorDefaults, isNativeLookAndFeel, isSupportedLookAndFeel, provideErrorFeedback, setCurrentTheme
-
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitialize
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
brightPanelUI
private static final java.lang.String brightPanelUI
- See Also:
- Constant Field Values
-
transparentPanelUI
private static final java.lang.String transparentPanelUI
- See Also:
- Constant Field Values
-
uiClasses
private static final java.lang.Class[] uiClasses
-
-
Constructor Detail
-
FreeColLookAndFeel
public FreeColLookAndFeel() throws FreeColException
Initiates a new FreeCol look and feel.- Throws:
FreeColException
- If the ui directory could not be found.
-
-
Method Detail
-
getDefaults
public javax.swing.UIDefaults getDefaults()
Creates the look and feel specific defaults table.- Overrides:
getDefaults
in classjavax.swing.plaf.metal.MetalLookAndFeel
- Returns:
- The defaults table.
-
install
public static void install(FreeColLookAndFeel fclaf) throws FreeColException
Installs a FreeColLookAndFeel as the default look and feel.- Parameters:
fclaf
- TheFreeColLookAndFeel
to install.- Throws:
FreeColException
- if the installation fails.
-
installFont
public static void installFont(java.awt.Font defaultFont)
Set the default font in all UI elements.- Parameters:
defaultFont
- AFont
to use by default.
-
getDescription
public java.lang.String getDescription()
Gets a one line description of this Look and Feel.- Overrides:
getDescription
in classjavax.swing.plaf.metal.MetalLookAndFeel
- Returns:
- "The default Look and Feel for FreeCol"
-
getName
public java.lang.String getName()
Gets the name of this Look and Feel.- Overrides:
getName
in classjavax.swing.plaf.metal.MetalLookAndFeel
- Returns:
- "FreeCol Look and Feel"
-
-