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

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

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

JCheckBox.setModel介绍

暂无

代码示例

代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin

private void initCheckBoxes() {
  LDPICheckBox.setModel(new ResolutionButtonModel(Resolution.LDPI));
  MDPICheckBox.setModel(new ResolutionButtonModel(Resolution.MDPI));
  HDPICheckBox.setModel(new ResolutionButtonModel(Resolution.HDPI));
  XHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XHDPI));
  XXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXHDPI));
  XXXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXXHDPI));
  TVDPICheckBox.setModel(new ResolutionButtonModel(Resolution.TVDPI));
}

代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin

private void initCheckBoxes() {
  LDPICheckBox.setModel(new ResolutionButtonModel(Resolution.LDPI));
  MDPICheckBox.setModel(new ResolutionButtonModel(Resolution.MDPI));
  HDPICheckBox.setModel(new ResolutionButtonModel(Resolution.HDPI));
  XHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XHDPI));
  XXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXHDPI));
  XXXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXXHDPI));
  TVDPICheckBox.setModel(new ResolutionButtonModel(Resolution.TVDPI));
}

代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin

private void initCheckBoxes() {
  LDPICheckBox.setModel(new ResolutionButtonModel(Resolution.LDPI));
  MDPICheckBox.setModel(new ResolutionButtonModel(Resolution.MDPI));
  HDPICheckBox.setModel(new ResolutionButtonModel(Resolution.HDPI));
  XHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XHDPI));
  XXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXHDPI));
  XXXHDPICheckBox.setModel(new ResolutionButtonModel(Resolution.XXXHDPI));
  TVDPICheckBox.setModel(new ResolutionButtonModel(Resolution.TVDPI));
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-installer

/** Creates new form InstallerPanel */
public InstallerPanel(SuiteInstallerProjectProperties props) {
  this.installerProps = props;
  initComponents();
  jCheckBox1.setModel(installerProps.windowsModel);
  jCheckBox2.setModel(installerProps.linuxModel);
  jCheckBox3.setModel(installerProps.macModel);
  jCheckBox4.setModel(installerProps.solarisModel);
  jCheckBox5.setModel(installerProps.pack200Model);
  
  licenseComboBox.setModel(installerProps.licenseModel);
}

代码示例来源:origin: com.numdata/numdata-swing

@Override
public void setModel( final ButtonModel newModel )
{
  super.setModel( newModel );
  //Listen for enable changes
  if ( model instanceof TristateButtonModel )
  {
    model.addChangeListener( _enableListener );
  }
}

代码示例来源:origin: kabutz/javaspecialists

public void setModel(ButtonModel newModel) {
  super.setModel(newModel);
  //Listen for enable changes
  if (model instanceof TristateButtonModel)
    model.addChangeListener(enableListener);
}

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

@Override
public void setModel(ButtonModel newModel) {
  super.setModel(newModel);
  //Listen for enable changes
  if (model instanceof TristateButtonModel) {
    model.addChangeListener(enableListener);
  }
}

代码示例来源:origin: Vhati/Slipstream-Mod-Manager

@Override
public void setModel( ButtonModel newModel ) {
  super.setModel( newModel );
  // Listen for enable changes.
  if ( model instanceof TristateButtonModel ) {
    model.addChangeListener( enableListener );
  }
}

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

private void addTab(String name, EffectPanel configurator) {
  JPanel tabPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
  JCheckBox tabSelectionCB = new JCheckBox();
  tabSelectionCB.setModel(configurator.getEnabledModel());
  tabPanel.add(tabSelectionCB);
  tabPanel.add(new JLabel(name));
  tabPanel.setOpaque(false);
  tabs.addTab(name, configurator);
  tabs.setTabComponentAt(tabs.getTabCount() - 1, tabPanel);
}

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

private void addLinkCheckBox() {
  JCheckBox linkedCB = new JCheckBox();
  linkedCB.setModel(model.getCheckBoxModel());
  gbh.addLabelWithControl("Linked:", linkedCB, numParams);
  linkedCB.addActionListener(e -> model.setLinked(linkedCB.isSelected()));
}

代码示例来源:origin: dcaoyuan/nbscala

