Package generic.theme

Class GThemeDefaults

java.lang.Object
generic.theme.GThemeDefaults

public class GThemeDefaults extends Object
This class contains many suitable default values for commonly used concepts. See each static class below.

The values in this class can be used where standard colors are desired. For example, where clients used to hard-code black for the font color:

 
 JLabel label = new JLabel():
 label.setColor(Color.BLACK);
 
 
Can instead be programmed to use the system's current theme font color instead:
 
 import generic.theme.GThemeDefaults.Colors;

 ...

 JLabel label = new JLabel():
 label.setColor(Colors.FOREGROUND);
 
 
Note that in the second example, you can use the shorthand version of the values in this class as long as you import them correctly. This means you do not have to use this form:
 
 component.setColor(GThemeDefaults.Colors.FOREGROUND);
 
 
  • Constructor Details

    • GThemeDefaults

      public GThemeDefaults()