1 19 20 package org.netbeans.swing.plaf; 21 22 50 public abstract class LFCustoms { 51 private Object [] lfKeysAndValues = null; 52 private Object [] appKeysAndValues = null; 53 private Object [] guaranteedKeysAndValues = null; 54 protected static final String WORKPLACE_FILL = "nb_workplace_fill"; 56 58 59 Object [] getLookAndFeelCustomizationKeysAndValues () { 60 if (lfKeysAndValues == null) { 61 lfKeysAndValues = createLookAndFeelCustomizationKeysAndValues(); 63 } 64 return lfKeysAndValues; 65 } 66 67 68 Object [] getApplicationSpecificKeysAndValues () { 69 if (appKeysAndValues == null) { 70 appKeysAndValues = createApplicationSpecificKeysAndValues(); 72 } 73 return appKeysAndValues; 74 } 75 76 77 Object [] getGuaranteedKeysAndValues () { 78 if (guaranteedKeysAndValues == null) { 79 guaranteedKeysAndValues = createGuaranteedKeysAndValues(); 81 } 82 return guaranteedKeysAndValues; 83 } 84 85 91 Object [] allKeys() { 92 Object [] additional = additionalKeys(); 93 int size = additional == null ? 0 : additional.length; 94 if (appKeysAndValues != null) { 95 size += appKeysAndValues.length / 2; 96 } 97 if (guaranteedKeysAndValues != null) { 98 size += guaranteedKeysAndValues.length / 2; 99 } 100 if (lfKeysAndValues != null) { 101 size += (lfKeysAndValues.length / 2); 102 } 103 Object [] result = new Object [size]; 104 105 int ct = 0; 106 if (lfKeysAndValues != null) { 107 for (int i=0; i < lfKeysAndValues.length; i+=2) { 109 result[ct++] = lfKeysAndValues[i]; 110 } 111 } 112 if (guaranteedKeysAndValues != null) { 113 for (int i=0; i < guaranteedKeysAndValues.length; i+=2) { 114 result[ct++] = guaranteedKeysAndValues[i]; 115 } 116 } 117 if (appKeysAndValues != null) { 118 for (int i=0; i < appKeysAndValues.length; i+=2) { 119 result[ct++] = appKeysAndValues[i]; 120 } 121 } 122 if (additional != null) { 123 for (int i=0; i < additional.length; i++) { 124 result[ct++] = additional[i]; 125 } 126 } 127 return result; 128 } 129 130 137 protected Object [] additionalKeys() { 138 return null; 139 } 140 141 145 void disposeValues() { 146 if (lfKeysAndValues != null) { 147 disposeValues (lfKeysAndValues); 149 } 150 disposeValues (appKeysAndValues); 151 disposeValues (guaranteedKeysAndValues); 152 } 153 154 155 private void disposeValues (Object [] arr) { 156 for (int i=1; i < arr.length; i+=2) { 157 arr[i] = null; 158 } 159 } 160 161 167 public Object [] createLookAndFeelCustomizationKeysAndValues () { 168 return new Object [0]; 169 } 170 171 176 public Object [] createApplicationSpecificKeysAndValues () { 177 return new Object [0]; 178 } 179 180 193 public Object [] createGuaranteedKeysAndValues () { 194 return new Object [0]; 195 } 196 197 200 protected static final String CUSTOM_FONT_SIZE = "customFontSize"; 202 protected static final String DEFAULT_FONT_SIZE = "nbDefaultFontSize"; 206 protected static final String EDITOR_STATUS_LEFT_BORDER = "Nb.Editor.Status.leftBorder"; protected static final String EDITOR_STATUS_INNER_BORDER = "Nb.Editor.Status.innerBorder"; protected static final String EDITOR_STATUS_RIGHT_BORDER = "Nb.Editor.Status.rightBorder"; protected static final String EDITOR_STATUS_ONLYONEBORDER = "Nb.Editor.Status.onlyOneBorder"; protected static final String EDITOR_TOOLBAR_BORDER = "Nb.Editor.Toolbar.border"; protected static final String EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS = "Nb.Editor.ErrorStripe.ScrollBar.Insets"; 214 protected static final String EXPLORER_STATUS_BORDER = "Nb.Explorer.Status.border"; protected static final String EXPLORER_FOLDER_ICON = "Nb.Explorer.Folder.icon"; protected static final String EXPLORER_FOLDER_OPENED_ICON = "Nb.Explorer.Folder.openedIcon"; 219 protected static final String DESKTOP_BORDER = "Nb.Desktop.border"; public static final String SCROLLPANE_BORDER = "Nb.ScrollPane.border"; protected static final String TOOLBAR_UI = "Nb.Toolbar.ui"; protected static final String DESKTOP_BACKGROUND = "Nb.Desktop.background"; public static final String SCROLLPANE_BORDER_COLOR = "Nb.ScrollPane.Border.color"; 226 protected static final String OUTPUT_SELECTION_BACKGROUND = "nb.output.selectionBackground"; protected static final String OUTPUT_HYPERLINK_FOREGROUND = "nb.hyperlink.foreground"; protected static final String OUTPUT_BACKGROUND = "nb.output.background"; protected static final String OUTPUT_FOREGROUND = "nb.output.foreground"; 232 protected static final String PROPSHEET_ALTERNATE_ROW_COLOR = "Tree.altbackground"; protected static final String PROPSHEET_SET_BACKGROUND = "PropSheet.setBackground"; protected static final String PROPSHEET_SELECTED_SET_BACKGROUND = "PropSheet.selectedSetBackground"; protected static final String PROPSHEET_SET_FOREGROUND = "PropSheet.setForeground"; protected static final String PROPSHEET_SELECTED_SET_FOREGROUND = "PropSheet.selectedSetForeground"; protected static final String PROPSHEET_DISABLED_FOREGROUND = "PropSheet.disabledForeground"; protected static final String PROPSHEET_SELECTION_BACKGROUND = "PropSheet.selectionBackground"; protected static final String PROPSHEET_SELECTION_FOREGROUND = "PropSheet.selectionForeground"; protected static final String PROPSHEET_BUTTON_FOREGROUND = "PropSheet.customButtonForeground"; protected static final String PROPSHEET_BUTTON_COLOR = "netbeans.ps.buttonColor"; protected static final String PROPSHEET_BACKGROUND = "netbeans.ps.background"; 245 protected static final String PROPSHEET_ICON_MARGIN = "netbeans.ps.iconmargin"; protected static final String PROPSHEET_ROWHEIGHT = "netbeans.ps.rowheight"; 248 protected static final String ERROR_FOREGROUND = "nb.errorForeground"; protected static final String WARNING_FOREGROUND = "nb.warningForeground"; 252 protected static final String EDITOR_TABBED_CONTAINER_UI = "TabbedContainerUI"; protected static final String EDITOR_TAB_DISPLAYER_UI = "EditorTabDisplayerUI"; protected static final String VIEW_TAB_DISPLAYER_UI = "ViewTabDisplayerUI"; protected static final String SLIDING_TAB_DISPLAYER_UI = "SlidingTabDisplayerUI"; protected static final String SLIDING_TAB_BUTTON_UI = "IndexButtonUI"; 258 protected static final String SLIDING_BUTTON_UI = "SlidingButtonUI"; 260 protected static final String EDITOR_TAB_CONTENT_BORDER = "TabbedContainer.editor.contentBorder"; protected static final String EDITOR_TAB_TABS_BORDER = "TabbedContainer.editor.tabsBorder"; protected static final String EDITOR_TAB_OUTER_BORDER = "TabbedContainer.editor.outerBorder"; 265 protected static final String VIEW_TAB_CONTENT_BORDER = "TabbedContainer.view.contentBorder"; protected static final String VIEW_TAB_TABS_BORDER = "TabbedContainer.view.tabsBorder"; protected static final String VIEW_TAB_OUTER_BORDER = "TabbedContainer.view.outerBorder"; 270 protected static final String SLIDING_TAB_CONTENT_BORDER = "TabbedContainer.sliding.contentBorder"; protected static final String SLIDING_TAB_TABS_BORDER = "TabbedContainer.sliding.tabsBorder"; protected static final String SLIDING_TAB_OUTER_BORDER = "TabbedContainer.sliding.outerBorder"; 275 276 protected static final String TAB_ACTIVE_SELECTION_BACKGROUND = "TabRenderer.selectedActivatedBackground"; protected static final String TAB_ACTIVE_SELECTION_FOREGROUND = "TabRenderer.selectedActivatedForeground"; protected static final String TAB_SELECTION_FOREGROUND = "TabRenderer.selectedForeground"; protected static final String TAB_SELECTION_BACKGROUND = "TabRenderer.selectedBackground"; 282 protected static final String EXPLORER_MINISTATUSBAR_BORDER = "nb.explorer.ministatusbar.border"; 284 protected static final String DESKTOP_SPLITPANE_BORDER = "nb.desktop.splitpane.border"; 286 protected static final String PROPERTYSHEET_BOOTSTRAP = "nb.propertysheet"; 289 290 public static final String CONTROLFONT = "controlFont"; public static final String SYSTEMFONT = "systemFont"; public static final String USERFONT = "userFont"; public static final String MENUFONT = "menuFont"; public static final String WINDOWTITLEFONT = "windowTitleFont"; public static final String SUBFONT = "subFont"; public static final String LISTFONT = "List.font"; public static final String TREEFONT = "Tree.font"; public static final String PANELFONT = "Panel.font"; public static final String SPINNERFONT = "Spinner.font"; 302 public static final String PROGRESS_CANCEL_BUTTON_ICON = "nb.progress.cancel.icon"; 304 public static final String PROGRESS_CANCEL_BUTTON_ROLLOVER_ICON = "nb.progress.cancel.icon.mouseover"; 305 public static final String PROGRESS_CANCEL_BUTTON_PRESSED_ICON = "nb.progress.cancel.icon.pressed"; 306 } 307 | Popular Tags |