windowslookandfeel.java

来自「JAVA的一些源码 JAVA2 STANDARD EDITION DEVELO」· Java 代码 · 共 1,348 行 · 第 1/5 页

JAVA
1,348
字号
							 table.get("activeCaptionText"),                                                        toolkit),	    "InternalFrame.inactiveTitleBackground", new DesktopProperty(                                                        "win.frame.inactiveCaptionColor",							 table.get("inactiveCaption"),                                                        toolkit),	    "InternalFrame.inactiveTitleGradient", new DesktopProperty(                                                        "win.frame.inactiveCaptionGradientColor",							 table.get("inactiveCaption"),                                                        toolkit),	    "InternalFrame.inactiveTitleForeground", new DesktopProperty(                                                        "win.frame.inactiveCaptionTextColor",							 table.get("inactiveCaptionText"),                                                        toolkit),                        "InternalFrame.maximizeIcon",                 WindowsIconFactory.createFrameMaximizeIcon(),            "InternalFrame.minimizeIcon",                 WindowsIconFactory.createFrameMinimizeIcon(),            "InternalFrame.iconifyIcon",                 WindowsIconFactory.createFrameIconifyIcon(),            "InternalFrame.closeIcon",                 WindowsIconFactory.createFrameCloseIcon(),            "InternalFrame.icon",		new SwingLazyValue(	"com.sun.java.swing.plaf.windows.WindowsInternalFrameTitlePane$ScalableIconUIResource",		    // The constructor takes one arg: an array of UIDefaults.LazyValue		    // representing the icons		    new Object[][] { {                        SwingUtilities2.makeIcon(getClass(), BasicLookAndFeel.class, "icons/JavaCup16.png"),                        SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, "icons/JavaCup32.png")		    } }),	    // Internal Frame Auditory Cue Mappings            "InternalFrame.closeSound", "win.sound.close",            "InternalFrame.maximizeSound", "win.sound.maximize",            "InternalFrame.minimizeSound", "win.sound.minimize",            "InternalFrame.restoreDownSound", "win.sound.restoreDown",            "InternalFrame.restoreUpSound", "win.sound.restoreUp",	    "InternalFrame.windowBindings", new Object[] {		"shift ESCAPE", "showSystemMenu",		  "ctrl SPACE", "showSystemMenu",		      "ESCAPE", "hideSystemMenu"},	    	    // Label	    "Label.font", ControlFont,	    "Label.background", ControlBackgroundColor,	    "Label.foreground", ControlTextColor,	    "Label.disabledForeground", InactiveTextColor,	    "Label.disabledShadow", ControlHighlightColor,	    // List.	    "List.font", ControlFont,	    "List.background", WindowBackgroundColor,	    "List.foreground", WindowTextColor,	    "List.selectionBackground", SelectionBackgroundColor,	    "List.selectionForeground", SelectionTextColor,	    "List.lockToPositionOnScroll", Boolean.TRUE,	    "List.focusInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                           "ctrl C", "copy",                           "ctrl V", "paste",                           "ctrl X", "cut",                             "COPY", "copy",                            "PASTE", "paste",                              "CUT", "cut",		               "UP", "selectPreviousRow",		            "KP_UP", "selectPreviousRow",		         "shift UP", "selectPreviousRowExtendSelection",		      "shift KP_UP", "selectPreviousRowExtendSelection",                    "ctrl shift UP", "selectPreviousRowExtendSelection",                 "ctrl shift KP_UP", "selectPreviousRowExtendSelection",                          "ctrl UP", "selectPreviousRowChangeLead",                       "ctrl KP_UP", "selectPreviousRowChangeLead",		             "DOWN", "selectNextRow",		          "KP_DOWN", "selectNextRow",		       "shift DOWN", "selectNextRowExtendSelection",		    "shift KP_DOWN", "selectNextRowExtendSelection",                  "ctrl shift DOWN", "selectNextRowExtendSelection",               "ctrl shift KP_DOWN", "selectNextRowExtendSelection",                        "ctrl DOWN", "selectNextRowChangeLead",                     "ctrl KP_DOWN", "selectNextRowChangeLead",		             "LEFT", "selectPreviousColumn",		          "KP_LEFT", "selectPreviousColumn",		       "shift LEFT", "selectPreviousColumnExtendSelection",		    "shift KP_LEFT", "selectPreviousColumnExtendSelection",                  "ctrl shift LEFT", "selectPreviousColumnExtendSelection",               "ctrl shift KP_LEFT", "selectPreviousColumnExtendSelection",                        "ctrl LEFT", "selectPreviousColumnChangeLead",                     "ctrl KP_LEFT", "selectPreviousColumnChangeLead",		            "RIGHT", "selectNextColumn",		         "KP_RIGHT", "selectNextColumn",		      "shift RIGHT", "selectNextColumnExtendSelection",		   "shift KP_RIGHT", "selectNextColumnExtendSelection",                 "ctrl shift RIGHT", "selectNextColumnExtendSelection",              "ctrl shift KP_RIGHT", "selectNextColumnExtendSelection",                       "ctrl RIGHT", "selectNextColumnChangeLead",                    "ctrl KP_RIGHT", "selectNextColumnChangeLead",		             "HOME", "selectFirstRow",		       "shift HOME", "selectFirstRowExtendSelection",                  "ctrl shift HOME", "selectFirstRowExtendSelection",                        "ctrl HOME", "selectFirstRowChangeLead",		              "END", "selectLastRow",		        "shift END", "selectLastRowExtendSelection",                   "ctrl shift END", "selectLastRowExtendSelection",                         "ctrl END", "selectLastRowChangeLead",		          "PAGE_UP", "scrollUp",		    "shift PAGE_UP", "scrollUpExtendSelection",               "ctrl shift PAGE_UP", "scrollUpExtendSelection",                     "ctrl PAGE_UP", "scrollUpChangeLead",		        "PAGE_DOWN", "scrollDown",		  "shift PAGE_DOWN", "scrollDownExtendSelection",             "ctrl shift PAGE_DOWN", "scrollDownExtendSelection",                   "ctrl PAGE_DOWN", "scrollDownChangeLead",		           "ctrl A", "selectAll",		       "ctrl SLASH", "selectAll",		  "ctrl BACK_SLASH", "clearSelection",                            "SPACE", "addToSelection",                       "ctrl SPACE", "toggleAndAnchor",                      "shift SPACE", "extendTo",                 "ctrl shift SPACE", "moveSelectionTo"		 }),	    // PopupMenu	    "PopupMenu.font", MenuFont,	    "PopupMenu.background", MenuBackgroundColor,	    "PopupMenu.foreground", MenuTextColor,            "PopupMenu.popupSound", "win.sound.menuPopup",	    // Menus            "Menu.font", MenuFont,            "Menu.foreground", MenuTextColor,            "Menu.background", MenuBackgroundColor,	    "Menu.useMenuBarBackgroundForTopLevel", Boolean.TRUE,            "Menu.selectionForeground", SelectionTextColor,            "Menu.selectionBackground", SelectionBackgroundColor,	    "Menu.acceleratorForeground", MenuTextColor,	    "Menu.acceleratorSelectionForeground", SelectionTextColor,	    "Menu.menuPopupOffsetX", new Integer(0),	    "Menu.menuPopupOffsetY", new Integer(0),	    "Menu.submenuPopupOffsetX", new Integer(-4),	    "Menu.submenuPopupOffsetY", new Integer(-3),            "Menu.crossMenuMnemonic", Boolean.FALSE,	    // MenuBar.	    "MenuBar.font", MenuFont,	    "MenuBar.background", new XPValue(MenuBarBackgroundColor,					      MenuBackgroundColor),	    "MenuBar.foreground", MenuTextColor,	    "MenuBar.shadow", ControlShadowColor,	    "MenuBar.highlight", ControlHighlightColor,	    "MenuBar.windowBindings", new Object[] {		"F10", "takeFocus" },            "MenuItem.font", MenuFont,            "MenuItem.acceleratorFont", MenuFont,            "MenuItem.foreground", MenuTextColor,            "MenuItem.background", MenuBackgroundColor,            "MenuItem.selectionForeground", SelectionTextColor,            "MenuItem.selectionBackground", SelectionBackgroundColor,	    "MenuItem.disabledForeground", InactiveTextColor,	    "MenuItem.acceleratorForeground", MenuTextColor,	    "MenuItem.acceleratorSelectionForeground", SelectionTextColor,	    "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter,	         // Menu Item Auditory Cue Mapping	    "MenuItem.commandSound", "win.sound.menuCommand",	    "RadioButton.font", ControlFont,            "RadioButton.interiorBackground", WindowBackgroundColor,            "RadioButton.background", ControlBackgroundColor,	    "RadioButton.foreground", ControlTextColor,            "RadioButton.shadow", ControlShadowColor,            "RadioButton.darkShadow", ControlDarkShadowColor,            "RadioButton.light", ControlLightColor,	    "RadioButton.highlight", ControlHighlightColor,            "RadioButton.focus", black,	    "RadioButton.focusInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                          "SPACE", "pressed",                 "released SPACE", "released"	      }),            "RadioButtonMenuItem.font", MenuFont,	    "RadioButtonMenuItem.foreground", MenuTextColor,	    "RadioButtonMenuItem.background", MenuBackgroundColor,	    "RadioButtonMenuItem.selectionForeground", SelectionTextColor,	    "RadioButtonMenuItem.selectionBackground", SelectionBackgroundColor,	    "RadioButtonMenuItem.disabledForeground", InactiveTextColor,	    "RadioButtonMenuItem.acceleratorForeground", MenuTextColor,	    "RadioButtonMenuItem.acceleratorSelectionForeground", SelectionTextColor,	    "RadioButtonMenuItem.commandSound", "win.sound.menuCommand",	    // OptionPane.	    "OptionPane.font", MessageFont,	    "OptionPane.messageFont", MessageFont,	    "OptionPane.buttonFont", MessageFont,	    "OptionPane.background", ControlBackgroundColor,	    "OptionPane.foreground", ControlTextColor,            "OptionPane.messageForeground", ControlTextColor,	    "OptionPane.errorIcon",       new LazyWindowsIcon("optionPaneIcon Error",							      "icons/Error.gif"),	    "OptionPane.informationIcon", new LazyWindowsIcon("optionPaneIcon Information",							      "icons/Inform.gif"),	    "OptionPane.questionIcon",    new LazyWindowsIcon("optionPaneIcon Question",							      "icons/Question.gif"),	    "OptionPane.warningIcon",     new LazyWindowsIcon("optionPaneIcon Warning",							      "icons/Warn.gif"),	    "OptionPane.windowBindings", new Object[] {		"ESCAPE", "close" },	         // Option Pane Auditory Cue Mappings            "OptionPane.errorSound", "win.sound.hand", // Error            "OptionPane.informationSound", "win.sound.asterisk", // Info Plain            "OptionPane.questionSound", "win.sound.question", // Question            "OptionPane.warningSound", "win.sound.exclamation", // Warning            "FormattedTextField.focusInputMap",              new UIDefaults.LazyInputMap(new Object[] {			   "ctrl C", DefaultEditorKit.copyAction,			   "ctrl V", DefaultEditorKit.pasteAction,			   "ctrl X", DefaultEditorKit.cutAction,			     "COPY", DefaultEditorKit.copyAction,			    "PASTE", DefaultEditorKit.pasteAction,			      "CUT", DefaultEditorKit.cutAction,		       "shift LEFT", DefaultEditorKit.selectionBackwardAction,                    "shift KP_LEFT", DefaultEditorKit.selectionBackwardAction,		      "shift RIGHT", DefaultEditorKit.selectionForwardAction,		   "shift KP_RIGHT", DefaultEditorKit.selectionForwardAction,			"ctrl LEFT", DefaultEditorKit.previousWordAction,		     "ctrl KP_LEFT", DefaultEditorKit.previousWordAction,		       "ctrl RIGHT", DefaultEditorKit.nextWordAction,		    "ctrl KP_RIGHT", DefaultEditorKit.nextWordAction,		  "ctrl shift LEFT", DefaultEditorKit.selectionPreviousWordAction,	       "ctrl shift KP_LEFT", DefaultEditorKit.selectionPreviousWordAction,		 "ctrl shift RIGHT", DefaultEditorKit.selectionNextWordAction,	      "ctrl shift KP_RIGHT", DefaultEditorKit.selectionNextWordAction,			   "ctrl A", DefaultEditorKit.selectAllAction,			     "HOME", DefaultEditorKit.beginLineAction,			      "END", DefaultEditorKit.endLineAction,		       "shift HOME", DefaultEditorKit.selectionBeginLineAction,		        "shift END", DefaultEditorKit.selectionEndLineAction,                       "BACK_SPACE", DefaultEditorKit.deletePrevCharAction,                           "ctrl H", DefaultEditorKit.deletePrevCharAction,                           "DELETE", DefaultEditorKit.deleteNextCharAction,                            "RIGHT", DefaultEditorKit.forwardAction,                             "LEFT", DefaultEditorKit.backwardAction,                         "KP_RIGHT", DefaultEditorKit.forwardAction,                          "KP_LEFT", DefaultEditorKit.backwardAction,			    "ENTER", JTextField.notifyAction,		  "ctrl BACK_SLASH", "unselect",                   "control shift O", "toggle-componentOrientation",                           "ESCAPE", "reset-field-edit",                               "UP", "increment",                            "KP_UP", "increment",                             "DOWN", "decrement",                          "KP_DOWN", "decrement",              }),	    // *** Panel	    "Panel.font", ControlFont,	    "Panel.background", ControlBackgroundColor,	    "Panel.foreground", WindowTextColor,	    // *** PasswordField	    "PasswordField.font", FixedControlFont,	    "PasswordField.background", TextBackground,	    "PasswordField.foreground", WindowTextColor,	    "PasswordField.inactiveForeground", InactiveTextColor,      // for disabled	    "PasswordField.inactiveBackground", ReadOnlyTextBackground, // for readonly

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?