Package org.compiere.plaf
Class CompiereLookAndFeel
- java.lang.Object
-
- javax.swing.LookAndFeel
-
- javax.swing.plaf.basic.BasicLookAndFeel
-
- javax.swing.plaf.metal.MetalLookAndFeel
-
- org.compiere.plaf.CompiereLookAndFeel
-
- All Implemented Interfaces:
Serializable
public class CompiereLookAndFeel extends MetalLookAndFeel
Compiere Look & Feel. We wanted a nice UI not the battleship gray based stuff. I guess a matter of taste.: UIManager.setLookAndFeel(new com.adempiere.plaf.AdempiereLookAndFeel()); // or UIManager.setLookAndFeel("com.adempiere.plaf.AdempiereLookAndFeel");
- Version:
- $Id: AdempiereLookAndFeel.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
BACKGROUND
Key of Client Property to paint in CompiereColorstatic String
BACKGROUND_FILL
Key of Client Property for Rectangle Items - if exists, the standard background is usedstatic String
NAME
The nameprotected static boolean
ROUND
Paint Round Cornersstatic String
TABLEVEL
Key of Client Property for CPanelstatic String
VERSION
Version tag
-
Constructor Summary
Constructors Constructor Description CompiereLookAndFeel()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createDefaultTheme()
Create Default Themesstatic CompiereTheme
getCompiereTheme()
Get Compiere Themestatic MetalTheme
getCurrentTheme()
Get Current ThemeUIDefaults
getDefaults()
Get/Create DefaultsString
getDescription()
The DescriptionString
getID()
The IDString
getName()
The Nameprotected void
initClassDefaults(UIDefaults table)
Creates the mapping from UI class IDs toComponentUI
classes, putting the ID-ComponentUI
pairs in the passed-in defaults table.protected void
initComponentDefaults(UIDefaults table)
For overwriting Component defaultsprotected void
initSystemColorDefaults(UIDefaults table)
For overwriting Component defaultsvoid
provideErrorFeedback(Component component)
Error Feedback.static void
setCurrentTheme(MetalTheme theme)
Set Current Theme-
Methods inherited from class javax.swing.plaf.metal.MetalLookAndFeel
getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getControlTextFont, getDesktopColor, getDisabledIcon, getDisabledSelectedIcon, getFocusColor, getHighlightedTextColor, 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, isNativeLookAndFeel, isSupportedLookAndFeel
-
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initialize, loadSystemColors, playSound, uninitialize
-
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
-
-
-
-
Field Detail
-
NAME
public static final String NAME
The name- See Also:
- Constant Field Values
-
ROUND
protected static boolean ROUND
Paint Round Corners
-
BACKGROUND
public static final String BACKGROUND
Key of Client Property to paint in CompiereColor- See Also:
- Constant Field Values
-
BACKGROUND_FILL
public static final String BACKGROUND_FILL
Key of Client Property for Rectangle Items - if exists, the standard background is used- See Also:
- Constant Field Values
-
TABLEVEL
public static final String TABLEVEL
Key of Client Property for CPanel- See Also:
- Constant Field Values
-
VERSION
public static final String VERSION
Version tag- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
The Name- Overrides:
getName
in classMetalLookAndFeel
- Returns:
- Name
-
getID
public String getID()
The ID- Overrides:
getID
in classMetalLookAndFeel
- Returns:
- Name
-
getDescription
public String getDescription()
The Description- Overrides:
getDescription
in classMetalLookAndFeel
- Returns:
- description
-
getDefaults
public UIDefaults getDefaults()
Get/Create Defaults- Overrides:
getDefaults
in classMetalLookAndFeel
- Returns:
- UI Defaults
-
initClassDefaults
protected void initClassDefaults(UIDefaults table)
Creates the mapping from UI class IDs toComponentUI
classes, putting the ID-ComponentUI
pairs in the passed-in defaults table. EachJComponent
class specifies its own UI class ID string.- Overrides:
initClassDefaults
in classMetalLookAndFeel
- Parameters:
table
- UI Defaults
-
initSystemColorDefaults
protected void initSystemColorDefaults(UIDefaults table)
For overwriting Component defaults- Overrides:
initSystemColorDefaults
in classMetalLookAndFeel
- Parameters:
table
-
-
initComponentDefaults
protected void initComponentDefaults(UIDefaults table)
For overwriting Component defaults- Overrides:
initComponentDefaults
in classMetalLookAndFeel
- Parameters:
table
-
-
createDefaultTheme
protected void createDefaultTheme()
Create Default Themes- Overrides:
createDefaultTheme
in classMetalLookAndFeel
-
setCurrentTheme
public static void setCurrentTheme(MetalTheme theme)
Set Current Theme- Parameters:
theme
- metal theme
-
getCurrentTheme
public static MetalTheme getCurrentTheme()
Get Current Theme- Returns:
- Metal Theme
-
getCompiereTheme
public static CompiereTheme getCompiereTheme()
Get Compiere Theme- Returns:
- Metal Theme
-
provideErrorFeedback
public void provideErrorFeedback(Component component)
Error Feedback.Invoked when the user attempts an invalid operation, such as pasting into an uneditable
JTextField
that has focus.If the user has enabled visual error indication on the desktop, this method will flash the caption bar of the active window. The user can also set the property awt.visualbell=true to achieve the same results.
- Overrides:
provideErrorFeedback
in classMetalLookAndFeel
- Parameters:
component
- Component the error occured in, may be null indicating the error condition is not directly associated with aComponent
.
-
-