Examples of IUndoHandler


Examples of org.freeplane.core.undo.IUndoHandler

  }

  @Override
  public void commit() {
    final MapModel map = getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.commit();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    final MapModel map = from.getMap();
    if (map == null) {
      removeExtensions(key, from, which);
      return;
    }
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    if (undoHandler == null) {
      removeExtensions(key, from, which);
      return;
    }
    final NodeModel backup = new NodeModel(null);
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    undoHandler.commit();
  }

  public void delayedCommit() {
    final MMapModel map = (MMapModel) getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.delayedCommit();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    final MapModel map = to.getMap();
    if (map == null) {
      resolveParentExtensions(key, to);
      return;
    }
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    if (undoHandler == null) {
      resolveParentExtensions(key, to);
      return;
    }
    final NodeModel backup = new NodeModel(null);
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    undoHandler.delayedCommit();
  }

  public void delayedRollback() {
    final MMapModel map = (MMapModel) getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.delayedRollback();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

  }

  @Override
  public void rollback() {
    final MapModel map = getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.rollback();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

  }

  @Override
  public void startTransaction() {
    final MapModel map = getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.startTransaction();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

  }

  @Override
  public void forceNewTransaction() {
    final MapModel map = getController().getMap();
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.forceNewTransaction();
    }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    Controller.getCurrentController().getMapViewManager().addMapSelectionListener(this);
    setEnabled(false);
    changeListener = new ChangeListener() {
      public void stateChanged(final ChangeEvent e) {
        final MapModel map = Controller.getCurrentController().getMap();
        final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
        if (undoHandler == null) {
          return;
        }
        final Object eventSource = e.getSource();
        if (!eventSource.equals(undoHandler)) {
          return;
        }
        setEnabled(undoHandler.canUndo());
        redo.setEnabled(undoHandler.canRedo());
      }
    };
  }
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.getUndoAction().actionPerformed(e);
    if(lastChangedNode != null){
      mapController.displayNode(lastChangedNode);
      controller.getSelection().selectAsTheOnlyOneSelected(lastChangedNode);
      lastChangedNode = null;
    }
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.