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

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

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

JCheckBox.getActionCommand介绍

暂无

代码示例

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

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

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

  1. public boolean changed() {
  2. Preferences node = MarkOccurencesSettings.getCurrentNode();
  3. for (JCheckBox box : boxes) {
  4. boolean value = box.isSelected();
  5. boolean original = node.getBoolean(box.getActionCommand(), DEFAULT_VALUE);
  6. if (value != original) {
  7. return true;
  8. }
  9. }
  10. return false;
  11. }

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

  1. @Override
  2. public void actionPerformed(ActionEvent evt) {
  3. okButton.setEnabled(true);
  4. Set<String> networksSelected = new HashSet<String>();
  5. JCheckBox[] networkButtons = {coexp, spd, gi, coloc, pathCheck, predict, pi, other};
  6. for (int i = 0; i < networkButtons.length; i++) {
  7. if (networkButtons[i].isSelected()) {
  8. networksSelected.add(networkButtons[i].getActionCommand());
  9. }
  10. }
  11. genemania.setNetworks(networksSelected);
  12. }
  13. };

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

  1. public void store() {
  2. Preferences node = MarkOccurencesSettings.getCurrentNode();
  3. for (javax.swing.JCheckBox box : boxes) {
  4. boolean value = box.isSelected();
  5. boolean original = node.getBoolean(box.getActionCommand(),
  6. DEFAULT_VALUE);
  7. if (value != original) {
  8. node.putBoolean(box.getActionCommand(), value);
  9. }
  10. }
  11. try {
  12. node.flush();
  13. } catch (BackingStoreException ex) {
  14. Exceptions.printStackTrace(ex);
  15. }
  16. }

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

  1. public void load(MarkOccurencesOptionsPanelController controller) {
  2. this.controller = controller;
  3. Preferences node = MarkOccurencesSettings.getCurrentNode();
  4. for (JCheckBox box : boxes) {
  5. box.setSelected(node.getBoolean(box.getActionCommand(), DEFAULT_VALUE));
  6. }
  7. componentsSetEnabled();
  8. }

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

  1. while (checkBoxIterator.hasNext()) {
  2. JCheckBox checkBox = (JCheckBox) checkBoxIterator.next();
  3. String action = checkBox.getActionCommand();
  4. if (checkBox.isSelected()) {
  5. selectedInteractionSet.add(action);

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

  1. if (compo instanceof JCheckBox) {
  2. final JCheckBox cb = (JCheckBox) compo;
  3. if ("unfold".equalsIgnoreCase(cb.getActionCommand())) {
  4. this.flagExpandAllNodes = cb.isSelected();
  5. } else if ("back".equalsIgnoreCase(cb.getActionCommand())) {
  6. this.flagDrawBackground = cb.isSelected();

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

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

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

  1. if (compo instanceof JCheckBox) {
  2. final JCheckBox cb = (JCheckBox) compo;
  3. if ("unfold".equalsIgnoreCase(cb.getActionCommand())) {
  4. this.flagExpandAllNodes = cb.isSelected();
  5. } else if ("back".equalsIgnoreCase(cb.getActionCommand())) {
  6. this.flagDrawBackground = cb.isSelected();

相关文章

JCheckBox类方法