public IconAction(
     MindMapController controller, MindIcon _icon, RemoveIconAction removeLastIconAction) {
   super(_icon.getDescription(), _icon.getIcon(), controller);
   this.modeController = controller;
   this.removeLastIconAction = removeLastIconAction;
   putValue(Action.SHORT_DESCRIPTION, _icon.getDescription());
   this.icon = _icon;
   controller.getActionFactory().registerActor(this, getDoActionClass());
 }
Beispiel #2
0
 public void setValue(Object value) {
   if (value instanceof IconsHolder) {
     IconsHolder iconsHolder = (IconsHolder) value;
     MultipleImage iconImages = new MultipleImage(1.0f);
     for (Iterator i = iconsHolder.getIcons().iterator(); i.hasNext(); ) {
       MindIcon icon = (MindIcon) i.next();
       iconImages.addImage(icon.getIcon());
     }
     if (iconImages.getImageCount() > 0) {
       setIcon(iconImages);
     } else {
       setIcon(null);
     }
   }
 }
 public ImageIcon getIcon() {
   return icon.getIcon();
 }