Package org.adempiere.plaf
Class AdempiereTheme
- java.lang.Object
-
- javax.swing.plaf.metal.MetalTheme
-
- javax.swing.plaf.metal.DefaultMetalTheme
-
- com.jgoodies.looks.plastic.PlasticTheme
-
- org.adempiere.plaf.AdempiereTheme
-
- Direct Known Subclasses:
AdempiereThemeInnova
public class AdempiereTheme extends com.jgoodies.looks.plastic.PlasticThemeA theme based on GTK2-Gilouche and tango project iconset. It has been optimized to work with Suse SLED 10 default desktop settings.- Version:
- $Revision: 1.0 $
- Author:
- vpj-cd, Low Heng Sin - Fixed invisible disactive component issue - Use red instead of green as background for error field
-
-
Field Summary
Fields Modifier and Type Field Description static ColorUIResourceblackBlackstatic FontUIResourcecontrolFontControl fontstatic ColorUIResourceerrorBackground for fields in errorstatic StringFONT_DEFAULTDefault Fontstatic intFONT_SIZEDefault Font Sizestatic ColorUIResourceinactiveBackground for inactive fieldsstatic ColorUIResourceinfoBackground for info fieldsprotected static LoggerlogLoggerstatic ColorUIResourcemandatoryBackground for mandatory fieldsstatic FontUIResourcemenuFontMenu fontstatic StringNAMEstatic ColorUIResourceprimary0Blue 51,51,102static ColorUIResourceprimary1Blue 102, 102, 153static ColorUIResourceprimary2Blue 153, 153, 204static ColorUIResourceprimary3Blue 204, 204, 255protected static Strings_nameTheme Nameprotected static AdempiereThemes_themeActive ThemeColorUIResourcesecondary0Blackstatic ColorUIResourcesecondary1Gray 102, 102, 102static ColorUIResourcesecondary2Gray 153, 153, 153static ColorUIResourcesecondary3BlueGray 214, 224, 234 - backgroundColorUIResourcesecondary4Whitestatic FontUIResourcesmallFontSmall fontstatic FontUIResourcesystemFontSystem fontstatic ColorUIResourcetxt_errorForeground Text Errorstatic ColorUIResourcetxt_okForeground Text OKstatic FontUIResourceuserFontUser fontstatic ColorUIResourcewhiteWhitestatic FontUIResourcewindowFontWindow Title font
-
Constructor Summary
Constructors Constructor Description AdempiereTheme()
-
Method Summary
-
Methods inherited from class com.jgoodies.looks.plastic.PlasticTheme
equals, getFontSet, getMenuForeground, getMenuItemSelectedBackground, getMenuItemSelectedForeground, getSimpleInternalFrameBackground, getSimpleInternalFrameForeground, getSystemTextColor, getTitleTextColor, getTitleTextFont, hashCode
-
Methods inherited from class javax.swing.plaf.metal.MetalTheme
getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getSeparatorBackground, getSeparatorForeground, getTextHighlightColor, getUserTextColor, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
-
-
-
-
Field Detail
-
s_name
protected static String s_name
Theme Name
-
NAME
public static final String NAME
-
log
protected static Logger log
Logger
-
s_theme
protected static AdempiereTheme s_theme
Active Theme
-
primary0
public static ColorUIResource primary0
Blue 51,51,102
-
primary1
public static ColorUIResource primary1
Blue 102, 102, 153
-
primary2
public static ColorUIResource primary2
Blue 153, 153, 204
-
primary3
public static ColorUIResource primary3
Blue 204, 204, 255
-
secondary0
public final ColorUIResource secondary0
Black
-
secondary1
public static ColorUIResource secondary1
Gray 102, 102, 102
-
secondary2
public static ColorUIResource secondary2
Gray 153, 153, 153
-
secondary3
public static ColorUIResource secondary3
BlueGray 214, 224, 234 - background
-
secondary4
public final ColorUIResource secondary4
White
-
black
public static ColorUIResource black
Black
-
white
public static ColorUIResource white
White
-
mandatory
public static ColorUIResource mandatory
Background for mandatory fields
-
error
public static ColorUIResource error
Background for fields in error
-
inactive
public static ColorUIResource inactive
Background for inactive fields
-
info
public static ColorUIResource info
Background for info fields
-
txt_ok
public static ColorUIResource txt_ok
Foreground Text OK
-
txt_error
public static ColorUIResource txt_error
Foreground Text Error
-
controlFont
public static FontUIResource controlFont
Control font
-
systemFont
public static FontUIResource systemFont
System font
-
userFont
public static FontUIResource userFont
User font
-
smallFont
public static FontUIResource smallFont
Small font
-
windowFont
public static FontUIResource windowFont
Window Title font
-
menuFont
public static FontUIResource menuFont
Menu font
-
FONT_DEFAULT
public static final String FONT_DEFAULT
Default Font- See Also:
- Constant Field Values
-
FONT_SIZE
public static int FONT_SIZE
Default Font Size
-
-
Method Detail
-
getName
public String getName()
Return Theme Name- Overrides:
getNamein classDefaultMetalTheme- Returns:
- Theme Name
-
toString
public String toString()
String Representation
-
getPrimary1
public ColorUIResource getPrimary1()
Get Primary 1 (blue in default Metal Theme)- Overrides:
getPrimary1in classDefaultMetalTheme- Returns:
- color
-
getPrimary2
public ColorUIResource getPrimary2()
- Overrides:
getPrimary2in classDefaultMetalTheme
-
getPrimary3
public ColorUIResource getPrimary3()
- Overrides:
getPrimary3in classDefaultMetalTheme
-
getSecondary0
public ColorUIResource getSecondary0()
Get Secondary 1 (gray in default Metal Theme)- Returns:
- color
-
getSecondary1
public ColorUIResource getSecondary1()
- Overrides:
getSecondary1in classDefaultMetalTheme
-
getSecondary2
public ColorUIResource getSecondary2()
- Overrides:
getSecondary2in classDefaultMetalTheme
-
getSecondary3
public ColorUIResource getSecondary3()
- Overrides:
getSecondary3in classDefaultMetalTheme
-
getSecondary4
public ColorUIResource getSecondary4()
-
getBlack
public ColorUIResource getBlack()
- Overrides:
getBlackin classcom.jgoodies.looks.plastic.PlasticTheme
-
getWhite
public ColorUIResource getWhite()
- Overrides:
getWhitein classcom.jgoodies.looks.plastic.PlasticTheme
-
_getControlTextFont
protected static FontUIResource _getControlTextFont()
Control Font (plain)- Returns:
- font
-
getControlTextFont
public FontUIResource getControlTextFont()
- Overrides:
getControlTextFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
_getSystemTextFont
protected static FontUIResource _getSystemTextFont()
System Font- Returns:
- font
-
getSystemTextFont
public FontUIResource getSystemTextFont()
- Overrides:
getSystemTextFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
_getUserTextFont
protected static FontUIResource _getUserTextFont()
User Font- Returns:
- font
-
getUserTextFont
public FontUIResource getUserTextFont()
- Overrides:
getUserTextFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
_getMenuTextFont
protected static FontUIResource _getMenuTextFont()
Menu- Returns:
- font
-
getMenuTextFont
public FontUIResource getMenuTextFont()
- Overrides:
getMenuTextFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
_getWindowTitleFont
protected static FontUIResource _getWindowTitleFont()
Window Title- Returns:
- font
-
getWindowTitleFont
public FontUIResource getWindowTitleFont()
- Overrides:
getWindowTitleFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
_getSubTextFont
protected static FontUIResource _getSubTextFont()
Sub Text- Returns:
- font
-
getSubTextFont
public FontUIResource getSubTextFont()
- Overrides:
getSubTextFontin classcom.jgoodies.looks.plastic.PlasticTheme
-
getColorAsString
public static String getColorAsString(Color c)
Parses Color into String representation. Required as SystemColors and Alpha Colors have different formats- Parameters:
c- Color- Returns:
- [r=102,g=102,b=153,a=255]
- See Also:
#parseColor
-
setDefault
public void setDefault()
Set Default Colors
-
getFocusColor
public ColorUIResource getFocusColor()
- Overrides:
getFocusColorin classMetalTheme
-
getPrimaryControlShadow
public ColorUIResource getPrimaryControlShadow()
- Overrides:
getPrimaryControlShadowin classMetalTheme
-
getMenuSelectedBackground
public ColorUIResource getMenuSelectedBackground()
- Overrides:
getMenuSelectedBackgroundin classMetalTheme
-
getMenuSelectedForeground
public ColorUIResource getMenuSelectedForeground()
- Overrides:
getMenuSelectedForegroundin classMetalTheme
-
getMenuItemBackground
public ColorUIResource getMenuItemBackground()
- Overrides:
getMenuItemBackgroundin classcom.jgoodies.looks.plastic.PlasticTheme
-
getToggleButtonCheckColor
public ColorUIResource getToggleButtonCheckColor()
- Overrides:
getToggleButtonCheckColorin classcom.jgoodies.looks.plastic.PlasticTheme
-
addCustomEntriesToTable
public void addCustomEntriesToTable(UIDefaults table)
- Overrides:
addCustomEntriesToTablein classMetalTheme
-
-