Package com._1c.g5.v8.dt.qw.ui.tabs
Class AbstractLazyTab
java.lang.Object
com._1c.g5.v8.dt.qw.ui.tabs.AbstractLazyTab
- Direct Known Subclasses:
AdditionallyTab
,AliasesTab
,CharacteristicsTab
,ConditionsTab
,DataCompositionTab
,GroupingsTab
,IndexTab
,JoinsTab
,OrderTab
,QueryBatchTab
,TablesAndFieldsTab
,TotalsTab
Abstact class contains logic for creating tab item for Query Wizard.
Content of the tab will be created in lazy style when tab will be activated
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Flag that check tabItem was initialized or notprotected final org.eclipse.core.resources.IProject
Actual context project of Query Builderprotected QueryWizardSource
ActualQueryWizardSource
of Query Builderprotected final QueryWizardControl
Actual Query wizard controlprotected final org.eclipse.swt.custom.CTabFolder
ParentCTabFolder
for creating tab on itprotected org.eclipse.swt.custom.CTabItem
CreatedCTabItem
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractLazyTab
(QueryWizardControl queryWizard, org.eclipse.core.resources.IProject project, org.eclipse.swt.custom.CTabFolder tabFolder) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds special paint listener for draw content of the tab when it will be activated firstly.protected abstract void
Creates content of the tab item, method will be call once when tab item has not been initialized yet.org.eclipse.swt.custom.CTabItem
Gets createdCTabItem
protected void
init()
Initializes content of the tab itemboolean
isInit()
Checks that tab item was initialized or notvoid
setTabItem
(org.eclipse.swt.custom.CTabItem tabItem) Sets newCTabItem
for tabprotected abstract void
Sets content and label providers to the trees in tab itemsvoid
updateTreeProviders
(QueryWizardSource querySchemaSource) Updates label and content provider for trees in tab item
-
Field Details
-
queryWizard
Actual Query wizard control -
project
protected final org.eclipse.core.resources.IProject projectActual context project of Query Builder -
tabFolder
protected final org.eclipse.swt.custom.CTabFolder tabFolderParentCTabFolder
for creating tab on it -
tabItem
protected org.eclipse.swt.custom.CTabItem tabItemCreatedCTabItem
-
querySchemaSource
ActualQueryWizardSource
of Query Builder -
init
protected boolean initFlag that check tabItem was initialized or not
-
-
Constructor Details
-
AbstractLazyTab
protected AbstractLazyTab(QueryWizardControl queryWizard, org.eclipse.core.resources.IProject project, org.eclipse.swt.custom.CTabFolder tabFolder) Constructor.tabItem
should be initilized in constructor.- Parameters:
queryWizard
- actual Query wizard control, cannot benull
project
- actual context project of Query Builder, cannot benull
tabFolder
- parentCTabFolder
for creating tab on it, cannot benull
-
-
Method Details
-
getTabItem
public org.eclipse.swt.custom.CTabItem getTabItem()Gets createdCTabItem
- Returns:
- created
CTabItem
, nevernull
-
setTabItem
public void setTabItem(org.eclipse.swt.custom.CTabItem tabItem) Sets newCTabItem
for tab- Parameters:
tabItem
- newCTabItem
for tab, cannot benull
-
isInit
public boolean isInit()Checks that tab item was initialized or not- Returns:
true
if tab item was initialized,false
otherwise
-
updateTreeProviders
Updates label and content provider for trees in tab item- Parameters:
querySchemaSource
- newQueryWizardSource
corresponding to the Query Builder, cannot benull
-
addPaintListener
protected void addPaintListener()Adds special paint listener for draw content of the tab when it will be activated firstly. Listener removes itself -
init
protected void init()Initializes content of the tab item -
setTreeProviders
protected abstract void setTreeProviders()Sets content and label providers to the trees in tab items -
createTabContent
protected abstract void createTabContent()Creates content of the tab item, method will be call once when tab item has not been initialized yet. Seeinit()
-