Package org.rstudio.core.client.widget

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


         toolbar.addLeftWidget(commands_.checkPackage().createToolbarButton());
         toolbar.addLeftSeparator();
      }
     
      // create more menu
      ToolbarPopupMenu moreMenu = new ToolbarPopupMenu();
      if (type.equals(SessionInfo.BUILD_TOOLS_MAKEFILE))
      {
         moreMenu.addItem(commands_.rebuildAll().createMenuItem(false));
         moreMenu.addItem(commands_.cleanAll().createMenuItem(false));
         moreMenu.addSeparator();
      }
     
      // packages get additional commands
      else if (type.equals(SessionInfo.BUILD_TOOLS_PACKAGE))
      {
         moreMenu.addItem(commands_.devtoolsLoadAll().createMenuItem(false));
         moreMenu.addItem(commands_.rebuildAll().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.testPackage().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.checkPackage().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.buildSourcePackage().createMenuItem(false));
         moreMenu.addItem(commands_.buildBinaryPackage().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.roxygenizePackage().createMenuItem(false));  
         moreMenu.addSeparator();
      }
      moreMenu.addItem(commands_.buildToolsProjectSetup().createMenuItem(false));
     
      // add more menu
      ToolbarButton moreButton = new ToolbarButton(
                                   "More",
                                   StandardIcons.INSTANCE.more_actions(),
View Full Code Here


   @Override
   public void showContextMenu(final int clientX,
                               final int clientY)
   {
      final ToolbarPopupMenu menu = new ToolbarPopupMenu();
     
      menu.addItem(commands_.vcsAddFiles().createMenuItem(false));
      menu.addItem(commands_.vcsRemoveFiles().createMenuItem(false));
      menu.addSeparator();
      menu.addItem(commands_.vcsRevert().createMenuItem(false));
      menu.addItem(commands_.vcsIgnore().createMenuItem(false));
      menu.addSeparator();
      menu.addItem(commands_.vcsResolve().createMenuItem(false));
      menu.addSeparator();
      menu.addItem(commands_.vcsOpen().createMenuItem(false));
   
      menu.setPopupPositionAndShow(new PositionCallback() {
         @Override
         public void setPosition(int offsetWidth, int offsetHeight)
         {
            menu.setPopupPosition(clientX, clientY);    
         }
      });
   }
View Full Code Here

      toolbar_.addLeftSeparator();
      toolbar_.addLeftWidget(commands_.viewerZoom().createToolbarButton());
     
      // export commands
      exportButtonSeparator_ = toolbar_.addLeftSeparator();
      ToolbarPopupMenu exportMenu = new ToolbarPopupMenu();
      exportMenu.addItem(commands_.viewerSaveAsImage().createMenuItem(false));
      exportMenu.addItem(commands_.viewerCopyToClipboard().createMenuItem(false));
      exportMenu.addSeparator();
      exportMenu.addItem(commands_.viewerSaveAsWebPage().createMenuItem(false));
      exportMenu.addSeparator();
      exportMenu.addItem(commands_.viewerPublishToRPubs().createMenuItem(false));
     
      exportButton_ = new ToolbarButton(
            "Export", StandardIcons.INSTANCE.export_menu(),
            exportMenu);
      toolbar_.addLeftWidget(exportButton_)
View Full Code Here

                                    RemoteFileSystemContext fileContext,
                                    Session session)
   {
      super(ALL_COMMITS,
            StandardIcons.INSTANCE.empty_command(),
            new ToolbarPopupMenu());
     
      fileTypeRegistry_ = fileTypeRegistry;
      fileDialogs_ = fileDialogs;
      fileContext_ = fileContext;
      session_ = session;
     
      setTitle(ALL_COMMITS_TITLE);
     
      ToolbarPopupMenu menu = getMenu();
     
      menu.addItem(new MenuItem("(all commits)", new Command() {
         @Override
         public void execute()
         {
            setValue(null);
         }
      }));
     
      menu.addItem(new MenuItem("Filter by File...", new Command() {
         @Override
         public void execute()
         {
            fileDialogs_.openFile("Choose File",
                                  fileContext_,
                                  getInitialChooserPath(),
                                  chooserOperation());
         }
      }));
     
      menu.addItem(new MenuItem("Filter by Directory...", new Command() {
         @Override
         public void execute()
         {
            fileDialogs_.chooseFolder("Choose Folder",
                                       fileContext_,
View Full Code Here

      packratBootstrapButton_ = commands_.packratBootstrap().createToolbarButton(false);
      toolbar.addLeftWidget(packratBootstrapButton_);
      packratBootstrapButton_.setVisible(false);
     
      // create packrat menu + button
      ToolbarPopupMenu packratMenu = new ToolbarPopupMenu();
      packratMenu.addItem(commands_.packratHelp().createMenuItem(false));
      packratMenu.addSeparator();
      packratMenu.addItem(commands_.packratClean().createMenuItem(false));
      packratMenu.addItem(commands_.packratBundle().createMenuItem(false));
      packratMenu.addSeparator();
      packratMenu.addItem(commands_.packratOptions().createMenuItem(false));
      packratMenuButton_ = new ToolbarButton(
            "Packrat", commands_.packratBootstrap().getImageResource(),
            packratMenu
       );
      toolbar.addLeftWidget(packratMenuButton_);
View Full Code Here

      toolbar.addLeftSeparator();
      toolbar.addLeftWidget(commands_.clearWorkspace().createToolbarButton());
      toolbar.addLeftSeparator();
      toolbar.addLeftWidget(commands_.refreshEnvironment().createToolbarButton());
     
      ToolbarPopupMenu menu = new ToolbarPopupMenu();
      menu.addItem(createViewMenuItem(EnvironmentObjects.OBJECT_LIST_VIEW));
      menu.addItem(createViewMenuItem(EnvironmentObjects.OBJECT_GRID_VIEW));
      viewButton_ = new ToolbarButton(
            nameOfViewType(EnvironmentObjects.OBJECT_LIST_VIEW),
            imageOfViewType(EnvironmentObjects.OBJECT_LIST_VIEW),
            menu);
      toolbar.addRightWidget(viewButton_);
View Full Code Here

   @Override
   public void showHtmlFileChoice(FileSystemItem file,
                                  Command onEdit,
                                  Command onBrowse)
   {
       final ToolbarPopupMenu menu = new ToolbarPopupMenu();
      
       String editLabel = AppCommand.formatMenuLabel(
          commands_.renameFile().getImageResource(), "Open in Editor", null);
       String openLabel = AppCommand.formatMenuLabel(
          commands_.openHtmlExternal().getImageResource(),
          "View in Web Browser",
          null);
      
       menu.addItem(new MenuItem(editLabel, true, onEdit));
       menu.addItem(new MenuItem(openLabel, true, onBrowse));
     
       menu.setPopupPositionAndShow(new PositionCallback() {
          @Override
          public void setPosition(int offsetWidth, int offsetHeight)
          {
             Event event = Event.getCurrentEvent();
             menu.setPopupPosition(event.getClientX(), event.getClientY());    
          }
       });
   }
View Full Code Here

   {
      maxLinks_ = maxLinks;
      top_ = addFromTop;
      pre_ = pre != null ? pre : new MenuItem[0] ;
      post_ = post != null ? post : new MenuItem[0] ;
      menu_ = new ToolbarPopupMenu() ;
      clearLinks() ;
   }
View Full Code Here

      eventBus_.fireEvent(event);
   }

   private Widget createImportMenu()
   {
      ToolbarPopupMenu menu = new ToolbarPopupMenu();
      menu.addItem(commands_.importDatasetFromFile().createMenuItem(false));
      menu.addItem(commands_.importDatasetFromURL().createMenuItem(false));
      dataImportButton_ = new ToolbarButton(
              "Import Dataset",
              StandardIcons.INSTANCE.import_dataset(),
              menu);
      return dataImportButton_;
View Full Code Here

      toolbar.addLeftWidget(commands_.presentationFullscreen().createToolbarButton());
    
      // More
      if (!isTutorial)
      {
         ToolbarPopupMenu moreMenu = new ToolbarPopupMenu();
         moreMenu.addItem(commands_.clearPresentationCache().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.presentationViewInBrowser().createMenuItem(false));
         moreMenu.addItem(commands_.presentationSaveAsStandalone().createMenuItem(false));
         moreMenu.addSeparator();
         moreMenu.addItem(commands_.presentationPublishToRpubs().createMenuItem(false));
        
         ToolbarButton moreButton = new ToolbarButton("More",
                                                      StandardIcons.INSTANCE.more_actions(),
                                                      moreMenu);
         toolbar.addRightWidget(moreButton);
View Full Code Here

TOP

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

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.