Java Code Examples for javax.swing.LookAndFeel#installColors()
The following examples show how to use
javax.swing.LookAndFeel#installColors() .
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: BasicOutlookBarUI.java From CodenameOne with GNU General Public License v2.0 | 6 votes |
protected void installDefaults() { super.installDefaults(); TabLayout layout = new TabLayout(); tabPane.setLayout(layout); // ensure constraints is correct for existing components layout.setLayoutConstraints(tabPane); updateTabLayoutOrientation(); buttonToTab = new HashMap(); tabToButton = new HashMap(); LookAndFeel.installBorder(tabPane, "OutlookBar.border"); LookAndFeel.installColors(tabPane, "OutlookBar.background", "OutlookBar.foreground"); tabPane.setOpaque(true); // add buttons for the current components already added in this panel Component[] components = tabPane.getComponents(); for (int i = 0, c = components.length; i < c; i++) { tabAdded(components[i]); } }
Example 2
Source File: FlatDatePickerUI.java From FlatLaf with Apache License 2.0 | 5 votes |
@Override protected void installDefaults() { super.installDefaults(); LookAndFeel.installColors( datePicker, "ComboBox.background", "ComboBox.foreground" ); LookAndFeel.installBorder( datePicker, "JXDatePicker.border" ); LookAndFeel.installProperty( datePicker, "opaque", Boolean.TRUE ); MigLayoutVisualPadding.install( datePicker ); }
Example 3
Source File: FlatDesktopIconUI.java From FlatLaf with Apache License 2.0 | 5 votes |
@Override protected void installDefaults() { super.installDefaults(); LookAndFeel.installColors( desktopIcon, "DesktopIcon.background", "DesktopIcon.foreground" ); iconSize = UIManager.getDimension( "DesktopIcon.iconSize" ); closeSize = UIManager.getDimension( "DesktopIcon.closeSize" ); }
Example 4
Source File: PToolTipUI.java From PolyGlot with MIT License | 5 votes |
/** * Invoked when the <code>JComponent</code> associated with the * <code>JToolTip</code> has changed, or at initialization time. This * should update any state dependant upon the <code>JComponent</code>. * * @param c the JToolTip the JComponent has changed on. */ private void componentChanged(JComponent c) { JComponent comp = ((JToolTip)c).getComponent(); if (comp != null && !(comp.isEnabled())) { // For better backward compatibility, only install inactive // properties if they are defined. if (UIManager.getBorder("ToolTip.borderInactive") != null) { LookAndFeel.installBorder(c, "ToolTip.borderInactive"); } else { LookAndFeel.installBorder(c, "ToolTip.border"); } if (UIManager.getColor("ToolTip.backgroundInactive") != null) { LookAndFeel.installColors(c,"ToolTip.backgroundInactive", "ToolTip.foregroundInactive"); } else { LookAndFeel.installColors(c,"ToolTip.background", "ToolTip.foreground"); } } else { LookAndFeel.installBorder(c, "ToolTip.border"); LookAndFeel.installColors(c, "ToolTip.background", "ToolTip.foreground"); } }
Example 5
Source File: BasicMarkerBarUI.java From microba with BSD 3-Clause "New" or "Revised" License | 5 votes |
protected void installDefaults(MarkerBar bar) { LookAndFeel.installBorder(bar, "Slider.border"); LookAndFeel.installColors(bar, "Slider.background", "Slider.foreground"); // selectedmark selectionColor = UIManager.getColor("ComboBox.selectionBackground"); // fixed mark disabledColor = UIManager.getColor("ComboBox.disabledBackground"); normalColor = UIManager.getColor("ComboBox.background"); // focus rect focusColor = UIManager.getColor("Slider.focus"); // text & outline color textColor = UIManager.getColor("textText"); }
Example 6
Source File: BEPopupMenuSeparatorUI.java From beautyeye with Apache License 2.0 | 4 votes |
/** * Install defaults. * * @param s the s */ protected void installDefaults( JSeparator s ) { LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" ); LookAndFeel.installProperty( s, "opaque", Boolean.FALSE); }
Example 7
Source File: BESeparatorUI.java From beautyeye with Apache License 2.0 | 4 votes |
protected void installDefaults( JSeparator s ) { LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" ); LookAndFeel.installProperty( s, "opaque", Boolean.FALSE); }