public CustomizerCompile( J2SEProjectProperties uiProperties ) {
  initComponents();
  uiProperties.SCALAC_DEPRECATION_MODEL.setMnemonic( deprecationCheckBox.getMnemonic() );
  deprecationCheckBox.setModel( uiProperties.SCALAC_DEPRECATION_MODEL );
  uiProperties.SCALAC_UNCHECKED_MODEL.setMnemonic( uncheckedCheckBox.getMnemonic() );
  uncheckedCheckBox.setModel( uiProperties.SCALAC_UNCHECKED_MODEL );
  uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( debugInfoCheckBox.getMnemonic() );
  debugInfoCheckBox.setModel( uiProperties.JAVAC_DEBUG_MODEL );
  uiProperties.DO_DEPEND_MODEL.setMnemonic(doDependCheckBox.getMnemonic());
  doDependCheckBox.setModel(uiProperties.DO_DEPEND_MODEL);
  additionalJavacParamsField.setDocument( uiProperties.SCALAC_COMPILER_ARG_MODEL );
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-ejbjarproject

public CustomizerCompile( EjbJarProjectProperties uiProperties ) {
  initComponents();
  uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() );
  jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL );
  uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() );
  jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL );
  uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL.setMnemonic(enableAPTCheckBox.getMnemonic());
  enableAPTCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL);
  uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL.setMnemonic(enableAPTEditorCheckBox.getMnemonic());
  enableAPTEditorCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL);
  annotationProcessorsList.setModel(uiProperties.ANNOTATION_PROCESSORS_MODEL);
  enableAPTCheckBoxActionPerformed(null);
  additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL );                 
  
  jCheckBoxCompileOnSave.setModel(uiProperties.COMPILE_ON_SAVE_MODEL);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-project

/** Creates new form CustomizerCompile */
public CustomizerCompile(WebProjectProperties uiProperties) {
  initComponents();
  uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() );
  jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL );
  uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() );
  jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL );
  uiProperties.COMPILE_JSP_MODEL.setMnemonic( jCheckBoxCompileJSP.getMnemonic() );
  jCheckBoxCompileJSP.setModel( uiProperties.COMPILE_JSP_MODEL );
  uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL.setMnemonic(enableAPTCheckBox.getMnemonic());
  enableAPTCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL);
  uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL.setMnemonic(enableAPTEditorCheckBox.getMnemonic());
  enableAPTEditorCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL);
  annotationProcessorsList.setModel(uiProperties.ANNOTATION_PROCESSORS_MODEL);
  enableAPTCheckBoxActionPerformed(null);
  additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL );                 
  jCheckBoxCompileOnSave.setModel(uiProperties.COMPILE_ON_SAVE_MODEL);
  jCopyOnSaveCheckBox.setModel(uiProperties.COPY_STATIC_RESOURCE_ON_SAVE_MODEL);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-clientproject

public CustomizerCompile( AppClientProjectProperties uiProperties ) {
  initComponents();
      
  uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() );
  jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL );
  
  uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() );
  jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL );
  
  uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL.setMnemonic(enableAPTCheckBox.getMnemonic());
  enableAPTCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_MODEL);
  uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL.setMnemonic(enableAPTEditorCheckBox.getMnemonic());
  enableAPTEditorCheckBox.setModel(uiProperties.ENABLE_ANNOTATION_PROCESSING_IN_EDITOR_MODEL);
  annotationProcessorsList.setModel(uiProperties.ANNOTATION_PROCESSORS_MODEL);
  enableAPTCheckBoxActionPerformed(null);
  additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL );                 
  
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-grailsproject

