コード例 #1
0
 public ActionPair apply(MindMap model, MindMapNode selected) {
   List icons = selected.getIcons();
   if (icons.size() == 0) return null;
   AddIconAction undoAction =
       iconAction.createAddIconAction(
           selected, (MindIcon) icons.get(icons.size() - 1), MindIcon.LAST);
   return new ActionPair(createRemoveIconXmlAction(selected, MindIcon.LAST), undoAction);
 }
コード例 #2
0
ファイル: TimeList.java プロジェクト: jmflorezff/cs-6301
 public IconsHolder(MindMapNode node) {
   icons.addAll(node.getIcons());
   // sorting the output.
   iconNames = new Vector();
   for (Iterator i = icons.iterator(); i.hasNext(); ) {
     MindIcon icon = (MindIcon) i.next();
     iconNames.add(icon.getName());
   }
   Collections.sort(iconNames);
 }
コード例 #3
0
 public int removeLastIcon(MindMapNode node) {
   modeController.getActionFactory().startTransaction((String) getValue(NAME));
   modeController.getActionFactory().executeAction(apply(modeController.getMap(), node));
   modeController.getActionFactory().endTransaction((String) getValue(NAME));
   return node.getIcons().size();
 }