本文整理了Java中javax.swing.JCheckBox.getModel()
方法的一些代码示例,展示了JCheckBox.getModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.getModel()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:getModel
暂无
代码示例来源:origin: KronicDeth/intellij-elixir
@Override
public void apply() {
service.includeExplanation(includeExplanationCheckBox.getModel().isSelected());
}
代码示例来源:origin: KronicDeth/intellij-elixir
@Override
public boolean isModified() {
return service.includeExplanation() != includeExplanationCheckBox.getModel().isSelected();
}
代码示例来源:origin: KronicDeth/intellij-elixir
@Override
public void reset() {
includeExplanationCheckBox.getModel().setSelected(service.includeExplanation());
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
@Override
public void actionPerformed(ActionEvent actionEvent) {
final JCheckBox source = (JCheckBox) actionEvent.getSource();
final Resolution resolution = ((ResolutionButtonModel) source.getModel()).getResolution();
controller.setExportResolution(resolution, source.isSelected());
}
};
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateTargetResolutions() {
final Set<Resolution> resolutions = controller.getTargetResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateExportResolutions() {
final Set<Resolution> resolutions = controller.getExportResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
@Override
public void actionPerformed(ActionEvent actionEvent) {
final JCheckBox source = (JCheckBox) actionEvent.getSource();
final Resolution resolution = ((ResolutionButtonModel) source.getModel()).getResolution();
if (source.isSelected()) {
controller.addTargetResolution(resolution);
} else {
controller.removeTargetResolution(resolution);
}
}
};
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
@Override
public void actionPerformed(ActionEvent actionEvent) {
final JCheckBox source = (JCheckBox) actionEvent.getSource();
final Resolution resolution = ((ResolutionButtonModel) source.getModel()).getResolution();
if (source.isSelected()) {
controller.addTargetResolution(resolution);
} else {
controller.removeTargetResolution(resolution);
}
}
};
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateTargetResolutions() {
final Set<Resolution> resolutions = controller.getTargetResolutions();
for (JCheckBox checkBox : Arrays.asList(LDPICheckBox,
MDPICheckBox,
HDPICheckBox,
XHDPICheckBox,
XXHDPICheckBox,
XXXHDPICheckBox,
TVDPICheckBox)) {
checkBox.removeActionListener(resolutionActionListener);
final Resolution resolution = ((ResolutionButtonModel) checkBox.getModel()).getResolution();
checkBox.setSelected(resolutions.contains(resolution));
final int[] sizes = controller.getScaledSize(resolution);
checkBox.setText(String.format("%s (%d px x %d px)", resolution, sizes[0], sizes[1]));
checkBox.addActionListener(resolutionActionListener);
}
}
代码示例来源:origin: kabutz/javaspecialists
public TristateButtonModel getTristateModel() {
return (TristateButtonModel) super.getModel();
}
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
public TristateButtonModel getTristateModel() {
return (TristateButtonModel) super.getModel();
}
代码示例来源:origin: Vhati/Slipstream-Mod-Manager
@SuppressWarnings("unchecked")
public TristateButtonModel getTristateModel() {
return (TristateButtonModel)super.getModel();
}
代码示例来源:origin: lbalazscs/Pixelitor
ButtonModel getEnabledModel() {
return enabledCB.getModel();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
private void valueCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_valueCheckBoxActionPerformed
if (evt.getSource() == this.valueCheckBox) {
if (this.valueCheckBox.getModel().isSelected()) {
this.valueTextField.setEnabled(false);
this.valueTextField.setText(this.labelTextField.getText());
} else {
this.valueTextField.setEnabled(true);
}
}
}//GEN-LAST:event_valueCheckBoxActionPerformed
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
private void labelTextFieldUpdated() {
if (this.valueCheckBox.getModel().isSelected())
this.valueTextField.setText(this.labelTextField.getText());
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-glassfish-javaee
public boolean shouldPersist() {
return noAskCheck.getModel().isSelected();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
protected boolean isValueSameAsName() {
return sameCheckBox.getModel().isSelected();
}
代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core
private void initView() {
this.checkBox = new JCheckBox(this.label);
this.checkBox.getModel().addItemListener(new ItemListener() {
@Override
public void itemStateChanged(final ItemEvent e) {
updateModel();
}
});
updateView();
}
代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core
protected void updateView() {
if (this.checkBox == null) {
return;
}
this.checkBox.getModel().setSelected(this.model.get());
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
public VCheckBox(String aText, boolean aSelected) {
super(aText, aSelected);
ordinaryIcon = getIcon();
oldValue = aSelected;
super.getModel().addActionListener((ActionEvent e) -> {
setIcon(ordinaryIcon);
checkValueChanged();
});
}
内容来源于网络,如有侵权,请联系作者删除!