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 CButtongetCancelButton()Create Cancel Buttonstatic ColorgetFieldBackground_Error()Return Error field backgroundstatic ColorgetFieldBackground_Inactive()Return Inactive field background colorstatic ColorgetFieldBackground_Mandatory()Return Mandatory field background colorstatic ColorgetFieldBackground_Normal()Return Normal field background color "text".static ColorgetFieldBackground_ReadOnly()Return ReadOnly field background colorstatic ColorgetFieldBackground_Selected()Return Selected field background colorstatic FontgetFont_Field()Get Field Fontstatic FontgetFont_Header()Get Header Font (window title font)static FontgetFont_Label()Get Label Fontstatic FontgetFont_Small()Get Small (report) Fontstatic ColorgetFormBackground()Return form background color "control".static ColorgetInfoBackground()Info Background Color "info" Windows = info (light yellow)static CButtongetOKButton()Create OK Buttonstatic ValueNamePair[]getPLAFs()Get available Look And Feelsstatic ColorgetPrimary1()Get Primary1static ColorgetPrimary2()Get Primary2static ColorgetPrimary3()Get Primary3static ColorgetSecondary1()Get Secondary 1static ColorgetSecondary2()Get Secondary 2static ColorgetSecondary3()Get Secondary 3static ColorgetTextColor_Issue()Issue Text Foreground Color (Theme)static ColorgetTextColor_Label()Label Text foreground Color "controlText" Windows = blackstatic ColorgetTextColor_Normal()Normal field text foreground color "textText" Windows = blackstatic ColorgetTextColor_OK()OK Text Foreground Color (Theme)static ValueNamePair[]getThemes()Get the list of available Metal or Plastic Themes.static booleanisActive()Is AdempiereL&F the active L&Fstatic voidmain(String[] args)Start Class With Adempiere Lookstatic voidprintPLAFDefaults()Print current UIDefaultsstatic voidreset()Reset PLAF Settingsstatic voidsetCurrentMetalTheme(MetalLookAndFeel laf, MetalTheme theme)Invoke the correct method to set current metal based theme.static voidsetPLAF()Set PLAF based on Ini Propertiesstatic voidsetPLAF(ValueNamePair plaf, ValueNamePair theme, boolean updateIni)Set PLAF and update Inistatic voidshowCenterScreen(Window window)Center Window on Screen and show itstatic voidupdateUI(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
-
-