use of org.rstudio.core.client.widget.ToolbarButton in project rstudio by rstudio.
the class ShinyApplicationPanel method initToolbar.
@Override
protected void initToolbar(Toolbar toolbar, Commands commands) {
urlBox_ = new Label("");
Style style = urlBox_.getElement().getStyle();
style.setColor("#606060");
urlBox_.addStyleName(ThemeStyles.INSTANCE.selectableText());
urlBox_.getElement().getStyle().setMarginRight(7, Unit.PX);
toolbar.addLeftWidget(urlBox_);
toolbar.addLeftSeparator();
ToolbarButton popoutButton = commands.viewerPopout().createToolbarButton();
popoutButton.setText("Open in Browser");
toolbar.addLeftWidget(popoutButton);
toolbar.addLeftSeparator();
ToolbarButton refreshButton = commands.reloadShinyApp().createToolbarButton();
refreshButton.setLeftImage(commands.viewerRefresh().getImageResource());
refreshButton.getElement().getStyle().setMarginTop(1, Unit.PX);
toolbar.addLeftWidget(refreshButton);
publishButton_ = new RSConnectPublishButton(RSConnect.CONTENT_TYPE_NONE, true, null);
toolbar.addRightWidget(publishButton_);
}
use of org.rstudio.core.client.widget.ToolbarButton in project rstudio by rstudio.
the class TextEditingTargetFindReplace method createFindReplaceButton.
public Widget createFindReplaceButton() {
if (findReplaceBar_ == null) {
findReplaceButton_ = new ToolbarButton(FindReplaceBar.getFindIcon(), new ClickHandler() {
public void onClick(ClickEvent event) {
if (findReplaceBar_ == null)
showFindReplace(true);
else
hideFindReplace();
}
});
String title = showReplace_ ? "Find/Replace" : "Find";
findReplaceButton_.setTitle(title);
}
return findReplaceButton_;
}
use of org.rstudio.core.client.widget.ToolbarButton in project rstudio by rstudio.
the class TerminalPopupMenu method getToolbarButton.
public ToolbarButton getToolbarButton() {
if (toolbarButton_ == null) {
String buttonText = "Terminal";
toolbarButton_ = new ToolbarButton(buttonText, StandardIcons.INSTANCE.empty_command(), this, false);
setNoActiveTerminal();
}
return toolbarButton_;
}
use of org.rstudio.core.client.widget.ToolbarButton in project rstudio by rstudio.
the class SVNPane method createMainToolbar.
@Override
protected Toolbar createMainToolbar() {
Toolbar toolbar = new Toolbar();
toolbar.addLeftWidget(commands_.vcsDiff().createToolbarButton());
toolbar.addLeftSeparator();
toolbar.addLeftWidget(commands_.vcsAddFiles().createToolbarButton());
toolbar.addLeftWidget(commands_.vcsRemoveFiles().createToolbarButton());
toolbar.addLeftSeparator();
toolbar.addLeftWidget(commands_.vcsCommit().createToolbarButton());
toolbar.addLeftSeparator();
ToolbarPopupMenu moreMenu = new ToolbarPopupMenu();
moreMenu.addItem(commands_.vcsRevert().createMenuItem(false));
moreMenu.addItem(commands_.vcsIgnore().createMenuItem(false));
moreMenu.addSeparator();
moreMenu.addItem(commands_.vcsResolve().createMenuItem(false));
moreMenu.addSeparator();
moreMenu.addItem(commands_.vcsPull().createMenuItem(false));
moreMenu.addItem(commands_.vcsCleanup().createMenuItem(false));
moreMenu.addSeparator();
moreMenu.addItem(commands_.vcsShowHistory().createMenuItem(false));
moreMenu.addSeparator();
moreMenu.addItem(commands_.showShellDialog().createMenuItem(false));
toolbar.addLeftWidget(new ToolbarButton("More", new ImageResource2x(StandardIcons.INSTANCE.more_actions2x()), moreMenu));
toolbar.addLeftSeparator();
toolbar.addRightWidget(commands_.vcsRefresh().createToolbarButton());
return toolbar;
}
use of org.rstudio.core.client.widget.ToolbarButton in project rstudio by rstudio.
the class GlobalToolbar method completeInitialization.
public void completeInitialization(SessionInfo sessionInfo) {
StandardIcons icons = StandardIcons.INSTANCE;
if (sessionInfo.isVcsEnabled()) {
addLeftSeparator();
ToolbarPopupMenu vcsMenu = new ToolbarPopupMenu();
vcsMenu.addItem(commands_.vcsFileDiff().createMenuItem(false));
vcsMenu.addItem(commands_.vcsFileLog().createMenuItem(false));
vcsMenu.addItem(commands_.vcsFileRevert().createMenuItem(false));
vcsMenu.addSeparator();
vcsMenu.addItem(commands_.vcsViewOnGitHub().createMenuItem(false));
vcsMenu.addItem(commands_.vcsBlameOnGitHub().createMenuItem(false));
vcsMenu.addSeparator();
vcsMenu.addItem(commands_.vcsCommit().createMenuItem(false));
vcsMenu.addSeparator();
vcsMenu.addItem(commands_.vcsPull().createMenuItem(false));
vcsMenu.addItem(commands_.vcsCleanup().createMenuItem(false));
vcsMenu.addItem(commands_.vcsPush().createMenuItem(false));
vcsMenu.addSeparator();
vcsMenu.addItem(commands_.vcsShowHistory().createMenuItem(false));
vcsMenu.addSeparator();
vcsMenu.addItem(commands_.versionControlProjectSetup().createMenuItem(false));
ImageResource vcsIcon = null;
if (sessionInfo.getVcsName().equals(VCSConstants.GIT_ID))
vcsIcon = new ImageResource2x(icons.git2x());
else if (sessionInfo.getVcsName().equals(VCSConstants.SVN_ID))
vcsIcon = new ImageResource2x(icons.svn2x());
ToolbarButton vcsButton = new ToolbarButton(null, vcsIcon, vcsMenu);
vcsButton.setTitle("Version control");
addLeftWidget(vcsButton);
}
// zoom button
addLeftSeparator();
ToolbarPopupMenu paneLayoutMenu = new ToolbarPopupMenu();
paneLayoutMenu.addItem(commands_.layoutEndZoom().createMenuItem(false));
paneLayoutMenu.addSeparator();
paneLayoutMenu.addItem(commands_.layoutConsoleOnLeft().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutConsoleOnRight().createMenuItem(false));
paneLayoutMenu.addSeparator();
paneLayoutMenu.addItem(commands_.paneLayout().createMenuItem(false));
paneLayoutMenu.addSeparator();
paneLayoutMenu.addItem(commands_.layoutZoomSource().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomConsole().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomHelp().createMenuItem(false));
paneLayoutMenu.addSeparator();
paneLayoutMenu.addItem(commands_.layoutZoomHistory().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomFiles().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomPlots().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomPackages().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomEnvironment().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomViewer().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomVcs().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomBuild().createMenuItem(false));
paneLayoutMenu.addItem(commands_.layoutZoomConnections().createMenuItem(false));
ImageResource paneLayoutIcon = new ImageResource2x(ThemeResources.INSTANCE.paneLayoutIcon2x());
ToolbarButton paneLayoutButton = new ToolbarButton(null, paneLayoutIcon, paneLayoutMenu);
paneLayoutButton.setTitle("Workspace Panes");
addLeftWidget(paneLayoutButton);
// addins menu
ToolbarPopupMenu addinsMenu = new ToolbarPopupMenu();
addinsMenu.addItem(commands_.addinsMru0().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru1().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru2().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru3().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru4().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru5().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru6().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru7().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru8().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru9().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru10().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru11().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru12().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru13().createMenuItem(false));
addinsMenu.addItem(commands_.addinsMru14().createMenuItem(false));
addinsMenu.addSeparator();
addinsMenu.addItem(commands_.browseAddins().createMenuItem(false));
addLeftSeparator();
ToolbarButton addinsButton = new ToolbarButton("Addins", CoreResources.INSTANCE.iconEmpty(), addinsMenu);
addLeftWidget(addinsButton);
// project popup menu
ProjectPopupMenu projectMenu = new ProjectPopupMenu(sessionInfo, commands_);
addRightWidget(projectMenu.getToolbarButton());
}
Aggregations