Package com.projity.job

Examples of com.projity.job.Job


    finishAnyOperations();

    final ArrayList descriptors=new ArrayList();

      Session session=SessionFactory.getInstance().getSession(false);
    Job job=(Job)SessionFactory.callNoEx(session,"getLoadProjectDescriptorsJob",new Class[]{boolean.class,java.util.List.class,boolean.class},new Object[]{true,descriptors,!Environment.isAdministrator()});
      job.addSwingRunnable(new JobRunnable("Local: loadDocument"){ //$NON-NLS-1$
        public Object run() throws Exception{
                 final Closure setter=new Closure(){
                    public void execute(Object obj){

                    }
View Full Code Here


//    }

    final ArrayList descriptors=new ArrayList();

      Session session=SessionFactory.getInstance().getSession(false);
    Job job=(Job)SessionFactory.callNoEx(session,"getLoadProjectDescriptorsJob",new Class[]{boolean.class,java.util.List.class,boolean.class},new Object[]{true,descriptors,true});
      job.addSwingRunnable(new JobRunnable("Local: add"){ //$NON-NLS-1$
        public Object run() throws Exception{
            Closure setter=new Closure(){
                public void execute(Object obj){

                }
View Full Code Here

                return null; //return not used anyway
          }
        };


        Job job=projectFactory.getPortfolio().getRemoveAllProjectsJob(exitRunnable,true,null);
        SessionFactory.getInstance().getLocalSession().schedule(job);

      }
    }).start();
  }
View Full Code Here

        }
            return null;
      }
    };
    final boolean[] closeStatus=new boolean[]{false};
    final Job job=projectFactory.getPortfolio().getRemoveAllProjectsJob(exitRunnable,false,closeStatus);
    SessionFactory.getInstance().getLocalSession().schedule(job);

    synchronized(lock){
      while (!lock[0]){
        try{
View Full Code Here

      if (printerJob.printDialog()) {
        //update();


        final JobQueue jobQueue=SessionFactory.getInstance().getJobQueue();
        Job j=new Job(jobQueue,"Printing","Printing...",true,getPrintPreviewFrame());
        j.addRunnable(new JobRunnable("Printing",1.0f){
          public Object run() throws Exception{
            try {
              ViewPrintable vp=getSafePrintable();
              vp.setJr(this);
              vp.setPrinterJob(printerJob);
View Full Code Here

public class PDFExport {
  public static void export(final GraphPageable pageable,Component parentComponent) throws IOException{
    final File file=chooseFile(pageable.getRenderer().getProject().getName(),parentComponent);
    final JobQueue jobQueue=SessionFactory.getInstance().getJobQueue();
    Job job=new Job(jobQueue,"PDF Export","Exporting PDF...",true,parentComponent);
    job.addRunnable(new JobRunnable("PDF Export",1.0f){
      public Object run() throws Exception{
        Document document = new Document();
        PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
        pageable.update();
        int pageCount = pageable.getNumberOfPages();
View Full Code Here

  public void testMppImport() throws Exception {
    MicrosoftImporter importer = new MicrosoftImporter();
    importer.setFileName(mppFileName);
    importer.setProject(ProjectFactory.getInstance().createProject());
    Job job=importer.getImportFileJob();
    SessionFactory.getInstance().getJobQueue().schedule(job);
  }
View Full Code Here

      projects.add(project);
      return getSaveProjectJob(projects,opt);
    }

    public Job getEmptyJob(String name,final Object result){
      Job job=new Job(jobQueue,name,"Job...",false);
      job.addRunnable(new JobRunnable(name,0.0f){
        public Object run() throws Exception{
          return result;
        }
      });
      return job;
View Full Code Here

  public Job getImportFileJob(){
    return getImportFileJob(this);
  }

    public static Job getImportFileJob(final FileImporter importer){
      final Job job=new Job(importer.getJobQueue(),"importFile",Messages.getString("LocalFileImporter.Importing"),true); //$NON-NLS-1$ //$NON-NLS-2$
        job.addRunnable(new JobRunnable("Import",1.0f){ //$NON-NLS-1$
        public Object run() throws Exception{
              DataUtil serializer=new DataUtil();
              System.out.println("Loading "+importer.getFileName()+"..."); //$NON-NLS-1$ //$NON-NLS-2$

              long t1=System.currentTimeMillis();
View Full Code Here

    public Job getExportFileJob(){
      return getExportFileJob(this);
    }
    public static Job getExportFileJob(final FileImporter importer){
      final Job job=new Job(importer.getJobQueue(),"exportFile",Messages.getString("LocalFileImporter.Exporting"),true); //$NON-NLS-1$ //$NON-NLS-2$
        job.addRunnable(new JobRunnable("Export",1.0f){ //$NON-NLS-1$
        public Object run() throws Exception{
              DataUtil serializer=new DataUtil();
              System.out.println("Serialization..."); //$NON-NLS-1$
              long t1=System.currentTimeMillis();
              DocumentData projectData=serializer.serializeDocument(importer.getProject());
View Full Code Here

TOP

Related Classes of com.projity.job.Job

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.