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

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

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

JComboBox.removeItem介绍

暂无

代码示例

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

@Override
public void removeItem(Object object) {
  ignoreActionEvent = true;
  super.removeItem(object);
  ignoreActionEvent = false;
}

代码示例来源:origin: jtrfp/terminal-recall

@Override
public void run() {
  for(Object s:buffer)
    destBox.removeItem(s);
}});
return true;

代码示例来源:origin: org.cytoscape/webservice-biomart-client-impl

protected void removeAttribute(final String attributeName) {
  if (attributeName != null) {
    columnNameComboBox.removeItem(attributeName);
    return;
  }
}

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

private void projectLicenseComboBoxPopupMenuWillBecomeVisible(PopupMenuEvent evt) {//GEN-FIRST:event_projectLicenseComboBoxPopupMenuWillBecomeVisible
  if (projectLicenseComboBox.getSelectedItem().equals(EMPTY_ELEMENT)) {
    projectLicenseComboBox.removeItem(EMPTY_ELEMENT);
  }
}//GEN-LAST:event_projectLicenseComboBoxPopupMenuWillBecomeVisible

代码示例来源:origin: Exslims/MercuryTrade

public void addProfileToSelect(String profileName) {
  this.profileSelector.removeItem("Create new");
  this.profileSelector.addItem(profileName);
  this.profileSelector.addItem("Create new");
  this.profileSelector.setSelectedItem(profileName);
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

public void actionPerformed(ActionEvent e) {
    String local = (String) localColumBox.getSelectedItem();
    String ref = (String) referencingBox.getSelectedItem();
    localColumBox.removeItem(local);
    referencingBox.removeItem(ref);
    _columnTableModel.addColumn(new String[]{local, ref});
    _propertiesTab.enableReferencedComboBox(false);
    if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)
      addButton.setEnabled(false);
    MergeTableDialog.this.checkInputCompletion();
  }
});

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

@Override
  public void actionPerformed(ActionEvent e) {
    Feeder feeder = (Feeder) feederCb.getSelectedItem();
    Bank bank = (Bank) bankCb.getSelectedItem();
    bank.getFeeders().remove(feeder);
    feederCb.removeItem(feeder);
  }
};

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

public void actionPerformed(ActionEvent e) {
    String local = (String) localColumBox.getSelectedItem();
    String ref = (String) referencingBox.getSelectedItem();
    localColumBox.removeItem(local);
    referencingBox.removeItem(ref);
    _columnTableModel.addColumn(new String[]{local, ref});
    _propertiesTab.enableReferencedComboBox(false);
    if (localColumBox.getItemCount() == 0 || referencingBox.getItemCount() == 0)
      addButton.setEnabled(false);
    AddForeignKeyDialog.this.checkInputCompletion();
  }
});

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

public void actionPerformed(ActionEvent e) {
    String ref = (String) referencingBox.getSelectedItem();
    referencingBox.removeItem(ref);
    _columnTableModel.addColumn(ref);
    _propertiesTab.enableReferencedComboBox(false);
    if (referencingBox.getItemCount() == 0)
      addButton.setEnabled(false);
    MergeTableDialog.this.checkInputCompletion();
  }
});

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

public void actionPerformed(ActionEvent e)
  {
    String local = (String) localColumBox.getSelectedItem();
    localColumBox.removeItem(local);
    _columnTableModel.addColumn(local);
    if (localColumBox.getItemCount() == 0)
      addButton.setEnabled(false);
    AddUniqueConstraintDialog.this.checkInputCompletion();
  }
});

代码示例来源:origin: fcrepo3/fcrepo

public void removeMIMETypeItems() {
    for (int i = 1; i < ALL_KNOWN_MIMETYPES.length; i++) {
      m_mimeComboBox.removeItem(ALL_KNOWN_MIMETYPES[i]);
    }
    m_mimeComboBox.setPreferredSize(new Dimension(150, 20));
  }
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/refactoring

public void actionPerformed(ActionEvent e)
  {
    String local = (String) _columnBox.getSelectedItem();
    _columnBox.removeItem(local);
    _columnTableModel.addColumn(local);
    if (_columnBox.getItemCount() == 0)
      _addButton.setEnabled(false);
    AddIndexDialog.this.checkInputCompletion();
  }
});

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

/**
 * Click on the Ok button.
 */
public void onRemove() {
  String valueConnection = connectionName.getText();
  if(dbProperties.containsKey(valueConnection)){
    dbProperties.remove(valueConnection);
    connectionsComboBox.removeItem(valueConnection);
    saveProperties();
    onUserSelectionChange();
  }
}

代码示例来源:origin: org.orbisgis/orbisgis-view

/**
 * Click on the Ok button.
 */
public void onRemove() {
  String valueConnection = connectionName.getText();
  if(dbProperties.containsKey(valueConnection)){
    dbProperties.remove(valueConnection);
    comboBox.removeItem(valueConnection);
    saveProperties();
    onUserSelectionChange();
  }
}

代码示例来源:origin: cytoscape/application

public void propertyChange(PropertyChangeEvent evt) {
  final String propName = evt.getPropertyName();
  
  if (propName.equals(Cytoscape.NETWORK_CREATED)||propName.equals(Cytoscape.NETWORK_TITLE_MODIFIED)){
    updateNetworkList();
  }
  else if (propName.equals(Cytoscape.NETWORK_DESTROYED))
    networkComboBox.removeItem(Cytoscape.getNetwork(
        (String) evt.getNewValue()).getTitle());
}

代码示例来源:origin: nl.cloudfarming.client/util-swing

@Override
public void removeItem(final Object anObject) {
  for (int i = 0; i <= getItemCount(); i++) {
    if (getItemAt(i) == anObject) {
      disabled_items.remove(i);
    }
  }
  super.removeItem(anObject);
}

代码示例来源:origin: eu.agrosense.client/util-swing

@Override
public void removeItem(final Object anObject) {
  for (int i = 0; i <= getItemCount(); i++) {
    if (getItemAt(i) == anObject) {
      disabled_items.remove(i);
    }
  }
  super.removeItem(anObject);
}

代码示例来源:origin: eu.mihosoft.vrl/vrl

@Override
public void removeItem(Object o) {
  super.removeItem(o);
  removeToolTip(o);
  setWide(wide); // update width
}

代码示例来源:origin: cytoscape.coreplugins/filters

private void deleteFilter(CompositeFilter pFilter) {
     filter2SettingPanelMap.remove(pFilter);
  cmbSelectFilter.removeItem(pFilter);
  
  if (allFilterVect == null || allFilterVect.size() == 0) {
    replaceFilterSettingPanel(null);
  }
  this.validate();
  this.repaint();
}

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

@Override
  public void actionPerformed(ActionEvent e) {
    Bank bank = (Bank) bankCb.getSelectedItem();
    if (ReferenceSlotAutoFeeder.getBanks().size() < 2) {
      MessageBoxes.errorBox(getTopLevelAncestor(), "Error", "Can't delete the only bank. There must always be one bank defined.");
      return;
    }
    ReferenceSlotAutoFeeder.getBanks().remove(bank);
    bankCb.removeItem(bank);
  }
};

相关文章

JComboBox类方法