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 voidattachToModel()Attaches this component to the model.protected voidcreateComponents()Creates the child components of this component.protected abstract AbstractGridComponent<T,ME,M,P>createGridComponent()Creates grid component.protected IAefLayoutDatacreateGridComponentLayoutData()Create layout data for grid componentprotected IAefLayoutDatacreateToolBarComponentLayoutData()Create layout data for toolbar componentprotected ToolBarItemViewModelcreateToolBarItem(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 voiddetachFromModel()Detaches this component from the model.protected voiddisposeComponents()Disposes the child components.protected voiddisposeViewModels()Disposes the view models of this component.protected TgetItemByModelElement(ME element)Returns the grid item associated with the given {code element}.protected MEgetModelElementByItem(T item)Returns the model element associated with the given grid {code item}.protected voidrefreshGrid()Refreshes the grid.protected voidrefreshGridItem(T item)Refreshes the grid item.protected voidrefreshToolBarItems()Refreshes toolbar items.protected voidregisterToolBarItemHandler(ToolBarItemViewModel toolBarItem, IToolBarItemHandler handler)Registers the handler for the given toolbar item.protected voidregisterToolBarItemRefresher(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:ComponentAttaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModelin classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
detachFromModel
protected void detachFromModel()
Description copied from class:ComponentDetaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModelin classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
disposeViewModels
protected void disposeViewModels()
Description copied from class:ComponentDisposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModelsin classStandardComponent<M extends IGridModel<ME>,P extends IParameterization>
-
createComponents
protected void createComponents()
Description copied from class:ComponentCreates the child components of this component. Override it to fill a component with a child components.Method can be called multiple times.
- Overrides:
createComponentsin classComponent<M extends IGridModel<ME>,P extends IParameterization>
-
disposeComponents
protected void disposeComponents()
Description copied from class:ComponentDisposes the child components. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeComponentsin 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
-
-