Package org.compiere.plaf
Class CompiereTheme
- java.lang.Object
-
- javax.swing.plaf.metal.MetalTheme
-
- org.compiere.plaf.CompiereTheme
-
- Direct Known Subclasses:
CompiereThemeBlueMetal
,CompiereThemeIce
public class CompiereTheme extends MetalTheme
Compiere User definable Theme (if used in Metal L&F). In other Environments, it provides UI extensions (e.g. Error Color)- Version:
- $Id: AdempiereTheme.java,v 1.4 2006/07/30 00:52:23 jjanke Exp $
- Author:
- Jorg Janke
-
-
Field Summary
Fields Modifier and Type Field Description protected static ColorUIResource
black
Blackprotected static FontUIResource
controlFont
Control fontprotected static ColorUIResource
error
Background for fields in errorstatic String
FONT_DEFAULT
Default Fontstatic int
FONT_SIZE
Default Font Sizeprotected static ColorUIResource
inactive
Background for inactive fieldsprotected static ColorUIResource
info
Background for info fieldsprotected static Logger
log
Loggerprotected static ColorUIResource
mandatory
Background for mandatory fieldsprotected static FontUIResource
menuFont
Menu fontprotected static ColorUIResource
primary0
Blue 51,51,102protected static ColorUIResource
primary1
Blue 102, 102, 153protected static ColorUIResource
primary2
Blue 153, 153, 204protected static ColorUIResource
primary3
Blue 204, 204, 255protected static String
s_name
Theme Nameprotected static CompiereTheme
s_theme
Active Themeprotected ColorUIResource
secondary0
Blackprotected static ColorUIResource
secondary1
Gray 102, 102, 102protected static ColorUIResource
secondary2
Gray 153, 153, 153protected static ColorUIResource
secondary3
BlueGray 214, 224, 234 - backgroundprotected ColorUIResource
secondary4
Whiteprotected static FontUIResource
smallFont
Small fontprotected static FontUIResource
systemFont
System fontprotected static ColorUIResource
txt_error
Foreground Text Errorprotected static ColorUIResource
txt_ok
Foreground Text OKprotected static FontUIResource
userFont
User fontprotected static ColorUIResource
white
Whiteprotected static FontUIResource
windowFont
Window Title font
-
Constructor Summary
Constructors Constructor Description CompiereTheme()
Constructor - nop
-
Method Summary
-
Methods inherited from class javax.swing.plaf.metal.MetalTheme
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
-
-
-
-
Field Detail
-
s_name
protected static String s_name
Theme Name
-
log
protected static Logger log
Logger
-
s_theme
protected static CompiereTheme s_theme
Active Theme
-
primary0
protected static ColorUIResource primary0
Blue 51,51,102
-
primary1
protected static ColorUIResource primary1
Blue 102, 102, 153
-
primary2
protected static ColorUIResource primary2
Blue 153, 153, 204
-
primary3
protected static ColorUIResource primary3
Blue 204, 204, 255
-
secondary0
protected final ColorUIResource secondary0
Black
-
secondary1
protected static ColorUIResource secondary1
Gray 102, 102, 102
-
secondary2
protected static ColorUIResource secondary2
Gray 153, 153, 153
-
secondary3
protected static ColorUIResource secondary3
BlueGray 214, 224, 234 - background
-
secondary4
protected final ColorUIResource secondary4
White
-
black
protected static ColorUIResource black
Black
-
white
protected static ColorUIResource white
White
-
mandatory
protected static ColorUIResource mandatory
Background for mandatory fields
-
error
protected static ColorUIResource error
Background for fields in error
-
inactive
protected static ColorUIResource inactive
Background for inactive fields
-
info
protected static ColorUIResource info
Background for info fields
-
txt_ok
protected static ColorUIResource txt_ok
Foreground Text OK
-
txt_error
protected static ColorUIResource txt_error
Foreground Text Error
-
controlFont
protected static FontUIResource controlFont
Control font
-
systemFont
protected static FontUIResource systemFont
System font
-
userFont
protected static FontUIResource userFont
User font
-
smallFont
protected static FontUIResource smallFont
Small font
-
windowFont
protected static FontUIResource windowFont
Window Title font
-
menuFont
protected static FontUIResource menuFont
Menu font
-
FONT_DEFAULT
public static final String FONT_DEFAULT
Default Font- See Also:
- Constant Field Values
-
FONT_SIZE
public static final int FONT_SIZE
Default Font Size- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Return Theme Name- Specified by:
getName
in classMetalTheme
- Returns:
- Theme Name
-
toString
public String toString()
String Representation
-
setDefault
protected void setDefault()
Set Default Colors
-
getPrimary1
public ColorUIResource getPrimary1()
Get Primary 1 (blue in default Metal Theme)- Specified by:
getPrimary1
in classMetalTheme
- Returns:
- color
-
getPrimary2
public ColorUIResource getPrimary2()
- Specified by:
getPrimary2
in classMetalTheme
-
getPrimary3
public ColorUIResource getPrimary3()
- Specified by:
getPrimary3
in classMetalTheme
-
getSecondary0
public ColorUIResource getSecondary0()
Get Seconary 1 (gray in default Metal Theme)- Returns:
- color
-
getSecondary1
public ColorUIResource getSecondary1()
- Specified by:
getSecondary1
in classMetalTheme
-
getSecondary2
public ColorUIResource getSecondary2()
- Specified by:
getSecondary2
in classMetalTheme
-
getSecondary3
public ColorUIResource getSecondary3()
- Specified by:
getSecondary3
in classMetalTheme
-
getSecondary4
public ColorUIResource getSecondary4()
-
getBlack
public ColorUIResource getBlack()
- Overrides:
getBlack
in classMetalTheme
-
getWhite
public ColorUIResource getWhite()
- Overrides:
getWhite
in classMetalTheme
-
_getControlTextFont
protected static FontUIResource _getControlTextFont()
Control Font (plain)- Returns:
- font
-
getControlTextFont
public FontUIResource getControlTextFont()
- Specified by:
getControlTextFont
in classMetalTheme
-
_getSystemTextFont
protected static FontUIResource _getSystemTextFont()
System Font- Returns:
- font
-
getSystemTextFont
public FontUIResource getSystemTextFont()
- Specified by:
getSystemTextFont
in classMetalTheme
-
_getUserTextFont
protected static FontUIResource _getUserTextFont()
User Font- Returns:
- font
-
getUserTextFont
public FontUIResource getUserTextFont()
- Specified by:
getUserTextFont
in classMetalTheme
-
_getMenuTextFont
protected static FontUIResource _getMenuTextFont()
Menu- Returns:
- font
-
getMenuTextFont
public FontUIResource getMenuTextFont()
- Specified by:
getMenuTextFont
in classMetalTheme
-
_getWindowTitleFont
protected static FontUIResource _getWindowTitleFont()
Window Title- Returns:
- font
-
getWindowTitleFont
public FontUIResource getWindowTitleFont()
- Specified by:
getWindowTitleFont
in classMetalTheme
-
_getSubTextFont
protected static FontUIResource _getSubTextFont()
Sub Text- Returns:
- font
-
getSubTextFont
public FontUIResource getSubTextFont()
- Specified by:
getSubTextFont
in classMetalTheme
-
addCustomEntriesToTable
public void addCustomEntriesToTable(UIDefaults table)
- Overrides:
addCustomEntriesToTable
in classMetalTheme
-
-