Class SortHeaderLayer<T>

Type Parameters:
T - Type of the Beans in the backing data source.
All Implemented Interfaces:
ILayer, ILayerListener, IPersistable

public class SortHeaderLayer<T> extends AbstractLayerTransform implements IPersistable
Enables sorting of the data. Uses an ISortModel to do/track the sorting.
See Also:
  • Constructor Details

    • SortHeaderLayer

      public SortHeaderLayer(ILayer underlyingLayer, ISortModel sortModel)
    • SortHeaderLayer

      public SortHeaderLayer(ILayer underlyingLayer, ISortModel sortModel, boolean useDefaultConfiguration)
  • Method Details

    • getConfigLabelsByPosition

      public LabelStack getConfigLabelsByPosition(int columnPosition, int rowPosition)
      Description copied from interface: ILayer
      Returns the config labels for the cell at the given coordinates. Needed to retrieve the corresponding configurations out of the IConfigRegistry.
      Specified by:
      getConfigLabelsByPosition in interface ILayer
      Overrides:
      getConfigLabelsByPosition in class AbstractLayerTransform
      Parameters:
      columnPosition - The column position of the cell.
      rowPosition - The row position of the cell.
      Returns:
      adds a special configuration label to the stack taking into account the following:
      1. Is the column sorted ?
      2. What is the sort order of the column
      A special painter is registered against the above labels to render the sort arrows
    • getSortModel

      public ISortModel getSortModel()
      Returns:
      The ISortModel that is used to handle the sorting of the underlying data.
    • getProvidedLabels

      public Collection<String> getProvidedLabels()
      Specified by:
      getProvidedLabels in interface ILayer
      Overrides:
      getProvidedLabels in class AbstractLayer
      Returns:
      The collection of labels that are provided by this layer.
      Since:
      1.4