Interface IRowGroupModel<T>

    • Method Detail

      • addRowGroup

        boolean addRowGroup​(IRowGroup<T> rowGroup)

        Adds a group into the model.

        A notification should be sent to any IRowGroupModelListeners to indicate a change in the model has occurred.

        Parameters:
        rowGroup - The IRowGroup to be added.
        Returns:
        false if the group wasn't added.
      • addRowGroups

        void addRowGroups​(List<IRowGroup<T>> rowGroups)

        Adds multiple row groups into the model and only fires off a single change notification.

        Parameters:
        rowGroups - A list of IRowGroups to add.
      • removeRowGroup

        boolean removeRowGroup​(IRowGroup<T> rowGroup)

        Removes the group from the model.

        A notification should be sent to any IRowGroupModelListeners to indicate a change in the model has occurred.

        Parameters:
        rowGroup - The IRowGroup to remove.
        Returns:
        true if the group was present and removed, false if the group was not present.
      • getRowGroupForName

        IRowGroup<T> getRowGroupForName​(String groupName)
        Returns an the IRowGroup with the specified group name.
        Parameters:
        groupName - The unique name assigned to an IRowGroup.
        Returns:
        An IRowGroup or null if there is no group with the specified name.
      • getRowGroupForRow

        IRowGroup<T> getRowGroupForRow​(T row)
        Returns the first IRowGroup found containing the specified row.
        Parameters:
        row - The row object.
        Returns:
        An IRowGroup or null if there is no group with the specified row.
      • isEmpty

        boolean isEmpty()
        Returns:
        true if there are no IRowGroups in the model. Note: if there are groups but there are no rows, then true is still returned.
      • clear

        void clear()

        Wipes all groups from the model.

        A notification should be sent to any IRowGroupModelListeners to indicate a change in the model has occurred.

      • notifyListeners

        void notifyListeners()

        Notify any IRowGroupModelListeners that something in the model has changed.

      • registerRowGroupModelListener

        void registerRowGroupModelListener​(IRowGroupModelListener listener)
        Registers a listener to the model to receive notification of any changes.
        Parameters:
        listener - an IRowGroupModelListener.
      • getRowFromIndexCache

        T getRowFromIndexCache​(int rowIndex)
        Retrieves a row T by it's index from our cache. It will be added to the cache if not present.
      • getIndexFromRowCache

        int getIndexFromRowCache​(T row)
        Retrieves a row's index by from our cache. It will be added to the cache if not present.
      • setDataProvider

        void setDataProvider​(IRowDataProvider<T> dataProvider)
        Required for the index-to-row cache to populate itseld.
      • invalidateIndexCache

        void invalidateIndexCache()