Java 类javax.swing.plaf.basic.BasicTextAreaUI 实例源码
项目:JavaAyo
文件:DefaultNotificationWindow.java
/**
* Constructs a new display only {@link JTextArea}
* @param text text that the {@link JTextArea} displays
* @return a new display only {@link JTextArea}
*/
private JTextArea getTextAreaForDisplay(String text) {
final JTextArea ta = new JTextArea(text);
ta.setUI(new BasicTextAreaUI());
ta.setEditable(false);
ta.setFocusable(false);
ta.setOpaque(false);
ta.setWrapStyleWord(true);
ta.setLineWrap(true);
return ta;
}
项目:cn1
文件:JTextComponent_byAuxiliaryComponentTest.java
public void testUpdateUI() throws Exception {
assertTrue(jtComp.getUI() instanceof TextCompUI);
TextUI textUI1 = jtComp.getUI();
SimplePropertyChangeListener listener = new SimplePropertyChangeListener();
jtComp.addPropertyChangeListener(listener);
jtComp.UIClassId = "TextCompUISecond";
TextUI textUI2 = (TextUI) UIManager.getUI(jtComp);
assertNotNull(textUI2);
jtComp.updateUI();
assertEqualsPropertyChangeEvent("UI", textUI1, jtComp.getUI(), listener.event);
assertTrue(jtComp.getUI() instanceof BasicTextAreaUI);
}
项目:freeVM
文件:JTextComponent_byAuxiliaryComponentTest.java
public void testUpdateUI() throws Exception {
assertTrue(jtComp.getUI() instanceof TextCompUI);
TextUI textUI1 = jtComp.getUI();
SimplePropertyChangeListener listener = new SimplePropertyChangeListener();
jtComp.addPropertyChangeListener(listener);
jtComp.UIClassId = "TextCompUISecond";
TextUI textUI2 = (TextUI) UIManager.getUI(jtComp);
assertNotNull(textUI2);
jtComp.updateUI();
assertEqualsPropertyChangeEvent("UI", textUI1, jtComp.getUI(), listener.event);
assertTrue(jtComp.getUI() instanceof BasicTextAreaUI);
}
项目:freeVM
文件:JTextComponent_byAuxiliaryComponentTest.java
public void testUpdateUI() throws Exception {
assertTrue(jtComp.getUI() instanceof TextCompUI);
TextUI textUI1 = jtComp.getUI();
SimplePropertyChangeListener listener = new SimplePropertyChangeListener();
jtComp.addPropertyChangeListener(listener);
jtComp.UIClassId = "TextCompUISecond";
TextUI textUI2 = (TextUI) UIManager.getUI(jtComp);
assertNotNull(textUI2);
jtComp.updateUI();
assertEqualsPropertyChangeEvent("UI", textUI1, jtComp.getUI(), listener.event);
assertTrue(jtComp.getUI() instanceof BasicTextAreaUI);
}
项目:samebug-idea-plugin
文件:LengthRestrictedArea.java
@Override
public void updateUI() {
setUI(new BasicTextAreaUI());
if (myColors != null) updateColors();
}
项目:samebug-idea-plugin
文件:SamebugMultilineLabel.java
@Override
public void updateUI() {
setUI(new BasicTextAreaUI());
updateColors();
}
项目:samebug-idea-plugin
文件:LinkMultilineLabel.java
@Override
public void updateUI() {
setUI(new BasicTextAreaUI());
updateColors();
}