Example #1
0
 /** Unconfigures a JCheckBoxMenuItem for an Action. */
 public static void unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a) {
   PropertyChangeListener propertyHandler =
       (PropertyChangeListener) mi.getClientProperty("actionPropertyHandler");
   if (propertyHandler != null) {
     a.removePropertyChangeListener(propertyHandler);
     mi.putClientProperty("actionPropertyHandler", null);
   }
 }
Example #2
0
 public void clearActions() {
   final Set<Action> actions = myActions.keySet();
   for (Iterator<Action> iterator = actions.iterator(); iterator.hasNext(); ) {
     Action each = iterator.next();
     each.removePropertyChangeListener(this);
   }
   myActions.clear();
   myActionsPanel.removeAll();
 }