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

    • Constructor Detail

      • AbstractGridWithToolbarComponent

        public AbstractGridWithToolbarComponent​(P parameterization)
        Creates a new component.
        Parameters:
        parameterization - the parameterization, cannot be null.
    • Method Detail

      • 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>
      • 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