Class AbstractGridWithToolbarComponent<T extends IGridItem,ME,M extends IGridModel<ME>,P extends IParameterization>

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.
  • Constructor Details

    • AbstractGridWithToolbarComponent

      public AbstractGridWithToolbarComponent(P parameterization)
      Creates a new component.
      Parameters:
      parameterization - the parameterization, cannot be null.
  • 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 class Component<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 class Component<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 class StandardComponent<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 class Component<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 class Component<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} and image.
      Parameters:
      tooltip - the tooltip text, cannot be null.
      image - the image, cannot be null.
      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, naver null
    • 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, naver null