/**
   * Removes a <tt>ConfigurationForm</tt> from this list.
   *
   * @param configForm The <tt>ConfigurationForm</tt> to remove.
   */
  public void removeConfigForm(ConfigurationForm configForm) {
    DefaultListModel listModel = (DefaultListModel) configList.getModel();

    for (int count = listModel.getSize(), i = count - 1; i >= 0; i--) {
      ConfigurationForm form = (ConfigurationForm) listModel.get(i);

      if (form.equals(configForm)) {
        listModel.remove(i);
        /*
         * TODO We may just consider not allowing duplicates on addition
         * and then break here.
         */
      }
    }
  }
Esempio n. 2
0
 private void subZListBoxEintrag() {
   if (zielJList.getSelectedIndex() < 0) return;
   else zielListModel.remove(zielJList.getSelectedIndex());
   if (zielListModel.getSize() > 0) zielJList.setSelectedIndex(zielListModel.getSize() - 1);
 }
Esempio n. 3
0
 private void subQListBoxEintrag() {
   if (quellJList.getSelectedIndex() < 0) return;
   else quellListModel.remove(quellJList.getSelectedIndex());
   if (quellListModel.getSize() > 0) quellJList.setSelectedIndex(quellListModel.getSize() - 1);
 }