Class ColumnGroupHeaderLayer

    • Method Detail

      • saveState

        public void saveState​(String prefix,
                              Properties properties)
        Description copied from interface: IPersistable
        Saves the state to the given Properties using the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.
        Specified by:
        saveState in interface IPersistable
        Overrides:
        saveState in class AbstractLayerTransform
        Parameters:
        prefix - The prefix to use for the state keys. Is also used as the state configuration name.
        properties - The Properties instance to save the state to.
      • loadState

        public void loadState​(String prefix,
                              Properties properties)
        Description copied from class: AbstractLayerTransform
        Underlying layers must load state first. If this is not done, IStructuralChangeEvent from underlying layers will reset caches after state has been loaded
        Specified by:
        loadState in interface IPersistable
        Overrides:
        loadState in class AbstractLayerTransform
        Parameters:
        prefix - The prefix to use for the state keys. Is also used as the state configuration name.
        properties - The Properties instance to load the state from.
      • getRowIndexByPosition

        public int getRowIndexByPosition​(int rowPosition)
        Description copied from interface: ILayer
        Gets the underlying non-transformed row index for the given row position on this layer.
        Specified by:
        getRowIndexByPosition in interface ILayer
        Overrides:
        getRowIndexByPosition in class AbstractLayerTransform
        Parameters:
        rowPosition - The row position relative to this layer.
        Returns:
        An underlying non-transformed row index, or -1 if the given row position does not exist within this coordinate system.
      • localToUnderlyingRowPosition

        public int localToUnderlyingRowPosition​(int localRowPosition)
        Description copied from interface: ILayer
        Convert a row position to the coordinates of the underlying layer. This is possible since each layer is aware of its underlying layer.
        Specified by:
        localToUnderlyingRowPosition in interface ILayer
        Overrides:
        localToUnderlyingRowPosition in class AbstractLayerTransform
        Parameters:
        localRowPosition - row position in local (the layer's own) coordinates
        Returns:
        row position in the underlying layer's coordinates
      • getHeight

        public int getHeight()
        Description copied from interface: ILayer
        Returns the total height in pixels of this layer.
        Specified by:
        getHeight in interface ILayer
        Overrides:
        getHeight in class AbstractLayerTransform
        Returns:
        The total height in pixels of this layer.
      • getRowHeightByPosition

        public int getRowHeightByPosition​(int rowPosition)
        Description copied from interface: ILayer
        Returns the height in pixels of the given row. The height of invisible and non-existing rows is 0.
        Specified by:
        getRowHeightByPosition in interface ILayer
        Overrides:
        getRowHeightByPosition in class AbstractLayerTransform
        Parameters:
        rowPosition - The row position in this layer.
        Returns:
        The height of the row.
      • setRowHeight

        public void setRowHeight​(int rowHeight)
      • isRowPositionResizable

        public boolean isRowPositionResizable​(int rowPosition)
        Description copied from interface: ILayer
        Check if the row at the given position is resizable.
        Specified by:
        isRowPositionResizable in interface ILayer
        Overrides:
        isRowPositionResizable in class AbstractLayerTransform
        Parameters:
        rowPosition - The row position to check.
        Returns:
        true if the row is resizable, false if not.
      • getRowPositionByY

        public int getRowPositionByY​(int y)
        Description copied from interface: ILayer
        Returns the row position that contains the given y coordinate.
        Specified by:
        getRowPositionByY in interface ILayer
        Overrides:
        getRowPositionByY in class AbstractLayerTransform
        Parameters:
        y - a vertical pixel location relative to the pixel boundary of this layer
        Returns:
        a row position relative to the associated coordinate system, or -1 if there is no row that contains y
      • getStartYOfRowPosition

        public int getStartYOfRowPosition​(int rowPosition)
        Description copied from interface: ILayer
        Returns the y offset in pixels of the given row.
        Specified by:
        getStartYOfRowPosition in interface ILayer
        Overrides:
        getStartYOfRowPosition in class AbstractLayerTransform
        Parameters:
        rowPosition - the row position in this layer
        Returns:
        the y offset of the row, or -1
      • getCellByPosition

        public ILayerCell getCellByPosition​(int columnPosition,
                                            int rowPosition)
        If a cell belongs to a column group: column position - set to the start position of the group span - set to the width/size of the column group NOTE: gc.setClip() is used in the CompositeLayerPainter to ensure that partially visible Column group header cells are rendered properly.
        Specified by:
        getCellByPosition in interface ILayer
        Overrides:
        getCellByPosition in class AbstractLayerTransform
        Parameters:
        columnPosition - The column position of the requested cell.
        rowPosition - The row position of the requested cell.
        Returns:
        The ILayerCell for the given coordinates in this layer or null if the coordinates are invalid on this layer.
      • getColumnSpan

        public int getColumnSpan​(int columnPosition)
        Calculates the span of a cell in a Column Group. Takes into account collapsing and hidden columns in the group.
        Parameters:
        columnPosition - position of any column belonging to the group
        Returns:
        the column span
        Since:
        1.6
      • getStartPositionOfGroup

        public int getStartPositionOfGroup​(int columnPosition)
        Figures out the start position of the group.
        Parameters:
        columnPosition - of any column belonging to the group
        Returns:
        first position of the column group
        Since:
        1.6
      • 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:
        The LabelStack with the config labels for the cell at the given coordinates.
      • getDataValueByPosition

        public Object getDataValueByPosition​(int columnPosition,
                                             int rowPosition)
        Description copied from interface: ILayer
        Returns the data value for the cell at the given coordinates.
        Specified by:
        getDataValueByPosition in interface ILayer
        Overrides:
        getDataValueByPosition in class AbstractLayerTransform
        Parameters:
        columnPosition - The column position of the cell.
        rowPosition - The row position of the cell.
        Returns:
        The data value for the cell at the given coordinates.
      • getRegionLabelsByXY

        public LabelStack getRegionLabelsByXY​(int x,
                                              int y)
        Description copied from interface: ILayer
        Return the LabelStack containing the region labels for the cell at the given pixel position.
        Specified by:
        getRegionLabelsByXY in interface ILayer
        Overrides:
        getRegionLabelsByXY in class AbstractLayerTransform
        Parameters:
        x - the x pixel coordinate
        y - the y pixel coordinate
        Returns:
        LabelStack containing the region labels for the cell at the given pixel position.
      • addColumnsIndexesToGroup

        public void addColumnsIndexesToGroup​(String colGroupName,
                                             int... colIndexes)
      • clearAllGroups

        public void clearAllGroups()
      • setStaticColumnIndexesByGroup

        public void setStaticColumnIndexesByGroup​(String colGroupName,
                                                  int... staticColumnIndexes)
      • isColumnInGroup

        public boolean isColumnInGroup​(int bodyColumnIndex)
      • setGroupUnbreakable

        public void setGroupUnbreakable​(int columnIndex)
      • setGroupAsCollapsed

        public void setGroupAsCollapsed​(int columnIndex)
      • isCalculateHeight

        public boolean isCalculateHeight()
      • setCalculateHeight

        public void setCalculateHeight​(boolean calculateHeight)