本文整理汇总了Java中javax.swing.plaf.SeparatorUI类的典型用法代码示例。如果您正苦于以下问题:Java SeparatorUI类的具体用法?Java SeparatorUI怎么用?Java SeparatorUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SeparatorUI类属于javax.swing.plaf包,在下文中一共展示了SeparatorUI类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
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));
}
}
示例2: createCustomUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
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;
}
}
示例3: testSetUISeparatorUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
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());
}
示例4: getUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
public SeparatorUI getUI() {
AndroidClassUtil.callEmptyMethod();
return (SeparatorUI) null;
}
示例5: setUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
public void setUI(SeparatorUI ui) {
AndroidClassUtil.callEmptyMethod();
}
示例6: updateUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
/**
* 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));
}
示例7: getUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
public SeparatorUI getUI() {
return (SeparatorUI)ui;
}
示例8: setUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
public void setUI(final SeparatorUI ui) {
super.setUI(ui);
}
示例9: getUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
/**
* Returns the UI delegate being used with the <code>JSeparator</code>.
*
* @return The JSeparator's UI delegate.
*/
public SeparatorUI getUI()
{
return (SeparatorUI) ui;
}
示例10: setUI
import javax.swing.plaf.SeparatorUI; //导入依赖的package包/类
/**
* Sets the separator's UI delegate.
*
* @param ui the UI delegate.
*/
public void setUI(SeparatorUI ui)
{
super.setUI(ui);
}