/[classpath]/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/metal/MetalLookAndFeel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6.2.9 by gnu_andrew, Tue Sep 20 18:46:34 2005 UTC revision 1.6.2.10 by gnu_andrew, Wed Nov 2 00:44:00 2005 UTC
# Line 42  import java.awt.Color; Line 42  import java.awt.Color;
42  import java.awt.Font;  import java.awt.Font;
43  import java.awt.Insets;  import java.awt.Insets;
44    
45    import javax.swing.LookAndFeel;
46  import javax.swing.UIDefaults;  import javax.swing.UIDefaults;
47    import javax.swing.UIManager;
48  import javax.swing.plaf.BorderUIResource;  import javax.swing.plaf.BorderUIResource;
49  import javax.swing.plaf.ColorUIResource;  import javax.swing.plaf.ColorUIResource;
50  import javax.swing.plaf.FontUIResource;  import javax.swing.plaf.FontUIResource;
51  import javax.swing.plaf.InsetsUIResource;  import javax.swing.plaf.InsetsUIResource;
52    import javax.swing.plaf.BorderUIResource.LineBorderUIResource;
53  import javax.swing.plaf.basic.BasicLookAndFeel;  import javax.swing.plaf.basic.BasicLookAndFeel;
54    
55    
# Line 78  public class MetalLookAndFeel extends Ba Line 81  public class MetalLookAndFeel extends Ba
81     */     */
82    protected void createDefaultTheme()    protected void createDefaultTheme()
83    {    {
84      setCurrentTheme(new OceanTheme());      setCurrentTheme(new DefaultMetalTheme());
85    }    }
86    
87    /**    /**
# Line 602  public class MetalLookAndFeel extends Ba Line 605  public class MetalLookAndFeel extends Ba
605    }    }
606    
607    /**    /**
608     * Sets the current theme for the look and feel.     * Sets the current theme for the look and feel.  Note that the theme must be
609       * set <em>before</em> the look and feel is installed.  To change the theme
610       * for an already running application that is using the
611       * {@link MetalLookAndFeel}, first set the theme with this method, then
612       * create a new instance of {@link MetalLookAndFeel} and install it in the
613       * usual way (see {@link UIManager#setLookAndFeel(LookAndFeel)}).
614     *     *
615     * @param theme  the theme.     * @param theme  the theme (<code>null</code> not permitted).
616       *
617       * @throws NullPointerException if <code>theme</code> is <code>null</code>.
618     */     */
619    public static void setCurrentTheme(MetalTheme theme)    public static void setCurrentTheme(MetalTheme theme)
620    {    {
621        if (theme == null)
622          throw new NullPointerException("Null 'theme' not permitted.");
623      MetalLookAndFeel.theme = theme;      MetalLookAndFeel.theme = theme;
624    }    }
625    
# Line 769  public class MetalLookAndFeel extends Ba Line 781  public class MetalLookAndFeel extends Ba
781        "Button.foreground", getControlTextColor(),        "Button.foreground", getControlTextColor(),
782        "Button.highlight", getControlHighlight(),        "Button.highlight", getControlHighlight(),
783        "Button.light", getControlHighlight(),        "Button.light", getControlHighlight(),
784        "Button.margin", new Insets(2, 14, 2, 14),        "Button.margin", new InsetsUIResource(2, 14, 2, 14),
785        "Button.select", getControlShadow(),        "Button.select", getControlShadow(),
786        "Button.shadow", getControlShadow(),        "Button.shadow", getControlShadow(),
787    
# Line 845  public class MetalLookAndFeel extends Ba Line 857  public class MetalLookAndFeel extends Ba
857        "FormattedTextField.selectionBackground", getTextHighlightColor(),        "FormattedTextField.selectionBackground", getTextHighlightColor(),
858        "FormattedTextField.selectionForeground", getHighlightedTextColor(),        "FormattedTextField.selectionForeground", getHighlightedTextColor(),
859    
860          "FileView.computerIcon", MetalIconFactory.getTreeComputerIcon(),
861          "FileView.directoryIcon", MetalIconFactory.getTreeFolderIcon(),
862          "FileView.fileIcon", MetalIconFactory.getTreeLeafIcon(),
863          "FileView.floppyDriveIcon", MetalIconFactory.getTreeFloppyDriveIcon(),
864          "FileView.hardDriveIcon", MetalIconFactory.getTreeHardDriveIcon(),
865    
866        "InternalFrame.activeTitleBackground", getWindowTitleBackground(),        "InternalFrame.activeTitleBackground", getWindowTitleBackground(),
867        "InternalFrame.activeTitleForeground", getWindowTitleForeground(),        "InternalFrame.activeTitleForeground", getWindowTitleForeground(),
# Line 873  public class MetalLookAndFeel extends Ba Line 890  public class MetalLookAndFeel extends Ba
890        "Label.font", getControlTextFont(),        "Label.font", getControlTextFont(),
891        "Label.foreground", getSystemTextColor(),        "Label.foreground", getSystemTextColor(),
892    
893          "List.font", getControlTextFont(),
894        "List.background", getWindowBackground(),        "List.background", getWindowBackground(),
895        "List.foreground", getUserTextColor(),        "List.foreground", getUserTextColor(),
896        "List.selectionBackground", getTextHighlightColor(),        "List.selectionBackground", getTextHighlightColor(),
897        "List.selectionForeground", getHighlightedTextColor(),        "List.selectionForeground", getHighlightedTextColor(),
898          "List.focusCellHighlightBorder",
899            new LineBorderUIResource(MetalLookAndFeel.getFocusColor()),
900    
901        "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),        "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),
902        "Menu.acceleratorForeground", getAcceleratorForeground(),        "Menu.acceleratorForeground", getAcceleratorForeground(),
# Line 996  public class MetalLookAndFeel extends Ba Line 1016  public class MetalLookAndFeel extends Ba
1016        "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(),        "ScrollBar.thumbShadow", getPrimaryControlDarkShadow(),
1017        "ScrollBar.track", getControl(),        "ScrollBar.track", getControl(),
1018        "ScrollBar.trackHighlight", getControlDarkShadow(),        "ScrollBar.trackHighlight", getControlDarkShadow(),
1019          "ScrollBar.width", new Integer(17),
1020    
1021        "ScrollPane.background", getControl(),        "ScrollPane.background", getControl(),
1022        "ScrollPane.border", new MetalBorders.ScrollPaneBorder(),        "ScrollPane.border", new MetalBorders.ScrollPaneBorder(),
# Line 1050  public class MetalLookAndFeel extends Ba Line 1071  public class MetalLookAndFeel extends Ba
1071        "Table.focusCellBackground", getWindowBackground(),        "Table.focusCellBackground", getWindowBackground(),
1072        "Table.focusCellForeground", getControlTextColor(),        "Table.focusCellForeground", getControlTextColor(),
1073        "Table.foreground", getControlTextColor(),        "Table.foreground", getControlTextColor(),
1074        "Table.focusCellHighlightBorder", getControlShadow(),        "Table.focusCellHighlightBorder",
1075          new BorderUIResource.LineBorderUIResource(getControlShadow()),
1076        "Table.focusCellBackground", getWindowBackground(),        "Table.focusCellBackground", getWindowBackground(),
1077        "Table.gridColor", getControlDarkShadow(),        "Table.gridColor", getControlDarkShadow(),
1078          "Table.selectionBackground", new ColorUIResource(204, 204, 255),
1079          "Table.selectionForeground", new ColorUIResource(0, 0, 0),
1080    
1081        "TableHeader.background", getControl(),        "TableHeader.background", getControl(),
1082        "TableHeader.cellBorder", new MetalBorders.TableHeaderBorder(),        "TableHeader.cellBorder", new MetalBorders.TableHeaderBorder(),
# Line 1116  public class MetalLookAndFeel extends Ba Line 1140  public class MetalLookAndFeel extends Ba
1140        "ToolBar.highlight", getControlHighlight(),        "ToolBar.highlight", getControlHighlight(),
1141        "ToolBar.light", getControlHighlight(),        "ToolBar.light", getControlHighlight(),
1142        "ToolBar.shadow", getControlShadow(),        "ToolBar.shadow", getControlShadow(),
1143          "ToolBar.border", new MetalBorders.ToolBarBorder(),
1144    
1145        "ToolTip.background", getPrimaryControl(),        "ToolTip.background", getPrimaryControl(),
1146        "ToolTip.backgroundInactive", getControl(),        "ToolTip.backgroundInactive", getControl(),

Legend:
Removed from v.1.6.2.9  
changed lines
  Added in v.1.6.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26