本文整理了Java中javax.swing.JComboBox.setEnabled()
方法的一些代码示例,展示了JComboBox.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.setEnabled()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:setEnabled
暂无
代码示例来源:origin: wiztools/rest-client
@Override
public void disableBody() {
jcb_body_type.setEnabled(false);
// ((ReqBodyPanel) getPanelFromSelection()).disableBody();
for(ReqBodyPanel panel: allPanels) {
panel.disableBody();
}
}
代码示例来源:origin: wiztools/rest-client
@Override
public void enableBody() {
jcb_body_type.setEnabled(true);
// ((ReqBodyPanel) getPanelFromSelection()).enableBody();
for(ReqBodyPanel panel: allPanels) {
panel.enableBody();
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* <code>updateResolutionChoices</code> updates the available resolutions
* list to match the currently selected window mode (fullscreen or
* windowed). It then sets up a list of standard options (if windowed) or
* calls <code>updateDisplayChoices</code> (if fullscreen).
*/
private void updateResolutionChoices() {
if (!fullscreenBox.isSelected()) {
displayResCombo.setModel(new DefaultComboBoxModel(
getWindowedResolutions(windowModes)));
if (displayResCombo.getItemCount() > 0) {
displayResCombo.setSelectedIndex(displayResCombo.getItemCount()-1);
}
colorDepthCombo.setModel(new DefaultComboBoxModel(new String[]{
"24 bpp", "16 bpp"}));
displayFreqCombo.setModel(new DefaultComboBoxModel(
new String[]{resourceBundle.getString("refresh.na")}));
displayFreqCombo.setEnabled(false);
} else {
displayResCombo.setModel(new DefaultComboBoxModel(
getResolutions(modes, Integer.MAX_VALUE, Integer.MAX_VALUE)));
if (displayResCombo.getItemCount() > 0) {
displayResCombo.setSelectedIndex(displayResCombo.getItemCount()-1);
}
displayFreqCombo.setEnabled(true);
updateDisplayChoices();
}
}
代码示例来源:origin: magefree/mage
public void showLanguagesSupport(boolean haveSupport) {
labelLanguage.setEnabled(haveSupport);
comboLanguage.setEnabled(haveSupport);
}
代码示例来源:origin: geotools/geotools
public void actionPerformed(ActionEvent e) {
labelFeatures = checkBox.isSelected();
labelCBox.setEnabled(labelFeatures);
fontBtn.setEnabled(labelFeatures);
}
});
代码示例来源:origin: magefree/mage
private void enableAdvancedPanel(boolean enable) {
adjustingSliderPanel.setEnabled(enable);
btnReset.setEnabled(enable);
cbCMC.setEnabled(enable);
averageCMCLabel.setEnabled(enable);
}
代码示例来源:origin: nodebox/nodebox
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
menuBox.setEnabled(enabled);
}
代码示例来源:origin: nodebox/nodebox
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
fontChooser.setEnabled(enabled);
}
代码示例来源:origin: magefree/mage
private void jToggleListViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleListViewActionPerformed
currentView = mainModel;
panelCardArea.setViewportView(mainTable);
cbSortBy.setEnabled(false);
chkPiles.setEnabled(false);
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "listView");
redrawCards();
}//GEN-LAST:event_jToggleListViewActionPerformed
代码示例来源:origin: magefree/mage
private void jToggleCardViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleCardViewActionPerformed
currentView = this;
panelCardArea.setViewportView(cardArea);
cbSortBy.setEnabled(true);
chkPiles.setEnabled(true);
PreferencesDialog.saveValue(PreferencesDialog.KEY_DRAFT_VIEW, "cardView");
redrawCards();
}//GEN-LAST:event_jToggleCardViewActionPerformed
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateAlgorithmMethod() {
methodSpinner.removeActionListener(methodListener);
methodSpinner.removeAllItems();
final List<String> methods = controller.getMethods();
for (String method : methods) {
methodSpinner.addItem(method);
}
methodSpinner.setSelectedItem(controller.getMethod());
methodSpinner.setEnabled(methods.size() > 1);
methodSpinner.addActionListener(methodListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateAlgorithmMethod() {
methodSpinner.removeActionListener(methodListener);
methodSpinner.removeAllItems();
final List<String> methods = controller.getMethods();
for (String method : methods) {
methodSpinner.addItem(method);
}
methodSpinner.setSelectedItem(controller.getMethod());
methodSpinner.setEnabled(methods.size() > 1);
methodSpinner.addActionListener(methodListener);
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
public SymfonyInstallerForm() {
checkBoxDemo.addItemListener(e -> {
boolean state = e.getStateChange() != ItemEvent.SELECTED;
buttonRefresh.setEnabled(state);
comboVersions.setEnabled(state);
});
buttonRefresh.addActionListener(e -> appendSymfonyVersions());
// @TODO: use com.intellij.util.ui.ReloadableComboBoxPanel in Phpstorm9 api level
comboVersions.setRenderer(new ListCellRenderer());
appendSymfonyVersions();
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateFormat() {
formatSpinner.removeActionListener(formatListener);
formatSpinner.removeAllItems();
for (Format format : Format.nonVectorValues()) {
formatSpinner.addItem(format);
}
formatSpinner.setSelectedItem(controller.getFormat());
formatSpinner.setEnabled(!controller.isNinePatch());
formatSpinner.addActionListener(formatListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateFormat() {
formatSpinner.removeActionListener(formatListener);
formatSpinner.removeAllItems();
for (Format format : Format.nonVectorValues()) {
formatSpinner.addItem(format);
}
formatSpinner.setSelectedItem(controller.getFormat());
formatSpinner.setEnabled(!controller.isNinePatch());
formatSpinner.addActionListener(formatListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateFormat() {
formatSpinner.removeActionListener(formatListener);
formatSpinner.removeAllItems();
for (Format format : Format.nonVectorValues()) {
formatSpinner.addItem(format);
}
formatSpinner.setSelectedItem(controller.getFormat());
formatSpinner.setEnabled(!controller.containsNinePatch());
formatSpinner.addActionListener(formatListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateSizes() {
prepareSpinner(sizeSpinner, sizeActionListener);
List<String> sizes = controller.getSizes();
for (String size : sizes) {
sizeSpinner.addItem(size);
}
sizeSpinner.setEnabled(sizeSpinner.getItemCount() > 1);
initSpinner(sizeSpinner, controller.getSelectedSize(), sizeActionListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateCategories() {
prepareSpinner(categorySpinner, categoryActionListener);
for (String category : controller.getCategories()) {
categorySpinner.addItem(category);
}
categorySpinner.setEnabled(categorySpinner.getItemCount() > 1);
initSpinner(categorySpinner, controller.getSelectedCategory(), categoryActionListener);
}
代码示例来源:origin: winterDroid/android-drawable-importer-intellij-plugin
private void updateCategories() {
prepareSpinner(categorySpinner, categoryActionListener);
for (String category : controller.getCategories()) {
categorySpinner.addItem(category);
}
categorySpinner.setEnabled(categorySpinner.getItemCount() > 1);
initSpinner(categorySpinner, controller.getSelectedCategory(), categoryActionListener);
}
代码示例来源:origin: magefree/mage
private void setGameOptions() {
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
int oldValue = (Integer) this.spnNumPlayers.getValue();
this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1));
this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers());
if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()) {
this.spnNumPlayers.setValue(oldValue);
}
this.cbAttackOption.setEnabled(gameType.isUseAttackOption());
this.cbRange.setEnabled(gameType.isUseRange());
createPlayers((Integer) spnNumPlayers.getValue() - 1);
}
内容来源于网络,如有侵权,请联系作者删除!