Java Code Examples for javax.swing.UIDefaults#ProxyLazyValue
The following examples show how to use
javax.swing.UIDefaults#ProxyLazyValue .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GtkLFCustoms.java From netbeans with Apache License 2.0 | 4 votes |
@Override public Object[] createLookAndFeelCustomizationKeysAndValues() { if (ThemeValue.functioning()) { return new Object[] { //XXX once the JDK team has integrated support for standard //UIManager keys into 1.5 (not there as of b47), these can //probably be deleted, resulting in a performance improvement: "control", control, "controlHighlight", new ThemeValue (Region.PANEL, ThemeValue.LIGHT, Color.LIGHT_GRAY), //NOI18N "controlShadow", new ThemeValue (Region.PANEL, ThemeValue.DARK, Color.DARK_GRAY), //NOI18N "controlDkShadow", new ThemeValue (Region.PANEL, ThemeValue.BLACK, Color.BLACK), //NOI18N "controlLtHighlight", new ThemeValue (Region.PANEL, ThemeValue.WHITE, Color.WHITE), //NOI18N "textText", new ThemeValue (Region.PANEL, ColorType.TEXT_FOREGROUND, Color.BLACK), //NOI18N "text", new ThemeValue (Region.PANEL, ColorType.TEXT_BACKGROUND, Color.GRAY), //NOI18N "tab_unsel_fill", control, //NOI18N "SplitPane.dividerSize", new Integer (2), //NOI18N SYSTEMFONT, controlFont, //NOI18N USERFONT, controlFont, //NOI18N MENUFONT, controlFont, //NOI18N LISTFONT, controlFont, //NOI18N "Label.font", controlFont, //NOI18N "Panel.font", controlFont, //NOI18N // workaround: GTKLookAndFeel FileChooser is unusable, cannot // choose a dir and doesn't look native anyway. We force MetalFileChooserUI "FileChooserUI", "javax.swing.plaf.metal.MetalFileChooserUI", // NOI18N "FileView.computerIcon", javax.swing.plaf.metal.MetalIconFactory.getTreeComputerIcon(), // NOI18N "FileView.hardDriveIcon", javax.swing.plaf.metal.MetalIconFactory.getTreeHardDriveIcon(), // NOI18N "FileView.floppyDriveIcon", javax.swing.plaf.metal.MetalIconFactory.getTreeFloppyDriveIcon(), // NOI18N "FileChooser.newFolderIcon", javax.swing.plaf.metal.MetalIconFactory.getFileChooserNewFolderIcon(), // NOI18N "FileChooser.upFolderIcon", javax.swing.plaf.metal.MetalIconFactory.getFileChooserUpFolderIcon(), // NOI18N "FileChooser.homeFolderIcon", javax.swing.plaf.metal.MetalIconFactory.getFileChooserHomeFolderIcon(), // NOI18N "FileChooser.detailsViewIcon", javax.swing.plaf.metal.MetalIconFactory.getFileChooserDetailViewIcon(), // NOI18N "FileChooser.listViewIcon", javax.swing.plaf.metal.MetalIconFactory.getFileChooserListViewIcon(), // NOI18N "FileChooser.usesSingleFilePane", Boolean.TRUE, // NOI18N "FileChooser.ancestorInputMap", // NOI18N new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection", // NOI18N "F2", "editFileName", // NOI18N "F5", "refresh", // NOI18N "BACK_SPACE", "Go Up", // NOI18N "ENTER", "approveSelection", // NOI18N "ctrl ENTER", "approveSelection" // NOI18N }), // special tree icons - only for property sheet "Tree.gtk_expandedIcon", new GTKExpandedIcon(), "Tree.gtk_collapsedIcon", new GTKCollapsedIcon(), }; } else { Object[] result = new Object[] { TOOLBAR_UI, new UIDefaults.ProxyLazyValue("org.netbeans.swing.plaf.gtk.GtkToolbarUI"), //NOI18N // special tree icons - only for property sheet "Tree.gtk_expandedIcon", new GTKExpandedIcon(), "Tree.gtk_collapsedIcon", new GTKCollapsedIcon(), }; return result; } }