Package com.projity.undo

Examples of com.projity.undo.UndoController


    Node subprojectNode = getCurrentFrame().addNodeForImpl(subprojectTask,NodeModel.EVENT);
    ProjectFactory.getInstance().openSubproject(project, subprojectNode, true);

    //Undo
    if (undo){
      UndoController undoContoller=project.getUndoController();
      if (undoContoller.getEditSupport()!=null){
        undoContoller.clear();
        //undoContoller.getEditSupport().postEdit(new CreateSubprojectEdit(project,subprojectNode,subprojectUniqueId));
      }
    }

  }
View Full Code Here


  }


  public void doUndoRedo(boolean isUndo){
    DocumentFrame frame=getCurrentFrame();
    UndoController undoController=getUndoController();
    Object[] args=null;
    if (undoController!=null){
      if (isUndo){
              String name=undoController.getUndoName();
              if (name!=null) args=new Object[]{true,name};
      }else{
              String name=undoController.getRedoName();
              if (name!=null) args=new Object[]{false,name};
      }
    }
    if (args==null) args=new Object[]{isUndo};
    addHistory("doUndoRedo",args);
View Full Code Here

  }
  public void doUndoRedo(boolean isUndo) {
    if (!isActive())
      return;
    finishAnyOperations();
    UndoController undoController=getUndoController();
    if (undoController!=null){
      if (isUndo)
        undoController.undo();
      else
        undoController.redo();
      refreshUndoButtons();
    }
  }
View Full Code Here

    if (lastBottomButton != null)
      menuManager.setActionSelected(lastBottomButton,enable);

  }
  public void refreshUndoButtons() {
    UndoController undoController = null;
    if (activeTopView != null)
      undoController = activeTopView.getUndoController();

    if (undoController!=currentUndoController){
      if (currentUndoController!=null)
        currentUndoController.getEditSupport().removeUndoableEditListener(this);
      if (undoController!=null)
        undoController.getEditSupport().addUndoableEditListener(this);
      currentUndoController=undoController;
    }

    boolean canUndo = false;
    boolean canRedo = false;
//    String undoText = "";
//    String redoText = "";

    if (undoController != null){
      canUndo = undoController.canUndo();
      canRedo = undoController.canRedo();
//      undoText = undoController.getUndoManager().getUndoPresentationName();
//      redoText = undoController.getUndoManager().getRedoPresentationName();
    }
    menuManager.setActionEnabled(ACTION_UNDO,canUndo);
    menuManager.setActionEnabled(ACTION_REDO,canRedo);
View Full Code Here

    Node subprojectNode = getCurrentFrame().addNodeForImpl(subprojectTask,NodeModel.EVENT);
    ProjectFactory.getInstance().openSubproject(project, subprojectNode, true);

    //Undo
    if (undo){
      UndoController undoContoller=project.getUndoController();
      if (undoContoller.getEditSupport()!=null){
        undoContoller.clear();
        //undoContoller.getEditSupport().postEdit(new CreateSubprojectEdit(project,subprojectNode,subprojectUniqueId));
      }
    }

  }
View Full Code Here

  }


  public void doUndoRedo(boolean isUndo){
    DocumentFrame frame=getCurrentFrame();
    UndoController undoController=getUndoController();
    Object[] args=null;
    if (undoController!=null){
      if (isUndo){
              String name=undoController.getUndoName();
              if (name!=null) args=new Object[]{true,name};
      }else{
              String name=undoController.getRedoName();
              if (name!=null) args=new Object[]{false,name};
      }
    }
    if (args==null) args=new Object[]{isUndo};
    addHistory("doUndoRedo",args);
View Full Code Here

TOP

Related Classes of com.projity.undo.UndoController

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.