Package org.freeplane.features.map

Examples of org.freeplane.features.map.MapModel


      copier.remove(key, from, which);
    }
  }

  public void undoableRemoveExtensions(final Object key, final NodeModel from, final NodeModel which) {
    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


      copier.resolveParentExtensions(key, to);
    }
  }

  public void undoableResolveParentExtensions(final Object key,  final NodeModel to) {
    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

    undoHandler.deactivate();
  }

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

    return optionPanelBuilder;
  }

  @Override
  public boolean isUndoAction() {
    final MapModel model = getController().getMap();
    if (!(model instanceof MMapModel)) {
      return false;
    }
    return ((MMapModel) model).getExtension(IUndoHandler.class).isUndoActionRunning();
  }
View Full Code Here

    return ((MMapModel) model).getExtension(IUndoHandler.class).isUndoActionRunning();
  }

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

    }
  }

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

    undoHandler.startTransaction();
  }

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

    super("UndoAction");
    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)) {
View Full Code Here

  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){
View Full Code Here

    return addAttribute(pNode, newAttribute);
  }

  @Override
  public void performInsertRow(final NodeAttributeTableModel model, final int row, final String name, Object value) {
    final MapModel map = Controller.getCurrentModeController().getController().getMap();
    final AttributeRegistry attributes = AttributeRegistry.getRegistry(map);
    if (name.equals("")) {
      return;
    }
    try {
View Full Code Here

TOP

Related Classes of org.freeplane.features.map.MapModel

Copyright © 2018 www.massapicom. 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.