Examples of IUndoHandler


Examples of net.sourceforge.squirrel_sql.client.session.mainpanel.IUndoHandler

      shared.put(squirrelRedoStroke,shared.get(rsyntaxRedoStroke));
   }

   public IUndoHandler createUndoHandler()
   {
      return new IUndoHandler()
      {
         @Override
         public Action getUndoAction()
         {
            return onGetUndoAction();
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    final MapModel styleMap = mapStyleModel.getStyleMap();
    if(styleMap == null){
      UITools.errorMessage(TextUtils.getText("no_styles_found_in_map"));
      return;
    }
    final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
    undoHandler.startTransaction();
    init();
    SModeController modeController = getModeController();
    modeController.getMapController().newMapView(styleMap);
    Controller controller = modeController.getController();
    Component mapViewComponent = controller.getMapViewManager().getMapViewComponent();
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

        public void componentHidden(final ComponentEvent e) {
            final WindowConfigurationStorage windowConfigurationStorage = new WindowConfigurationStorage(getKey() + ".dialog");
            windowConfigurationStorage.storeDialogPositions(dialog);
          final IMapViewManager mapViewManager = modeController.getController().getMapViewManager();
          final MapModel map = mapViewManager.getModel();
          final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
          mapViewManager.close(true);
          Controller.setCurrentController(AEditStylesAction.this.controller);
          super.componentHidden(e);
          switch (modeController.getStatus()) {
            case JOptionPane.OK_OPTION:
              if (undoHandler.canUndo()) {
                commit();
                break;
              }
            case JOptionPane.CANCEL_OPTION:
              rollback();
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    }
 
  void tryToCloseDialog() {
      final IMapViewManager mapViewManager = getController().getMapViewManager();
      final MapModel map = mapViewManager.getModel();
      final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
      final Window dialog = ((DialogController) getController().getViewController()).getDialog();
      if (! undoHandler.canUndo()){
        dialog.setVisible(false);
        return;
      }
      final String text = TextUtils.getText("save_unsaved_styles");
      final String title = TextUtils.getText("SaveAction.text");
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    }
  }

  public void undo() {
    final MapModel map = Controller.getCurrentController().getMap();
    final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
    undoHandler.undo();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    undoHandler.undo();
  }

  public void redo() {
    final MapModel map = Controller.getCurrentController().getMap();
    final IUndoHandler undoHandler = (IUndoHandler) map.getExtension(IUndoHandler.class);
    undoHandler.redo();
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

      throw new RuntimeException("error on newMap", e);
    }
  }

  private void restartTransaction(final MapModel oldMap, final MapModel newmap) {
    final IUndoHandler oldUndoHandler = (IUndoHandler) oldMap.getExtension(IUndoHandler.class);
    final IUndoHandler newUndoHandler = (IUndoHandler) newmap.getExtension(IUndoHandler.class);
    final int transactionLevel = oldUndoHandler.getTransactionLevel();
        if(transactionLevel == 0){
            return;
        }
    if(transactionLevel == 1){
        oldUndoHandler.commit();
        newUndoHandler.startTransaction();
        return;
    }
    throw new RuntimeException("can not create map inside transaction");
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    createActions();
    createOptionPanelControls();
  }

  private void addUndoableActor(final IActor actor, final MapModel map) {
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.addActor(actor);
  }
View Full Code Here

Examples of org.freeplane.core.undo.IUndoHandler

    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    undoHandler.addActor(actor);
  }

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

Examples of org.freeplane.core.undo.IUndoHandler

    final MapModel map = to.getMap();
    if (map == null) {
      copyExtensions(key, from, to);
      return;
    }
    final IUndoHandler undoHandler = map.getExtension(IUndoHandler.class);
    if (undoHandler == null) {
      copyExtensions(key, from, to);
      return;
    }
    final NodeModel backup = new NodeModel(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.