Compiere Looks 1.2.1

org.compiere.plaf
Class CompierePLAF

java.lang.Object
  |
  +--org.compiere.plaf.CompierePLAF

public final class CompierePLAF
extends Object

Variable Pluggable Look And Feel. Provides an easy access to the required currently active PLAF information

Version:
$Id: CompierePLAF.java,v 1.30 2002/09/01 22:34:37 jjanke Exp $
Author:
Jorg Janke

Field Summary
static String BACKGROUND
          Key of Client Property to paint in CompiereColor
static String BACKGROUND_FILL
          Key of Client Property for Rectangle Items - if exists, the standard background is used
static String DEFAULT_PLAF
          Default PLAF Name
static String DEFAULT_THEME
          Default Theme Name
static String TABLEVEL
          Key of Client Property for CPanel
static String VERSION
          Version tag
 
Constructor Summary
CompierePLAF()
           
 
Method Summary
static CButton getCancelButton()
          Create Cancel Button
static Color getFieldBackground_Error()
          Return Error field background (CompiereTheme)
static Color getFieldBackground_Inactive()
          Return Inactive field background color (CompiereTheme)
static Color getFieldBackground_Mandatory()
          Return Mandatory field background color (CompiereTheme)
static Color getFieldBackground_Normal()
          Return Normal field background color "text".
static Font getFont_Field()
          Get Field Font
static Font getFont_Header()
          Get Header Font (window/label font)
static Font getFont_Label()
          Get Label Font
static Font getFont_Small()
          Get Small (report) Font
static Color getFormBackground()
          Return form background color "control".
static Color getInfoBackground()
          Info Background Color "info" Windows = info (light yellow)
static CButton getOKButton()
          Create OK Button
static ValueNamePair[] getPLAFs()
          Get available Look And Feels
static Color getPrimary1()
           
static Color getPrimary2()
           
static Color getPrimary3()
           
static Color getSecondary1()
           
static Color getSecondary2()
           
static Color getSecondary3()
           
static Color getTextColor_Issue()
          Issue Text Foreground Color (Theme)
static Color getTextColor_Label()
          Label Text foreground Color "controlText" Windows = black
static Color getTextColor_Normal()
          Normal field text foreground color "textText" Windows = black
static Color getTextColor_OK()
          OK Text Foreground Color (Theme)
static ValueNamePair[] getThemes()
          Get the list of available Metal Themes if the current L&F is a Metal L&F
static boolean isActive()
          Is CompiereL&F the active L&F
static void main(String[] args)
          Start Class With Compiere Look or Compiere PLAF Editor
static void printPLAFDefaults()
          Print current UIDefaults
static void reset(Window win)
          Reset PLAF Settings
static void setPLAF(ValueNamePair plaf, ValueNamePair theme, Window win)
          Set PLAF and update Ini
static void setPLAF(Window win)
          Set PLAF based on Ini Properties
static void showCenterScreen(Window window)
          Center Window on Screen and show it
static void updateUI(Window win)
          Update UI of this and parent Windows
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Version tag

See Also:
Constant Field Values

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

DEFAULT_PLAF

public static final String DEFAULT_PLAF
Default PLAF Name

See Also:
Constant Field Values

DEFAULT_THEME

public static final String DEFAULT_THEME
Default Theme Name

See Also:
Constant Field Values
Constructor Detail

CompierePLAF

public CompierePLAF()
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 (CompiereTheme)

Returns:
Color

getFieldBackground_Mandatory

public static Color getFieldBackground_Mandatory()
Return Mandatory field background color (CompiereTheme)

Returns:
Color

getFieldBackground_Inactive

public static Color getFieldBackground_Inactive()
Return Inactive field background color (CompiereTheme)

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()

getPrimary2

public static Color getPrimary2()

getPrimary3

public static Color getPrimary3()

getSecondary1

public static Color getSecondary1()

getSecondary2

public static Color getSecondary2()

getSecondary3

public static Color getSecondary3()

getFont_Header

public static Font getFont_Header()
Get Header Font (window/label 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 Themes if the current L&F is a Metal L&F

Returns:
Array of Strings with Names of Metal Themes

setPLAF

public static void setPLAF(Window win)
Set PLAF based on Ini Properties

Parameters:
win - Optional Window

setPLAF

public static void setPLAF(ValueNamePair plaf,
                           ValueNamePair theme,
                           Window win)
Set PLAF and update Ini

Parameters:
plaf - ValueNamePair of the PLAF to be set
theme - Optional Theme name
win - Optional Window

updateUI

public static void updateUI(Window win)
Update UI of this and parent Windows

Parameters:
win - window

reset

public static void reset(Window win)
Reset PLAF Settings

Parameters:
win - Window to be reset

printPLAFDefaults

public static void printPLAFDefaults()
Print current UIDefaults


isActive

public static boolean isActive()
Is CompiereL&F the active L&F

Returns:
true if L&F is Compiere

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

main

public static void main(String[] args)
Start Class With Compiere Look or Compiere PLAF Editor

Parameters:
args - first parameter is class to start, if none start PLAF Editor

Compiere Looks 1.2.1

Copyright (c) 1999-2003 ComPiere, Inc. - Author: Jorg Janke