本文整理匯總了Java中javax.swing.UIDefaults.ProxyLazyValue方法的典型用法代碼示例。如果您正苦於以下問題:Java UIDefaults.ProxyLazyValue方法的具體用法?Java UIDefaults.ProxyLazyValue怎麽用?Java UIDefaults.ProxyLazyValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.UIDefaults
的用法示例。
在下文中一共展示了UIDefaults.ProxyLazyValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createLookAndFeelCustomizationKeysAndValues
import javax.swing.UIDefaults; //導入方法依賴的package包/類
@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;
}
}