Esempio n. 1
0
 private void removeEquipSets(Set<String> eqSetIds) {
   for (String key : eqSetIds) {
     JRadioButton w = eqSetWidgets.remove(key);
     eqSets.remove(w);
     eqSetPanel.remove(w);
   }
 }
Esempio n. 2
0
 public static void clearButtonGroup(ButtonGroup g) {
   if (g == null || g.getButtonCount() == 0) return;
   Enumeration e = g.getElements();
   List<AbstractButton> list = new ArrayList<AbstractButton>();
   while (e.hasMoreElements()) list.add((AbstractButton) e.nextElement());
   for (AbstractButton b : list) {
     g.remove(b);
   }
 }
Esempio n. 3
0
 /** <code>removeAllBoxes</code> clears out the GUI panel's */
 private void removeAllBoxes() {
   tempBonusWidgets.clear();
   modifiersPanel.removeAll();
   eqSetPanel.removeAll();
   for (JRadioButton button : eqSetWidgets.values()) {
     eqSets.remove(button);
   }
   eqSetWidgets.clear();
 }
Esempio n. 4
0
  /**
   * removes the specified radio menu button from the menu
   *
   * @param menuButton the JRadioButtonMenuItem to remove
   */
  public void remove(JRadioButtonMenuItem menuButton) {
    frameRadioButtonMenuItemGroup.remove(menuButton);
    super.remove(menuButton);

    // cannot simply remove the radio menu button, as need to renumber the
    // keyboard shortcut keys as well. Hence, a call to refreshMenu is in order...

    refreshMenu(); // refresh the mnemonics associated with the other items
  }
 public void remove(AbstractButton button) {
   button.removeActionListener(actionListener);
   bg.remove(button);
 }