コード例 #1
0
  /** {@inheritDoc} */
  @Override
  public void onToggleSplitterClicked(boolean isShowSplitter) {
    terminalTab.setScopes(isShowSplitter ? EnumSet.allOf(State.class) : EnumSet.of(RUNNERS));

    if (isShowSplitter) {
      panelState.setSplitterState(SPLITTER_ON);

      view.setLeftPropertiesPanel(leftPropertiesContainer);
      view.setRightPropertiesPanel(rightPropertiesContainer);
    } else {
      panelState.setSplitterState(SPLITTER_OFF);

      view.setGeneralPropertiesPanel(rightPropertiesContainer);
    }

    if (TEMPLATE.equals(state)) {
      panelState.setState(TEMPLATE);

      leftTabContainer.showTab(locale.runnerTabTemplates());

      if (SPLITTER_OFF.equals(panelState.getSplitterState())) {
        rightPropertiesContainer.showTab(propertiesTab.getTitle());
      }
    }
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public void actionPerformed(ActionEvent e) {
    runnerManagerPresenter.setActive();

    tabContainer.showTab(locale.runnerTabTemplates());

    createSimpleEnvironment();
  }
コード例 #3
0
  private void initializeLeftPanel(
      @NotNull final PanelState panelState,
      @NotNull Provider<TabBuilder> tabBuilderProvider,
      @NotNull HistoryPanel historyPanel,
      @NotNull final TemplatesContainer templatesContainer) {
    TabSelectHandler historyHandler =
        new TabSelectHandler() {
          @Override
          public void onTabSelected() {
            selectHistoryTab();
          }
        };

    Tab historyTab =
        tabBuilderProvider
            .get()
            .presenter(historyPanel)
            .selectHandler(historyHandler)
            .title(locale.runnerTabHistory())
            .visible(REMOVABLE)
            .scope(EnumSet.allOf(State.class))
            .tabType(LEFT)
            .build();

    leftTabContainer.addTab(historyTab);

    TabSelectHandler templatesHandler =
        new TabSelectHandler() {
          @Override
          public void onTabSelected() {
            state = TEMPLATE;
            panelState.setState(State.TEMPLATE);

            templatesContainer.selectEnvironment();
            templatesContainer.changeEnableStateRunButton();

            view.hideOtherButtons();
          }
        };

    Tab templateTab =
        tabBuilderProvider
            .get()
            .presenter(templatesContainer)
            .selectHandler(templatesHandler)
            .title(locale.runnerTabTemplates())
            .visible(REMOVABLE)
            .scope(EnumSet.allOf(State.class))
            .tabType(LEFT)
            .build();

    leftTabContainer.addTab(templateTab);
  }