private void onDisplayErrors( final ArrayList<String> sqlExecErrorMsgs, final String lastExecutedStatement) { Runnable runnable = new Runnable() { public void run() { showErrorPanel(sqlExecErrorMsgs, lastExecutedStatement); } }; SwingUtilities.invokeLater(runnable); }
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()); } }); }
private void propertiesHaveChanged(String propName) { final SessionProperties props = _session.getProperties(); if (propName == null || propName.equals(SessionProperties.IPropertyNames.AUTO_COMMIT)) { SetAutoCommitTask task = new SetAutoCommitTask(); if (SwingUtilities.isEventDispatchThread()) { _session.getApplication().getThreadPool().addTask(task); } else { task.run(); } } if (propName == null || propName.equals(SessionProperties.IPropertyNames.SQL_EXECUTION_TAB_PLACEMENT)) { _tabbedExecutionsPanel.setTabPlacement(props.getSQLExecutionTabPlacement()); } }
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); } } }); }
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(); } }); }