Class FreezeSelectionStrategy

    • Constructor Detail

      • FreezeSelectionStrategy

        public FreezeSelectionStrategy​(FreezeLayer freezeLayer,
                                       ViewportLayer viewportLayer,
                                       SelectionLayer selectionLayer,
                                       boolean include)
        Parameters:
        freezeLayer - The FreezeLayer on which the freeze state should be applied. Needed for coordinate definition.
        viewportLayer - The ViewportLayer needed to handle the scrolled state.
        selectionLayer - The SelectionLayer to identify the last selected cell position.
        include - Whether the last selected cell should be included in the freeze region or not. Include means the freeze borders will be to the right and bottom, while exclude means the freeze borders are to the left and top. Default is false.
        Since:
        1.6
    • Method Detail

      • getUnderlyingColumnPosition

        protected int getUnderlyingColumnPosition​(int columnPosition)
        Returns the column position to be used for the FreezeLayer position. Typically no conversion is needed when the FreezeLayer is build on top of the SelectionLayer. But if there is a layer in between that adds a transformation (e.g. adding a column like the HierarchicalTreeLayer) the SelectionLayer based position needs to be converted.
        Parameters:
        columnPosition - The SelectionLayer based column position.
        Returns:
        The column position based on the scrollable layer below the ViewportLayer.
        Since:
        1.6
      • getUnderlyingRowPosition

        protected int getUnderlyingRowPosition​(int rowPosition)
        Returns the row position to be used for the FreezeLayer position. Typically no conversion is needed when the FreezeLayer is build on top of the SelectionLayer. But if there is a layer in between that adds a transformation the SelectionLayer based position needs to be converted.
        Parameters:
        rowPosition - The SelectionLayer based row position.
        Returns:
        The row position based on the scrollable layer below the ViewportLayer.
        Since:
        1.6