本文整理汇总了Java中sun.swing.plaf.WindowsKeybindings类的典型用法代码示例。如果您正苦于以下问题:Java WindowsKeybindings类的具体用法?Java WindowsKeybindings怎么用?Java WindowsKeybindings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WindowsKeybindings类属于sun.swing.plaf包,在下文中一共展示了WindowsKeybindings类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaults
import sun.swing.plaf.WindowsKeybindings; //导入依赖的package包/类
/**
* Returns the defaults for SeaGlassLookAndFeel.
*
* @return the UI defaults for SeaGlassLookAndFeel.
*/
@Override
public UIDefaults getDefaults() {
if (uiDefaults == null) {
uiDefaults = new UIWrapper(super.getDefaults());
// Install Keybindings for the operating system.
if (PlatformUtils.isWindows()) {
WindowsKeybindings.installKeybindings(uiDefaults);
} else if (PlatformUtils.isMac()) {
MacKeybindings.installKeybindings(uiDefaults);
} else {
GTKKeybindings.installKeybindings(uiDefaults);
}
// Set the default font.
defineDefaultFont(uiDefaults);
// Override some of the Synth UI delegates with copied and modified
// versions.
useOurUIs();
defineBaseColors(uiDefaults);
defineDefaultBorders(uiDefaults);
defineArrowButtons(uiDefaults);
defineButtons(uiDefaults);
defineComboBoxes(uiDefaults);
defineDesktopPanes(uiDefaults);
defineInternalFrames(uiDefaults);
defineInternalFrameMenuButtons(uiDefaults);
defineInternalFrameCloseButtons(uiDefaults);
defineInternalFrameIconifyButtons(uiDefaults);
defineInternalFrameMaximizeButton(uiDefaults);
defineLists(uiDefaults);
defineMenus(uiDefaults);
definePanels(uiDefaults);
definePopups(uiDefaults);
defineProgressBars(uiDefaults);
defineRootPanes(uiDefaults);
defineSeparators(uiDefaults);
defineSpinners(uiDefaults);
defineScrollBars(uiDefaults);
defineScrollPane(uiDefaults);
defineSliders(uiDefaults);
defineSplitPanes(uiDefaults);
defineTabbedPanes(uiDefaults);
defineTables(uiDefaults);
defineTextControls(uiDefaults);
defineToolBars(uiDefaults);
defineTrees(uiDefaults);
defineToolTips(uiDefaults);
defineOptionPane(uiDefaults);
defineFileChooser(uiDefaults);
if (!PlatformUtils.isMac()) {
uiDefaults.put("MenuBar[Enabled].backgroundPainter", null);
uiDefaults.put("MenuBar[Enabled].borderPainter", null);
// If we're not on a Mac, draw our own title bar.
JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);
} else {
// If we're on a Mac, use the screen menu bar.
System.setProperty("apple.laf.useScreenMenuBar", "true");
// If we're on a Mac, use Aqua for some things.
defineAquaSettings(uiDefaults);
}
}
return uiDefaults;
}