Пример #1
0
  /**
   * Builds the main toolbar.
   *
   * @return the main toolbar
   */
  private HorizontalPanel buildToolBar() {
    HorizontalPanel toolbarPanel = new HorizontalPanel();
    toolbarPanel.setVerticalAlignment(HorizontalPanel.ALIGN_MIDDLE);
    toolbarPanel.setStyleName("lab-Toolbar");
    toolbarPanel.add(
        buildButton(
            resources.blankFile(),
            "New Project",
            new CreateNewProjectDialogWidget().openDialogForNewProjectCommand()));
    toolbarPanel.add(buildButton(resources.openIcon(), "Open Project", createBlankCommand()));
    toolbarPanel.add(buildButton(resources.saveIcon(), "Save Project", createBlankCommand()));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(buildButton(resources.refreshIcon(), "Refresh", createBlankCommand()));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(
        buildButton(
            resources.copyIcon(),
            "Clone Project",
            (new GitCloneDialogWidget().openDialogForGITCloneCommand())));
    toolbarPanel.add(buildSeparator());
    toolbarPanel.add(
        buildButton(
            resources.uploadIcon(), "Deploy Project", (new DeployDialog().openMenuDialog())));

    return toolbarPanel;
  }
Пример #2
0
 private Image buildSeparator() {
   Image sep = new Image(resources.buttonSeparator());
   sep.addStyleName("separator");
   return sep;
 }