Class AbstractGridCell<RENDERER extends AbstractRenderer<?>>

  • Type Parameters:
    RENDERER - the renderer type (e.g. SWT or JavaFX renderer)
    Direct Known Subclasses:
    SWTGridCell

    public abstract class AbstractGridCell<RENDERER extends AbstractRenderer<?>>
    extends java.lang.Object
    A AbstractGridCell has a row, a column and a renderer it is rendered by a renderer.
    Author:
    Eugen Neufeld, Lucas Köhler
    • Constructor Detail

      • AbstractGridCell

        public AbstractGridCell​(int row,
                                int column,
                                RENDERER renderer)
        Default constructor to create a grid cell.
        Parameters:
        row - the row of the cell
        column - the column of the cell
        renderer - the AbstractRenderer that renderes the cell
    • Method Detail

      • getRow

        public int getRow()
        The id of the row.
        Returns:
        the row
      • getColumn

        public int getColumn()
        The id of the column.
        Returns:
        the column
      • getRenderer

        public RENDERER getRenderer()
        Returns:
        the renderer
      • setRenderer

        public void setRenderer​(RENDERER renderer)
        Parameters:
        renderer - the renderer to set
      • getHorizontalSpan

        public int getHorizontalSpan()
        Return the horizontalSpan of this control. Default is 1.
        Returns:
        the horizontalSpan
      • setHorizontalSpan

        public void setHorizontalSpan​(int horizontalSpan)
        Set the horizontal span of this cell.
        Parameters:
        horizontalSpan - the horizontalSpan to set
      • isVerticalGrab

        public boolean isVerticalGrab()
        Returns whether this cell will take all available vertical space.
        Returns:
        the verticalGrab
      • setVerticalGrab

        public void setVerticalGrab​(boolean verticalGrab)
        True if all available vertical space should be taken.
        Parameters:
        verticalGrab - the verticalGrab to set
      • isVerticalFill

        public boolean isVerticalFill()
        Returns whether the control should fill the available vertical space.
        Returns:
        the verticalFill
      • setVerticalFill

        public void setVerticalFill​(boolean verticalFill)
        True if the available vertical space should be filled.
        Parameters:
        verticalFill - the verticalFill to set
      • isHorizontalGrab

        public boolean isHorizontalGrab()
        Returns whether this cell will take all available horizontal space.
        Returns:
        the horizontalGrab
      • setHorizontalGrab

        public void setHorizontalGrab​(boolean horizontalGrab)
        True if all available horizontal space should be taken.
        Parameters:
        horizontalGrab - the horizontalGrab to set
      • isHorizontalFill

        public boolean isHorizontalFill()
        Returns whether the control should fill the available horizontal space.
        Returns:
        the horizontalFill
      • setHorizontalFill

        public void setHorizontalFill​(boolean horizontalFill)
        True if the available horizontal space should be filled.
        Parameters:
        horizontalFill - the horizontalFill to set
      • setHorizontalAlignment

        public void setHorizontalAlignment​(AbstractGridCell.Alignment horizontalAlignment)
        Set the horizontal alignment. This alignment is only considered if horizontal fill is set to false.
        Parameters:
        horizontalAlignment - the horizontalAlignment to set
        Since:
        1.9
      • setVerticalAlignment

        public void setVerticalAlignment​(AbstractGridCell.Alignment verticalAlignment)
        Set the vertical alignment. This alignment is only considered if vertical fill is set to false.
        Parameters:
        verticalAlignment - the verticalAlignment to set
        Since:
        1.9
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)