javax.swing.JTextField.addPropertyChangeListener()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中javax.swing.JTextField.addPropertyChangeListener()方法的一些代码示例,展示了JTextField.addPropertyChangeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.addPropertyChangeListener()方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:addPropertyChangeListener

JTextField.addPropertyChangeListener介绍

暂无

代码示例

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
public void addValueChangeListener(PropertyChangeListener listener) {
  super.addPropertyChangeListener(VALUE_PROP_NAME, listener);
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets

@Override
public void applyDataBinding() {
  addPropertyChangeListener("modelText", this);
  if (textField != null) {
    textField.addPropertyChangeListener("caretPosition", this);
  }
}

代码示例来源:origin: groboclown/p4ic4idea

public static void addTo(@NotNull final JTextField 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);
    }
  });
}
public static void addTo(@NotNull final JTextArea field, @NotNull final TextFieldListener listener) {

代码示例来源:origin: fr.ifremer/isis-fish

@Override
public void applyDataBinding() {
  if (mailTo != null) {
    $bindingSources.put("mailTo.getDocument()", mailTo.getDocument());
    mailTo.getDocument().addDocumentListener( JAXXUtil.getEventListener(DocumentListener.class, this, "$pr$u0"));
    mailTo.addPropertyChangeListener("document", JAXXUtil.getDataBindingUpdateListener(fr.ifremer.isisfish.ui.logging.console.LogMailUI.this, BINDING_SEND_MAIL_ENABLED));
  }
}

代码示例来源:origin: unchartedsoftware/aperture-tiles

public SQLitePyramidIOSelector () {
  _dbPath = null;
  _io = null;
  JLabel dbPathLabel = new JLabel("Database path:");
  _dbPathField = new JTextField();
  setLayout(new GridBagLayout());
  add(dbPathLabel,  new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0, GridBagConstraints.EAST,   GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
  add(_dbPathField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
  _dbPathField.addPropertyChangeListener(new PropertyChangeListener() {
      @Override
      public void propertyChange (PropertyChangeEvent arg0) {
        setDBPath(_dbPathField.getText());
      }
    });
}

代码示例来源:origin: stackoverflow.com

txt.addPropertyChangeListener(name,listener);

代码示例来源:origin: featurecat/lizzie

private void initContentPanel() {
 GridLayout gridLayout = new GridLayout(5, 2, 4, 4);
 contentPanel.setLayout(gridLayout);
 checkBoxPlayerIsBlack = new JCheckBox("Play black?", true);
 checkBoxPlayerIsBlack.addChangeListener(evt -> togglePlayerIsBlack());
 textFieldWhite = new JTextField();
 textFieldBlack = new JTextField();
 textFieldKomi = new JFormattedTextField(FORMAT_KOMI);
 textFieldHandicap = new JFormattedTextField(FORMAT_HANDICAP);
 textFieldHandicap.addPropertyChangeListener(evt -> modifyHandicap());
 contentPanel.add(checkBoxPlayerIsBlack);
 contentPanel.add(PLACEHOLDER);
 contentPanel.add(new JLabel("Black"));
 contentPanel.add(textFieldBlack);
 contentPanel.add(new JLabel("White"));
 contentPanel.add(textFieldWhite);
 contentPanel.add(new JLabel("Komi"));
 contentPanel.add(textFieldKomi);
 contentPanel.add(new JLabel("Handicap"));
 contentPanel.add(textFieldHandicap);
 textFieldKomi.setEnabled(false);
 dialogPane.add(contentPanel, BorderLayout.CENTER);
}

代码示例来源:origin: fr.ifremer/isis-fish

@Override
public void applyDataBinding() {
  if (getFieldNewRegion() != null) {
    $bindingSources.put("getFieldNewRegion().getDocument()", getFieldNewRegion().getDocument());
    getFieldNewRegion().getDocument().addDocumentListener( JAXXUtil.getEventListener(DocumentListener.class, this, "$pr$u0"));
    getFieldNewRegion().addPropertyChangeListener("document", JAXXUtil.getDataBindingUpdateListener(fr.ifremer.isisfish.ui.input.InputUI.this, BINDING_BUTTON_NEW_REGION_ENABLED));
  }
}

代码示例来源:origin: com.synaptix/SynaptixWidget

ClipboardHelper.installClipboardPasteListener(textField);
this.textField.addPropertyChangeListener(new PropertyChangeListener() {

代码示例来源:origin: fr.ifremer/isis-fish

@Override
public void applyDataBinding() {
  if (getFactorNameField() != null) {
    $bindingSources.put("getFactorNameField().getDocument()", getFactorNameField().getDocument());
    getFactorNameField().getDocument().addDocumentListener( JAXXUtil.getEventListener(DocumentListener.class, this, "$pr$u0"));
    getFactorNameField().addPropertyChangeListener("document", JAXXUtil.getDataBindingUpdateListener(fr.ifremer.isisfish.ui.sensitivity.wizard.FactorWizardUI.this, BINDING_SAVE_ENABLED));
  }
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Installs a {@link BuddyLayoutAndBorder} as a layout and border of the
 * given text field. Registers a {@link PropertyChangeListener} to wrap any
 * subsequently set border on the text field.
 */
protected void install(JTextField textField) {
  uninstall();
  this.textField = textField;
  textField.setLayout(this);
  replaceBorderIfNecessary();
  textField.addPropertyChangeListener("border", this);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Installs a {@link BuddyLayoutAndBorder} as a layout and border of the
 * given text field. Registers a {@link PropertyChangeListener} to wrap any
 * subsequently set border on the text field.
 */
protected void install(JTextField textField) {
  uninstall();
  this.textField = textField;
  textField.setLayout(this);
  replaceBorderIfNecessary();
  textField.addPropertyChangeListener("border", this);
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * Installs a {@link BuddyLayoutAndBorder} as a layout and border of the
 * given text field. Registers a {@link PropertyChangeListener} to wrap any
 * subsequently set border on the text field.
 */
protected void install(JTextField textField) {
  uninstall();
  this.textField = textField;
  textField.setLayout(this);
  replaceBorderIfNecessary();
  textField.addPropertyChangeListener("border", this);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

/**
 * Installs a {@link BuddyLayoutAndBorder} as a layout and border of the
 * given text field. Registers a {@link PropertyChangeListener} to wrap any
 * subsequently set border on the text field.
 */
protected void install(JTextField textField) {
  uninstall();
  this.textField = textField;
  textField.setLayout(this);
  replaceBorderIfNecessary();
  textField.addPropertyChangeListener("border", this);
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget

addPropertyChangeListener("modelText", $DataSource23);
if (textField != null) {
    textField.addPropertyChangeListener("caretPosition", $DataSource23);

代码示例来源:origin: org.java.net.substance/substance

.addPropertyChangeListener(this.substancePropertyChangeListener);

代码示例来源:origin: com.github.insubstantial/substance

.addPropertyChangeListener(this.substancePropertyChangeListener);

代码示例来源:origin: org.japura/japura-gui

field.setBorder(null);
field.addPropertyChangeListener(new PropertyChangeListener() {
 @Override
 public void propertyChange(PropertyChangeEvent evt) {

代码示例来源:origin: com.haulmont.thirdparty/glazedlists

this.comboBoxEditorComponent.addPropertyChangeListener("document", this.documentWatcher);

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15

this.comboBoxEditorComponent.addPropertyChangeListener("document", this.documentWatcher);

相关文章

JTextField类方法