metallookandfeel.java

来自「java jdk 1.4的源码」· Java 代码 · 共 1,404 行 · 第 1/5 页

JAVA
1,404
字号
		            "LEFT", "unitScrollLeft",		         "KP_LEFT", "unitScrollLeft",		              "UP", "unitScrollUp",		           "KP_UP", "unitScrollUp",		         "PAGE_UP", "scrollUp",		       "PAGE_DOWN", "scrollDown",		    "ctrl PAGE_UP", "scrollLeft",		  "ctrl PAGE_DOWN", "scrollRight",		       "ctrl HOME", "scrollHome",		        "ctrl END", "scrollEnd"		 }),            // Tabbed Pane            "TabbedPane.font", controlTextValue,            "TabbedPane.tabAreaBackground", getControl(),            "TabbedPane.background", getControlShadow(),            "TabbedPane.light", getControl(),            "TabbedPane.focus", getPrimaryControlDarkShadow(),            "TabbedPane.selected", getControl(),            "TabbedPane.selectHighlight", getControlHighlight(),            "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets,            "TabbedPane.tabInsets", tabbedPaneTabInsets,	    "TabbedPane.focusInputMap",	      new UIDefaults.LazyInputMap(new Object[] {		         "RIGHT", "navigateRight",	              "KP_RIGHT", "navigateRight",	                  "LEFT", "navigateLeft",	               "KP_LEFT", "navigateLeft",	                    "UP", "navigateUp",	                 "KP_UP", "navigateUp",	                  "DOWN", "navigateDown",	               "KP_DOWN", "navigateDown",	             "ctrl DOWN", "requestFocusForVisibleComponent",	          "ctrl KP_DOWN", "requestFocusForVisibleComponent",		}),	    "TabbedPane.ancestorInputMap",	       new UIDefaults.LazyInputMap(new Object[] {		   "ctrl PAGE_DOWN", "navigatePageDown",	             "ctrl PAGE_UP", "navigatePageUp",	                  "ctrl UP", "requestFocus",	               "ctrl KP_UP", "requestFocus",		 }),                        // Table	    "Table.font", userTextValue,            "Table.focusCellHighlightBorder", focusCellHighlightBorder,            "Table.scrollPaneBorder", scrollPaneBorder,      	    "Table.gridColor", getControlShadow(),  // grid line color	    "Table.ancestorInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                               "ctrl C", "copy",                               "ctrl V", "paste",                               "ctrl X", "cut",                                 "COPY", "copy",                                "PASTE", "paste",                                  "CUT", "cut",		                "RIGHT", "selectNextColumn",		             "KP_RIGHT", "selectNextColumn",		                 "LEFT", "selectPreviousColumn",		              "KP_LEFT", "selectPreviousColumn",		                 "DOWN", "selectNextRow",		              "KP_DOWN", "selectNextRow",		                   "UP", "selectPreviousRow",		                "KP_UP", "selectPreviousRow",		          "shift RIGHT", "selectNextColumnExtendSelection",		       "shift KP_RIGHT", "selectNextColumnExtendSelection",		           "shift LEFT", "selectPreviousColumnExtendSelection",		        "shift KP_LEFT", "selectPreviousColumnExtendSelection",		           "shift DOWN", "selectNextRowExtendSelection",		        "shift KP_DOWN", "selectNextRowExtendSelection",		             "shift UP", "selectPreviousRowExtendSelection",		          "shift KP_UP", "selectPreviousRowExtendSelection",		              "PAGE_UP", "scrollUpChangeSelection",		            "PAGE_DOWN", "scrollDownChangeSelection",		                 "HOME", "selectFirstColumn",		                  "END", "selectLastColumn",		        "shift PAGE_UP", "scrollUpExtendSelection",		      "shift PAGE_DOWN", "scrollDownExtendSelection",		           "shift HOME", "selectFirstColumnExtendSelection",		            "shift END", "selectLastColumnExtendSelection",		         "ctrl PAGE_UP", "scrollLeftChangeSelection",		       "ctrl PAGE_DOWN", "scrollRightChangeSelection",		            "ctrl HOME", "selectFirstRow",		             "ctrl END", "selectLastRow",		   "ctrl shift PAGE_UP", "scrollRightExtendSelection",		 "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection",		      "ctrl shift HOME", "selectFirstRowExtendSelection",		       "ctrl shift END", "selectLastRowExtendSelection",		                  "TAB", "selectNextColumnCell",		            "shift TAB", "selectPreviousColumnCell",		                "ENTER", "selectNextRowCell",		          "shift ENTER", "selectPreviousRowCell",		               "ctrl A", "selectAll",		               "ESCAPE", "cancel",		                   "F2", "startEditing"		 }),	    "TableHeader.font", userTextValue,	    "TableHeader.cellBorder", new UIDefaults.ProxyLazyValue(					  "javax.swing.plaf.metal.MetalBorders$TableHeaderBorder"),            // MenuBar            "MenuBar.border", menuBarBorder,            "MenuBar.font", menuTextValue,	    "MenuBar.windowBindings", new Object[] {		"F10", "takeFocus" },            // Menu            "Menu.border", menuItemBorder,            "Menu.borderPainted", Boolean.TRUE,	    "Menu.menuPopupOffsetX", new Integer(0),	    "Menu.menuPopupOffsetY", new Integer(0),	    "Menu.submenuPopupOffsetX", new Integer(-4),	    "Menu.submenuPopupOffsetY", new Integer(-3),            "Menu.font", menuTextValue,            "Menu.selectionForeground", getMenuSelectedForeground(),            "Menu.selectionBackground", getMenuSelectedBackground(),            "Menu.disabledForeground", getMenuDisabledForeground(),            "Menu.acceleratorFont", subTextValue,            "Menu.acceleratorForeground", getAcceleratorForeground(),            "Menu.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),            "Menu.checkIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuItemCheckIcon"),            "Menu.arrowIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuArrowIcon"),            // Menu Item            "MenuItem.border", menuItemBorder,            "MenuItem.borderPainted", Boolean.TRUE,            "MenuItem.font", menuTextValue,            "MenuItem.selectionForeground", getMenuSelectedForeground(),            "MenuItem.selectionBackground", getMenuSelectedBackground(),            "MenuItem.disabledForeground", getMenuDisabledForeground(),            "MenuItem.acceleratorFont", subTextValue,            "MenuItem.acceleratorForeground", getAcceleratorForeground(),            "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),	    "MenuItem.acceleratorDelimiter", menuItemAcceleratorDelimiter,            "MenuItem.checkIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuItemCheckIcon"),            "MenuItem.arrowIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuItemArrowIcon"),	         // Menu Item Auditory Cue Mapping	    "MenuItem.commandSound", "sounds/MenuItemCommand.wav",	    // OptionPane.	    "OptionPane.windowBindings", new Object[] {		"ESCAPE", "close" },	    // Option Pane Auditory Cue Mappings            "OptionPane.informationSound", "sounds/OptionPaneInformation.wav",            "OptionPane.warningSound", "sounds/OptionPaneWarning.wav",            "OptionPane.errorSound", "sounds/OptionPaneError.wav",            "OptionPane.questionSound", "sounds/OptionPaneQuestion.wav",            // Option Pane Special Dialog Colors, used when MetalRootPaneUI            // is providing window manipulation widgets.            "OptionPane.errorDialog.border.background",                        new ColorUIResource(153, 51, 51),            "OptionPane.errorDialog.titlePane.foreground",                        new ColorUIResource(51, 0, 0),            "OptionPane.errorDialog.titlePane.background",                        new ColorUIResource(255, 153, 153),            "OptionPane.errorDialog.titlePane.shadow",                        new ColorUIResource(204, 102, 102),            "OptionPane.questionDialog.border.background",                        new ColorUIResource(51, 102, 51),            "OptionPane.questionDialog.titlePane.foreground",                        new ColorUIResource(0, 51, 0),            "OptionPane.questionDialog.titlePane.background",                        new ColorUIResource(153, 204, 153),            "OptionPane.questionDialog.titlePane.shadow",                        new ColorUIResource(102, 153, 102),            "OptionPane.warningDialog.border.background",                        new ColorUIResource(153, 102, 51),            "OptionPane.warningDialog.titlePane.foreground",                        new ColorUIResource(102, 51, 0),            "OptionPane.warningDialog.titlePane.background",                        new ColorUIResource(255, 204, 153),            "OptionPane.warningDialog.titlePane.shadow",                        new ColorUIResource(204, 153, 102),            // OptionPane fonts are defined below                       // Separator            "Separator.background", getSeparatorBackground(),            "Separator.foreground", getSeparatorForeground(),            // Popup Menu            "PopupMenu.border", popupMenuBorder,          	         // Popup Menu Auditory Cue Mappings            "PopupMenu.popupSound", "sounds/PopupMenuPopup.wav",            "PopupMenu.font", menuTextValue,            // CB & RB Menu Item            "CheckBoxMenuItem.border", menuItemBorder,            "CheckBoxMenuItem.borderPainted", Boolean.TRUE,            "CheckBoxMenuItem.font", menuTextValue,            "CheckBoxMenuItem.selectionForeground", getMenuSelectedForeground(),            "CheckBoxMenuItem.selectionBackground", getMenuSelectedBackground(),            "CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(),            "CheckBoxMenuItem.acceleratorFont", subTextValue,            "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(),            "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),            "CheckBoxMenuItem.checkIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getCheckBoxMenuItemIcon"),            "CheckBoxMenuItem.arrowIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuItemArrowIcon"),	    "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav",            "RadioButtonMenuItem.border", menuItemBorder,            "RadioButtonMenuItem.borderPainted", Boolean.TRUE,            "RadioButtonMenuItem.font", menuTextValue,            "RadioButtonMenuItem.selectionForeground", getMenuSelectedForeground(),            "RadioButtonMenuItem.selectionBackground", getMenuSelectedBackground(),            "RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(),            "RadioButtonMenuItem.acceleratorFont", subTextValue,            "RadioButtonMenuItem.acceleratorForeground", getAcceleratorForeground(),            "RadioButtonMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),            "RadioButtonMenuItem.checkIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getRadioButtonMenuItemIcon"),            "RadioButtonMenuItem.arrowIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getMenuItemArrowIcon"),	    "RadioButtonMenuItem.commandSound", "sounds/MenuItemCommand.wav",            "Spinner.ancestorInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                               "UP", "increment",                            "KP_UP", "increment",                             "DOWN", "decrement",                          "KP_DOWN", "decrement",               }),	    "Spinner.arrowButtonInsets", new Insets(0, 0, 0, 0),	    "Spinner.border", textFieldBorder,	    "Spinner.arrowButtonBorder", buttonBorder,            "Spinner.font", controlTextValue,	    // SplitPane	    "SplitPane.dividerSize", new Integer(10),	    "SplitPane.ancestorInputMap",	       new UIDefaults.LazyInputMap(new Object[] {		        "UP", "negativeIncrement",		      "DOWN", "positiveIncrement",		      "LEFT", "negativeIncrement",		     "RIGHT", "positiveIncrement",		     "KP_UP", "negativeIncrement",		   "KP_DOWN", "positiveIncrement",		   "KP_LEFT", "negativeIncrement",		  "KP_RIGHT", "positiveIncrement",		      "HOME", "selectMin",		       "END", "selectMax",		        "F8", "startResize",		        "F6", "toggleFocus",		  "ctrl TAB", "focusOutForward", 	    "ctrl shift TAB", "focusOutBackward"		 }),            // Tree            // Tree.font was mapped to system font pre 1.4.1            "Tree.font", userTextValue,            "Tree.textBackground", getWindowBackground(),            "Tree.selectionBorderColor", MetalLookAndFeel.getFocusColor(),            "Tree.openIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getTreeFolderIcon"),            "Tree.closedIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getTreeFolderIcon"),            "Tree.leafIcon", new UIDefaults.ProxyLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getTreeLeafIcon"),            "Tree.expandedIcon", new UIDefaults.ProxyLazyValue(				     "javax.swing.plaf.metal.MetalIconFactory", 				     "getTreeControlIcon",				     new Object[] {Boolean.valueOf(MetalIconFactory.DARK)}),            "Tree.collapsedIcon", new UIDefaults.ProxyLazyValue(				     "javax.swing.plaf.metal.MetalIconFactory", 				     "getTreeControlIcon",				     new Object[] {Boolean.valueOf( MetalIconFactory.LIGHT )}),            "Tree.line", getPrimaryControl(), // horiz lines            "Tree.hash", getPrimaryControl(),  // legs	    "Tree.rowHeight", new Integer(0),	    "Tree.focusInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                                 "ctrl C", "copy",                                 "ctrl V", "paste",                                 "ctrl X", "cut",                                   "COPY", "copy",                                  "PASTE", "paste",                                    "CUT", "cut",		                     "UP", "selectPrevious",		                  "KP_UP", "selectPrevious",		               "shift UP", "selectPreviousExtendSelection",		            "shift KP_UP", "selectPreviousExtendSelection",		                   "DOWN", "selectNext",		                "KP_DOWN", "selectNext",

⌨️ 快捷键说明

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