basiclookandfeel.java

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

JAVA
1,545
字号
					 table.getColor("controlLtHighlight"),					 table.getColor("control"),					 table.getColor("controlDkShadow"),					 table.getColor("controlShadow") });	// *** Button value objects	Object buttonBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getButtonBorder");	Object buttonToggleBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getToggleButtonBorder");	Object radioButtonBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getRadioButtonBorder");	// *** FileChooser / FileView value objects	Object newFolderIcon = LookAndFeel.makeIcon(getClass(), "icons/NewFolder.gif");	Object upFolderIcon = LookAndFeel.makeIcon(getClass(), "icons/UpFolder.gif");	Object homeFolderIcon = LookAndFeel.makeIcon(getClass(), "icons/HomeFolder.gif");	Object detailsViewIcon = LookAndFeel.makeIcon(getClass(), "icons/DetailsView.gif");	Object listViewIcon = LookAndFeel.makeIcon(getClass(), "icons/ListView.gif");	Object directoryIcon = LookAndFeel.makeIcon(getClass(), "icons/Directory.gif");	Object fileIcon = LookAndFeel.makeIcon(getClass(), "icons/File.gif");	Object computerIcon = LookAndFeel.makeIcon(getClass(), "icons/Computer.gif");	Object hardDriveIcon = LookAndFeel.makeIcon(getClass(), "icons/HardDrive.gif");	Object floppyDriveIcon = LookAndFeel.makeIcon(getClass(), "icons/FloppyDrive.gif");	// *** InternalFrame value objects	Object internalFrameBorder = new UIDefaults.ProxyLazyValue(                "javax.swing.plaf.basic.BasicBorders", 		"getInternalFrameBorder");	// *** List value objects	Object listCellRendererActiveValue = new UIDefaults.ActiveValue() {	    public Object createValue(UIDefaults table) {		return new DefaultListCellRenderer.UIResource();	    }	};	// *** Menus value objects	Object menuBarBorder = 	    new UIDefaults.ProxyLazyValue(                "javax.swing.plaf.basic.BasicBorders", 		"getMenuBarBorder");	Object menuItemCheckIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getMenuItemCheckIcon");	Object menuItemArrowIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getMenuItemArrowIcon");	Object menuArrowIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getMenuArrowIcon");	Object checkBoxIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getCheckBoxIcon");	Object radioButtonIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getRadioButtonIcon");	Object checkBoxMenuItemIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getCheckBoxMenuItemIcon");	Object radioButtonMenuItemIcon = 	    new UIDefaults.ProxyLazyValue(		"javax.swing.plaf.basic.BasicIconFactory", 		"getRadioButtonMenuItemIcon");	Object menuItemAcceleratorDelimiter = new String("+");	// *** OptionPane value objects        Object optionPaneMinimumSize = new DimensionUIResource(262, 90);	Integer zero =  new Integer(0);        Object zeroBorder = new UIDefaults.ProxyLazyValue(			   "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",			   new Object[] {zero, zero, zero, zero});	Integer ten = new Integer(10);        Object optionPaneBorder = new UIDefaults.ProxyLazyValue(			   "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",			   new Object[] {ten, ten, twelve, ten});	        Object optionPaneButtonAreaBorder = new UIDefaults.ProxyLazyValue(			   "javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",			   new Object[] {new Integer(6), zero, zero, zero});	// *** ProgessBar value objects	Object progressBarBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getProgressBarBorder");	// ** ScrollBar value objects	Object minimumThumbSize = new DimensionUIResource(8,8);	Object maximumThumbSize = new DimensionUIResource(4096,4096);	// ** Slider value objects	Object sliderFocusInsets = new InsetsUIResource( 2, 2, 2, 2 );	Object toolBarSeparatorSize = new DimensionUIResource( 10, 10 );	// *** SplitPane value objects	Object splitPaneBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getSplitPaneBorder");	Object splitPaneDividerBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getSplitPaneDividerBorder");	// ** TabbedBane value objects        Object tabbedPaneTabInsets = new InsetsUIResource(0, 4, 1, 4);        Object tabbedPaneTabPadInsets = new InsetsUIResource(2, 2, 2, 1);        Object tabbedPaneTabAreaInsets = new InsetsUIResource(3, 2, 0, 2);        Object tabbedPaneContentBorderInsets = new InsetsUIResource(2, 2, 3, 3);	// *** Text value objects	Object textFieldBorder = 	    new UIDefaults.ProxyLazyValue(			    "javax.swing.plaf.basic.BasicBorders",			    "getTextFieldBorder");        Object editorMargin = new InsetsUIResource(3,3,3,3);	Object caretBlinkRate = fiveHundred;	Integer four = new Integer(4);	Object[] allAuditoryCues = new Object[] {		"CheckBoxMenuItem.commandSound",		"InternalFrame.closeSound",		"InternalFrame.maximizeSound",		"InternalFrame.minimizeSound",		"InternalFrame.restoreDownSound",		"InternalFrame.restoreUpSound",		"MenuItem.commandSound",		"OptionPane.errorSound",		"OptionPane.informationSound",		"OptionPane.questionSound",		"OptionPane.warningSound",		"PopupMenu.popupSound",		"RadioButtonMenuItem.commandSound"};	Object[] noAuditoryCues = new Object[] {"mute"};        // *** Component Defaults	Object[] defaults = {	    // *** Auditory Feedback	    "AuditoryCues.cueList", allAuditoryCues,	    "AuditoryCues.allAuditoryCues", allAuditoryCues,	    "AuditoryCues.noAuditoryCues", noAuditoryCues,	    // this key defines which of the various cues to render.	    // L&Fs that want auditory feedback NEED to override playList.	    "AuditoryCues.playList", null,	    // *** Buttons	    "Button.font", dialogPlain12,	    "Button.background", table.get("control"),	    "Button.foreground", table.get("controlText"),	    "Button.shadow", table.getColor("controlShadow"),            "Button.darkShadow", table.getColor("controlDkShadow"),            "Button.light", table.getColor("controlHighlight"),            "Button.highlight", table.getColor("controlLtHighlight"),	    "Button.border", buttonBorder,	    "Button.margin", new InsetsUIResource(2, 14, 2, 14),	    "Button.textIconGap", four,	    "Button.textShiftOffset", zero,	    "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {                         "SPACE", "pressed",                "released SPACE", "released",                         "ENTER", "pressed",                "released ENTER", "released"              }),	    "ToggleButton.font", dialogPlain12,	    "ToggleButton.background", table.get("control"),	    "ToggleButton.foreground", table.get("controlText"),	    "ToggleButton.shadow", table.getColor("controlShadow"),            "ToggleButton.darkShadow", table.getColor("controlDkShadow"),            "ToggleButton.light", table.getColor("controlHighlight"),            "ToggleButton.highlight", table.getColor("controlLtHighlight"),	    "ToggleButton.border", buttonToggleBorder,	    "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14),	    "ToggleButton.textIconGap", four,	    "ToggleButton.textShiftOffset", zero,	    "ToggleButton.focusInputMap",	      new UIDefaults.LazyInputMap(new Object[] {		            "SPACE", "pressed",                   "released SPACE", "released"	        }),	    "RadioButton.font", dialogPlain12,	    "RadioButton.background", table.get("control"),	    "RadioButton.foreground", table.get("controlText"),	    "RadioButton.shadow", table.getColor("controlShadow"),            "RadioButton.darkShadow", table.getColor("controlDkShadow"),            "RadioButton.light", table.getColor("controlHighlight"),            "RadioButton.highlight", table.getColor("controlLtHighlight"),	    "RadioButton.border", radioButtonBorder,	    "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2),	    "RadioButton.textIconGap", four,	    "RadioButton.textShiftOffset", zero,	    "RadioButton.icon", radioButtonIcon,	    "RadioButton.focusInputMap",	       new UIDefaults.LazyInputMap(new Object[] {                          "SPACE", "pressed",                 "released SPACE", "released",			 "RETURN", "pressed"	      }),	    "CheckBox.font", dialogPlain12,	    "CheckBox.background", table.get("control"),	    "CheckBox.foreground", table.get("controlText"),	    "CheckBox.border", radioButtonBorder,	    "CheckBox.margin", new InsetsUIResource(2, 2, 2, 2),	    "CheckBox.textIconGap", four,	    "CheckBox.textShiftOffset", zero,	    "CheckBox.icon", checkBoxIcon,	    "CheckBox.focusInputMap",	       new UIDefaults.LazyInputMap(new Object[] {		            "SPACE", "pressed",                   "released SPACE", "released"		 }),	    // *** ColorChooser            "ColorChooser.font", dialogPlain12,            "ColorChooser.background", table.get("control"),            "ColorChooser.foreground", table.get("controlText"),            "ColorChooser.swatchesSwatchSize", new Dimension(10, 10),            "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10),            "ColorChooser.swatchesDefaultRecentColor", table.get("control"),            "ColorChooser.rgbRedMnemonic", new Integer(KeyEvent.VK_D),            "ColorChooser.rgbGreenMnemonic", new Integer(KeyEvent.VK_N),            "ColorChooser.rgbBlueMnemonic", new Integer(KeyEvent.VK_B),	    // *** ComboBox            "ComboBox.font", sansSerifPlain12,            "ComboBox.background", table.get("window"),            "ComboBox.foreground", table.get("textText"),	    "ComboBox.buttonBackground", table.get("control"),	    "ComboBox.buttonShadow", table.get("controlShadow"),	    "ComboBox.buttonDarkShadow", table.get("controlDkShadow"),	    "ComboBox.buttonHighlight", table.get("controlLtHighlight"),            "ComboBox.selectionBackground", table.get("textHighlight"),            "ComboBox.selectionForeground", table.get("textHighlightText"),            "ComboBox.disabledBackground", table.get("control"),            "ComboBox.disabledForeground", table.get("textInactiveText"),	    "ComboBox.ancestorInputMap",	       new UIDefaults.LazyInputMap(new Object[] {		      "ESCAPE", "hidePopup",		     "PAGE_UP", "pageUpPassThrough",		   "PAGE_DOWN", "pageDownPassThrough",		        "HOME", "homePassThrough",		         "END", "endPassThrough",		       "ENTER", "enterPressed"		 }), 	    // *** FileChooser 	             "FileChooser.cancelButtonMnemonic", new Integer(KeyEvent.VK_C),            "FileChooser.saveButtonMnemonic", new Integer(KeyEvent.VK_S),            "FileChooser.openButtonMnemonic", new Integer(KeyEvent.VK_O),            "FileChooser.updateButtonMnemonic", new Integer(KeyEvent.VK_U),            "FileChooser.helpButtonMnemonic", new Integer(KeyEvent.VK_H),

⌨️ 快捷键说明

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