Class AbstractGridWithToolbarComponent<T extends IGridItem,ME,M extends IGridModel<ME>,P extends IParameterization>
- java.lang.Object
-
- com._1c.g5.aef2.components.Component<M,P>
-
- com._1c.g5.aef2.standard.components.StandardComponent<M,P>
-
- com._1c.g5.aef2.standard.components.ContainerComponent<M,P>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractGridWithToolbarComponent<T,ME,M,P>
-
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
- Direct Known Subclasses:
ChartReferenceBandsDialogComponent.ChartReferenceBandsGridWithToolbarComponent
,ChartReferenceLinesDialogComponent.ReferenceLinesGridWithToolbarComponent
,CommonPictureEntriesComponent
public abstract class AbstractGridWithToolbarComponent<T extends IGridItem,ME,M extends IGridModel<ME>,P extends IParameterization> extends ContainerComponent<M,P>
The container component that combines toolbar and grid components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Constructor Summary
Constructors Constructor Description AbstractGridWithToolbarComponent(P parameterization)
Creates a new component.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
attachToModel()
Attaches this component to the model.protected void
createComponents()
Creates the child components of this component.protected abstract AbstractGridComponent<T,ME,M,P>
createGridComponent()
Creates grid component.protected IAefLayoutData
createGridComponentLayoutData()
Create layout data for grid componentprotected IAefLayoutData
createToolBarComponentLayoutData()
Create layout data for toolbar componentprotected ToolBarItemViewModel
createToolBarItem(String tooltip, org.eclipse.swt.graphics.Image image)
Creates toolbar item with the given {code tooltip} andimage
.protected abstract Collection<ToolBarItemViewModel>
createToolBarItems()
Creates toolbar items.protected void
detachFromModel()
Detaches this component from the model.protected void
disposeComponents()
Disposes the child components.protected void
disposeViewModels()
Disposes the view models of this component.protected T
getItemByModelElement(ME element)
Returns the grid item associated with the given {code element}.protected ME
getModelElementByItem(T item)
Returns the model element associated with the given grid {code item}.protected void
refreshGrid()
Refreshes the grid.protected void
refreshGridItem(T item)
Refreshes the grid item.protected void
refreshToolBarItems()
Refreshes toolbar items.protected void
registerToolBarItemHandler(ToolBarItemViewModel toolBarItem, IToolBarItemHandler handler)
Registers the handler for the given toolbar item.protected void
registerToolBarItemRefresher(ToolBarItemViewModel toolBarItem, IToolBarItemRefresher refresher)
Registers the refresher for the given toolbar item.-
Methods inherited from class com._1c.g5.aef2.standard.components.ContainerComponent
addComponent, button, button, checkBox, checkBox, combo, createContainerViewModel, createViewModels, disposeChildren, field, field, getContainerViewModel, isEditable, label, label, refreshChildren, separator, spinner, text, updateViewModels
-
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, handleExternalValidationEvent, isEnabled, isPassive, setEnabled, setFocus, setLayoutData, updateViewModelStatus
-
Methods inherited from class com._1c.g5.aef2.components.Component
addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, beginExternalUpdate, checkComponents, checkViewModels, commit, dispose, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
-
-
-
Constructor Detail
-
AbstractGridWithToolbarComponent
public AbstractGridWithToolbarComponent(P parameterization)
Creates a new component.- Parameters:
parameterization
- the parameterization, cannot benull
.
-
-
Method Detail
-
attachToModel
protected void attachToModel()
Description copied from class:Component
Attaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModel
in classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
detachFromModel
protected void detachFromModel()
Description copied from class:Component
Detaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModel
in classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
disposeViewModels
protected void disposeViewModels()
Description copied from class:Component
Disposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModels
in classStandardComponent<M extends IGridModel<ME>,P extends IParameterization>
-
createComponents
protected void createComponents()
Description copied from class:Component
Creates the child components of this component. Override it to fill a component with a child components.Method can be called multiple times.
- Overrides:
createComponents
in classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
disposeComponents
protected void disposeComponents()
Description copied from class:Component
Disposes the child components. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeComponents
in classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
getItemByModelElement
protected T getItemByModelElement(ME element)
Returns the grid item associated with the given {code element}.- Parameters:
element
- the model element.
-
getModelElementByItem
protected ME getModelElementByItem(T item)
Returns the model element associated with the given grid {code item}.- Parameters:
item
- the grid item.
-
refreshToolBarItems
protected void refreshToolBarItems()
Refreshes toolbar items.
-
refreshGrid
protected void refreshGrid()
Refreshes the grid.
-
refreshGridItem
protected void refreshGridItem(T item)
Refreshes the grid item.- Parameters:
item
- the grid item.
-
createToolBarItem
protected ToolBarItemViewModel createToolBarItem(String tooltip, org.eclipse.swt.graphics.Image image)
Creates toolbar item with the given {code tooltip} andimage
.- Parameters:
tooltip
- the tooltip text, cannot benull
.image
- the image, cannot benull
.- Returns:
- a created toolbar item.
-
registerToolBarItemHandler
protected void registerToolBarItemHandler(ToolBarItemViewModel toolBarItem, IToolBarItemHandler handler)
Registers the handler for the given toolbar item.- Parameters:
toolBarItem
- the toolbar item, cannot be {code null}.handler
- the toolbar item handler, cannot be {code null}.
-
registerToolBarItemRefresher
protected void registerToolBarItemRefresher(ToolBarItemViewModel toolBarItem, IToolBarItemRefresher refresher)
Registers the refresher for the given toolbar item.- Parameters:
toolBarItem
- the toolbar item, cannot be {code null}.refresher
- the toolbar item refresher, cannot be {code null}.
-
createGridComponent
protected abstract AbstractGridComponent<T,ME,M,P> createGridComponent()
Creates grid component.- Returns:
- created grid component.
-
createGridComponentLayoutData
protected IAefLayoutData createGridComponentLayoutData()
Create layout data for grid component- Returns:
- instance of
IAefLayoutData
, navernull
-
createToolBarItems
protected abstract Collection<ToolBarItemViewModel> createToolBarItems()
Creates toolbar items.- Returns:
- created toolbar items, never
null
.
-
createToolBarComponentLayoutData
protected IAefLayoutData createToolBarComponentLayoutData()
Create layout data for toolbar component- Returns:
- instance of
IAefLayoutData
, navernull
-
-