Package com.projity.undo

Examples of com.projity.undo.DataFactoryUndoController


    {
      _existingProject = existingProject;
      _localResourceMap = localResourceMap;
    }
    public Project deserializeProject(ProjectData projectData, final boolean subproject, final Session reindex, Map enterpriseResources,Closure loadResources,boolean updateDistribution) throws IOException, ClassNotFoundException {
      DataFactoryUndoController undoController=new DataFactoryUndoController();
      Project project=(Project)deserialize(projectData,reindex);
      project.setUndoController(undoController);
      project.setMaster(projectData.isMaster()); //not necessary
      project.setLocal(projectData.isLocal());
      project.setReadOnly(!projectData.canBeUsed());
View Full Code Here


         
          job.addSwingRunnable(new JobRunnable("LocalAccess: loadProject.begin",1.0f){
          public Object run() throws Exception{
            ResourcePool resourcePool=null;
            if (MICROSOFT_PROJECT_IMPORTER.equals(opt.getImporter())){
              DataFactoryUndoController undoController=new DataFactoryUndoController();
              resourcePool = ResourcePoolFactory.getInstance().createResourcePool("",undoController);
              resourcePool.setLocal(importer.getResourceMapping()==null);
              Project project = Project.createProject(resourcePool,undoController);
             
              ((DefaultNodeModel)project.getTaskOutline()).setDataFactory(project);   
View Full Code Here

      return new NodeBridge(groupImpl);
    }catch (Exception e) {return null;}
  }
  public Node createTestNode(){
    try{
      com.projity.pm.task.Project project = Project.createProject(null,new DataFactoryUndoController());
      com.projity.pm.task.NormalTask task = project.newNormalTaskInstance();
      task.setName("this is the task name");
      return new NodeBridge(task);
    }catch (Exception e) {return null;}
  }
View Full Code Here

  }
 
  //Undo
  protected transient DataFactoryUndoController undoController;
  protected void initUndo(){
    undoController=new DataFactoryUndoController(this);
  }
View Full Code Here

  //undo
  public UndoableEditSupport getUndoableEditSupport(Dependency dependency) {
    if (dependency.getPredecessor()==null)
      return null;
    else {
      DataFactoryUndoController c = ((Task)dependency.getPredecessor()).getProject().getUndoController();
      if (c == null)
        return null;
      return c.getEditSupport();
    }
  }
View Full Code Here

//  public Project createProject(ResourcePool resourcePool, boolean local, String name) {
//    return createProject(resourcePool,local,name,!local,true);
//  }
//  public Project createProject(ResourcePool resourcePool, boolean local, String name, boolean addResources,boolean verify) {
  private Project createProjectAsync(CreateOptions opt) {
    DataFactoryUndoController undoController=new DataFactoryUndoController();
    ResourcePool resourcePool=opt.getResourcePool();
    if (resourcePool == null){
      resourcePool = ResourcePoolFactory.getInstance().createResourcePool(opt.getName(),undoController);
      resourcePool.setLocal(opt.isLocal());
    }
    Project project = Project.createProject(resourcePool,undoController);
    undoController.setDataFactory(project);
    project.setName(opt.getName());
    if (opt.isLocal()) project.setMaster(true);

    //Don't forget to modify Serializer.deserialize too
    if (opt.isAddResources() &&!project.isLocal()){
View Full Code Here

  }
 
  //Undo
  protected transient DataFactoryUndoController undoController;
  protected void initUndo(){
    undoController=new DataFactoryUndoController(this);
  }
View Full Code Here

TOP

Related Classes of com.projity.undo.DataFactoryUndoController

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.