org.eclipse.datatools.sqltools.result.internal.ui.view
Class MultipleTabsModeSection

java.lang.Object
  extended by org.eclipse.datatools.sqltools.result.internal.ui.view.ResultSection
      extended by org.eclipse.datatools.sqltools.result.internal.ui.view.MultipleTabsModeSection
Direct Known Subclasses:
MultipleTabsGridSection, MultipleTabsTextSection

public abstract class MultipleTabsModeSection
extends ResultSection

Parent class of MultipleTabsTextSection and MultipleTabsGridSection.

Author:
Dafan Yang

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.datatools.sqltools.result.internal.ui.view.ResultSection
ResultSection.OutputThread
 
Constructor Summary
MultipleTabsModeSection(org.eclipse.swt.widgets.Composite composite, IResultInstance instance, ResultsViewControl resultsViewControl)
           
MultipleTabsModeSection(org.eclipse.swt.widgets.Composite composite, ResultsViewControl resultsViewControl)
           
 
Method Summary
 org.eclipse.swt.widgets.Composite getControl()
          Returns the outer control of this UI section
 int getRowCount()
          Returns the row count of the current displaying result set.
 void onInstanceFinished()
          Does some jobs when resultInstanceFinish event occurs for the current result instance, for example, when using single window display mode, we need to display the parameters at the end
 void onInstanceReseted()
          Refreshes UI when resultInstanceReset event occurs for the current result instance
 void onNewItemAppended(ResultItem item, int index)
          Shows the newly-appended result item (when resultInstanceAppended event occurs) for the current result instance
 void onParametersShown(java.util.List params)
          Shows the parameters for the current result instance, do nothing in single window display mode, because we need to display the parameters at the end in this mode
 void showDetail(IResultInstance instance)
          Shows the selected instance (when user clicks the history results item).
 void showResultSet(IResultSetObject result)
          Sets focus to the given result set
 void showTab(int tabType)
          Sets focus to the given tab
 void showTab(int tabType, int tabNumber)
          Sets focus to the given message/result tab with the given number
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleTabsModeSection

public MultipleTabsModeSection(org.eclipse.swt.widgets.Composite composite,
                               IResultInstance instance,
                               ResultsViewControl resultsViewControl)

MultipleTabsModeSection

public MultipleTabsModeSection(org.eclipse.swt.widgets.Composite composite,
                               ResultsViewControl resultsViewControl)
Method Detail

showDetail

public void showDetail(IResultInstance instance)
Description copied from class: ResultSection
Shows the selected instance (when user clicks the history results item).

Overrides:
showDetail in class ResultSection
Parameters:
instance - the selected result instance

getControl

public org.eclipse.swt.widgets.Composite getControl()
Description copied from class: ResultSection
Returns the outer control of this UI section

Specified by:
getControl in class ResultSection
Returns:
the outer composite

onNewItemAppended

public void onNewItemAppended(ResultItem item,
                              int index)
Description copied from class: ResultSection
Shows the newly-appended result item (when resultInstanceAppended event occurs) for the current result instance

Overrides:
onNewItemAppended in class ResultSection
Parameters:
item - the newly-appended result item
index - the index of this item

onParametersShown

public void onParametersShown(java.util.List params)
Description copied from class: ResultSection
Shows the parameters for the current result instance, do nothing in single window display mode, because we need to display the parameters at the end in this mode

Specified by:
onParametersShown in class ResultSection
Parameters:
params - the parameters

onInstanceReseted

public void onInstanceReseted()
Description copied from class: ResultSection
Refreshes UI when resultInstanceReset event occurs for the current result instance

Specified by:
onInstanceReseted in class ResultSection

onInstanceFinished

public void onInstanceFinished()
Description copied from class: ResultSection
Does some jobs when resultInstanceFinish event occurs for the current result instance, for example, when using single window display mode, we need to display the parameters at the end

Specified by:
onInstanceFinished in class ResultSection

showTab

public void showTab(int tabType)
Description copied from class: ResultSection
Sets focus to the given tab

Overrides:
showTab in class ResultSection
Parameters:
tabType - the type of the tab to be set focus
See Also:
ResultsViewUIAccessor.STATUS_TAB, ResultsViewUIAccessor.PARAM_TAB, ResultsViewUIAccessor.MESSAGE_TAB, ResultsViewUIAccessor.RESULT_TAB

showResultSet

public void showResultSet(IResultSetObject result)
Description copied from class: ResultSection
Sets focus to the given result set

Overrides:
showResultSet in class ResultSection
Parameters:
result - the result set

showTab

public void showTab(int tabType,
                    int tabNumber)
Description copied from class: ResultSection
Sets focus to the given message/result tab with the given number

Overrides:
showTab in class ResultSection
Parameters:
tabType - the type of the tab to be set focus
tabNumber - the number of the tab for the given type
See Also:
ResultsViewUIAccessor.MESSAGE_TAB, ResultsViewUIAccessor.RESULT_TAB

getRowCount

public int getRowCount()
Description copied from class: ResultSection
Returns the row count of the current displaying result set.

Overrides:
getRowCount in class ResultSection
Returns:
the row count of the current displaying result set, returns -1 if the current tab is not a result set tab or current display mode is single tab display mode