javax.swing.JCheckBox.removeItemListener()方法的使用及代码示例

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

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

JCheckBox.removeItemListener介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

public void cleanUp() {
  for (ActionListener al : btnGenerate.getActionListeners()) {
    btnGenerate.removeActionListener(al);
  }
  for (ActionListener al : btnCancel.getActionListeners()) {
    btnCancel.removeActionListener(al);
  }
  for (ActionListener al : btnReset.getActionListeners()) {
    btnReset.removeActionListener(al);
  }
  for (ItemListener il : cAdvanced.getItemListeners()) {
    cAdvanced.removeItemListener(il);
  }
}

代码示例来源:origin: locationtech/jts

public Object getCellEditorValue()
{
 button.removeItemListener(this);
 return button;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

public void setWatchesAndEval(boolean watchesAndEval) {
  watchesAndEvalCheckBox.removeItemListener(watchesAndEvalListener);
  watchesAndEvalCheckBox.setSelected(watchesAndEval);
  watchesAndEvalListener.enableDependentFields(watchesAndEval);
  watchesAndEvalCheckBox.addItemListener(watchesAndEvalListener);
}

代码示例来源:origin: cytoscape.coreplugins/rfilters

/**
 *  DOCUMENT ME!
 *
 * @param negation DOCUMENT ME!
 */
public void setNegation(boolean negation) {
  filter.setNegation(negation);
  negationBox.removeItemListener(this);
  negationBox.setSelected(negation);
  negationBox.addItemListener(this);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

@Override
public void selectedFilesChanged() {
  checkAllCheckBox.removeItemListener(checkAllItemListener);
  checkAllCheckBox.setSelected(model.isAllSelected());
  checkAllCheckBox.addItemListener(checkAllItemListener);
}

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

public static void main(String [] args)
{
  JCheckBox checkBox = new JCheckBox();
  checkBox.addItemListener(new ItemListener() {

    @Override
    public void itemStateChanged(ItemEvent arg0) {
      // TODO Auto-generated method stub

    }
  });

  ItemListener [] itemListeners = checkBox.getListeners(ItemListener.class);
  System.out.println(itemListeners.length);
  for (int i = 0; i < itemListeners.length; i++)
  {
    checkBox.removeItemListener(itemListeners[i]);
  }
  System.out.println(checkBox.getListeners(ItemListener.class).length);
}

代码示例来源:origin: GoldenGnu/jeveassets

@Override
  public void itemStateChanged(ItemEvent e) {
    if (stopCellEditing()) {
      fireEditingStopped();
    }
    CheckBoxNode checkBoxNode = getCheckBoxNode();
    if (checkBoxNode != null) {
      boolean updated = checkBoxNode.setSelected(checkBox.isSelected());
      if (updated) {
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            tree.repaint();
          }
        });
      }
    }
    checkBox.removeItemListener(this);
  }
});

相关文章

JCheckBox类方法