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

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

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

JCheckBox.putClientProperty介绍

暂无

代码示例

代码示例来源: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: google/sagetv

public void itemStateChanged(java.awt.event.ItemEvent evt)
 {
  myBox.putClientProperty("solid", "true");
 }
});

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

public FmtUses() {
  initComponents();
  preferFullyQualifiedNamesCheckBox.putClientProperty(OPTION_ID, FmtOptions.PREFER_FULLY_QUALIFIED_NAMES);
  preferMultipleUseStatementsCombinedCheckBox.putClientProperty(OPTION_ID, FmtOptions.PREFER_MULTIPLE_USE_STATEMENTS_COMBINED);
  startUseWithNamespaceSeparatorCheckBox.putClientProperty(OPTION_ID, FmtOptions.START_USE_WITH_NAMESPACE_SEPARATOR);
  aliasesCapitalsOfNamespacesCheckBox.putClientProperty(OPTION_ID, FmtOptions.ALIASES_CAPITALS_OF_NAMESPACES);
}

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

/** Creates new form FmtTabsIndents */
public FmtTabsIndents() {
  initComponents();
  freeFormatCheckBox.putClientProperty(FmtOptions.CategorySupport.OPTION_ID, FmtOptions.freeFormat);
  autoDetect.putClientProperty(FmtOptions.CategorySupport.OPTION_ID, FmtOptions.autoDetect);
}

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

JCheckBox newCoffee = new JCheckBox("New Coffee");
newCoffee.addActionListener(actionListener);
newCoffee.putClientProperty("price", new BigDecimal("4.00"));

content.add(newCoffee);

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

/** Creates new form FmtTabsIndents */
public FmtTabsIndents() {
  initComponents();
  // Not yet implemented
  //indentCasesFromSwitchCheckBox.setVisible(false);
  
  continuationIndentSizeField.putClientProperty(OPTION_ID, continuationIndentSize);
  reformatCommentsCheckBox.putClientProperty(OPTION_ID, reformatComments);        
  indentHtmlCheckBox.putClientProperty(OPTION_ID, indentHtml);        
}

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

public FmtAlignment() {
  initComponents();
  nlElseCheckBox.putClientProperty(OPTION_ID, PLACE_ELSE_ON_NEW_LINE);
  nlWhileCheckBox.putClientProperty(OPTION_ID, PLACE_WHILE_ON_NEW_LINE);
  nlCatchCheckBox.putClientProperty(OPTION_ID, PLACE_CATCH_ON_NEW_LINE);
  nlFinallyCheckBox.putClientProperty(OPTION_ID, PLACE_FINALLY_ON_NEW_LINE);
  nlModifiersCheckBox.putClientProperty(OPTION_ID, PLACE_NEW_LINE_AFTER_MODIFIERS);
  amMethodParamsCheckBox.putClientProperty(OPTION_ID, ALIGN_MULTILINE_METHOD_PARAMS);
  amCallArgsCheckBox.putClientProperty(OPTION_ID, ALIGN_MULTILINE_CALL_ARGS);
  amImplementsCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_IMPLEMENTS);
  amArrayInitCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_ARRAY_INIT);
  amArrayInitCheckBox1.setVisible(false);
  amAssignCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_ASSIGNMENT);
  amAssignCheckBox1.setVisible(false);
  amBinaryOpCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_BINARY_OP);
  amBinaryOpCheckBox1.setVisible(false);
  amForCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_FOR);
  amForCheckBox1.setVisible(false);
  amParenthesizedCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_PARENTHESIZED);
  amParenthesizedCheckBox1.setVisible(false);
  amTernaryOpCheckBox1.putClientProperty(OPTION_ID, ALIGN_MULTILINE_TERNARY_OP);
  amTernaryOpCheckBox1.setVisible(false);
  gmlAssignmentCheckBox.putClientProperty(OPTION_ID, GROUP_ALIGNMENT_ASSIGNMENT);
  gmlArrayInitializerCheckBox.putClientProperty(OPTION_ID, GROUP_ALIGNMENT_ARRAY_INIT);
}

代码示例来源:origin: org.codehaus.mevenide/nb-project

public void actionPerformed(ActionEvent e) {
    if (cbDebug.isSelected()) {
      cbErrors.setEnabled(false);
      cbErrors.putClientProperty(CP_SELECTED, Boolean.valueOf(cbErrors.isSelected())); 
      cbErrors.setSelected(true);
    } else {
      cbErrors.setEnabled(true);
      cbErrors.setSelected(((Boolean)cbErrors.getClientProperty(CP_SELECTED)).booleanValue());
    }
  }
});

