Exemplo n.º 1
0
  /**
   * 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.
         */
      }
    }
  }
Exemplo 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);
 }
Exemplo 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);
 }