Java 类javax.swing.plaf.SeparatorUI 实例源码

项目:incubator-netbeans    文件:Separator.java   
public void setUI(SeparatorUI ui) {
    synchronized(this) {
        if (!separatorUIInitialized) {
            macOsXSeparatorUI = createCustomUI(this);
            separatorUIInitialized = true;
        }
    }

    if (macOsXSeparatorUI == null) {
        super.setUI(ui);
    } else {
        super.setUI(macOsXSeparatorUI);
        setForeground(UIManager.getColor(MAC_OS_X_SEPARATOR_COLOR_KEY));
    }
}
项目:incubator-netbeans    文件:Separator.java   
private static SeparatorUI createCustomUI(JComponent separator) {
    if (MAC_OS_X_SEPARATOR_UI_CLASS != null) {
        try {
            Method m = MAC_OS_X_SEPARATOR_UI_CLASS.getDeclaredMethod(
                       "createUI", JComponent.class); // NOI18N
            return (SeparatorUI)m.invoke(null, separator);
        } catch (Throwable e) {
            return null;
        }
    } else {
        return null;
    }
}
项目:cn1    文件:JSeparatorTest.java   
public void testSetUISeparatorUI() {
    SeparatorUI ui1 = new BasicSeparatorUI();
    SeparatorUI ui2 = new BasicSeparatorUI();
    separator.setUI(ui1);
    assertEquals(ui1, separator.ui);
    assertEquals(ui1, separator.getUI());
    separator.setUI(ui2);
    assertEquals(ui2, separator.ui);
    assertEquals(ui2, separator.getUI());
}
项目:freeVM    文件:JSeparatorTest.java   
public void testSetUISeparatorUI() {
    SeparatorUI ui1 = new BasicSeparatorUI();
    SeparatorUI ui2 = new BasicSeparatorUI();
    separator.setUI(ui1);
    assertEquals(ui1, separator.ui);
    assertEquals(ui1, separator.getUI());
    separator.setUI(ui2);
    assertEquals(ui2, separator.ui);
    assertEquals(ui2, separator.getUI());
}
项目:freeVM    文件:JSeparatorTest.java   
public void testSetUISeparatorUI() {
    SeparatorUI ui1 = new BasicSeparatorUI();
    SeparatorUI ui2 = new BasicSeparatorUI();
    separator.setUI(ui1);
    assertEquals(ui1, separator.ui);
    assertEquals(ui1, separator.getUI());
    separator.setUI(ui2);
    assertEquals(ui2, separator.ui);
    assertEquals(ui2, separator.getUI());
}
项目:j2se_for_android    文件:JSeparator.java   
public SeparatorUI getUI() {
    AndroidClassUtil.callEmptyMethod();
    return (SeparatorUI) null;
}
项目:j2se_for_android    文件:JSeparator.java   
public void setUI(SeparatorUI ui) {
    AndroidClassUtil.callEmptyMethod();
}
项目:javify    文件:JSeparator.java   
/**
 * Sets this separator's UI delegate to the default (obtained from the
 * {@link UIManager}) for the current look and feel.
 */
public void updateUI()
{
  setUI((SeparatorUI) UIManager.getUI(this));
}
项目:jvm-stm    文件:JSeparator.java   
/**
 * Sets this separator's UI delegate to the default (obtained from the
 * {@link UIManager}) for the current look and feel.
 */
public void updateUI()
{
  setUI((SeparatorUI) UIManager.getUI(this));
}
项目:cn1    文件:JSeparator.java   
public SeparatorUI getUI() {
    return (SeparatorUI)ui;
}
项目:cn1    文件:JSeparator.java   
public void setUI(final SeparatorUI ui) {
    super.setUI(ui);
}
项目:JamVM-PH    文件:JSeparator.java   
/**
 * Sets this separator's UI delegate to the default (obtained from the
 * {@link UIManager}) for the current look and feel.
 */
public void updateUI()
{
  setUI((SeparatorUI) UIManager.getUI(this));
}
项目:classpath    文件:JSeparator.java   
/**
 * Sets this separator's UI delegate to the default (obtained from the
 * {@link UIManager}) for the current look and feel.
 */
public void updateUI()
{
  setUI((SeparatorUI) UIManager.getUI(this));
}
项目:freeVM    文件:JSeparator.java   
public SeparatorUI getUI() {
    return (SeparatorUI)ui;
}
项目:freeVM    文件:JSeparator.java   
public void setUI(final SeparatorUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JSeparator.java   
public SeparatorUI getUI() {
    return (SeparatorUI)ui;
}
项目:freeVM    文件:JSeparator.java   
public void setUI(final SeparatorUI ui) {
    super.setUI(ui);
}
项目:javify    文件:JSeparator.java   
/**
 * Returns the UI delegate being used with the <code>JSeparator</code>.
 *
 * @return The JSeparator's UI delegate.
 */
public SeparatorUI getUI()
{
  return (SeparatorUI) ui;
}
项目:javify    文件:JSeparator.java   
/**
 * Sets the separator's UI delegate.
 *
 * @param ui  the UI delegate.
 */
public void setUI(SeparatorUI ui)
{
  super.setUI(ui);
}
项目:jvm-stm    文件:JSeparator.java   
/**
 * Returns the UI delegate being used with the <code>JSeparator</code>.
 *
 * @return The JSeparator's UI delegate.
 */
public SeparatorUI getUI()
{
  return (SeparatorUI) ui;
}
项目:jvm-stm    文件:JSeparator.java   
/**
 * Sets the separator's UI delegate.
 *
 * @param ui  the UI delegate.
 */
public void setUI(SeparatorUI ui)
{
  super.setUI(ui);
}
项目:JamVM-PH    文件:JSeparator.java   
/**
 * Returns the UI delegate being used with the <code>JSeparator</code>.
 *
 * @return The JSeparator's UI delegate.
 */
public SeparatorUI getUI()
{
  return (SeparatorUI) ui;
}
项目:JamVM-PH    文件:JSeparator.java   
/**
 * Sets the separator's UI delegate.
 *
 * @param ui  the UI delegate.
 */
public void setUI(SeparatorUI ui)
{
  super.setUI(ui);
}
项目:classpath    文件:JSeparator.java   
/**
 * Returns the UI delegate being used with the <code>JSeparator</code>.
 *
 * @return The JSeparator's UI delegate.
 */
public SeparatorUI getUI()
{
  return (SeparatorUI) ui;
}
项目:classpath    文件:JSeparator.java   
/**
 * Sets the separator's UI delegate.
 *
 * @param ui  the UI delegate.
 */
public void setUI(SeparatorUI ui)
{
  super.setUI(ui);
}