public void xmlActionPerformed(ActionEvent e) {
   if (singleNodeOperation != null) {
     for (ListIterator it = modeController.getSelecteds().listIterator(); it.hasNext(); ) {
       MindMapNodeModel selected = (MindMapNodeModel) it.next();
       singleNodeOperation.apply((MindMapMapModel) this.modeController.getMap(), selected);
     }
   } else {
     // xml action:
     // Do-action
     CompoundAction doAction = new CompoundAction();
     // Undo-action
     CompoundAction undo = new CompoundAction();
     // sort selectedNodes list by depth, in order to guarantee that
     // sons are deleted first:
     for (ListIterator it = modeController.getSelecteds().listIterator(); it.hasNext(); ) {
       MindMapNodeModel selected = (MindMapNodeModel) it.next();
       ActionPair pair = actor.apply(this.modeController.getMap(), selected);
       if (pair != null) {
         doAction.addChoice(pair.getDoAction());
         undo.addAtChoice(0, pair.getUndoAction());
       }
     }
     if (doAction.sizeChoiceList() == 0) return;
     modeController.getActionFactory().startTransaction((String) getValue(NAME));
     modeController.getActionFactory().executeAction(new ActionPair(doAction, undo));
     modeController.getActionFactory().endTransaction((String) getValue(NAME));
   }
 }
 private void removeAllIcons() {
   for (ListIterator it = modeController.getSelecteds().listIterator(); it.hasNext(); ) {
     MindMapNodeModel selected = (MindMapNodeModel) it.next();
     if (selected.getIcons().size() > 0) {
       modeController.removeAllIcons(selected);
     }
   }
 }
 private void removeIcon(boolean removeFirst) {
   for (ListIterator it = modeController.getSelecteds().listIterator(); it.hasNext(); ) {
     MindMapNodeModel selected = (MindMapNodeModel) it.next();
     removeIcon(selected, icon, removeFirst);
   }
 }
 private void addLastIcon() {
   for (ListIterator it = modeController.getSelecteds().listIterator(); it.hasNext(); ) {
     MindMapNodeModel selected = (MindMapNodeModel) it.next();
     addIcon(selected, icon);
   }
 }