< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTheme.java

Print this page




  60  * @see DefaultMetalTheme
  61  * @see OceanTheme
  62  * @see MetalLookAndFeel#setCurrentTheme
  63  *
  64  * @author Steve Wilson
  65  */
  66 public abstract class MetalTheme {
  67 
  68     // Contants identifying the various Fonts that are Theme can support
  69     static final int CONTROL_TEXT_FONT = 0;
  70     static final int SYSTEM_TEXT_FONT = 1;
  71     static final int USER_TEXT_FONT = 2;
  72     static final int MENU_TEXT_FONT = 3;
  73     static final int WINDOW_TITLE_FONT = 4;
  74     static final int SUB_TEXT_FONT = 5;
  75 
  76     static ColorUIResource white = new ColorUIResource( 255, 255, 255 );
  77     private static ColorUIResource black = new ColorUIResource( 0, 0, 0 );
  78 
  79     /**





  80      * Returns the name of this theme.
  81      *
  82      * @return the name of this theme
  83      */
  84     public abstract String getName();
  85 
  86     /**
  87      * Returns the primary 1 color.
  88      *
  89      * @return the primary 1 color
  90      */
  91     protected abstract ColorUIResource getPrimary1();  // these are blue in Metal Default Theme
  92 
  93     /**
  94      * Returns the primary 2 color.
  95      *
  96      * @return the primary 2 color
  97      */
  98     protected abstract ColorUIResource getPrimary2();
  99 




  60  * @see DefaultMetalTheme
  61  * @see OceanTheme
  62  * @see MetalLookAndFeel#setCurrentTheme
  63  *
  64  * @author Steve Wilson
  65  */
  66 public abstract class MetalTheme {
  67 
  68     // Contants identifying the various Fonts that are Theme can support
  69     static final int CONTROL_TEXT_FONT = 0;
  70     static final int SYSTEM_TEXT_FONT = 1;
  71     static final int USER_TEXT_FONT = 2;
  72     static final int MENU_TEXT_FONT = 3;
  73     static final int WINDOW_TITLE_FONT = 4;
  74     static final int SUB_TEXT_FONT = 5;
  75 
  76     static ColorUIResource white = new ColorUIResource( 255, 255, 255 );
  77     private static ColorUIResource black = new ColorUIResource( 0, 0, 0 );
  78 
  79     /**
  80      * Constructor for subclasses to call.
  81      */
  82     protected MetalTheme() {}
  83 
  84     /**
  85      * Returns the name of this theme.
  86      *
  87      * @return the name of this theme
  88      */
  89     public abstract String getName();
  90 
  91     /**
  92      * Returns the primary 1 color.
  93      *
  94      * @return the primary 1 color
  95      */
  96     protected abstract ColorUIResource getPrimary1();  // these are blue in Metal Default Theme
  97 
  98     /**
  99      * Returns the primary 2 color.
 100      *
 101      * @return the primary 2 color
 102      */
 103     protected abstract ColorUIResource getPrimary2();
 104 


< prev index next >