本文整理了Java中javax.swing.text.JTextComponent.setUI()
方法的一些代码示例,展示了JTextComponent.setUI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.setUI()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:setUI
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/org-netbeans-modules-editor-lib
public void propertyChange(PropertyChangeEvent evt) {
Object newValue = evt.getNewValue();
if ("UI".equals(evt.getPropertyName())
&& (newValue != null) && !(newValue instanceof BaseTextUI)
) {
JTextComponent c = (JTextComponent)evt.getSource();
EditorKit kit = ((TextUI)newValue).getEditorKit(c);
if (kit instanceof BaseKit) {
// BaseKit but not BaseTextUI -> restore BaseTextUI
try {
c.setUI((BaseTextUI)uiClass.newInstance());
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
}
}
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* Wraps and replaces the text components current UI by calling {@link #wrapUI(TextUI)}, if the
* text components current UI is not an instance of the given wrapper class.
*
* @param textComponent
* @return <code>true</code> if the UI has been replaced
*/
protected boolean replaceUIIfNeeded(JTextComponent textComponent) {
if (wrapperClass.isAssignableFrom(textComponent.getUI().getClass())) {
return false;
}
textComponent.setUI(wrapUI(textComponent));
return true;
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* Wraps and replaces the text components current UI by calling {@link #wrapUI(TextUI)}, if the
* text components current UI is not an instance of the given wrapper class.
*
* @param textComponent
* @return <code>true</code> if the UI has been replaced
*/
protected boolean replaceUIIfNeeded(JTextComponent textComponent) {
if (wrapperClass.isAssignableFrom(textComponent.getUI().getClass())) {
return false;
}
textComponent.setUI(wrapUI(textComponent));
return true;
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* Wraps and replaces the text components current UI by calling {@link #wrapUI(TextUI)}, if the
* text components current UI is not an instance of the given wrapper class.
*
* @param textComponent
* @return <code>true</code> if the UI has been replaced
*/
protected boolean replaceUIIfNeeded(JTextComponent textComponent) {
if (wrapperClass.isAssignableFrom(textComponent.getUI().getClass())) {
return false;
}
textComponent.setUI(wrapUI(textComponent));
return true;
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* Wraps and replaces the text components current UI by calling {@link #wrapUI(TextUI)}, if the
* text components current UI is not an instance of the given wrapper class.
*
* @param textComponent
* @return <code>true</code> if the UI has been replaced
*/
protected boolean replaceUIIfNeeded(JTextComponent textComponent) {
if (wrapperClass.isAssignableFrom(textComponent.getUI().getClass())) {
return false;
}
textComponent.setUI(wrapUI(textComponent));
return true;
}
代码示例来源:origin: stackoverflow.com
@Override public void updateUI() {
super.updateUI();
setUI(MyPasswordFieldUI.createUI(this));
代码示例来源:origin: stackoverflow.com
ta.setLineWrap(true);
ta.setWrapStyleWord(true);
ta.setUI(new CustomTextAreaUI());
fr.add(new JScrollPane(ta));
fr.setSize(100,200);
代码示例来源:origin: stackoverflow.com
setUI(new HintTextFieldUI(hint, true));
内容来源于网络,如有侵权,请联系作者删除!