Package com.projity.session

Examples of com.projity.session.LoadOptions


    //showWaitCursor(true);
    if (id==-1L)
      return null;
    ProjectFactory factory = projectFactory;
    factory.setServer(server);
    LoadOptions opt=new LoadOptions();
    opt.setId(id);
    opt.setSync(sync);
    opt.setOpenAs(openAs);
    opt.setEndSwingClosure(endSwingClosure);

    Document result = factory.openProject(opt);
    //showWaitCursor(false);
    return result;
  }
View Full Code Here


    if (fileName==null) {
      //System.out.println("creating empty project");
      project = projectFactory.createProject();

    } else {
      LoadOptions opt=new LoadOptions();
      opt.setFileName(fileName);
      opt.setLocal(true);
      opt.setSync(false);

      if (merge) opt.setResourceMapping(new ResourceMappingForm(){
        public boolean execute(){
          if (getImportedResources().size() == 0) // don't show dialog if no resources were imported
            return true;
          if (resourceMappingDialog == null) {
            resourceMappingDialog = ResourceMappingDialog.getInstance(this);
            resourceMappingDialog.pack();
            resourceMappingDialog.setModal(true);
          } else resourceMappingDialog.setForm(this);
          resourceMappingDialog.bind(true);
          resourceMappingDialog.setLocationRelativeTo(getCurrentFrame());//to center on screen
          resourceMappingDialog.setVisible(true);
          return resourceMappingDialog.getDialogResult()==JOptionPane.OK_OPTION;
        }
      });

      if (fileName.endsWith(".pod")){ //$NON-NLS-1$
        opt.setImporter(Environment.getStandAlone()?LocalSession.LOCAL_PROJECT_IMPORTER:LocalSession.SERVER_LOCAL_PROJECT_IMPORTER);
      }else opt.setImporter(LocalSession.MICROSOFT_PROJECT_IMPORTER);
      project=projectFactory.openProject(opt);

    }
    //showWaitCursor(false);
    return project != null;
View Full Code Here

    workspace = ws;
    setMainView(false);
    if (project == null) {
      project = ProjectFactory.getInstance().findFromId(ws.projectId);
      if (project == null){
        LoadOptions opt=new LoadOptions();
        opt.setId(ws.projectId);
        opt.setSync(true);
        project = ProjectFactory.getInstance().openProject(opt);
      }
    }
    coord.restoreWorkspace(ws.getCoord(), context);
View Full Code Here

    //showWaitCursor(true);
    if (id==-1L)
      return null;
    ProjectFactory factory = projectFactory;
    factory.setServer(server);
    LoadOptions opt=new LoadOptions();
    opt.setId(id);
    opt.setSync(sync);
    opt.setOpenAs(openAs);
    opt.setEndSwingClosure(endSwingClosure);

    Document result = factory.openProject(opt);
    //showWaitCursor(false);
    return result;
  }
View Full Code Here

    if (fileName==null) {
      //System.out.println("creating empty project");
      project = projectFactory.createProject();

    } else {
      LoadOptions opt=new LoadOptions();
      opt.setFileName(fileName);
      opt.setLocal(true);
      opt.setSync(false);

      if (merge) opt.setResourceMapping(new ResourceMappingForm(){
        public boolean execute(){
          if (getImportedResources().size() == 0) // don't show dialog if no resources were imported
            return true;
          if (resourceMappingDialog == null) {
            resourceMappingDialog = ResourceMappingDialog.getInstance(this);
            resourceMappingDialog.pack();
            resourceMappingDialog.setModal(true);
          } else resourceMappingDialog.setForm(this);
          resourceMappingDialog.bind(true);
          resourceMappingDialog.setLocationRelativeTo(getCurrentFrame());//to center on screen
          resourceMappingDialog.setVisible(true);
          return resourceMappingDialog.getDialogResult()==JOptionPane.OK_OPTION;
        }
      });

      if (fileName.endsWith(".pod")){ //$NON-NLS-1$
        opt.setImporter(Environment.getStandAlone()?LocalSession.LOCAL_PROJECT_IMPORTER:LocalSession.SERVER_LOCAL_PROJECT_IMPORTER);
      }else opt.setImporter(LocalSession.MICROSOFT_PROJECT_IMPORTER);
      project=projectFactory.openProject(opt);

    }
    //showWaitCursor(false);
    return project != null;
View Full Code Here

    while (i.hasNext()) {
      DocumentFrame.Workspace documentFrameWorkspace = (DocumentFrame.Workspace) i.next();
      long projectId = documentFrameWorkspace.getProjectId();
      Project project = ProjectFactory.getInstance().findFromId(projectId);
      if (project == null){
        LoadOptions opt=new LoadOptions();
        opt.setId(projectId);
        opt.setSync(true);
        ProjectFactory.getInstance().openProject(opt);
      }
      DocumentFrame documentFrame = graphicManager.addProjectFrame(project); // will add to combo
      documentFrame.restoreWorkspace(documentFrameWorkspace, context); // a little ugly, in that the worspace is used above to create the frame
    }
View Full Code Here

      return null;
    }

    addLoadingProject(id);

    LoadOptions opt=new LoadOptions();
    opt.setSubproject(true);
    opt.setId(id);
    Job job=session.getLoadProjectJob(opt);
    subprojectTask.setFetching(true);

    job.addSwingRunnable(new JobRunnable("Local: insertProject"){
      public Object run() throws Exception{
View Full Code Here

TOP

Related Classes of com.projity.session.LoadOptions

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.