javax.swing.LookAndFeel#installColors ( )源码实例Demo

下面列出了javax.swing.LookAndFeel#installColors ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: CodenameOne   文件: BasicOutlookBarUI.java
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]);
  }
}
 
源代码2 项目: FlatLaf   文件: FlatDatePickerUI.java
@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 );
}
 
源代码3 项目: FlatLaf   文件: FlatDesktopIconUI.java
@Override
protected void installDefaults() {
	super.installDefaults();

	LookAndFeel.installColors( desktopIcon, "DesktopIcon.background", "DesktopIcon.foreground" );

	iconSize = UIManager.getDimension( "DesktopIcon.iconSize" );
	closeSize = UIManager.getDimension( "DesktopIcon.closeSize" );
}
 
源代码4 项目: PolyGlot   文件: PToolTipUI.java
/**
 * 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");
    }
}
 
源代码5 项目: microba   文件: BasicMarkerBarUI.java
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");

}
 
源代码6 项目: beautyeye   文件: BEPopupMenuSeparatorUI.java
/**
 * Install defaults.
 *
 * @param s the s
 */
protected void installDefaults( JSeparator s )
{
	LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" );
	LookAndFeel.installProperty( s, "opaque", Boolean.FALSE);
}
 
源代码7 项目: beautyeye   文件: BESeparatorUI.java
protected void installDefaults( JSeparator s )
{
    LookAndFeel.installColors( s, "Separator.background", "Separator.foreground" );
    LookAndFeel.installProperty( s, "opaque", Boolean.FALSE);
}