home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / java / awt / SystemColor.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  3.8 KB  |  83 lines

  1. package java.awt;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public final class SystemColor extends Color implements Serializable {
  6.    public static final int DESKTOP = 0;
  7.    public static final int ACTIVE_CAPTION = 1;
  8.    public static final int ACTIVE_CAPTION_TEXT = 2;
  9.    public static final int ACTIVE_CAPTION_BORDER = 3;
  10.    public static final int INACTIVE_CAPTION = 4;
  11.    public static final int INACTIVE_CAPTION_TEXT = 5;
  12.    public static final int INACTIVE_CAPTION_BORDER = 6;
  13.    public static final int WINDOW = 7;
  14.    public static final int WINDOW_BORDER = 8;
  15.    public static final int WINDOW_TEXT = 9;
  16.    public static final int MENU = 10;
  17.    public static final int MENU_TEXT = 11;
  18.    public static final int TEXT = 12;
  19.    public static final int TEXT_TEXT = 13;
  20.    public static final int TEXT_HIGHLIGHT = 14;
  21.    public static final int TEXT_HIGHLIGHT_TEXT = 15;
  22.    public static final int TEXT_INACTIVE_TEXT = 16;
  23.    public static final int CONTROL = 17;
  24.    public static final int CONTROL_TEXT = 18;
  25.    public static final int CONTROL_HIGHLIGHT = 19;
  26.    public static final int CONTROL_LT_HIGHLIGHT = 20;
  27.    public static final int CONTROL_SHADOW = 21;
  28.    public static final int CONTROL_DK_SHADOW = 22;
  29.    public static final int SCROLLBAR = 23;
  30.    public static final int INFO = 24;
  31.    public static final int INFO_TEXT = 25;
  32.    public static final int NUM_COLORS = 26;
  33.    public static final SystemColor desktop = new SystemColor((byte)0);
  34.    public static final SystemColor activeCaption = new SystemColor((byte)1);
  35.    public static final SystemColor activeCaptionText = new SystemColor((byte)2);
  36.    public static final SystemColor activeCaptionBorder = new SystemColor((byte)3);
  37.    public static final SystemColor inactiveCaption = new SystemColor((byte)4);
  38.    public static final SystemColor inactiveCaptionText = new SystemColor((byte)5);
  39.    public static final SystemColor inactiveCaptionBorder = new SystemColor((byte)6);
  40.    public static final SystemColor window = new SystemColor((byte)7);
  41.    public static final SystemColor windowBorder = new SystemColor((byte)8);
  42.    public static final SystemColor windowText = new SystemColor((byte)9);
  43.    public static final SystemColor menu = new SystemColor((byte)10);
  44.    public static final SystemColor menuText = new SystemColor((byte)11);
  45.    public static final SystemColor text = new SystemColor((byte)12);
  46.    public static final SystemColor textText = new SystemColor((byte)13);
  47.    public static final SystemColor textHighlight = new SystemColor((byte)14);
  48.    public static final SystemColor textHighlightText = new SystemColor((byte)15);
  49.    public static final SystemColor textInactiveText = new SystemColor((byte)16);
  50.    public static final SystemColor control = new SystemColor((byte)17);
  51.    public static final SystemColor controlText = new SystemColor((byte)18);
  52.    public static final SystemColor controlHighlight = new SystemColor((byte)19);
  53.    public static final SystemColor controlLtHighlight = new SystemColor((byte)20);
  54.    public static final SystemColor controlShadow = new SystemColor((byte)21);
  55.    public static final SystemColor controlDkShadow = new SystemColor((byte)22);
  56.    public static final SystemColor scrollbar = new SystemColor((byte)23);
  57.    public static final SystemColor info = new SystemColor((byte)24);
  58.    public static final SystemColor infoText = new SystemColor((byte)25);
  59.    private static int[] systemColors = new int[]{-16753572, -16777088, -1, -4144960, -8355712, -4144960, -4144960, -1, -16777216, -16777216, -4144960, -16777216, -4144960, -16777216, -16777088, -1, -8355712, -4144960, -16777216, -1, -2039584, -8355712, -16777216, -2039584, -2039808, -16777216};
  60.    private static final long serialVersionUID = 4503142729533789064L;
  61.  
  62.    private static void updateSystemColors() {
  63.       Toolkit.getDefaultToolkit().loadSystemColors(systemColors);
  64.    }
  65.  
  66.    private SystemColor(byte var1) {
  67.       super(0, 0, 0);
  68.       super.value = var1;
  69.    }
  70.  
  71.    public int getRGB() {
  72.       return systemColors[super.value];
  73.    }
  74.  
  75.    public String toString() {
  76.       return this.getClass().getName() + "[i=" + super.value + "]";
  77.    }
  78.  
  79.    static {
  80.       updateSystemColors();
  81.    }
  82. }
  83.