代码示例来源:origin: fr.ifremer/isis-fish

protected void createFieldPopulationSeasonGroupChange() {
  $objectMap.put("fieldPopulationSeasonGroupChange", fieldPopulationSeasonGroupChange = new JCheckBox());
  
  fieldPopulationSeasonGroupChange.setName("fieldPopulationSeasonGroupChange");
  fieldPopulationSeasonGroupChange.setText(t("isisfish.populationSeasons.changeGroup"));
  fieldPopulationSeasonGroupChange.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__fieldPopulationSeasonGroupChange"));
  fieldPopulationSeasonGroupChange.putClientProperty("sensitivityBean", PopulationSeasonInfo.class);
  fieldPopulationSeasonGroupChange.putClientProperty("sensitivityMethod", "GroupChange");
}

代码示例来源:origin: fr.ifremer/isis-fish

protected void createFieldPopulationBasicsPlusGroup() {
  $objectMap.put("fieldPopulationBasicsPlusGroup", fieldPopulationBasicsPlusGroup = new JCheckBox());
  
  fieldPopulationBasicsPlusGroup.setName("fieldPopulationBasicsPlusGroup");
  fieldPopulationBasicsPlusGroup.setText(t("isisfish.populationBasics.plusGroup"));
  fieldPopulationBasicsPlusGroup.setToolTipText(t("isisfish.populationBasics.plusGroupTip"));
  fieldPopulationBasicsPlusGroup.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__fieldPopulationBasicsPlusGroup"));
  fieldPopulationBasicsPlusGroup.putClientProperty("sensitivityBean", Population.class);
  fieldPopulationBasicsPlusGroup.putClientProperty("sensitivityMethod", "PlusGroup");
}

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

checkbox.putClientProperty(PSEUDO_CLASS, pseudoClass);
pseudoClassCheckBoxes.add(checkbox);
return checkbox;

代码示例来源:origin: org.jbox2d/jbox2d-testbed

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: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

private JCheckBox getWrapper(final NamedOption entry) {
  JCheckBox cb = new JCheckBox();
  Mnemonics.setLocalizedText(cb, entry.getDisplayName());
  if (entry.getDescription() != null) {
    cb.setToolTipText(entry.getDescription());
  }
  cb.setOpaque(false);
  cb.setSelected(NamedOption.getAccessor().getBoolean(entry.getName()));
  cb.putClientProperty("MakeOptionNamedEntity", entry); //NOI18N
  return cb;
}

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

private void load() {
  types = new ArrayList<FoldType>(FoldUtilities.getFoldTypes(mimeType).values());
  if ("".equals(mimeType)) { // NOI18N
    filterUsedMimeTypes();
  }
  boolean override = isCollapseRedefined();
  boolean currentOverride = 
      isDefinedLocally(PREF_OVERRIDE_DEFAULTS) ? !preferences.getBoolean(PREF_OVERRIDE_DEFAULTS, true) : false;
  if (override != currentOverride) {
    updateOverrideChanged();
  }
  
  for (FoldType ft : types) {
    String name = ft.getLabel();
    
    JCheckBox cb = createCheckBox(ft);
    cb.setText(name);
    cb.putClientProperty("id", ft.code()); // NOI18N
    cb.putClientProperty("type", ft); // NOI18N
    localSwitchboard.add(cb);
    controls.add(cb);
    cb.addItemListener(this);
  }
  
  // watch out for preferences
  this.preferences.addPreferenceChangeListener(this);
  updateEnabledState();
}

代码示例来源:origin: org.codehaus.mevenide/nb-project

txtLocalRepository.setText(sett.getLocalRepository());
cbErrors.setSelected(MavenExecutionSettings.getDefault().isShowErrors());
cbErrors.putClientProperty(CP_SELECTED, Boolean.valueOf(cbErrors.isSelected()));
cbDebug.setSelected(MavenExecutionSettings.getDefault().isShowDebug());
cbUseCommandLine.setSelected(MavenExecutionSettings.getDefault().isUseCommandLine());

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

bFieldsField.putClientProperty(OPTION_ID, BLANK_LINES_BEFORE_FIELDS);
betweenFields.putClientProperty(OPTION_ID, BLANK_LINES_BETWEEN_FIELDS);
cbGroupFields.putClientProperty(OPTION_ID, BLANK_LINES_GROUP_FIELDS_WITHOUT_DOC);
aFieldsField.putClientProperty(OPTION_ID, BLANK_LINES_AFTER_FIELDS);
bMethodsField.putClientProperty(OPTION_ID, BLANK_LINES_BEFORE_FUNCTION);

