本文整理了Java中javax.swing.JTextArea.addPropertyChangeListener()
方法的一些代码示例,展示了JTextArea.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.addPropertyChangeListener()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: groboclown/p4ic4idea
public static void addTo(@NotNull final JTextArea field, @NotNull final TextFieldListener listener) {
field.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
listener.textUpdated(e, field.getText());
}
@Override
public void removeUpdate(DocumentEvent e) {
listener.textUpdated(e, field.getText());
}
@Override
public void changedUpdate(DocumentEvent e) {
listener.textUpdated(e, field.getText());
}
});
field.addPropertyChangeListener("enabled", new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
listener.enabledStateChanged(evt);
}
});
}
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Add a PropertyChangeListener to the listener list.
* The listener is registered for all properties.
* <p><em>Delegates to the underlying StringBean</em>
* @param listener The PropertyChangeListener to be added.
*/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
getBean ().addPropertyChangeListener (listener);
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Remove a PropertyChangeListener from the listener list.
* This removes a registered PropertyChangeListener.
* <p><em>Delegates to the underlying StringBean</em>
* @param listener The PropertyChangeListener to be removed.
*/
public void removePropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
getBean ().removePropertyChangeListener (listener);
}
代码示例来源:origin: opengeospatial/geoapi
tabs.addTab("Configuration", createScrollPane(configuration));
tabs.addTab("Exception", createScrollPane(exception));
exception.addPropertyChangeListener("enabled", new PropertyChangeListener() {
@Override public void propertyChange(final PropertyChangeEvent event) {
tabs.setEnabledAt(2, (Boolean) event.getNewValue());
代码示例来源:origin: senbox-org/snap-desktop
private JComponent createWktInputPanel() {
final JTextArea textArea = new AutoResizingTextArea(3, 30);
//Overrides behavior when set enabled
textArea.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (textArea.isEnabled()) {
textArea.setBackground(Color.WHITE);
} else {
textArea.setBackground(new Color(240, 240, 240));
}
}
});
bindingContext.bind(BinningFormModel.PROPERTY_KEY_WKT, textArea);
bindingContext.bindEnabledState(BinningFormModel.PROPERTY_KEY_WKT, false, BinningFormModel.PROPERTY_KEY_MANUAL_WKT, false);
textArea.setEnabled(false);
return new JScrollPane(textArea);
}
代码示例来源:origin: bcdev/beam
private JComponent createWktInputPanel() {
final JTextArea textArea = new AutoResizingTextArea(3, 30);
//Overrides behavior when set enabled
textArea.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (textArea.isEnabled()) {
textArea.setBackground(Color.WHITE);
} else {
textArea.setBackground(new Color(240, 240, 240));
}
}
});
bindingContext.bind(BinningFormModel.PROPERTY_KEY_WKT, textArea);
bindingContext.bindEnabledState(BinningFormModel.PROPERTY_KEY_WKT, false, BinningFormModel.PROPERTY_KEY_MANUAL_WKT, false);
textArea.setEnabled(false);
return new JScrollPane(textArea);
}
代码示例来源:origin: RUB-NDS/EccPlayground
jTextAreaLog.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
jTextAreaLogPropertyChange(evt);
代码示例来源:origin: com.github.insubstantial/substance
.addPropertyChangeListener(this.substancePropertyChangeListener);
代码示例来源:origin: org.java.net.substance/substance
.addPropertyChangeListener(this.substancePropertyChangeListener);
内容来源于网络,如有侵权,请联系作者删除!