home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.LookAndFeel;
- import com.sun.java.swing.UIDefaults;
- import com.sun.java.swing.border.BevelBorder;
- import com.sun.java.swing.border.LineBorder;
- import com.sun.java.swing.plaf.BorderUIResource;
- import com.sun.java.swing.plaf.ColorUIResource;
- import com.sun.java.swing.plaf.FontUIResource;
- import java.awt.Color;
- import java.io.Serializable;
-
- public abstract class BasicLookAndFeel extends LookAndFeel implements Serializable {
- // $FF: synthetic field
- static Class class$java$awt$SystemColor;
-
- public UIDefaults getDefaults() {
- UIDefaults var1 = new UIDefaults();
- this.initClassDefaults(var1);
- this.initSystemColorDefaults(var1);
- this.initComponentDefaults(var1);
- return var1;
- }
-
- protected void initClassDefaults(UIDefaults var1) {
- String var2 = "com.sun.java.swing.plaf.basic.";
- Object[] var3 = new Object[]{"ButtonUI", var2 + "BasicButtonUI", "CheckBoxUI", var2 + "BasicCheckBoxUI", "ColorChooserUI", var2 + "BasicColorChooserUI", "MenuBarUI", var2 + "BasicMenuBarUI", "MenuUI", var2 + "BasicMenuUI", "MenuItemUI", var2 + "BasicMenuItemUI", "CheckBoxMenuItemUI", var2 + "BasicCheckBoxMenuItemUI", "RadioButtonMenuItemUI", var2 + "BasicRadioButtonMenuItemUI", "RadioButtonUI", var2 + "BasicRadioButtonUI", "ToggleButtonUI", var2 + "BasicToggleButtonUI", "PopupMenuUI", var2 + "BasicPopupMenuUI", "ProgressBarUI", var2 + "BasicProgressBarUI", "ScrollBarUI", var2 + "BasicScrollBarUI", "ScrollPaneUI", var2 + "BasicScrollPaneUI", "SplitPaneUI", var2 + "BasicSplitPaneUI", "SliderUI", var2 + "BasicSliderUI", "SpinnerUI", var2 + "BasicSpinnerUI", "SeparatorUI", var2 + "BasicSeparatorUI", "TabbedPaneUI", var2 + "BasicTabbedPaneUI", "TextAreaUI", var2 + "BasicTextAreaUI", "TextFieldUI", var2 + "BasicTextFieldUI", "PasswordFieldUI", var2 + "BasicPasswordFieldUI", "TextPaneUI", var2 + "BasicTextPaneUI", "EditorPaneUI", var2 + "BasicEditorPaneUI", "TreeUI", var2 + "BasicTreeUI", "LabelUI", var2 + "BasicLabelUI", "ListUI", var2 + "BasicListUI", "ToolBarUI", var2 + "BasicToolBarUI", "ToolTipUI", var2 + "BasicToolTipUI", "ComboBoxUI", var2 + "BasicComboBoxUI", "TableUI", var2 + "BasicTableUI", "TableHeaderUI", var2 + "BasicTableHeaderUI", "InternalFrameUI", var2 + "BasicInternalFrameUI", "StandardDialogUI", var2 + "BasicStandardDialogUI", "DesktopPaneUI", var2 + "BasicDesktopPaneUI", "DesktopIconUI", var2 + "BasicDesktopIconUI", "DirectoryPaneUI", var2 + "BasicDirectoryPaneUI", "FileChooserUI", var2 + "BasicFileChooserUI", "OptionPaneUI", var2 + "BasicOptionPaneUI"};
- var1.putDefaults(var3);
- }
-
- protected void initSystemColorDefaults(UIDefaults var1) {
- String[] var2 = new String[]{"desktop", "#005C5C", "activeCaption", "#000080", "activeCaptionText", "#FFFFFF", "activeCaptionBorder", "#C0C0C0", "inactiveCaption", "#808080", "inactiveCaptionText", "#C0C0C0", "inactiveCaptionBorder", "#C0C0C0", "window", "#FFFFFF", "windowBorder", "#000000", "windowText", "#000000", "menu", "#C0C0C0", "menuText", "#000000", "text", "#C0C0C0", "textText", "#000000", "textHighlight", "#000080", "textHighlightText", "#FFFFFF", "textInactiveText", "#808080", "control", "#C0C0C0", "controlText", "#000000", "controlHighlight", "#FFFFFF", "controlLtHighlight", "#E0E0E0", "controlShadow", "#808080", "controlDkShadow", "#000000", "scrollbar", "#E0E0E0", "info", "#FFFFE1", "infoText", "#000000"};
- this.loadSystemColors(var1, var2);
- }
-
- protected void loadSystemColors(UIDefaults var1, String[] var2) {
- for(int var3 = 0; var3 < var2.length; var3 += 2) {
- Color var4 = Color.black;
-
- try {
- var4 = Color.decode(var2[var3 + 1]);
- } catch (NumberFormatException var6) {
- ((Throwable)var6).printStackTrace();
- }
-
- var1.put(var2[var3], new ColorUIResource(var4));
- }
-
- }
-
- protected void initComponentDefaults(UIDefaults var1) {
- FontUIResource var2 = new FontUIResource("Dialog", 0, 12);
- FontUIResource var3 = new FontUIResource("Serif", 0, 12);
- FontUIResource var4 = new FontUIResource("SansSerif", 0, 12);
- FontUIResource var5 = new FontUIResource("Monospaced", 0, 12);
- FontUIResource var6 = new FontUIResource("Dialog", 1, 12);
- ColorUIResource var7 = new ColorUIResource(Color.red);
- ColorUIResource var8 = new ColorUIResource(Color.black);
- ColorUIResource var9 = new ColorUIResource(Color.white);
- ColorUIResource var10 = new ColorUIResource(Color.yellow);
- ColorUIResource var11 = new ColorUIResource(Color.gray);
- ColorUIResource var12 = new ColorUIResource(Color.lightGray);
- ColorUIResource var13 = new ColorUIResource(Color.darkGray);
- ColorUIResource var14 = new ColorUIResource(224, 224, 224);
- ColorUIResource var15 = new ColorUIResource(Color.red);
- ColorUIResource var16 = new ColorUIResource(0, 0, 128);
- ColorUIResource var17 = new ColorUIResource(255, 255, 255);
- 1 var18 = new 1();
- 2 var19 = new 2();
- 3 var20 = new 3();
- 4 var21 = new 4();
- BorderUIResource var22 = new BorderUIResource(new BevelBorder(1));
- 5 var23 = new 5();
- 6 var24 = new 6();
- 7 var25 = new 7();
- 8 var26 = new 8();
- 9 var27 = new 9();
- 10 var28 = new 10();
- 11 var29 = new 11();
- 12 var30 = new 12();
- 13 var31 = new 13();
- 14 var32 = new 14();
- 15 var33 = new 15();
- 16 var34 = new 16();
- 17 var35 = new 17();
- 18 var36 = new 18();
- 19 var37 = new 19();
- 20 var38 = new 20();
- 21 var39 = new 21();
- 22 var40 = new 22();
- 23 var41 = new 23();
- 24 var42 = new 24();
- 25 var43 = new 25();
- 26 var44 = new 26();
- new 27();
- BorderUIResource var45 = new BorderUIResource(new LineBorder(var10));
- Object[] var46 = new Object[]{"Desktop.background", var1.get("desktop"), "Panel.background", var1.get("control"), "Panel.foreground", var1.get("textText"), "Panel.font", var2, "Button.border", var27, "Button.background", var1.get("control"), "Button.foreground", var1.get("controlText"), "Button.focus", var1.get("controlText"), "Button.font", var2, "Button.pressed", var1.get("control"), "ToggleButton.border", var28, "ToggleButton.background", var1.get("control"), "ToggleButton.foreground", var1.get("controlText"), "ToggleButton.focus", var1.get("controlText"), "ToggleButton.font", var2, "ToggleButton.pressed", var1.get("control"), "RadioButton.background", var1.get("control"), "RadioButton.foreground", var1.get("controlText"), "RadioButton.font", var2, "RadioButton.icon", var41, "RadioButton.border", var29, "RadioButton.focus", var8, "CheckBox.icon", var40, "CheckBox.focus", var8, "RadioButtonMenuItem.icon", var43, "CheckBoxMenuItem.icon", var42, "MenuBar.border", var32, "MenuBar.background", var1.get("menu"), "MenuBar.foreground", var1.get("menuText"), "MenuBar.font", var2, "Menu.border", var31, "Menu.font", var2, "Menu.foreground", var1.get("menuText"), "Menu.background", var1.get("menu"), "Menu.pressedForeground", var17, "Menu.pressedBackground", var16, "Menu.arrowIcon", var39, "MenuItem.border", var31, "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.font", var2, "MenuItem.foreground", var1.get("menuText"), "MenuItem.background", var1.get("menu"), "MenuItem.pressedForeground", var17, "MenuItem.pressedBackground", var16, "MenuItem.disabledForeground", null, "MenuItem.acceleratorFont", var2, "MenuItem.acceleratorForeground", var1.get("menuText"), "MenuItem.acceleratorPressedForeground", var17, "MenuItem.checkIcon", var37, "MenuItem.arrowIcon", var38, "PopupMenu.background", var1.get("menu"), "PopupMenu.border", var33, "PopupMenu.foreground", var1.get("menuText"), "PopupMenu.font", var2, "Label.font", var2, "Label.background", var1.get("control"), "Label.foreground", var1.get("controlText"), "Label.disabled", var9, "Label.disabledShadow", var1.get("controlShadow"), "List.selectionBackground", var1.get("textHighlight"), "List.selectionForeground", var1.get("textHighlightText"), "List.background", var1.get("window"), "List.foreground", var1.get("textText"), "List.focusCellHighlightBorder", var45, "List.font", var2, "List.cellRenderer", var18, "List.border", null, "ComboBox.renderer", var19, "ComboBox.editor", var20, "ComboBox.background", var9, "ComboBox.foreground", var8, "ComboBox.selectedBackground", var1.get("textHighlight"), "ComboBox.selectedForeground", var1.get("textHighlightText"), "ComboBox.font", var2, "ComboBox.disabledBackground", var1.get("control"), "ComboBox.disabledForeground", var1.get("textInactiveText"), "TextField.caretForeground", var8, "TextField.caretBlinkRate", var25, "TextField.inactiveForeground", var1.get("textInactiveText"), "TextField.selectionBackground", var1.get("textHighlight"), "TextField.selectionForeground", var1.get("textHighlightText"), "TextField.background", var1.get("window"), "TextField.foreground", var1.get("textText"), "TextField.font", var4, "TextField.border", var24, "PasswordField.caretForeground", var8, "PasswordField.caretBlinkRate", var25, "PasswordField.inactiveForeground", var1.get("textInactiveText"), "PasswordField.selectionBackground", var1.get("textHighlight"), "PasswordField.selectionForeground", var1.get("textHighlightText"), "PasswordField.background", var1.get("window"), "PasswordField.foreground", var1.get("textText"), "PasswordField.font", var5, "PasswordField.border", var24, "TextArea.caretForeground", var8, "TextArea.caretBlinkRate", var25, "TextArea.inactiveForeground", var1.get("textInactiveText"), "TextArea.selectionBackground", var1.get("textHighlight"), "TextArea.selectionForeground", var1.get("textHighlightText"), "TextArea.background", var1.get("window"), "TextArea.foreground", var1.get("textText"), "TextArea.font", var5, "TextArea.border", var23, "TextPane.caretForeground", var8, "TextPane.inactiveForeground", var1.get("textInactiveText"), "TextPane.selectionBackground", var12, "TextPane.selectionForeground", var1.get("textHighlightText"), "TextPane.background", var9, "TextPane.foreground", var1.get("textText"), "TextPane.font", var3, "TextPane.border", var23, "EditorPane.caretForeground", var7, "EditorPane.inactiveForeground", var1.get("textInactiveText"), "EditorPane.selectionBackground", var12, "EditorPane.selectionForeground", var1.get("textHighlightText"), "EditorPane.background", var9, "EditorPane.foreground", var1.get("textText"), "EditorPane.font", var3, "EditorPane.border", var23, "ScrollBar.background", var14, "ScrollBar.foreground", var1.get("control"), "ScrollBar.track", var14, "ScrollBar.trackHighlight", var1.get("controlDkShadow"), "ScrollBar.thumb", var1.get("control"), "ScrollBar.thumbHighlight", var1.get("controlHighlight"), "ScrollBar.thumbDarkShadow", var1.get("controlDkShadow"), "ScrollBar.thumbLightShadow", var1.get("controlShadow"), "ScrollBar.border", null, "ScrollPane.border", var21, "ScrollPane.font", var2, "ScrollPane.background", var1.get("control"), "ScrollPane.foreground", var1.get("controlText"), "ScrollPane.viewportBorder", null, "Slider.border", null, "Slider.foreground", var1.get("control"), "Slider.background", var1.get("control"), "Slider.highlight", var1.get("controlHighlight"), "Slider.shadow", var1.get("controlShadow"), "Slider.focus", var1.get("controlDkShadow"), "SplitPane.background", var1.get("control"), "SplitPane.highlight", var1.get("controllHighlight"), "SplitPane.shadow", var1.get("controlShadow"), "TabbedPane.font", var2, "TabbedPane.tabBackground", var1.get("control"), "TabbedPane.tabForeground", var1.get("controlText"), "TabbedPane.tabHighlight", var1.get("controlHighlight"), "TabbedPane.tabShadow", var1.get("controlShadow"), "TabbedPane.tabDarkShadow", var1.get("controlDkShadow"), "TabbedPane.focus", var8, "Table.font", var2, "Table.foreground", var1.get("controlText"), "Table.background", var1.get("window"), "Table.selectionForeground", var1.get("textHighlightText"), "Table.selectionBackground", var1.get("textHighlight"), "Table.gridColor", var11, "Table.focusCellHighlightBorder", var45, "Table.focusCellBackground", var1.get("window"), "Table.focusCellForeground", var1.get("controlText"), "Table.scrollPaneBorder", var22, "TableHeader.font", var2, "TableHeader.foreground", var1.get("controlText"), "TableHeader.background", var1.get("control"), "TitledBorder.font", var2, "TitledBorder.titleColor", var1.get("controlText"), "TitledBorder.border", var34, "ToolBar.border", var35, "ToolBar.background", var1.get("control"), "ToolBar.foreground", var1.get("controlText"), "ToolBar.font", var2, "ToolBar.dockingColor", var1.get("control"), "ToolBar.floatingColor", var1.get("control"), "ToolBar.dockingBorderColor", var7, "ToolBar.floatingBorderColor", var13, "ToolTip.font", var4, "ToolTip.border", var26, "ToolTip.background", var1.get("info"), "ToolTip.foreground", var1.get("infoText"), "Tree.background", var9, "Tree.hash", var11, "Tree.textSelectionColor", var9, "Tree.textNonSelectionColor", var8, "Tree.borderSelectionColor", var8, "Tree.backgroundSelectionColor", var15, "Tree.backgroundNonSelectionColor", var9, "Tree.openIcon", LookAndFeel.makeIcon(this.getClass(), "icons/TreeOpen.gif"), "Tree.closedIcon", LookAndFeel.makeIcon(this.getClass(), "icons/TreeClosed.gif"), "Tree.leafIcon", LookAndFeel.makeIcon(this.getClass(), "icons/TreeLeaf.gif"), "Tree.expandedIcon", null, "Tree.collapsedIcon", null, "FileChooser.newFolder", LookAndFeel.makeIcon(this.getClass(), "icons/NewFolder.gif"), "FileChooser.upFolder", LookAndFeel.makeIcon(this.getClass(), "icons/UpFolder.gif"), "FileChooser.homeFolder", LookAndFeel.makeIcon(this.getClass(), "icons/HomeFolder.gif"), "FileChooser.detailsView", LookAndFeel.makeIcon(this.getClass(), "icons/DetailsView.gif"), "FileChooser.listView", LookAndFeel.makeIcon(this.getClass(), "icons/ListView.gif"), "DirectoryPane.directoryIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Directory.gif"), "DirectoryPane.fileIcon", LookAndFeel.makeIcon(this.getClass(), "icons/File.gif"), "DirectoryPane.computerIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Computer.gif"), "DirectoryPane.hardDriveIcon", LookAndFeel.makeIcon(this.getClass(), "icons/HardDrive.gif"), "DirectoryPane.floppyDriveIcon", LookAndFeel.makeIcon(this.getClass(), "icons/FloppyDrive.gif"), "ProgressBar.font", var2, "ProgressBar.foreground", var1.get("textHighlight"), "ProgressBar.background", var1.get("control"), "OptionPane.font", var2, "OptionPane.background", var1.get("control"), "OptionPane.foreground", var1.get("controlText"), "OptionPane.border", var44, "OptionPane.errorIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Error.gif"), "OptionPane.informationIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Inform.gif"), "OptionPane.warningIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Warn.gif"), "OptionPane.questionIcon", LookAndFeel.makeIcon(this.getClass(), "icons/Question.gif"), "ColorChooser.font", var2, "ColorChooser.background", var1.get("control"), "ColorChooser.foreground", var1.get("controlText"), "ColorChooser.selectedColorBorder", var36, "InternalFrame.icon", LookAndFeel.makeIcon(this.getClass(), "icons/JavaCup.gif"), "InternalFrame.border", var30, "InternalFrame.titleFont", var6, "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), "DesktopIcon.border", null};
- var1.putDefaults(var46);
- }
-
- // $FF: synthetic method
- static Class class$(String var0) {
- try {
- return Class.forName(var0);
- } catch (ClassNotFoundException var2) {
- throw new NoClassDefFoundError(((Throwable)var2).getMessage());
- }
- }
- }
-