Package org.adempiere.plaf
Class AdempierePLAF
- java.lang.Object
-
- org.adempiere.plaf.AdempierePLAF
-
public final class AdempierePLAF extends Object
Variable Pluggable Look And Feel. Provides an easy access to the required currently active PLAF information- Version:
- $Id: AdempierePLAF.java,v 1.3 2006/07/30 00:52:23 jjanke Exp $, 2006-11-27
- Author:
- Jorg Janke, Low Heng Sin
-
-
Constructor Summary
Constructors Constructor Description AdempierePLAF()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CButton
getCancelButton()
Create Cancel Buttonstatic Color
getFieldBackground_Error()
Return Error field backgroundstatic Color
getFieldBackground_Inactive()
Return Inactive field background colorstatic Color
getFieldBackground_Mandatory()
Return Mandatory field background colorstatic Color
getFieldBackground_Normal()
Return Normal field background color "text".static Color
getFieldBackground_ReadOnly()
Return ReadOnly field background colorstatic Color
getFieldBackground_Selected()
Return Selected field background colorstatic Font
getFont_Field()
Get Field Fontstatic Font
getFont_Header()
Get Header Font (window title font)static Font
getFont_Label()
Get Label Fontstatic Font
getFont_Small()
Get Small (report) Fontstatic Color
getFormBackground()
Return form background color "control".static Color
getInfoBackground()
Info Background Color "info" Windows = info (light yellow)static CButton
getOKButton()
Create OK Buttonstatic ValueNamePair[]
getPLAFs()
Get available Look And Feelsstatic Color
getPrimary1()
Get Primary1static Color
getPrimary2()
Get Primary2static Color
getPrimary3()
Get Primary3static Color
getSecondary1()
Get Secondary 1static Color
getSecondary2()
Get Secondary 2static Color
getSecondary3()
Get Secondary 3static Color
getTextColor_Issue()
Issue Text Foreground Color (Theme)static Color
getTextColor_Label()
Label Text foreground Color "controlText" Windows = blackstatic Color
getTextColor_Normal()
Normal field text foreground color "textText" Windows = blackstatic Color
getTextColor_OK()
OK Text Foreground Color (Theme)static ValueNamePair[]
getThemes()
Get the list of available Metal or Plastic Themes.static boolean
isActive()
Is AdempiereL&F the active L&Fstatic void
main(String[] args)
Start Class With Adempiere Lookstatic void
printPLAFDefaults()
Print current UIDefaultsstatic void
reset()
Reset PLAF Settingsstatic void
setCurrentMetalTheme(MetalLookAndFeel laf, MetalTheme theme)
Invoke the correct method to set current metal based theme.static void
setPLAF()
Set PLAF based on Ini Propertiesstatic void
setPLAF(ValueNamePair plaf, ValueNamePair theme, boolean updateIni)
Set PLAF and update Inistatic void
showCenterScreen(Window window)
Center Window on Screen and show itstatic void
updateUI(Window win)
Update UI of this and parent Windows
-
-
-
Method Detail
-
getFieldBackground_Normal
public static Color getFieldBackground_Normal()
Return Normal field background color "text". Windows = white- Returns:
- Color
-
getFieldBackground_Error
public static Color getFieldBackground_Error()
Return Error field background- Returns:
- Color
-
getFieldBackground_Mandatory
public static Color getFieldBackground_Mandatory()
Return Mandatory field background color- Returns:
- Color
-
getFieldBackground_Inactive
public static Color getFieldBackground_Inactive()
Return Inactive field background color- Returns:
- Color
-
getFieldBackground_Selected
public static Color getFieldBackground_Selected()
Return Selected field background color- Returns:
- Color
-
getFieldBackground_ReadOnly
public static Color getFieldBackground_ReadOnly()
Return ReadOnly field background color- Returns:
- Color
-
getFormBackground
public static Color getFormBackground()
Return form background color "control". Windows = lightGray- Returns:
- Color
-
getInfoBackground
public static Color getInfoBackground()
Info Background Color "info" Windows = info (light yellow)- Returns:
- Color
-
getTextColor_Normal
public static Color getTextColor_Normal()
Normal field text foreground color "textText" Windows = black- Returns:
- Color
-
getTextColor_OK
public static Color getTextColor_OK()
OK Text Foreground Color (Theme)- Returns:
- Color
-
getTextColor_Issue
public static Color getTextColor_Issue()
Issue Text Foreground Color (Theme)- Returns:
- Color
-
getTextColor_Label
public static Color getTextColor_Label()
Label Text foreground Color "controlText" Windows = black- Returns:
- Color
-
getPrimary1
public static Color getPrimary1()
Get Primary1- Returns:
- primary 1
-
getPrimary2
public static Color getPrimary2()
Get Primary2- Returns:
- primary 2
-
getPrimary3
public static Color getPrimary3()
Get Primary3- Returns:
- primary 3
-
getSecondary1
public static Color getSecondary1()
Get Secondary 1- Returns:
- secondary 1
-
getSecondary2
public static Color getSecondary2()
Get Secondary 2- Returns:
- secondary 2
-
getSecondary3
public static Color getSecondary3()
Get Secondary 3- Returns:
- secondary 3
-
getFont_Header
public static Font getFont_Header()
Get Header Font (window title font)- Returns:
- font
-
getFont_Field
public static Font getFont_Field()
Get Field Font- Returns:
- font
-
getFont_Label
public static Font getFont_Label()
Get Label Font- Returns:
- font
-
getFont_Small
public static Font getFont_Small()
Get Small (report) Font- Returns:
- font
-
getPLAFs
public static ValueNamePair[] getPLAFs()
Get available Look And Feels- Returns:
- Array of ValueNamePair with name and class of Look and Feel
-
getThemes
public static ValueNamePair[] getThemes()
Get the list of available Metal or Plastic Themes.- Returns:
- Array of Strings with Names of Metal Themes
-
setPLAF
public static void setPLAF()
Set PLAF based on Ini Properties
-
setPLAF
public static void setPLAF(ValueNamePair plaf, ValueNamePair theme, boolean updateIni)
Set PLAF and update Ini- Parameters:
plaf
- ValueNamePair of the PLAF to be settheme
- Optional Theme nameupateIni
- Update setting to INI
-
updateUI
public static void updateUI(Window win)
Update UI of this and parent Windows- Parameters:
win
- window
-
reset
public static void reset()
Reset PLAF Settings
-
printPLAFDefaults
public static void printPLAFDefaults()
Print current UIDefaults
-
isActive
public static boolean isActive()
Is AdempiereL&F the active L&F- Returns:
- true if L&F is Adempiere
-
getOKButton
public static CButton getOKButton()
Create OK Button- Returns:
- OK button
-
getCancelButton
public static CButton getCancelButton()
Create Cancel Button- Returns:
- Cancel button
-
showCenterScreen
public static void showCenterScreen(Window window)
Center Window on Screen and show it- Parameters:
window
- window
-
setCurrentMetalTheme
public static void setCurrentMetalTheme(MetalLookAndFeel laf, MetalTheme theme)
Invoke the correct method to set current metal based theme. Supported look and feel are Metal, Plastic and Compiere.- Parameters:
laf
- Metal based look and feeltheme
- Metal based theme
-
main
public static void main(String[] args)
Start Class With Adempiere Look- Parameters:
args
- first parameter is class to start, if none start PLAF Editor
-
-