Class RowGroupExpandCollapseLayer

All Implemented Interfaces:
ILayer, ILayerListener, IUniqueIndexLayer, IPersistable

public class RowGroupExpandCollapseLayer extends AbstractRowHideShowLayer
Layer that is used in combination with the performance RowGroupHeaderLayer to support expand/collapse of row groups.
Since:
1.6
  • Constructor Details

    • RowGroupExpandCollapseLayer

      public RowGroupExpandCollapseLayer(IUniqueIndexLayer underlyingLayer)
  • Method Details

    • doCommand

      public boolean doCommand(ILayerCommand command)
      Description copied from interface: ILayer
      Opportunity to respond to a command as it flows down the stack. If the layer is not interested in the command it should allow the command to keep traveling down the stack.

      Note: Before the layer can process a command it must convert the command to its local coordinates using ILayerCommand.convertToTargetLayer(ILayer)

      Specified by:
      doCommand in interface ILayer
      Overrides:
      doCommand in class AbstractRowHideShowLayer
      Parameters:
      command - The command to execute.
      Returns:
      true if the command has been handled and was therefore consumed, false otherwise.
    • isRowIndexHidden

      public boolean isRowIndexHidden(int rowIndex)
      Description copied from class: AbstractRowHideShowLayer
      Will check if the row at the specified index is hidden or not. Checks this layer and also the sublayers for the visibility.
      Specified by:
      isRowIndexHidden in class AbstractRowHideShowLayer
      Parameters:
      rowIndex - The row index of the row whose visibility state should be checked.
      Returns:
      true if the row at the specified index is hidden, false if it is visible.
    • getHiddenRowIndexes

      public Collection<Integer> getHiddenRowIndexes()
      Description copied from class: AbstractRowHideShowLayer
      Will collect and return all indexes of the rows that are hidden in this layer.

      Note: It is not intended that it also collects the row indexes of underlying layers. This would cause issues on calculating positions, as every layer is responsible for those calculations itself.

      Since 2.0 it is recommended to use AbstractRowHideShowLayer.getHiddenRowIndexesArray() to avoid unnecessary autoboxing operations.

      Specified by:
      getHiddenRowIndexes in class AbstractRowHideShowLayer
      Returns:
      Collection of all row indexes that are hidden in this layer.
    • getHiddenRowIndexesArray

      public int[] getHiddenRowIndexesArray()
      Description copied from class: AbstractRowHideShowLayer
      Will collect and return all indexes of the rows that are hidden in this layer.

      Note: It is not intended that it also collects the row indexes of underlying layers. This would cause issues on calculating positions, as every layer is responsible for those calculations itself.

      Specified by:
      getHiddenRowIndexesArray in class AbstractRowHideShowLayer
      Returns:
      All row indexes that are hidden in this layer.
    • hasHiddenRows

      public boolean hasHiddenRows()
      Description copied from class: AbstractRowHideShowLayer
      Check if this layer actively hides rows.
      Specified by:
      hasHiddenRows in class AbstractRowHideShowLayer
      Returns:
      true if rows are hidden by this layer, false if not.