javax.swing.JComboBox.isEnabled()方法的使用及代码示例

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

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

JComboBox.isEnabled介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

private void comboboxSourceSelected(ItemEvent evt) {
  if (this.uiDialog.getSourcesCombo().isEnabled()) {
    selectedSource = ((DownloadSources) evt.getItem()).getSource();
    reloadSetsForSelectedSource();
    reloadLanguagesForSelectedSource();
  }
}

代码示例来源:origin: GoldenGnu/jeveassets

@Override
protected JComponent getDefaultFocus() {
  if (jItems.isEnabled()) {
    return jItems;
  } else {
    return jCountMinimum;
  }
}

代码示例来源:origin: com.eas.platypus/platypus-js-calendar-widget

/**
 * Is the Panel enabled ?
 *
 * @return enabled ?
 */
@Override
public boolean isEnabled() {
  return _month.isEnabled();
}

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

/**
 * Getter for enabled property.
 * @return true if it's enabled
 */
public boolean isEnabled() {
  return cMonths.isEnabled();
}

代码示例来源:origin: SonarSource/sonarlint-intellij

@Nullable @Override public JComponent getPreferredFocusedComponent() {
 if (authComboBox.isEnabled()) {
  return authComboBox;
 }
 return tokenField;
}

代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer

protected void updateViewPathChoice() {
  if (!resultsDialog.viewPathChoice.isEnabled())
    return;
  resultsDialog.viewPathChoice.setSelectedItem(
      xy_tracer_canvas.just_near_slices ? resultsDialog.partsNearbyChoice : resultsDialog.projectionChoice);
}

代码示例来源:origin: com.jidesoft/jide-oss

public BasicJideComboBoxButton(
    JComboBox cb, Icon i,
    CellRendererPane pane, JList list) {
  this();
  _comboBox = cb;
  _comboIcon = i;
  _rendererPane = pane;
  _listBox = list;
  setEnabled(_comboBox.isEnabled());
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

public void keyPressed(KeyEvent e)
{
  if (comboBox.isEnabled()
    && !isNavigationKey(e.getKeyCode())
    && isTypeAheadKey(e))
  {
    if (comboBox.selectWithKeyChar(e.getKeyChar()))
    {
      e.consume();
    }
  }
}

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

public String getSelectedNamespace() {
  if (!namespaceComboBox.isEnabled()) {
    return null;
  }
  return (String) namespaceComboBox.getEditor().getItem();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

public void actionPerformed(ActionEvent e) {
  if (comboBox().isEnabled() && isPopupVisible()) {
   selectPreviousPossibleValue();
  }
 }
};

代码示例来源:origin: MegaMek/megamek

public boolean getEditable() {
  switch (option.getType()) {
    case IOption.BOOLEAN:
      return checkbox.isEnabled();
    case IOption.CHOICE:
      return choice.isEnabled();
    default:
      return textField.isEnabled();
  }
}

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

private void focusFirstEnabledComponent() {
  repositoryComboBox.requestFocusInWindow();
  if(!repositoryComboBox.isEnabled()) {
    newButton.requestFocusInWindow();
    if(!newButton.isEnabled()) {
      newButton.transferFocus();
    }
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

public void actionPerformed(ActionEvent e) {
  if (comboBox().isEnabled()) {
   if (isPopupVisible()) {
    selectNextPossibleValue();
   }
   else {
    setPopupVisible(comboBox(), true);
   }
  }
 }
};

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

public void focusInputField(final boolean selectAll) {
  if (values.isEnabled()) {
    values.requestFocus();
    final Component editorComponent = values.getEditor().getEditorComponent();
    if (selectAll && editorComponent instanceof JTextComponent) {
      ((JTextComponent) editorComponent).selectAll();
    }
    return;
  }
}

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

private void focusFirstEnabledComponent() {
  repositoryComboBox.requestFocusInWindow();
  if(!repositoryComboBox.isEnabled()) {
    newButton.requestFocusInWindow();
    if(!newButton.isEnabled()) {
      newButton.transferFocus();
    }
  }
}

代码示例来源:origin: com.github.insubstantial/substance

public SubstanceComboBoxUI(JComboBox combo) {
  this.comboBox = combo;
  this.transitionModel = new DefaultButtonModel();
  this.transitionModel.setArmed(false);
  this.transitionModel.setSelected(false);
  this.transitionModel.setPressed(false);
  this.transitionModel.setRollover(false);
  this.transitionModel.setEnabled(combo.isEnabled());
  this.stateTransitionTracker = new StateTransitionTracker(this.comboBox,
      this.transitionModel);
  this.delegate = new ComboBoxBackgroundDelegate();
}

代码示例来源:origin: org.java.net.substance/substance

public SubstanceComboBoxUI(JComboBox combo) {
  this.comboBox = combo;
  this.transitionModel = new DefaultButtonModel();
  this.transitionModel.setArmed(false);
  this.transitionModel.setSelected(false);
  this.transitionModel.setPressed(false);
  this.transitionModel.setRollover(false);
  this.transitionModel.setEnabled(combo.isEnabled());
  this.stateTransitionTracker = new StateTransitionTracker(this.comboBox,
      this.transitionModel);
  this.delegate = new ComboBoxBackgroundDelegate();
}

代码示例来源:origin: bcdev/beam

@Test
public void testEnabledStateOfUIComponentsAfterInitializing() {
  assertFalse(roiMaskSelector.useRoiMaskCheckBox.isEnabled());
  assertFalse(roiMaskSelector.roiMaskComboBox.isEnabled());
  assertTrue(roiMaskSelector.showMaskManagerButton.isEnabled());
}

代码示例来源:origin: bcdev/beam

@Test
public void testEnabledStateWhenProductContainsNoMasks() {
  roiMaskSelector.updateMaskSource(createProduct());
  assertFalse(roiMaskSelector.useRoiMaskCheckBox.isEnabled());
  assertFalse(roiMaskSelector.roiMaskComboBox.isEnabled());
  assertTrue(roiMaskSelector.showMaskManagerButton.isEnabled());
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

public void testNoModulesFound() {
 CloudAttachDialog dialog = initDialog();
 mockLoggedInUser();
 selectEmptyProject();
 ValidationInfo error = dialog.doValidate();
 assertNotNull(error);
 assertEquals(NO_MODULES_FOUND_WARNING, error.message);
 assertFalse(warningMessage.isVisible());
 assertFalse(warningHeader.isVisible());
 assertFalse(targetSelector.isEnabled());
 dialog.close(0);
}

相关文章

JComboBox类方法