Interface IColumnHideShowLayer

    • Method Detail

      • hideColumnPositions

        void hideColumnPositions​(int... columnPositions)
        Hide the columns at the specified positions. Note that the positions are required as this method might get called via user interaction in a transformed table (e.g. reordered).
        Parameters:
        columnPositions - The column positions to hide.
        Since:
        2.0
      • hideColumnPositions

        void hideColumnPositions​(Collection<Integer> columnPositions)
        Hide the columns at the specified positions. Note that the positions are required as this method might get called via user interaction in a transformed table (e.g. reordered).
        Parameters:
        columnPositions - The column positions to hide.
      • hideColumnIndexes

        void hideColumnIndexes​(int... columnIndexes)
        Hide the columns with the given indexes.
        Parameters:
        columnIndexes - The indexes of the columns to hide.
        Since:
        2.0
      • hideColumnIndexes

        void hideColumnIndexes​(Collection<Integer> columnIndexes)
        Hide the columns with the given indexes.
        Parameters:
        columnIndexes - The indexes of the columns to hide.
        Since:
        2.0
      • showColumnIndexes

        void showColumnIndexes​(int... columnIndexes)
        Show the columns with the given indexes again if they are hidden by this layer. Note that the indexes are needed and not the positions. This is because a user is not able to select the hidden column in the NatTable and therefore the position is not available anymore.
        Parameters:
        columnIndexes - The column indexes to show again.
        Since:
        2.0
      • showColumnIndexes

        void showColumnIndexes​(Collection<Integer> columnIndexes)
        Show the columns with the given indexes again if they are hidden by this layer. Note that the indexes are needed and not the positions. This is because a user is not able to select the hidden column in the NatTable and therefore the position is not available anymore.
        Parameters:
        columnIndexes - The column indexes to show again.
      • showColumnPosition

        void showColumnPosition​(int columnPosition,
                                boolean showToLeft,
                                boolean showAll)
        Show the column(s) that are hidden next to the given column position.
        Parameters:
        columnPosition - The column position whose neighbors should be shown again.
        showToLeft - Whether the column positions to the left or the right of the given column position should be shown again.
        showAll - Whether all hidden adjacent columns should be shown again or only the single direct adjacent column.
      • showAllColumns

        void showAllColumns()
        Show all hidden columns again.
      • getHiddenColumnIndexes

        Collection<Integer> getHiddenColumnIndexes()
        Returns all indexes of the columns that are hidden in this layer.

        Note: It does not include the column indexes of hidden columns from underlying layers. This would cause issues on calculating positions as every layer is responsible for those calculations itself.

        Returns:
        The indexes of the columns that are hidden in this layer.
      • getHiddenColumnIndexesArray

        int[] getHiddenColumnIndexesArray()
        Will collect and return all indexes of the columns that are hidden in this layer.

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

        Returns:
        All column indexes that are hidden in this layer.
        Since:
        2.0