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

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

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

JCheckBox.setAlignmentX介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

private JCheckBox makeOptionsCheckBox(String name, final SearchOptions opt) {
  final JCheckBox chBox = new JCheckBox(name);
  chBox.setAlignmentX(LEFT_ALIGNMENT);
  chBox.setSelected(options.contains(opt));
  chBox.addItemListener(e -> {
    if (chBox.isSelected()) {
      options.add(opt);
    } else {
      options.remove(opt);
    }
    searchEmitter.emitSearch();
  });
  return chBox;
}

代码示例来源:origin: marytts/marytts

protected JPanel createControls() {
    JPanel controls = new JPanel();
    JCheckBox checkPhasogram = new JCheckBox("Show phasogram");
    checkPhasogram.setAlignmentX(CENTER_ALIGNMENT);
    checkPhasogram.setSelected(show);
    checkPhasogram.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.DESELECTED) {
          show = false;
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(false);
        } else if (e.getStateChange() == ItemEvent.SELECTED) {
          show = true;
          update(positionCursor.x);
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(true);
        }
      }
    });
    controls.add(checkPhasogram);
    return controls;
  }
}

代码示例来源:origin: marytts/marytts

protected JPanel createControls() {
    JPanel controls = new JPanel();
    JCheckBox checkSpectrum = new JCheckBox("Show spectrum");
    checkSpectrum.setAlignmentX(CENTER_ALIGNMENT);
    checkSpectrum.setSelected(show);
    checkSpectrum.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.DESELECTED) {
          show = false;
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(false);
        } else if (e.getStateChange() == ItemEvent.SELECTED) {
          show = true;
          update(positionCursor.x);
          if (graph != null) {
            graph.getTopLevelAncestor().setVisible(true);
          }
        }
      }
    });
    controls.add(checkSpectrum);
    return controls;
  }
}

代码示例来源:origin: marytts/marytts

protected JPanel createControls() {
    JPanel controls = new JPanel();
    JCheckBox checkSpectrum = new JCheckBox("Show spectrum");
    checkSpectrum.setAlignmentX(CENTER_ALIGNMENT);
    checkSpectrum.setSelected(show);
    checkSpectrum.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.DESELECTED) {
          show = false;
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(false);
        } else if (e.getStateChange() == ItemEvent.SELECTED) {
          show = true;
          update(positionCursor.x);
          if (graph != null) {
            graph.getTopLevelAncestor().setVisible(true);
          }
        }
      }
    });
    controls.add(checkSpectrum);
    return controls;
  }
}

代码示例来源:origin: marytts/marytts

protected JPanel createControls() {
    JPanel controls = new JPanel();
    JCheckBox checkPhasogram = new JCheckBox("Show phasogram");
    checkPhasogram.setAlignmentX(CENTER_ALIGNMENT);
    checkPhasogram.setSelected(show);
    checkPhasogram.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.DESELECTED) {
          show = false;
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(false);
        } else if (e.getStateChange() == ItemEvent.SELECTED) {
          show = true;
          update(positionCursor.x);
          if (graph != null)
            graph.getTopLevelAncestor().setVisible(true);
        }
      }
    });
    controls.add(checkPhasogram);
    return controls;
  }
}

代码示例来源:origin: marytts/marytts

controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS));
JCheckBox checkCepstrum = new JCheckBox("Show Cepstrum");
checkCepstrum.setAlignmentX(CENTER_ALIGNMENT);
checkCepstrum.setSelected(show);
checkCepstrum.addItemListener(new ItemListener() {

代码示例来源:origin: marytts/marytts

controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS));
JCheckBox checkCepstrum = new JCheckBox("Show Cepstrum");
checkCepstrum.setAlignmentX(CENTER_ALIGNMENT);
checkCepstrum.setSelected(show);
checkCepstrum.addItemListener(new ItemListener() {

代码示例来源:origin: marytts/marytts

controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS));
JCheckBox checkLPC = new JCheckBox("Show LPC");
checkLPC.setAlignmentX(CENTER_ALIGNMENT);
checkLPC.setSelected(show);
checkLPC.addItemListener(new ItemListener() {

代码示例来源:origin: marytts/marytts

controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS));
JCheckBox checkLPC = new JCheckBox("Show LPC");
checkLPC.setAlignmentX(CENTER_ALIGNMENT);
checkLPC.setSelected(show);
checkLPC.addItemListener(new ItemListener() {

代码示例来源:origin: redwarp/9-Patch-Resizer

box.setAlignmentX(Component.LEFT_ALIGNMENT);
optionPanel.add(box);

代码示例来源:origin: nodebox/nodebox

enableDeviceSupportCheck.setAlignmentX(Component.LEFT_ALIGNMENT);
contentPanel.add(enableDeviceSupportCheck);

代码示例来源:origin: openmuc/openiec61850

@Override
protected JComponent init() {
  interlock.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.add(interlock);
  valuePanel.add(synchron);
  return valuePanel;
}

代码示例来源:origin: org.openmuc/openiec61850

@Override
protected JComponent init() {
  dataChange.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.add(dataChange);
  valuePanel.add(dataUpdate);
  valuePanel.add(generalInterrogation);
  valuePanel.add(integrity);
  valuePanel.add(qualityChange);
  return valuePanel;
}

代码示例来源:origin: org.openmuc/openiec61850

@Override
protected JComponent init() {
  interlock.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.add(interlock);
  valuePanel.add(synchron);
  return valuePanel;
}

代码示例来源:origin: openmuc/openiec61850

@Override
protected JComponent init() {
  dataChange.setAlignmentX(Component.LEFT_ALIGNMENT);
  JPanel valuePanel = new JPanel();
  valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.PAGE_AXIS));
  valuePanel.add(dataChange);
  valuePanel.add(dataUpdate);
  valuePanel.add(generalInterrogation);
  valuePanel.add(integrity);
  valuePanel.add(qualityChange);
  return valuePanel;
}

代码示例来源:origin: freeplane/freeplane

private JCheckBox createOnlySelectedNodesCheckBox() {
  final JCheckBox checkBoxOnlySpecificNodes = createCheckBox("slide.showonlyselected");
  checkBoxOnlySpecificNodes.setAlignmentX(Component.CENTER_ALIGNMENT);
  checkBoxOnlySpecificNodes.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      UndoableSlide.of(slide).setShowsOnlySpecificNodes(! slide.showsOnlySpecificNodes());
    }
  });
  return checkBoxOnlySpecificNodes;
}

代码示例来源:origin: freeplane/freeplane

private JCheckBox createShowAncestorsCheckBox() {
  final JCheckBox checkBoxShowAncestors = createCheckBox("slide.showancestors");
  checkBoxShowAncestors.setAlignmentX(Component.CENTER_ALIGNMENT);
  checkBoxShowAncestors.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      UndoableSlide.of(slide).setShowsAncestors(! slide.showsAncestors());
    }
  });
  return checkBoxShowAncestors;
}

代码示例来源:origin: freeplane/freeplane

private JCheckBox createShowDescendantsCheckBox() {
  final JCheckBox checkBoxShowDescendants = createCheckBox("slide.descendants");
  checkBoxShowDescendants.setAlignmentX(Component.CENTER_ALIGNMENT);
  checkBoxShowDescendants.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      UndoableSlide.of(slide).setShowsDescendants(! slide.showsDescendants());
    }
  });
  return checkBoxShowDescendants;
}

代码示例来源:origin: protegeproject/protege

public JComponent createCustomizedImportsComponent() {
  JPanel panel = new JPanel();
  panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
  customizeImports = new JCheckBox("Manually specify import declarations.");
  panel.add(customizeImports);
  customizeImports.setAlignmentX(LEFT_ALIGNMENT);
  customizeImports.addActionListener(e -> {
    getWizard().setCustomizeImports(customizeImports.isSelected());
  });
  JLabel label1 = new JLabel("This is generally not needed as Protege will choose a reasonable default.");
  label1.setAlignmentX(LEFT_ALIGNMENT);
  panel.add(label1);
  return panel;
}

代码示例来源:origin: chungkwong/MathOCR

private void addBooleanProperty(String com){
  JCheckBox checkbox=new JCheckBox(ENVIRONMENT.getTranslation(com),ENVIRONMENT.getBoolean(com));
  checkbox.setAlignmentX(0);
  checkbox.setActionCommand(com);
  checkbox.addActionListener(this);
  add(checkbox);
}
private void addIntegerProperty(String com){

相关文章

JCheckBox类方法