Examples of IUndoHandler


Examples of org.freeplane.core.undo.IUndoHandler

  }

  public void afterMapChange(final MapModel oldMap, final MapModel newMap) {
    if (oldMap instanceof MMapModel) {
      final IUndoHandler undoHandler = oldMap.getExtension(IUndoHandler.class);
      undoHandler.removeChangeListener(changeListener);
    }
    if (newMap == null) {
      setEnabled(false);
      redo.setEnabled(false);
      return;
    }
    final IUndoHandler undoHandler = (newMap.getExtension(IUndoHandler.class));
    if (undoHandler != null) {
      setEnabled(undoHandler.canUndo());
      redo.setEnabled(undoHandler.canRedo());
      undoHandler.addChangeListener(changeListener);
    }
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

  public void actionPerformed(final ActionEvent e) {
    if(UITools.isEditingText())
      return;
    final Controller controller = Controller.getCurrentController();
    final MapModel map = controller.getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    final MapController mapController = Controller.getCurrentModeController().getMapController();
    mapController.addNodeChangeListener(this);
    try{
    undoHandler.getRedoAction().actionPerformed(e);
    if(lastChangedNode != null){
      mapController.displayNode(lastChangedNode);
      controller.getSelection().selectAsTheOnlyOneSelected(lastChangedNode);
      lastChangedNode = null;
    }
    undo.setEnabled(undoHandler.canUndo());
    setEnabled(undoHandler.canRedo());
    }
    finally{
      mapController.removeNodeChangeListener(this);
    }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

  }

  public void reset() {
    final MapModel map = Controller.getCurrentController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.resetRedo();
    setEnabled(false);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.