代码示例来源:origin: RPTools/maptool

labelPanel.add(new JLabel(name + ":"), new CellConstraints(1, 1, CellConstraints.RIGHT, CellConstraints.TOP));
JCheckBox hide = new JCheckBox("Hide");
hide.putClientProperty("JSlider", slider);
hide.addChangeListener(new ChangeListener() {
  public void stateChanged(ChangeEvent e) {

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

assignOpsCombo.putClientProperty(OPTION_ID, WRAP_ASSIGN_OPS);
assignOpsCombo.addFocusListener(this);
cbOpenCloseBlockBrace.putClientProperty(OPTION_ID, WRAP_BLOCK_BRACES);
cbStatements.putClientProperty(OPTION_ID, WRAP_STATEMENTS_ON_THE_LINE);
wrapAfterBinOpsCheckBox.putClientProperty(OPTION_ID, WRAP_AFTER_BIN_OPS);
wrapAfterAssignOpsCheckBox.putClientProperty(OPTION_ID, WRAP_AFTER_ASSIGN_OPS);

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

public void initialise() {
  super.initialise();
  ProtegeApplication.getLogManager().addErrorLogListener(errorLogListener);
  createActiveOntologyPanel();
  owlComponentFactory = new OWLComponentFactoryImpl(getOWLEditorKit());
  final OWLModelManager mngr = getOWLModelManager();
  mngr.addListener(owlModelManagerListener);
  mngr.addOntologyChangeListener(listener);
  OWLReasonerManager reasonerManager = mngr.getOWLReasonerManager();
  reasonerManager.setReasonerProgressMonitor(new ReasonerProgressUI(getOWLEditorKit()));
  reasonerManager.setReasonerExceptionHandler(new UIReasonerExceptionHandler(this));
  reasonerManagerStarted = true;
  updateReasonerStatus(false);
  displayReasonerResults.setSelected(reasonerManager.getReasonerPreferences().isShowInferences());
  displayReasonerResults.addActionListener(e -> {
    ReasonerPreferences prefs = reasonerManager.getReasonerPreferences();
    prefs.setShowInferences(displayReasonerResults.isSelected());
  });
  reasonerStatus.setFont(Fonts.getSmallDialogFont());
  displayReasonerResults.putClientProperty("JComponent.sizeVariant", "small");
  displayReasonerResults.setFont(Fonts.getSmallDialogFont());
  new OntologySourcesChangedHandlerUI(this);
}

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

public void initialise() {
  super.initialise();
  ProtegeApplication.getLogManager().addErrorLogListener(logStatusLabel);
  breadcrumbTrailProviderManager.start();
  breadcrumbTrailPresenter = new BreadcrumbTrailPresenter(this, new BreadcrumbTrailViewImpl(this));
  breadcrumbTrailPresenter.start();
  createActiveOntologyPanel();
  owlComponentFactory = new OWLComponentFactoryImpl(getOWLEditorKit());
  final OWLModelManager mngr = getOWLModelManager();
  mngr.addListener(owlModelManagerListener);
  mngr.addOntologyChangeListener(listener);
  OWLReasonerManager reasonerManager = mngr.getOWLReasonerManager();
  reasonerManager.setReasonerProgressMonitor(new ReasonerProgressUI(getOWLEditorKit()));
  reasonerManager.setReasonerExceptionHandler(new UIReasonerExceptionHandler(this));
  reasonerManagerStarted = true;
  updateReasonerStatus(false);
  displayReasonerResults.setSelected(reasonerManager.getReasonerPreferences().isShowInferences());
  displayReasonerResults.addActionListener(e -> {
    ReasonerPreferences prefs = reasonerManager.getReasonerPreferences();
    prefs.setShowInferences(displayReasonerResults.isSelected());
  });
  reasonerStatus.setFont(Fonts.getSmallDialogFont());
  displayReasonerResults.putClientProperty("JComponent.sizeVariant", "small");
  displayReasonerResults.setFont(Fonts.getSmallDialogFont());
  repoStatusPresenter = new GitRepoStatusPresenter(mngr, gitStatusView);
  repoStatusPresenter.start();
  new OntologySourcesChangedHandlerUI(this);
}

相关文章

JCheckBox类方法