1 19 20 package org.netbeans.swing.plaf; 21 22 import org.netbeans.swing.plaf.util.GuaranteedValue; 23 import org.netbeans.swing.plaf.util.RelativeColor; 24 import org.netbeans.swing.plaf.util.UIUtils; 25 26 import javax.swing.*; 27 import javax.swing.plaf.ColorUIResource ; 28 import javax.swing.plaf.FontUIResource ; 29 import java.awt.*; 30 31 32 final class AllLFCustoms extends LFCustoms { 33 34 public Object [] createApplicationSpecificKeysAndValues () { 35 ColorUIResource errorColor = new ColorUIResource (255, 0, 0); 38 ColorUIResource warningColor = new ColorUIResource (51, 51, 51); 39 40 Object [] uiDefaults = { 41 42 ERROR_FOREGROUND, errorColor, 43 44 WARNING_FOREGROUND, warningColor, 45 46 TAB_ACTIVE_SELECTION_BACKGROUND, 48 new GuaranteedValue (new String [] {"Table.selectionBackground", 49 "info"}, Color.BLUE.brighter()), 50 51 TAB_ACTIVE_SELECTION_FOREGROUND, 52 new GuaranteedValue ("Table.selectionForeground", 53 Color.WHITE), 54 55 TAB_SELECTION_FOREGROUND, 56 new GuaranteedValue("textText", Color.BLACK), 57 58 EDITOR_TABBED_CONTAINER_UI, 61 "org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI", 62 63 SLIDING_TAB_DISPLAYER_UI, 64 "org.netbeans.swing.tabcontrol.plaf.BasicSlidingTabDisplayerUI", 65 66 SLIDING_TAB_BUTTON_UI, 67 "org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI", 68 69 SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.SlidingButtonUI", 71 72 SCROLLPANE_BORDER_COLOR, new Color(127, 157, 185), 73 74 EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(0, 0, 0, 0), 75 }; return uiDefaults; 77 } 78 79 public Object [] createGuaranteedKeysAndValues () { 80 int fontsize = 11; 81 Integer in = (Integer ) UIManager.get(CUSTOM_FONT_SIZE); boolean hasCustomFontSize = in != null; 83 if (hasCustomFontSize) { 84 fontsize = in.intValue(); 85 } 86 Object [] uiDefaults = { 87 89 "control", new GuaranteedValue ("control", Color.LIGHT_GRAY), 90 "controlShadow", new GuaranteedValue ("controlShadow", Color.GRAY), 91 "controlDkShadow", new GuaranteedValue ("controlDkShadow", Color.DARK_GRAY), 92 "textText", new GuaranteedValue ("textText", Color.BLACK), 93 "controlFont", new GuaranteedValue ("controlFont", 94 new Font ("Dialog", Font.PLAIN, fontsize)), 95 96 DEFAULT_FONT_SIZE, new Integer (11), 97 }; 98 return uiDefaults; 99 } 100 101 public static void initCustomFontSize (int uiFontSize) { 102 Font nbDialogPlain = new FontUIResource ("Dialog", Font.PLAIN, uiFontSize); Font nbDialogBold = new FontUIResource ("Dialog", Font.BOLD, uiFontSize); Font nbSerifPlain = new FontUIResource ("Serif", Font.PLAIN, uiFontSize); Font nbSansSerifPlain = new FontUIResource ("SansSerif", Font.PLAIN, uiFontSize); Font nbMonospacedPlain = new FontUIResource ("Monospaced", Font.PLAIN, uiFontSize); UIManager.put("controlFont", nbDialogPlain); UIManager.put("Button.font", nbDialogPlain); UIManager.put("ToggleButton.font", nbDialogPlain); UIManager.put("RadioButton.font", nbDialogPlain); UIManager.put("CheckBox.font", nbDialogPlain); UIManager.put("ColorChooser.font", nbDialogPlain); UIManager.put("ComboBox.font", nbDialogPlain); UIManager.put("Label.font", nbDialogPlain); UIManager.put("List.font", nbDialogPlain); UIManager.put("MenuBar.font", nbDialogPlain); UIManager.put("MenuItem.font", nbDialogPlain); UIManager.put("MenuItem.acceleratorFont", nbDialogPlain); UIManager.put("RadioButtonMenuItem.font", nbDialogPlain); UIManager.put("CheckBoxMenuItem.font", nbDialogPlain); UIManager.put("Menu.font", nbDialogPlain); UIManager.put("PopupMenu.font", nbDialogPlain); UIManager.put("OptionPane.font", nbDialogPlain); UIManager.put("OptionPane.messageFont", nbDialogPlain); UIManager.put("Panel.font", nbDialogPlain); UIManager.put("ProgressBar.font", nbDialogPlain); UIManager.put("ScrollPane.font", nbDialogPlain); UIManager.put("Viewport.font", nbDialogPlain); UIManager.put("TabbedPane.font", nbDialogPlain); UIManager.put("Table.font", nbDialogPlain); UIManager.put("TableHeader.font", nbDialogPlain); UIManager.put("TextField.font", nbSansSerifPlain); UIManager.put("PasswordField.font", nbMonospacedPlain); UIManager.put("TextArea.font", nbDialogPlain); UIManager.put("TextPane.font", nbDialogPlain); UIManager.put("EditorPane.font", nbSerifPlain); UIManager.put("TitledBorder.font", nbDialogPlain); UIManager.put("ToolBar.font", nbDialogPlain); UIManager.put("ToolTip.font", nbSansSerifPlain); UIManager.put("Tree.font", nbDialogPlain); UIManager.put("InternalFrame.titleFont", nbDialogBold); UIManager.put("windowTitleFont", nbDialogBold); } 144 145 146 } 147 | Popular Tags |