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

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

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

JCheckBox.addChangeListener介绍

暂无

代码示例

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

useGPUBox.addChangeListener(new ChangeListener() {
  public void stateChanged (ChangeEvent event) {
    editor.getBillboardBatch().setUseGpu(useGPUBox.isSelected());

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

useGPUBox.addChangeListener(new ChangeListener() {
  public void stateChanged (ChangeEvent event) {
    editor.getBillboardBatch().setUseGpu(useGPUBox.isSelected());

代码示例来源:origin: apache/pdfbox

caseSensitive.addChangeListener(changeListener);
caseSensitive.setToolTipText("Check for case sensitive search");

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

private void addSettings(JPanel argPanel, TestbedSettings argSettings, SettingType argIgnore) {
 for (TestbedSetting setting : argSettings.getSettings()) {
  if (setting.settingsType == argIgnore) {
   continue;
  }
  switch (setting.constraintType) {
   case RANGE:
    JLabel text = new JLabel(setting.name + ": " + setting.value);
    JSlider slider = new JSlider(setting.min, setting.max, setting.value);
    slider.setMaximumSize(new Dimension(200, 20));
    slider.addChangeListener(this);
    slider.setName(setting.name);
    slider.putClientProperty(SETTING_TAG, setting);
    slider.putClientProperty(LABEL_TAG, text);
    argPanel.add(text);
    argPanel.add(slider);
    break;
   case BOOLEAN:
    JCheckBox checkbox = new JCheckBox(setting.name);
    checkbox.setSelected(setting.enabled);
    checkbox.addChangeListener(this);
    checkbox.putClientProperty(SETTING_TAG, setting);
    argPanel.add(checkbox);
    break;
  }
 }
}

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

checkBox.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent e) {

代码示例来源:origin: opensourceBIM/BIMserver

heapSizeField.getDocument().addDocumentListener(documentChangeListener);
stackSizeField.getDocument().addDocumentListener(documentChangeListener);
useProxy.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent e) {
proxyHost.getDocument().addDocumentListener(documentChangeListener);
proxyPort.getDocument().addDocumentListener(documentChangeListener);
forceIpv4Field.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent e) {

代码示例来源:origin: fossasia/neurolab-desktop

cbAdvancedMode.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent arg0) {
cbResFromDisk.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent arg0) {
cbFromFile.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent arg0) {
cbAudioFeedbackMask.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent arg0) {
cbBit24.addChangeListener(new ChangeListener() {
  @Override
  public void stateChanged(ChangeEvent arg0) {

代码示例来源:origin: no.tornado.databinding/databinding

public ChangeListener addValueChangeListener(JCheckBox component, ChangeListener listener) {
  component.addChangeListener(listener);
  return listener;
}

代码示例来源:origin: lbalazscs/Pixelitor

public void addChangeListener(ChangeListener changeListener) {
    checkBox.addChangeListener(changeListener);
  }
}

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

for(int i =0;i<studentlist1.size();i++)
   {
     JCheckBox chbx = new JCheckBox(studentlist1.get(i).getName());
     panel.add(chbx);
     boxes.add(chbx);
     chbx.addChangeListener(new ChangeListener() {
       @Override
       public void stateChanged(ChangeEvent e) {
         //Something
       }
     }
   }

代码示例来源:origin: otros-systems/otroslogviewer

public CallHierarchyLogFilter() {
 super("Call hierarchy", "Call hierarchy log filter");
 showOnlyEntryExits = new JCheckBox("Show only entry/exits");
 showOnlyEntryExits.addChangeListener(e -> CallHierarchyLogFilter.this.listener.ifPresent(LogFilterValueChangeListener::valueChanged));
}

代码示例来源:origin: cpesch/RouteConverter

private void initialize(boolean defaultValue) {
  checkBox.setSelected(preferences.getBoolean(keyName, defaultValue));
  checkBox.addChangeListener(this);
}

代码示例来源:origin: net.sf.tweety/beliefdynamics

/**
 * Helper method: Registers the presenter as swing listener at the view components.
 */
private void registerAsViewListener() {
  view.cbOperatorLeft.addItemListener(this);
  view.cbOperatorRight.addItemListener(this);
  view.checkIterativeLeft.addChangeListener(this);
  view.checkIterativeRight.addChangeListener(this);
  view.sliderStep.addChangeListener(this);
  view.btnUp.addActionListener(this);
  view.btnDown.addActionListener(this);
  view.btnAdd.addActionListener(this);
  view.btnRemove.addActionListener(this);
}

代码示例来源:origin: AlexanderBartash/hybris-integration-intellij-idea-plugin

public void createComponent() {
  groupModulesCheckBox.addChangeListener(changeEvent -> {
    groupCustomTextField.setEnabled(groupModulesCheckBox.isSelected());
    groupCustomUnusedTextField.setEnabled(groupModulesCheckBox.isSelected());
    groupHybrisTextField.setEnabled(groupModulesCheckBox.isSelected());
    groupHybrisUnusedTextField.setEnabled(groupModulesCheckBox.isSelected());
    groupPlatformTextField.setEnabled(groupModulesCheckBox.isSelected());
    groupNonHybrisTextField.setEnabled(groupModulesCheckBox.isSelected());
  });
}

代码示例来源:origin: dubreuia/intellij-plugin-save-actions

private JComponent wrap(JCheckBox checkBox, JComboBox comboBox) {
  JPanel wrapper = new JPanel();
  wrapper.setLayout(new BorderLayout());
  wrapper.add(checkBox, WEST);
  if (comboBox != null) {
    checkBox.addChangeListener(e -> comboBox.setEnabled(checkBox.isSelected()));
    comboBox.setEnabled(checkBox.isSelected());
    wrapper.add(comboBox, CENTER);
  }
  wrapper.setMaximumSize(new Dimension(BOX_LAYOUT_MAX_WIDTH, BOX_LAYOUT_MAX_HEIGHT));
  return wrapper;
}

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_components

private JPanel createSignaturePanel() {
  JPanel panel = new JPanel();
  panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils
    .getResString("smime_assertion_signature"))); // $NON-NLS-1$
  notSigned.addChangeListener(
      evt -> verifySignature.setEnabled(!notSigned.isSelected()));
  panel.add(verifySignature);
  panel.add(notSigned);
  return panel;
}

代码示例来源:origin: JGillam/burp-co2

public BeautifierConfigForm(IBurpExtenderCallbacks burpExtenderCallbacks) {
  this.callbacks = burpExtenderCallbacks;
  String enabledSetting = callbacks.loadExtensionSetting(SETTING_EXTENSION_ENABLED);
  enableJavascriptBeautifierCheckBox.setSelected(enabledSetting == null || Boolean.parseBoolean(enabledSetting));
  enableJavascriptBeautifierCheckBox.addChangeListener(new ChangeListener() {
    @Override
    public void stateChanged(ChangeEvent e) {
      callbacks.saveExtensionSetting(SETTING_EXTENSION_ENABLED, "" + enableJavascriptBeautifierCheckBox.isSelected());
    }
  });
}

代码示例来源:origin: org.gephi/visualization

/**
 * Creates new form ScreenshotSettingsPanel
 */
public ScreenshotSettingsPanel() {
  initComponents();
  autoSaveCheckBox.addChangeListener(new ChangeListener() {
    @Override
    public void stateChanged(ChangeEvent e) {
      selectDirectoryButton.setEnabled(autoSaveCheckBox.isSelected());
    }
  });
}

代码示例来源:origin: net.imagej/ij-ui-swing

@Override
public void initialize(final WidgetModel model) {
  super.initialize(model);
  checkBox = new JCheckBox("");
  setToolTip(checkBox);
  getComponent().add(checkBox);
  checkBox.addChangeListener(this);
  refreshWidget();
}

代码示例来源:origin: org.scijava/scijava-ui-swing

@Override
public void set(final WidgetModel model) {
  super.set(model);
  checkBox = new JCheckBox("");
  setToolTip(checkBox);
  getComponent().add(checkBox);
  checkBox.addChangeListener(this);
  refreshWidget();
}

相关文章

JCheckBox类方法