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

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

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

JCheckBox.getActionCommand介绍

暂无

代码示例

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

// assuming a List<CheckBox> called checkBoxList
for (JCheckBox checkBox : checkBoxList) {
  if (checkBox.isSelected()) {
   String actionCommand = checkBox.getActionCommand();
   // do something here for that checkBox
  }
}

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

public boolean changed() {
  Preferences node = MarkOccurencesSettings.getCurrentNode();
  for (JCheckBox box : boxes) {
    boolean value = box.isSelected();
    boolean original = node.getBoolean(box.getActionCommand(), DEFAULT_VALUE);
    if (value != original) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

@Override
  public void actionPerformed(ActionEvent evt) {
    okButton.setEnabled(true);
    Set<String> networksSelected = new HashSet<String>();
    JCheckBox[] networkButtons = {coexp, spd, gi, coloc, pathCheck, predict, pi, other};
    for (int i = 0; i < networkButtons.length; i++) {
      if (networkButtons[i].isSelected()) {
        networksSelected.add(networkButtons[i].getActionCommand());
      }
    }
    genemania.setNetworks(networksSelected);
  }
};

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

public void store() {
  Preferences node = MarkOccurencesSettings.getCurrentNode();
  for (javax.swing.JCheckBox box : boxes) {
    boolean value = box.isSelected();
    boolean original = node.getBoolean(box.getActionCommand(),
                      DEFAULT_VALUE);
    if (value != original) {
      node.putBoolean(box.getActionCommand(), value);
    }
  }
  try {
    node.flush();
  } catch (BackingStoreException ex) {
    Exceptions.printStackTrace(ex);
  }
}

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

public void load(MarkOccurencesOptionsPanelController controller) {
  this.controller = controller;
  Preferences node = MarkOccurencesSettings.getCurrentNode();
  for (JCheckBox box : boxes) {
    box.setSelected(node.getBoolean(box.getActionCommand(), DEFAULT_VALUE));
  }
  componentsSetEnabled();
}

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

while (checkBoxIterator.hasNext()) {
  JCheckBox checkBox = (JCheckBox) checkBoxIterator.next();
  String action = checkBox.getActionCommand();
  if (checkBox.isSelected()) {
    selectedInteractionSet.add(action);

代码示例来源:origin: raydac/netbeans-mmd-plugin

if (compo instanceof JCheckBox) {
 final JCheckBox cb = (JCheckBox) compo;
 if ("unfold".equalsIgnoreCase(cb.getActionCommand())) {
  this.flagExpandAllNodes = cb.isSelected();
 } else if ("back".equalsIgnoreCase(cb.getActionCommand())) {
  this.flagDrawBackground = cb.isSelected();

代码示例来源:origin: MegaMek/mekhq

UUID id = UUID.fromString(box.getActionCommand());
if(null == id || null == tracker.getUnitsStatus().get(id)) {
  continue;

代码示例来源:origin: raydac/netbeans-mmd-plugin

if (compo instanceof JCheckBox) {
 final JCheckBox cb = (JCheckBox) compo;
 if ("unfold".equalsIgnoreCase(cb.getActionCommand())) {
  this.flagExpandAllNodes = cb.isSelected();
 } else if ("back".equalsIgnoreCase(cb.getActionCommand())) {
  this.flagDrawBackground = cb.isSelected();

相关文章

JCheckBox类方法