Java Code Examples for javax.swing.UIDefaults#put()
The following examples show how to use
javax.swing.UIDefaults#put() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContrastMetalTheme.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { Border blackLineBorder = new BorderUIResource(new LineBorder(getBlack())); Border whiteLineBorder = new BorderUIResource(new LineBorder(getWhite())); Object textBorder = new BorderUIResource(new CompoundBorder( blackLineBorder, new BasicBorders.MarginBorder())); table.put("ToolTip.border", blackLineBorder); table.put("TitledBorder.border", blackLineBorder); table.put("Table.focusCellHighlightBorder", whiteLineBorder); table.put("Table.focusCellForeground", getWhite()); table.put("TextField.border", textBorder); table.put("PasswordField.border", textBorder); table.put("TextArea.border", textBorder); table.put("TextPane.font", textBorder); }
Example 2
Source File: SeaGlassLookAndFeel.java From seaglass with Apache License 2.0 | 6 votes |
/** * Initialize the popup settings. * * @param d the UI defaults map. */ private void definePopups(UIDefaults d) { d.put("seaGlassPopupBorder", new ColorUIResource(0xbbbbbb)); d.put("popupMenuInteriorEnabled", Color.WHITE); // Rossi: Changed color of popup / submenus to get better contrast to bright backgrounds. // d.put("popupMenuBorderEnabled", new Color(0xdddddd)); d.put("popupMenuBorderEnabled", new Color(0x5b7ea4)); String c = PAINTER_PREFIX + "PopupMenuPainter"; String p = "PopupMenu"; d.put(p + ".contentMargins", new InsetsUIResource(6, 1, 6, 1)); d.put(p + ".opaque", Boolean.TRUE); d.put(p + ".consumeEventOnClose", Boolean.TRUE); d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_DISABLED)); d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_ENABLED)); // Initialize PopupMenuSeparator c = PAINTER_PREFIX + "SeparatorPainter"; p = "PopupMenuSeparator"; d.put(p + ".contentMargins", new InsetsUIResource(1, 0, 2, 0)); d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SeparatorPainter.Which.BACKGROUND_ENABLED)); }
Example 3
Source File: ContrastMetalTheme.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { Border blackLineBorder = new BorderUIResource(new LineBorder(getBlack())); Border whiteLineBorder = new BorderUIResource(new LineBorder(getWhite())); Object textBorder = new BorderUIResource(new CompoundBorder( blackLineBorder, new BasicBorders.MarginBorder())); table.put("ToolTip.border", blackLineBorder); table.put("TitledBorder.border", blackLineBorder); table.put("Table.focusCellHighlightBorder", whiteLineBorder); table.put("Table.focusCellForeground", getWhite()); table.put("TextField.border", textBorder); table.put("PasswordField.border", textBorder); table.put("TextArea.border", textBorder); table.put("TextPane.font", textBorder); }
Example 4
Source File: ContrastMetalTheme.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { Border blackLineBorder = new BorderUIResource(new LineBorder(getBlack())); Border whiteLineBorder = new BorderUIResource(new LineBorder(getWhite())); Object textBorder = new BorderUIResource(new CompoundBorder( blackLineBorder, new BasicBorders.MarginBorder())); table.put("ToolTip.border", blackLineBorder); table.put("TitledBorder.border", blackLineBorder); table.put("Table.focusCellHighlightBorder", whiteLineBorder); table.put("Table.focusCellForeground", getWhite()); table.put("TextField.border", textBorder); table.put("PasswordField.border", textBorder); table.put("TextArea.border", textBorder); table.put("TextPane.font", textBorder); }
Example 5
Source File: DemoMetalTheme.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { super.addCustomEntriesToTable(table); final int internalFrameIconSize = 22; table.put("InternalFrame.closeIcon", MetalIconFactory. getInternalFrameCloseIcon(internalFrameIconSize)); table.put("InternalFrame.maximizeIcon", MetalIconFactory. getInternalFrameMaximizeIcon(internalFrameIconSize)); table.put("InternalFrame.iconifyIcon", MetalIconFactory. getInternalFrameMinimizeIcon(internalFrameIconSize)); table.put("InternalFrame.minimizeIcon", MetalIconFactory. getInternalFrameAltMaximizeIcon(internalFrameIconSize)); table.put("ScrollBar.width", 21); }
Example 6
Source File: DemoMetalTheme.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { super.addCustomEntriesToTable(table); final int internalFrameIconSize = 22; table.put("InternalFrame.closeIcon", MetalIconFactory. getInternalFrameCloseIcon(internalFrameIconSize)); table.put("InternalFrame.maximizeIcon", MetalIconFactory. getInternalFrameMaximizeIcon(internalFrameIconSize)); table.put("InternalFrame.iconifyIcon", MetalIconFactory. getInternalFrameMinimizeIcon(internalFrameIconSize)); table.put("InternalFrame.minimizeIcon", MetalIconFactory. getInternalFrameAltMaximizeIcon(internalFrameIconSize)); table.put("ScrollBar.width", 21); }
Example 7
Source File: DemoMetalTheme.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
@Override public void addCustomEntriesToTable(UIDefaults table) { super.addCustomEntriesToTable(table); final int internalFrameIconSize = 22; table.put("InternalFrame.closeIcon", MetalIconFactory. getInternalFrameCloseIcon(internalFrameIconSize)); table.put("InternalFrame.maximizeIcon", MetalIconFactory. getInternalFrameMaximizeIcon(internalFrameIconSize)); table.put("InternalFrame.iconifyIcon", MetalIconFactory. getInternalFrameMinimizeIcon(internalFrameIconSize)); table.put("InternalFrame.minimizeIcon", MetalIconFactory. getInternalFrameAltMaximizeIcon(internalFrameIconSize)); table.put("ScrollBar.width", 21); }
Example 8
Source File: SeaGlassLookAndFeel.java From seaglass with Apache License 2.0 | 6 votes |
private void defineFileChooser(UIDefaults d) { //Initialize FileChooser d.put("FileChooser.contentMargins", new InsetsUIResource(10, 10, 10, 10)); d.put("FileChooser.opaque", Boolean.TRUE); d.put("FileChooser.usesSingleFilePane", Boolean.TRUE); d.put("FileChooser[Enabled].fileIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FILEICON_ENABLED)); d.put("FileChooser.fileIcon", new SeaGlassIcon("FileChooser", "fileIconPainter", 16, 16)); d.put("FileChooser[Enabled].directoryIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DIRECTORYICON_ENABLED)); d.put("FileChooser.directoryIcon", new SeaGlassIcon("FileChooser", "directoryIconPainter", 16, 16)); d.put("FileChooser[Enabled].upFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.UPFOLDERICON_ENABLED)); d.put("FileChooser.upFolderIcon", new SeaGlassIcon("FileChooser", "upFolderIconPainter", 16, 16)); d.put("FileChooser[Enabled].newFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.NEWFOLDERICON_ENABLED)); d.put("FileChooser.newFolderIcon", new SeaGlassIcon("FileChooser", "newFolderIconPainter", 16, 16)); d.put("FileChooser[Enabled].hardDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HARDDRIVEICON_ENABLED)); d.put("FileChooser.hardDriveIcon", new SeaGlassIcon("FileChooser", "hardDriveIconPainter", 16, 16)); d.put("FileChooser[Enabled].floppyDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FLOPPYDRIVEICON_ENABLED)); d.put("FileChooser.floppyDriveIcon", new SeaGlassIcon("FileChooser", "floppyDriveIconPainter", 16, 16)); d.put("FileChooser[Enabled].homeFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HOMEFOLDERICON_ENABLED)); d.put("FileChooser.homeFolderIcon", new SeaGlassIcon("FileChooser", "homeFolderIconPainter", 16, 16)); d.put("FileChooser[Enabled].detailsViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DETAILSVIEWICON_ENABLED)); d.put("FileChooser.detailsViewIcon", new SeaGlassIcon("FileChooser", "detailsViewIconPainter", 16, 16)); d.put("FileChooser[Enabled].listViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.LISTVIEWICON_ENABLED)); d.put("FileChooser.listViewIcon", new SeaGlassIcon("FileChooser", "listViewIconPainter", 16, 16)); }
Example 9
Source File: ColorCustomizationTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
void testInheritance() { Color defaultColor = label.getBackground(); // more specific setting is in global defaults UIManager.put("Label[Enabled].background", new ColorUIResource(Color.RED)); // less specific one is in overrides UIDefaults defs = new UIDefaults(); defs.put("Label.background", new ColorUIResource(Color.GREEN)); // global wins label.putClientProperty("Nimbus.Overrides", defs); check(Color.RED); // now override wins label.putClientProperty("Nimbus.Overrides.InheritDefaults", false); check(Color.GREEN); // global is back label.putClientProperty("Nimbus.Overrides.InheritDefaults", true); check(Color.RED); // back to default color UIManager.put("Label[Enabled].background", null); label.putClientProperty("Nimbus.Overrides.InheritDefaults", false); label.putClientProperty("Nimbus.Overrides", null); check(defaultColor); }
Example 10
Source File: LuckRadioBtnMenuItemUIBundle.java From littleluck with Apache License 2.0 | 5 votes |
@Override protected void installColor(UIDefaults table) { table.put(BACKGROUND, getColorRes(Color.WHITE)); table.put(SELECTIONBG, getColorRes(60, 175, 210)); table.put(SELECTIONFG, getColorRes(Color.WHITE)); }
Example 11
Source File: LuckScrollUIBundle.java From littleluck with Apache License 2.0 | 5 votes |
@Override protected void installBorder(UIDefaults table) { table.put(SCROLLBAR_BORDER, getBorderRes(BorderFactory.createEmptyBorder())); table.put(SCROLLPANE_BORDER, getBorderRes(new LineBorder(new Color(200, 200, 200)))); }
Example 12
Source File: FlatLaf.java From FlatLaf with Apache License 2.0 | 4 votes |
private void initFonts( UIDefaults defaults ) { FontUIResource uiFont = null; if( SystemInfo.IS_WINDOWS ) { Font winFont = (Font) Toolkit.getDefaultToolkit().getDesktopProperty( "win.messagebox.font" ); if( winFont != null ) uiFont = createCompositeFont( winFont.getFamily(), winFont.getStyle(), winFont.getSize() ); } else if( SystemInfo.IS_MAC ) { String fontName; if( SystemInfo.IS_MAC_OS_10_15_CATALINA_OR_LATER ) { // use Helvetica Neue font fontName = "Helvetica Neue"; } else if( SystemInfo.IS_MAC_OS_10_11_EL_CAPITAN_OR_LATER ) { // use San Francisco Text font fontName = ".SF NS Text"; } else { // default font on older systems (see com.apple.laf.AquaFonts) fontName = "Lucida Grande"; } uiFont = createCompositeFont( fontName, Font.PLAIN, 13 ); } else if( SystemInfo.IS_LINUX ) { Font font = LinuxFontPolicy.getFont(); uiFont = (font instanceof FontUIResource) ? (FontUIResource) font : new FontUIResource( font ); } if( uiFont == null ) uiFont = createCompositeFont( Font.SANS_SERIF, Font.PLAIN, 12 ); uiFont = UIScale.applyCustomScaleFactor( uiFont ); // use active value for all fonts to allow changing fonts in all components // (similar as in Nimbus L&F) with: // UIManager.put( "defaultFont", myFont ); Object activeFont = new ActiveFont( 1 ); // override fonts for( Object key : defaults.keySet() ) { if( key instanceof String && (((String)key).endsWith( ".font" ) || ((String)key).endsWith( "Font" )) ) defaults.put( key, activeFont ); } // use smaller font for progress bar defaults.put( "ProgressBar.font", new ActiveFont( 0.85f ) ); // set default font defaults.put( "defaultFont", uiFont ); }
Example 13
Source File: Region.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
static void registerUIs(UIDefaults table) { for (Object key : getUItoRegionMap().keySet()) { table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel"); } }
Example 14
Source File: FlatInputMaps.java From FlatLaf with Apache License 2.0 | 4 votes |
private static void initBasicInputMaps( UIDefaults defaults ) { defaults.put( "Button.focusInputMap", new UIDefaults.LazyInputMap( new Object[] { "SPACE", "pressed", "released SPACE", "released" } ) ); modifyInputMap( defaults, "ComboBox.ancestorInputMap", "SPACE", "spacePopup", "UP", mac( "selectPrevious2", "selectPrevious" ), "DOWN", mac( "selectNext2", "selectNext" ), "KP_UP", mac( "selectPrevious2", "selectPrevious" ), "KP_DOWN", mac( "selectNext2", "selectNext" ), mac( "alt UP", null ), "togglePopup", mac( "alt DOWN", null ), "togglePopup", mac( "alt KP_UP", null ), "togglePopup", mac( "alt KP_DOWN", null ), "togglePopup" ); if( !SystemInfo.IS_MAC ) { modifyInputMap( defaults, "FileChooser.ancestorInputMap", "F2", "editFileName", "BACK_SPACE", "Go Up" ); } // join ltr and rtl bindings to fix up/down/etc keys in right-to-left component orientation Object[] bindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings" ); Object[] rtlBindings = (Object[]) defaults.get( "PopupMenu.selectedWindowInputMapBindings.RightToLeft" ); if( bindings != null && rtlBindings != null ) { Object[] newBindings = new Object[bindings.length + rtlBindings.length]; System.arraycopy( bindings, 0, newBindings, 0, bindings.length ); System.arraycopy( rtlBindings, 0, newBindings, bindings.length, rtlBindings.length ); defaults.put( "PopupMenu.selectedWindowInputMapBindings.RightToLeft", newBindings ); } modifyInputMap( defaults, "TabbedPane.ancestorInputMap", "ctrl TAB", "navigateNext", "shift ctrl TAB", "navigatePrevious" ); modifyInputMap( defaults, "Table.ancestorInputMap", // swap to make it consistent with List and Tree "HOME", "selectFirstRow", "END", "selectLastRow", "shift HOME", "selectFirstRowExtendSelection", "shift END", "selectLastRowExtendSelection", mac( "ctrl HOME", null ), "selectFirstColumn", mac( "ctrl END", null ), "selectLastColumn", mac( "shift ctrl HOME", null ), "selectFirstColumnExtendSelection", mac( "shift ctrl END", null ), "selectLastColumnExtendSelection" ); if( !SystemInfo.IS_MAC ) { modifyInputMap( defaults, "Tree.focusInputMap", "ADD", "expand", "SUBTRACT", "collapse" ); } }
Example 15
Source File: NimbusDefaults.java From Java8CN with Apache License 2.0 | 4 votes |
private void addColor(UIDefaults d, String uin, int r, int g, int b, int a) { Color color = new ColorUIResource(new Color(r, g, b, a)); colorTree.addColor(uin, color); d.put(uin, color); }
Example 16
Source File: LuckTreeUIBundle.java From littleluck with Apache License 2.0 | 4 votes |
@Override protected void installOther(UIDefaults table) { table.put(PAINTLINES, Boolean.FALSE); }
Example 17
Source File: Main.java From Cognizant-Intelligent-Test-Scripter with Apache License 2.0 | 4 votes |
private static void tweakNimbusUI() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); defaults.put("nimbusOrange", defaults.get("nimbusBase")); defaults.put("Table.gridColor", new Color(214, 217, 223)); defaults.put("Table.disabled", false); defaults.put("Table.showGrid", true); defaults.put("Table.intercellSpacing", new Dimension(1, 1)); defaults.put("CheckBoxMenuItem.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("RadioButtonMenuItem.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("MenuItem.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("Menu.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("Table.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("Label.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("TextField.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("TextArea.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("CheckBox.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("ComboBox.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("ToolTip.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("Button.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("TableHeader.font", new java.awt.Font("sansserif", 0, 11)); defaults.put("FileChooser.font", new java.awt.Font("sansserif", 0, 11)); /** * custom tab-area border painter */ Painter tabborder = (Painter) (Graphics2D g, Object object, int width, int height) -> { //add code to customize }; defaults.put("TabbedPane:TabbedPaneTabArea[Disabled].backgroundPainter", tabborder); defaults.put("TabbedPane:TabbedPaneTabArea[Enabled+MouseOver].backgroundPainter", tabborder); defaults.put("TabbedPane:TabbedPaneTabArea[Enabled+Pressed].backgroundPainter", tabborder); defaults.put("TabbedPane:TabbedPaneTabArea[Enabled].backgroundPainter", tabborder); PopupFactory.setSharedInstance(new PopupFactory() { @Override public Popup getPopup(Component owner, final Component contents, int x, int y) throws IllegalArgumentException { Popup popup = super.getPopup(owner, contents, x, y); SwingUtilities.invokeLater(() -> { contents.repaint(); }); return popup; } }); }
Example 18
Source File: SeaGlassLookAndFeel.java From seaglass with Apache License 2.0 | 4 votes |
/** * Initialize the spinner UI settings; * * @param d the UI defaults map. */ private void defineSpinners(UIDefaults d) { d.put("spinnerNextBorderBottomEnabled", new Color(0x4779bf)); d.put("spinnerNextBorderBottomPressed", new Color(0x4879bf)); d.put("spinnerNextInteriorBottomEnabled", new Color(0x85abcf)); d.put("spinnerNextInteriorBottomPressed", new Color(0x6e92b6)); d.put("spinnerPrevBorderTopEnabled", new Color(0x4778bf)); d.put("spinnerPrevInteriorTopEnabled", new Color(0x81aed4)); d.put("spinnerPrevInteriorBottomEnabled", new Color(0xaad4f1)); d.put("spinnerPrevInteriorPressedTop", new Color(0x6c91b8)); d.put("spinnerPrevInteriorPressedBottom", new Color(0x9cc3de)); d.put("spinnerPrevTopLineEnabled", new Color(0xacc8e0)); d.put("spinnerPrevTopLinePressed", new Color(0x9eb6cf)); d.put("Spinner.contentMargins", new InsetsUIResource(4, 6, 4, 6)); d.put("Spinner:\"Spinner.editor\".contentMargins", new InsetsUIResource(0, 0, 0, 0)); d.put("Spinner:\"Spinner.textField\".contentMargins", new InsetsUIResource(4, 6, 4, 0)); d.put("Spinner:\"Spinner.formattedTextField\".contentMargins", new InsetsUIResource(4, 6, 4, 2)); String c = PAINTER_PREFIX + "SpinnerFormattedTextFieldPainter"; String p = "Spinner:Panel:\"Spinner.formattedTextField\""; d.put(p + ".contentMargins", new InsetsUIResource(3, 10, 3, 2)); d.put(p + ".background", Color.WHITE); d.put(p + "[Selected].textForeground", Color.WHITE); d.put(p + "[Selected].textBackground", d.get("seaGlassSelection")); d.put(p + "[Disabled].textForeground", getDerivedColor("seaGlassDisabledText", 0.0f, 0.0f, 0.0f, 0, true)); d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, SpinnerFormattedTextFieldPainter.Which.BACKGROUND_DISABLED)); d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SpinnerFormattedTextFieldPainter.Which.BACKGROUND_ENABLED)); d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, SpinnerFormattedTextFieldPainter.Which.BACKGROUND_FOCUSED)); d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, SpinnerFormattedTextFieldPainter.Which.BACKGROUND_SELECTED)); d.put(p + "[Focused+Selected].backgroundPainter", new LazyPainter(c, SpinnerFormattedTextFieldPainter.Which.BACKGROUND_SELECTED_FOCUSED)); c = PAINTER_PREFIX + "SpinnerPreviousButtonPainter"; p = "Spinner:\"Spinner.previousButton\""; d.put(p + ".size", new Integer(22)); d.put(p + ".States", "Disabled,Enabled,Focused,Pressed"); d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.BACKGROUND_DISABLED)); d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.BACKGROUND_ENABLED)); d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.BACKGROUND_FOCUSED)); d.put(p + "[Focused+Pressed].backgroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED)); d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.BACKGROUND_PRESSED)); d.put(p + "[Disabled].foregroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.FOREGROUND_DISABLED)); d.put(p + "[Enabled].foregroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.FOREGROUND_ENABLED)); d.put(p + "[Focused].foregroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.FOREGROUND_FOCUSED)); d.put(p + "[Focused+Pressed].foregroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.FOREGROUND_PRESSED_FOCUSED)); d.put(p + "[Pressed].foregroundPainter", new LazyPainter(c, SpinnerPreviousButtonPainter.Which.FOREGROUND_PRESSED)); c = PAINTER_PREFIX + "SpinnerNextButtonPainter"; p = "Spinner:\"Spinner.nextButton\""; d.put(p + ".size", new Integer(22)); d.put(p + ".States", "Disabled,Enabled,Focused,Pressed"); d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.BACKGROUND_DISABLED)); d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.BACKGROUND_ENABLED)); d.put(p + "[Focused].backgroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.BACKGROUND_FOCUSED)); d.put(p + "[Focused+Pressed].backgroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.BACKGROUND_PRESSED_FOCUSED)); d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.BACKGROUND_PRESSED)); d.put(p + "[Disabled].foregroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.FOREGROUND_DISABLED)); d.put(p + "[Enabled].foregroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.FOREGROUND_ENABLED)); d.put(p + "[Focused].foregroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.FOREGROUND_FOCUSED)); d.put(p + "[Focused+Pressed].foregroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.FOREGROUND_PRESSED_FOCUSED)); d.put(p + "[Pressed].foregroundPainter", new LazyPainter(c, SpinnerNextButtonPainter.Which.FOREGROUND_PRESSED)); }
Example 19
Source File: Region.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
static void registerUIs(UIDefaults table) { for (Object key : getUItoRegionMap().keySet()) { table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel"); } }
Example 20
Source File: Region.java From JDKSourceCode1.8 with MIT License | 4 votes |
static void registerUIs(UIDefaults table) { for (Object key : getUItoRegionMap().keySet()) { table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel"); } }