コード例 #1
0
  private QueryStatisticsPanel addDMLStatsTab(
      @NotNull Content content, SqlStatementMarker sqlMarker, Icon icon, String s) {
    //        Component[] comps = (content.getComponent()).getComponents();
    //        JTabbedPane tabbedPane = (JTabbedPane) comps[1];
    JTabbedPane tabbedPane = getTabComponent(content);
    QueryStatisticsPanel dmlStatsPanel = new QueryStatisticsPanel();
    dmlStatsPanel.putClientProperty(CREATE_TIME, new Date().getTime());

    tabbedPane.addTab(sqlMarker.getName(), dmlStatsPanel);
    int index = tabbedPane.indexOfTab(sqlMarker.getName());
    tabbedPane.setTabComponentAt(index, new ButtonTabComponent(tabbedPane, icon, sqlMarker));

    return dmlStatsPanel;
  }
コード例 #2
0
  private DataGridPanel addGridPanelTab(
      @NotNull Content content, SqlStatementMarker sqlMarker, Icon icon, String toolTip) {
    JTabbedPane tabbedPane = getTabComponent(content);
    DataGridPanel dataGridPanel = new DataGridPanel();
    dataGridPanel.putClientProperty(CREATE_TIME, new Date().getTime());

    tabbedPane.addTab(sqlMarker.getName(), dataGridPanel);
    int index = tabbedPane.indexOfTab(sqlMarker.getName());
    ButtonTabComponent buttonTab = new ButtonTabComponent(tabbedPane, icon, sqlMarker);
    if (toolTip != null) {
      buttonTab.setToolTipText(toolTip);
    }
    tabbedPane.setTabComponentAt(index, buttonTab);
    return dataGridPanel;
  }