Package org.rstudio.core.client.widget

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


   }

   @Override
   protected Display createDisplay()
   {
      progressPanel_ = new SimplePanelWithProgress();
      progressPanel_.setSize("100%", "100%");
      reloadDisplay();
      return new Display()
      {
         public void print()
View Full Code Here


   @Override
   protected Widget createMainWidget()
   {
      // create progress container
      final SimplePanelWithProgress panel = new SimplePanelWithProgress(
                                          ProgressImages.createLargeGray());
      panel.setStylePrimaryName(RESOURCES.styles().mainWidget());
        
      // show progress (with delay)
      panel.showProgress(200);
     
      // query data source for packages
      mirrorSource_.requestData(new SimpleRequestCallback<JsArray<T>>() {

         @Override
         public void onResponseReceived(JsArray<T> mirrors)
         {  
            // keep internal list of mirrors
            mirrors_ = new ArrayList<T>(mirrors.length());
           
            // create list box and select default item
            listBox_ = new ListBox(false);
            listBox_.setVisibleItemCount(18); // all
            listBox_.setWidth("100%");
            if (mirrors.length() > 0)
            {
               for(int i=0; i<mirrors.length(); i++)
               {
                  T mirror = mirrors.get(i);
                  mirrors_.add(mirror);
                  String item = mirrorSource_.getLabel(mirror);
                  String value = mirrorSource_.getURL(mirror);
                  listBox_.addItem(item, value);
               }
              
               listBox_.setSelectedIndex(0);
               enableOkButton(true);
            }
           
            // set it into the panel
            panel.setWidget(listBox_);
           
            // update ok button on changed
            listBox_.addDoubleClickHandler(new DoubleClickHandler() {
               @Override
               public void onDoubleClick(DoubleClickEvent event)
               {
                  clickOkButton();             
               }
            });
           
           
            // if the list box is larger than the space we initially allocated
            // then increase the panel height
            final int kDefaultPanelHeight = 285;
            if (listBox_.getOffsetHeight() > kDefaultPanelHeight)
               panel.setHeight(listBox_.getOffsetHeight() + "px");
           
            // set focus  
            FocusHelper.setFocusDeferred(listBox_);
         }
        
View Full Code Here

         addToolbar(secondaryToolbar_);

      mainWidget_ = createMainWidget() ;
      mainWidget_.setSize("100%", "100%");

      progressPanel_ = new SimplePanelWithProgress();
      progressPanel_.setSize("100%", "100%");
      progressPanel_.setWidget(mainWidget_);

      dockPanel_.add(progressPanel_);
View Full Code Here

   }
  
   @UiFactory
   public SimplePanelWithProgress makeProgressPanel()
   {
      return new SimplePanelWithProgress(new Image(
            CoreResources.INSTANCE.progress()), 50);
   }
View Full Code Here

      table_.setSize("100%", "100%");

      scrollPanel_ = new ScrollPanelWithClick(table_);
      scrollPanel_.setSize("100%", "100%");

      progressPanel_ = new SimplePanelWithProgress();
      progressPanel_.setWidget(null);

      initWidget(progressPanel_);

      setStylePrimaryName(styles_.contents());
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.widget.SimplePanelWithProgress

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.