Examples of ProgressIndicator


Examples of org.eclipse.jface.dialogs.ProgressIndicator

    layout.horizontalSpacing = 0;
    layout.verticalSpacing = 0;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    fProgressBarComposite.setLayout(layout);
    fProgressBar = new ProgressIndicator(fProgressBarComposite);
    fProgressBar.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
        | GridData.GRAB_VERTICAL));

    fStopButtonCursor = new Cursor(getDisplay(), SWT.CURSOR_ARROW);
  }
View Full Code Here

Examples of org.exist.util.ProgressIndicator

        final ProgressBar parseProgress = new ProgressBar("storing nodes   ");
        final ProgressBar wordsProgress = new ProgressBar("storing words   ");
       
        @Override
        public void update(final Observable o, final Object obj) {
            final ProgressIndicator ind = (ProgressIndicator) obj;
            if (lastObservable == null || o != lastObservable) {
                System.out.println();
            }
           
            if (o instanceof ElementIndex) {
                elementsProgress.set(ind.getValue(), ind.getMax());
            } else if (o instanceof TextSearchEngine) {
                wordsProgress.set(ind.getValue(), ind.getMax());
            } else {
                parseProgress.set(ind.getValue(), ind.getMax());
            }
           
            lastObservable = o;
        }
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

               "Unable to Close",
               "Tutorials cannot be closed");
         return;
      }
     
      final ProgressIndicator progress = new GlobalProgressDelayer(
            globalDisplay_,
            0,
            "Closing Presentation...").getIndicator();
     
      server_.closePresentationPane(new ServerRequestCallback<Void>(){
         @Override
         public void onResponseReceived(Void resp)
         {
            reloadWorkbench();
         }

         @Override
         public void onError(ServerError error)
         {
            progress.onError(error.getUserMessage());
           
         }
      });
   }
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

   @Handler
   public void onViewerSaveAsImage()
   {
      display_.bringToFront();
     
      final ProgressIndicator indicator =
         globalDisplay_.getProgressIndicator("Error");
      indicator.onProgress("Preparing to export plot...");

      // get the default directory
      FileSystemItem defaultDir = ExportPlotUtils.getDefaultSaveDirectory(
            workbenchContext_.getCurrentWorkingDir());

      // get context
      server_.getViewerExportContext(
         defaultDir.getPath(),
         new SimpleRequestCallback<SavePlotAsImageContext>() {

            @Override
            public void onResponseReceived(SavePlotAsImageContext context)
            {
               indicator.onCompleted();

               new SaveViewerPlotAsImageDesktopDialog(
                   globalDisplay_,
                   display_.getUrl(),
                   context,
                   ExportPlotOptions.adaptToSize(
                         pUIPrefs_.get().exportViewerOptions().getValue(),
                         display_.getViewerFrameSize()),
                   saveExportOptionsOperation_
               ).showModal();
            }

            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }          
         });
   }
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

               {
                  // We're quitting. Save one last time.

                  final Token token = event.acquire();
                  boolean saving = doSave(null, null, null,
                                          new ProgressIndicator()
                  {
                     public void onProgress(String message)
                     {
                     }
                    
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

   public void withSavedDoc(final Command onSaved)
   {
      if (changeTracker_.hasChanged())
      {
         boolean saved = doSave(null, null, null, new ProgressIndicator() {

            @Override
            public void onCompleted()
            {
               onSaved.execute();
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

                                          String fileType,
                                          String encoding,
                                          final ProgressIndicator progress)
   {
      bufferedCommand_.suspend();
      doSave(path, fileType, encoding, new ProgressIndicator()
      {
         public void onProgress(String message)
         {
            if (progress != null)
               progress.onProgress(message);
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

   }
  
   private void createDraftFromTemplate(final RmdChosenTemplate template,
                                        final String target)
   {
      final ProgressIndicator progress = new GlobalProgressDelayer(
            globalDisplay_,
            250,
            "Creating R Markdown Document...").getIndicator();

      server_.createRmdFromTemplate(target,
            template.getTemplatePath(), template.createDir(),
            new ServerRequestCallback<RmdCreatedTemplate>() {
               @Override
               public void onResponseReceived(RmdCreatedTemplate created)
               {
                  // write a pref indicating this is the preferred template--
                  // we'll default to it the next time we load the template list
                  prefs_.rmdPreferredTemplatePath().setGlobalValue(
                        template.getTemplatePath());
                  prefs_.writeUIPrefs();
                  FileSystemItem file =
                        FileSystemItem.createFile(created.getPath());
                  eventBus_.fireEvent(new FileEditEvent(file));
                  progress.onCompleted();
               }

               @Override
               public void onError(ServerError error)
               {
                  progress.onError(
                        "Couldn't create a template from " +
                        template.getTemplatePath() + " at " + target + ".\n\n" +
                        error.getMessage());
               }
            });
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

  
   void onSavePlotAsImage()
   {
      view_.bringToFront();
     
      final ProgressIndicator indicator =
         globalDisplay_.getProgressIndicator("Error");
      indicator.onProgress("Preparing to export plot...");

      // get the default directory
      FileSystemItem defaultDir = ExportPlotUtils.getDefaultSaveDirectory(
            workbenchContext_.getCurrentWorkingDir());

      // get context
      server_.getSavePlotContext(
         defaultDir.getPath(),
         new SimpleRequestCallback<SavePlotAsImageContext>() {

            @Override
            public void onResponseReceived(SavePlotAsImageContext context)
            {
               indicator.onCompleted();

               exportPlot_.savePlotAsImage(globalDisplay_,
                     server_,
                     context,
                     ExportPlotOptions.adaptToSize(
                           uiPrefs_.get().exportPlotOptions().getValue(),
                           getPlotSize()),
                     saveExportOptionsOperation_)
            }

            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }          
         });
   }
View Full Code Here

Examples of org.rstudio.core.client.widget.ProgressIndicator

  
   void onSavePlotAsPdf()
   {
      view_.bringToFront();
     
      final ProgressIndicator indicator =
         globalDisplay_.getProgressIndicator("Error");
      indicator.onProgress("Preparing to export plot...");

      // get the default directory
      final FileSystemItem defaultDir = ExportPlotUtils.getDefaultSaveDirectory(
            workbenchContext_.getCurrentWorkingDir());

      // get context
      server_.getUniqueSavePlotStem(
         defaultDir.getPath(),
         new SimpleRequestCallback<String>() {

            @Override
            public void onResponseReceived(String stem)
            {
               indicator.onCompleted();

               Size size = getPlotSize();
               final SavePlotAsPdfOptions currentOptions =
                   SavePlotAsPdfOptions.adaptToSize(
                         uiPrefs_.get().savePlotAsPdfOptions().getValue(),
                         pixelsToInches(size.width),
                         pixelsToInches(size.height));
              
              
               exportPlot_.savePlotAsPdf(
                 globalDisplay_,
                 server_,
                 session_.getSessionInfo(),
                 defaultDir,
                 stem,
                 currentOptions,
                 new OperationWithInput<SavePlotAsPdfOptions>() {
                    @Override
                    public void execute(SavePlotAsPdfOptions options)
                    {
                       if (!SavePlotAsPdfOptions.areEqual(
                                                options,
                                                currentOptions))
                       {
                          UIPrefs prefs = uiPrefs_.get();
                          prefs.savePlotAsPdfOptions().setGlobalValue(options);
                          prefs.writeUIPrefs();   
                       }
                    }   
                 })
            }

            @Override
            public void onError(ServerError error)
            {
               indicator.onError(error.getUserMessage());
            }          
         });
   }
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.