Class 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 Detail

      • AdempierePLAF

        public AdempierePLAF()
    • 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 set
        theme - Optional Theme name
        upateIni - 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 feel
        theme - 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