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>
- Record Components:
T
- the type of grid items.ME
- the type of domain model elements.M
- the model type.P
- the parameterization type
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
- Direct Known Subclasses:
ChartReferenceBandsDialogComponent.ChartReferenceBandsGridWithToolbarComponent
,ChartReferenceLinesDialogComponent.ReferenceLinesGridWithToolbarComponent
,ChoiceListDialogContentComponent
,CommonPictureEntriesComponent
,GanttChartBackgroundIntervalsComponent
,MobileCommandBarElementsDialogContentComponent
,PlannerDimensionsComponent
,TimeScaleLabelsComponent
,TimeScaleLevelsComponent
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
ConstructorsConstructorDescriptionAbstractGridWithToolbarComponent
(P parameterization) Creates a new component. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Attaches this component to the model.protected void
Creates the child components of this component.protected abstract AbstractGridComponent<T,
ME, M, P> Creates grid component.protected IAefLayoutData
Create layout data for grid componentprotected IAefLayoutData
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>
Creates toolbar items.protected void
Detaches this component from the model.protected void
Disposes the child components.protected void
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
Refreshes the grid.protected void
refreshGridItem
(T item) Refreshes the grid item.protected void
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 Details
-
AbstractGridWithToolbarComponent
Creates a new component.- Parameters:
parameterization
- the parameterization, cannot benull
.
-
-
Method Details
-
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
Returns the grid item associated with the given {code element}.- Parameters:
element
- the model element.
-
getModelElementByItem
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
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
Creates grid component.- Returns:
- created grid component.
-
createGridComponentLayoutData
Create layout data for grid component- Returns:
- instance of
IAefLayoutData
, navernull
-
createToolBarItems
Creates toolbar items.- Returns:
- created toolbar items, never
null
.
-
createToolBarComponentLayoutData
Create layout data for toolbar component- Returns:
- instance of
IAefLayoutData
, navernull
-