/** Creates new form GeneralCustomizerPanel */
public GeneralCustomizerPanel(GrailsProjectProperties uiProperties) {
  this.uiProperties = uiProperties;
  initComponents();
  projectFolderTextField.setText(FileUtil.getFileDisplayName(uiProperties.getProject().getProjectDirectory()));
  // populating the port field
  grailsServerPort.getDocument().addDocumentListener(this);
  grailsServerPort.setText(uiProperties.getPort());
  vmOptionsTextField.getDocument().addDocumentListener(this);
  vmOptionsTextField.setText(uiProperties.getVmOptions());
  // Here we define the indexes for the default enviroments as this:
  // 0 : "Development",
  // 1 : "Production",
  // 2 : "Test"
  grailsEnvChooser.setModel(uiProperties.getEnvironmentModel());
  grailsDisplayBrowser.setModel(uiProperties.getDisplayBrowserModel());
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-ejbjarproject

public CustomizerJar( EjbJarProjectProperties uiProperties ) {
  initComponents();
  
  jTextFieldDistDir.setDocument( uiProperties.DIST_JAR_MODEL );
  jTextFieldExcludes.setDocument( uiProperties.BUILD_CLASSES_EXCLUDES_MODEL );
  uiProperties.JAR_COMPRESS_MODEL.setMnemonic( jCheckBoxCommpress.getMnemonic() );
  jCheckBoxCommpress.setModel( uiProperties.JAR_COMPRESS_MODEL ); 
  uiProperties.INCLUDE_JARS_MODEL.setMnemonic( includeJarsCheckBox.getMnemonic() );
  includeJarsCheckBox.setModel(uiProperties.INCLUDE_JARS_MODEL);
}

代码示例来源:origin: dcaoyuan/nbscala

public CustomizerJar( J2SEProjectProperties uiProperties ) {
  initComponents();
  distDirField.setDocument(uiProperties.DIST_JAR_MODEL);
  excludeField.setDocument(uiProperties.BUILD_CLASSES_EXCLUDES_MODEL);
  uiProperties.JAR_COMPRESS_MODEL.setMnemonic(compressCheckBox.getMnemonic());
  compressCheckBox.setModel(uiProperties.JAR_COMPRESS_MODEL);
  uiProperties.DO_JAR_MODEL.setMnemonic(doJarCheckBox.getMnemonic());
  doJarCheckBox.setModel(uiProperties.DO_JAR_MODEL);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

/**
 * Creates new form JFXPackagingPanel
 */
public JFXPackagingPanel(JFXProjectProperties properties) {
  initComponents();
  jfxProps = properties;
  configs = jfxProps.getConfigs();
  binaryCSSCheckBox.setModel(jfxProps.getBinaryEncodeCSSModel());
  updateManifestMessage();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-clientproject

public CustomizerJar( AppClientProjectProperties uiProperties ) {
  initComponents();
  
  jTextFieldDistDir.setDocument( uiProperties.DIST_JAR_MODEL );
  jTextFieldExcludes.setDocument( uiProperties.BUILD_CLASSES_EXCLUDES_MODEL );
  
  uiProperties.JAR_COMPRESS_MODEL.setMnemonic( jCheckBoxCommpress.getMnemonic() );
  jCheckBoxCommpress.setModel( uiProperties.JAR_COMPRESS_MODEL ); 
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-ejbjarproject

/** Creates new form CustomizerRun */
public CustomizerRun( EjbJarProjectProperties uiProperties ) {
  initComponents();
  this.uiProperties = uiProperties;
  
  this.oldServerInstanceId = uiProperties.J2EE_SERVER_INSTANCE_MODEL.getSelectedItem() != null
      ? J2eePlatformUiSupport.getServerInstanceID(uiProperties.J2EE_SERVER_INSTANCE_MODEL.getSelectedItem())
      : null;
  
  uiProperties.JAVAC_CLASSPATH_MODEL.addTableModelListener(new TableModelListener() {
    public void tableChanged(TableModelEvent e) {
      setMessages();
    }
  });
  
  jComboBoxJ2eePlatform.setModel (uiProperties.J2EE_SERVER_INSTANCE_MODEL );
  jComboBoxJ2eeSpecVersion.setModel (uiProperties.J2EE_PLATFORM_MODEL );
  jCheckBoxDeployOnSave.setModel(uiProperties.DEPLOY_ON_SAVE_MODEL);
  vmOptions.setDocument(uiProperties.RUNMAIN_JVM_MODEL);
  
  initialJ2eeSpecVersion = uiProperties.J2EE_PLATFORM_MODEL.getSelectedItem();
  setDeployOnSaveState();
}

相关文章

JCheckBox类方法