コード例 #1
0
  private void onDisplayErrors(
      final ArrayList<String> sqlExecErrorMsgs, final String lastExecutedStatement) {
    Runnable runnable =
        new Runnable() {
          public void run() {
            showErrorPanel(sqlExecErrorMsgs, lastExecutedStatement);
          }
        };

    SwingUtilities.invokeLater(runnable);
  }
コード例 #2
0
 private void onSetCancelPanel(final CancelPanelCtrl cancelPanelCtrl) {
   SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           _tabbedExecutionsPanel.addTab(
               SQLResultExecuterPanel.i18n.EXEC_SQL_MSG,
               null,
               cancelPanelCtrl.getPanel(),
               SQLResultExecuterPanel.i18n.CANCEL_SQL_MSG);
           _tabbedExecutionsPanel.setSelectedComponent(cancelPanelCtrl.getPanel());
         }
       });
 }
コード例 #3
0
 private void onAddResultsTab(
     final SQLExecutionInfo exInfo,
     final ResultSetDataSet rsds,
     final ResultSetMetaDataDataSet mdds,
     final IDataSetUpdateableTableModel creator,
     final IResultTab resultTabToReplace) {
   SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           try {
             ResultTab tab = _resultTabFactory.createResultTab(exInfo, creator, rsds, mdds);
             addResultsTab(tab, resultTabToReplace);
             _tabbedExecutionsPanel.setSelectedComponent(tab);
           } catch (Throwable t) {
             _session.showErrorMessage(t);
           }
         }
       });
 }
コード例 #4
0
  private void onRemoveCancelPanel(
      final CancelPanelCtrl cancelPanelCtrl, final IResultTab resultTabToReplace) {
    SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            _tabbedExecutionsPanel.remove(cancelPanelCtrl.getPanel());

            int indexToSelect = -1;
            if (null == resultTabToReplace) {
              indexToSelect = getIndexOfTab(_stickyTab);
            } else {
              indexToSelect = getIndexOfTab(resultTabToReplace);
            }

            if (-1 != indexToSelect) {
              _tabbedExecutionsPanel.setSelectedIndex(indexToSelect);
            }

            cancelPanelCtrl.wasRemoved();
          }
        });
  }