Package org.rstudio.core.client

Examples of org.rstudio.core.client.Size


  
   protected void setLabel(String text)
   {
      if (BrowseCap.isChrome() || BrowseCap.isCocoaDesktop())
      {
         Size labelSize = DomMetrics.measureHTML(text);
         labelCell_.getStyle().setWidth(labelSize.width + 10, Unit.PX);
      }
      label_.setText(text);
   }
View Full Code Here


      if (win == null || (!isRefresh && !isChrome))
      {
         // If there's no window yet, or we're switching apps in a browser
         // other than Chrome, do a normal open
         satelliteManager_.openSatellite(ShinyApplicationSatellite.NAME,    
                                         params_, new Size(960,1100));  
      }
      else if (isChrome)
      {
         // we have a window and we're Chrome, so force a close and reopen
         satelliteManager_.forceReopenSatellite(ShinyApplicationSatellite.NAME,
View Full Code Here

         public void onShowHTMLPreview(ShowHTMLPreviewEvent event)
         {
            // open the window
            satelliteManager.openSatellite(HTMLPreviewApplication.NAME,    
                                            event.getParams(),
                                            new Size(850,1100));  
           
        
      });
   }
View Full Code Here

   protected Widget createMainWidget()
   {
      VerticalPanel mainPanel = new VerticalPanel();   
  
      // enforce maximum initial dimensions based on screen size
      Size maxSize = new Size(Window.getClientWidth() - 100,
                              Window.getClientHeight() - 200);
     
      int width = Math.min(options_.getWidth(), maxSize.width);
      int height = Math.min(options_.getHeight(), maxSize.height);
      
View Full Code Here

      if (paneManager_.getConsole().getOffsetWidth() <= 0)
         consoleWidth = lastMetrics_.getConsoleWidth();
     
      // plots size (don't allow negative metrics)
      WorkbenchTabPanel plotPanel = paneManager_.getOwnerTabPanel(Tab.Plots);
      Size deckPanelSize = new Size(
            plotPanel.getOffsetWidth(),
            plotPanel.getOffsetHeight() - ModuleTabLayoutPanel.BAR_HEIGHT);

      Size plotsSize = new Size(
               Math.max(deckPanelSize.width, 0),
               Math.max(deckPanelSize.height - Toolbar.DEFAULT_HEIGHT, 0));
  
      WorkbenchMetrics metrics = WorkbenchMetrics.create(consoleWidth,
                                                         plotsSize.width,
View Full Code Here

      }
   }
  
   private void setPreviewPanelSize(int width, int height)
   {
      Size maxSize = getMaxSize();
     
      if (width <= maxSize.width && height <= maxSize.height)
      {
         previewPanel_.setVisible(true);
         previewPanel_.setSize((width + IMAGE_INSET) + "px",
View Full Code Here

      }
   }
  
   private Size getMaxSize()
   {
      return new Size(Window.getClientWidth() - 100,
                      Window.getClientHeight() - 200);
   }
View Full Code Here

public class ShowContentDialog extends ModalDialogBase
{
   public ShowContentDialog(String title, String content)
   {
      this(title, content, new Size(0,0));
   }
View Full Code Here

     if (isFixedFont_)
        FontSizer.applyNormalFontSize(htmlContent);
     scrollPanel.setWidget(htmlContent);
     
     // if we don't have a preferred size then size based on content
     Size size = preferredSize_ ;
     if (size.isEmpty())
        size = DomMetrics.measureHTML(content_, styleName_);
                                           
     // compute the widget size and set it
     Size minimumSize = new Size(300, 300);
     size = DomMetrics.adjustedElementSize(size,
                                           minimumSize,
                                           70,   // pad
                                           100); // client margin
     scrollPanel.setSize(size.width + "px", size.height + "px");
View Full Code Here

      // compute width (trim to max)
      int width = Math.min(preferredSize.width, screen.getAvailWidth() - 20);
     
      // return size
      return new Size(width, height);
   }
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.Size

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.