1 19 20 package org.netbeans.swing.plaf.aqua; 21 22 import org.netbeans.swing.plaf.LFCustoms; 23 import org.netbeans.swing.plaf.util.GuaranteedValue; 24 import org.netbeans.swing.plaf.util.UIUtils; 25 26 import javax.swing.*; 27 import javax.swing.border.Border ; 28 import javax.swing.plaf.FontUIResource ; 29 import java.awt.*; 30 31 32 35 public final class AquaLFCustoms extends LFCustoms { 36 37 38 public Object [] createLookAndFeelCustomizationKeysAndValues() { 39 Integer cus = (Integer ) UIManager.get("customFontSize"); Object [] result; 41 if (cus != null) { 42 int uiFontSize = cus.intValue(); 43 Font controlFont = new GuaranteedValue (new String [] {"controlFont", "Tree.font", "Label.font"}, 44 new FontUIResource ("Dialog", Font.PLAIN, uiFontSize)).getFont(); result = new Object [] { 46 "Button.font", controlFont, 47 "Tree.font", controlFont, 48 "ToggleButton.font", controlFont, 49 "Menu.font", controlFont, 50 "MenuBar.font", controlFont, 51 "MenuItem.font", controlFont, 52 "CheckBoxMenuItem.font", controlFont, 53 "RadioButtonMenuItem.font", controlFont, 54 "PopupMenu.font", controlFont, 55 "List.font", controlFont, 56 "Label.font", controlFont, 57 "ComboBox.font", controlFont, 58 "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", 59 "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", 60 "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), 61 SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", 62 63 EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(18, 0, 18, 0), 64 65 }; } else { 67 result = new Object [] { 68 "controlFont", new GuaranteedValue (new String [] {"Label.font", "Tree.font"}, new FontUIResource ("Dialog", Font.PLAIN, 14)).getFont(), 69 "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", 70 "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", 71 "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), 72 SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", 73 74 EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(18, 0, 18, 0), 75 }; 76 } 77 return result; 78 } 79 80 public Object [] createApplicationSpecificKeysAndValues () { 81 Border topOnly = BorderFactory.createMatteBorder(1, 0, 0, 0, 82 UIManager.getColor("controlShadow").brighter()); Border bottomOnly = BorderFactory.createMatteBorder(0, 0, 1, 0, 84 UIManager.getColor("controlShadow").brighter()); 86 Border empty = BorderFactory.createEmptyBorder(); 87 88 Image explorerIcon = UIUtils.loadImage( 89 "org/netbeans/swing/plaf/resources/osx-folder.png"); 91 Border lowerBorder = new AquaRoundedLowerBorder(); 92 Border tabsBorder = new AquaEditorTabControlBorder(); 93 94 Object [] result = { 95 TOOLBAR_UI, "org.netbeans.swing.plaf.aqua.PlainAquaToolbarUI", 96 97 DESKTOP_BACKGROUND, new Color(226, 223, 214), SCROLLPANE_BORDER_COLOR, new Color(127, 157, 185), 100 EXPLORER_FOLDER_ICON ,explorerIcon, 101 EXPLORER_FOLDER_OPENED_ICON, explorerIcon, 102 DESKTOP_BORDER, empty, 103 SCROLLPANE_BORDER, UIManager.get("ScrollPane.border"), 104 EXPLORER_STATUS_BORDER, topOnly, 105 EDITOR_STATUS_LEFT_BORDER, topOnly, 106 EDITOR_STATUS_RIGHT_BORDER, topOnly, 107 EDITOR_STATUS_INNER_BORDER, topOnly, 108 EDITOR_STATUS_ONLYONEBORDER, topOnly, 109 EDITOR_TOOLBAR_BORDER, new PlainAquaToolbarUI.AquaTbBorder(), 110 111 EDITOR_TAB_OUTER_BORDER, BorderFactory.createEmptyBorder(), 112 EDITOR_TAB_CONTENT_BORDER, lowerBorder, 113 EDITOR_TAB_TABS_BORDER, tabsBorder, 114 115 VIEW_TAB_OUTER_BORDER, BorderFactory.createEmptyBorder(), 116 VIEW_TAB_TABS_BORDER, BorderFactory.createEmptyBorder(), 117 VIEW_TAB_CONTENT_BORDER, lowerBorder, 118 119 120 EDITOR_TAB_DISPLAYER_UI, "org.netbeans.swing.tabcontrol.plaf.AquaEditorTabDisplayerUI", 122 VIEW_TAB_DISPLAYER_UI, "org.netbeans.swing.tabcontrol.plaf.AquaViewTabDisplayerUI", 123 SLIDING_TAB_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.SlidingTabDisplayerButtonUI$Aqua", 124 125 EXPLORER_MINISTATUSBAR_BORDER, BorderFactory.createEmptyBorder(), 126 127 "floatingBorder", new FakeDropShadowBorder(), 128 129 TAB_ACTIVE_SELECTION_FOREGROUND, new GuaranteedValue ("textText", Color.BLACK), 130 131 "nbProgressBar.Foreground", new Color(49, 106, 197), 133 "nbProgressBar.Background", Color.WHITE, 134 "nbProgressBar.popupDynaText.foreground", new Color(141, 136, 122), 135 "nbProgressBar.popupText.background", new Color(249, 249, 249), 136 "nbProgressBar.popupText.foreground", UIManager.getColor("TextField.foreground"), 137 "nbProgressBar.popupText.selectBackground", UIManager.getColor("List.selectionBackground"), 138 "nbProgressBar.popupText.selectForeground", UIManager.getColor("List.selectionForeground"), 139 PROGRESS_CANCEL_BUTTON_ICON, UIUtils.loadImage("org/netbeans/swing/plaf/resources/cancel_task_linux_mac.png"), 140 141 }; return result; 143 } 144 145 146 } 147 | Popular Tags |