Пример #1
0
  /** Shows the tab and put into the foreground, if no query is executed yet. */
  private void showTab() {
    if (mainTab == null) {
      mainTab = ui.getMainTab();
    }

    if (mainTab != null) {
      tab = mainTab.getTab(this);
      tab.getComponent().addStyleName("example-queries-tab");
      tab.setEnabled(true);

      if (!(mainTab.getSelectedTab() instanceof ResultViewPanel)) {
        mainTab.setSelectedTab(tab);
      }
    }
  }
Пример #2
0
  private void hideTabSheet() {
    if (mainTab == null) {
      mainTab = ui.getMainTab();
    }

    if (mainTab != null) {
      tab = mainTab.getTab(this);

      if (tab != null) {
        tab.setEnabled(false);
      }
    }
  }