Package org.compiere.swing
Class ThemeUtils
- java.lang.Object
-
- org.compiere.swing.ThemeUtils
-
public final class ThemeUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
P_Black
static String
P_Control
static String
P_Error
static String
P_Inactive
static String
P_Info
static String
P_Mandatory
static String
P_Menu
static String
P_Primary1
static String
P_Primary2
static String
P_Primary3
static String
P_Secondary1
static String
P_Secondary2
static String
P_Secondary3
static String
P_Small
static String
P_System
static String
P_Txt_Error
static String
P_Txt_OK
static String
P_User
static String
P_White
static String
P_Window
-
Constructor Summary
Constructors Constructor Description ThemeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getColorAsString(Color c)
Parses Color into String representation.static void
load(Properties properties, ExtendedTheme theme)
Load Properties from propertiesstatic ColorUIResource
parseColor(String information, ColorUIResource stdColor)
Parse Color.static FontUIResource
parseFont(String information, FontUIResource stdFont)
Parse Fontstatic void
save(Properties properties, MetalTheme theme)
Save information in Properties
-
-
-
Field Detail
-
P_Primary1
public static final String P_Primary1
- See Also:
- Constant Field Values
-
P_Primary2
public static final String P_Primary2
- See Also:
- Constant Field Values
-
P_Primary3
public static final String P_Primary3
- See Also:
- Constant Field Values
-
P_Secondary1
public static final String P_Secondary1
- See Also:
- Constant Field Values
-
P_Secondary2
public static final String P_Secondary2
- See Also:
- Constant Field Values
-
P_Secondary3
public static final String P_Secondary3
- See Also:
- Constant Field Values
-
P_Black
public static final String P_Black
- See Also:
- Constant Field Values
-
P_White
public static final String P_White
- See Also:
- Constant Field Values
-
P_Error
public static final String P_Error
- See Also:
- Constant Field Values
-
P_Info
public static final String P_Info
- See Also:
- Constant Field Values
-
P_Mandatory
public static final String P_Mandatory
- See Also:
- Constant Field Values
-
P_Inactive
public static final String P_Inactive
- See Also:
- Constant Field Values
-
P_Txt_OK
public static final String P_Txt_OK
- See Also:
- Constant Field Values
-
P_Txt_Error
public static final String P_Txt_Error
- See Also:
- Constant Field Values
-
P_Control
public static final String P_Control
- See Also:
- Constant Field Values
-
P_System
public static final String P_System
- See Also:
- Constant Field Values
-
P_User
public static final String P_User
- See Also:
- Constant Field Values
-
P_Small
public static final String P_Small
- See Also:
- Constant Field Values
-
P_Window
public static final String P_Window
- See Also:
- Constant Field Values
-
P_Menu
public static final String P_Menu
- See Also:
- Constant Field Values
-
-
Method Detail
-
getColorAsString
public static String getColorAsString(Color c)
Parses Color into String representation. Required as SystemColors and Alpha Colors have different formats- Parameters:
c
- Color- Returns:
- [r=102,g=102,b=153,a=255]
- See Also:
parseColor(java.lang.String, javax.swing.plaf.ColorUIResource)
-
parseColor
public static ColorUIResource parseColor(String information, ColorUIResource stdColor)
Parse Color.Color - [r=102,g=102,b=153,a=0]
- Parameters:
information
- string information to be parsedstdColor
- color used if info cannot parsed- Returns:
- color
- See Also:
getColorAsString(java.awt.Color)
-
parseFont
public static FontUIResource parseFont(String information, FontUIResource stdFont)
Parse Fontjavax.swing.plaf.FontUIResource[family=dialog.bold,name=Dialog,style=bold,size=12]
- Parameters:
information
- string information to be parsedstdFont
- font used if info cannot be parsed- Returns:
- font
-
save
public static void save(Properties properties, MetalTheme theme)
Save information in Properties
-
load
public static void load(Properties properties, ExtendedTheme theme)
Load Properties from properties
-
-