home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / plaf / metal / MetalTheme.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  3.5 KB  |  184 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.UIDefaults;
  4. import com.sun.java.swing.plaf.ColorUIResource;
  5. import com.sun.java.swing.plaf.FontUIResource;
  6.  
  7. public abstract class MetalTheme {
  8.    private static ColorUIResource white = new ColorUIResource(255, 255, 255);
  9.    private static ColorUIResource black = new ColorUIResource(0, 0, 0);
  10.  
  11.    public abstract String getName();
  12.  
  13.    protected abstract ColorUIResource getPrimary1();
  14.  
  15.    protected abstract ColorUIResource getPrimary2();
  16.  
  17.    protected abstract ColorUIResource getPrimary3();
  18.  
  19.    protected abstract ColorUIResource getSecondary1();
  20.  
  21.    protected abstract ColorUIResource getSecondary2();
  22.  
  23.    protected abstract ColorUIResource getSecondary3();
  24.  
  25.    public abstract FontUIResource getControlTextFont();
  26.  
  27.    public abstract FontUIResource getSystemTextFont();
  28.  
  29.    public abstract FontUIResource getUserTextFont();
  30.  
  31.    public abstract FontUIResource getMenuTextFont();
  32.  
  33.    public abstract FontUIResource getEmphasisTextFont();
  34.  
  35.    public abstract FontUIResource getSubTextFont();
  36.  
  37.    protected ColorUIResource getWhite() {
  38.       return white;
  39.    }
  40.  
  41.    protected ColorUIResource getBlack() {
  42.       return black;
  43.    }
  44.  
  45.    public ColorUIResource getFocusColor() {
  46.       return this.getPrimary2();
  47.    }
  48.  
  49.    public ColorUIResource getDesktopColor() {
  50.       return this.getPrimary2();
  51.    }
  52.  
  53.    public ColorUIResource getControl() {
  54.       return this.getSecondary3();
  55.    }
  56.  
  57.    public ColorUIResource getControlShadow() {
  58.       return this.getSecondary2();
  59.    }
  60.  
  61.    public ColorUIResource getControlDarkShadow() {
  62.       return this.getSecondary1();
  63.    }
  64.  
  65.    public ColorUIResource getControlInfo() {
  66.       return this.getBlack();
  67.    }
  68.  
  69.    public ColorUIResource getControlHighlight() {
  70.       return this.getWhite();
  71.    }
  72.  
  73.    public ColorUIResource getControlDisabled() {
  74.       return this.getSecondary2();
  75.    }
  76.  
  77.    public ColorUIResource getPrimaryControl() {
  78.       return this.getPrimary3();
  79.    }
  80.  
  81.    public ColorUIResource getPrimaryControlShadow() {
  82.       return this.getPrimary2();
  83.    }
  84.  
  85.    public ColorUIResource getPrimaryControlDarkShadow() {
  86.       return this.getPrimary1();
  87.    }
  88.  
  89.    public ColorUIResource getPrimaryControlInfo() {
  90.       return this.getBlack();
  91.    }
  92.  
  93.    public ColorUIResource getPrimaryControlHighlight() {
  94.       return this.getWhite();
  95.    }
  96.  
  97.    public ColorUIResource getSystemTextColor() {
  98.       return this.getPrimary1();
  99.    }
  100.  
  101.    public ColorUIResource getControlTextColor() {
  102.       return this.getControlInfo();
  103.    }
  104.  
  105.    public ColorUIResource getInactiveControlTextColor() {
  106.       return this.getControlDisabled();
  107.    }
  108.  
  109.    public ColorUIResource getInactiveSystemTextColor() {
  110.       return this.getSecondary2();
  111.    }
  112.  
  113.    public ColorUIResource getUserTextColor() {
  114.       return this.getBlack();
  115.    }
  116.  
  117.    public ColorUIResource getTextHighlightColor() {
  118.       return this.getPrimary3();
  119.    }
  120.  
  121.    public ColorUIResource getHighlightedTextColor() {
  122.       return this.getControlTextColor();
  123.    }
  124.  
  125.    public ColorUIResource getWindowBackground() {
  126.       return this.getWhite();
  127.    }
  128.  
  129.    public ColorUIResource getWindowTitleBackground() {
  130.       return this.getPrimary3();
  131.    }
  132.  
  133.    public ColorUIResource getWindowTitleForeground() {
  134.       return this.getBlack();
  135.    }
  136.  
  137.    public ColorUIResource getWindowTitleInactiveBackground() {
  138.       return this.getSecondary3();
  139.    }
  140.  
  141.    public ColorUIResource getWindowTitleInactiveForeground() {
  142.       return this.getBlack();
  143.    }
  144.  
  145.    public ColorUIResource getMenuBackground() {
  146.       return this.getSecondary3();
  147.    }
  148.  
  149.    public ColorUIResource getMenuForeground() {
  150.       return this.getBlack();
  151.    }
  152.  
  153.    public ColorUIResource getMenuSelectedBackground() {
  154.       return this.getPrimary2();
  155.    }
  156.  
  157.    public ColorUIResource getMenuSelectedForeground() {
  158.       return this.getBlack();
  159.    }
  160.  
  161.    public ColorUIResource getMenuDisabledForeground() {
  162.       return this.getSecondary2();
  163.    }
  164.  
  165.    public ColorUIResource getSeparatorBackground() {
  166.       return this.getWhite();
  167.    }
  168.  
  169.    public ColorUIResource getSeparatorForeground() {
  170.       return this.getPrimary1();
  171.    }
  172.  
  173.    public ColorUIResource getAcceleratorForeground() {
  174.       return this.getPrimary1();
  175.    }
  176.  
  177.    public ColorUIResource getAcceleratorSelectedForeground() {
  178.       return this.getBlack();
  179.    }
  180.  
  181.    public void addCustomEntriesToTable(UIDefaults var1) {
  182.    }
  183. }
  184.