Class GridCellImpl

  • All Implemented Interfaces:
    GridCell

    public class GridCellImpl
    extends java.lang.Object
    implements GridCell
    Instances of this class represent a single cell in a GridPrint.
    • Constructor Summary

      Constructors 
      Constructor Description
      GridCellImpl​(int hAlignment, int vAlignment, Print target, int colspan)
      This constructor is only here for compatibility reasons and is not intented to be used by clients.
    • Field Detail

      • hAlignment

        private final int hAlignment
      • vAlignment

        private final int vAlignment
      • target

        private final Print target
      • colspan

        private final int colspan
    • Constructor Detail

      • GridCellImpl

        public GridCellImpl​(int hAlignment,
                            int vAlignment,
                            Print target,
                            int colspan)
        This constructor is only here for compatibility reasons and is not intented to be used by clients.
        Parameters:
        hAlignment - the horizontal alignment.
        vAlignment - the vertical alignment.
        target - the target of the cell.
        colspan - the number of columns this cell spans across.
    • Method Detail

      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getAlignment

        public org.eclipse.swt.graphics.Point getAlignment()
        Description copied from interface: GridCell
        Returns a Point representing the horizontal and vertical alignment applied to the cell's content.
        Specified by:
        getAlignment in interface GridCell
        Returns:
        a Point representing the horizontal and vertical alignment applied to the cell's content.
      • getHorizontalAlignment

        public int getHorizontalAlignment()
        Description copied from interface: GridCell
        Returns the horizontal alignment applied to the cell content.
        Specified by:
        getHorizontalAlignment in interface GridCell
        Returns:
        the horizontal alignment applied to the cell content.
      • getVerticalAlignment

        public int getVerticalAlignment()
        Description copied from interface: GridCell
        Returns the vertical alignment applied to the cell content.
        Specified by:
        getVerticalAlignment in interface GridCell
        Returns:
        the vertical alignment applied to the cell content.
      • getContent

        public Print getContent()
        Description copied from interface: GridCell
        Returns the content print of the cell.
        Specified by:
        getContent in interface GridCell
        Returns:
        the content print of the cell.
      • getColSpan

        public int getColSpan()
        Description copied from interface: GridCell
        Returns the number of columns this cell spans across.
        Specified by:
        getColSpan in interface GridCell
        Returns:
        the number of columns this cell spans across.
      • checkHorizontalAlignment

        private static int checkHorizontalAlignment​(int hAlignment)
      • checkVerticalAlignment

        private static int checkVerticalAlignment​(int vAlignment)
      • checkColspan

        private int checkColspan​(int colspan)
      • iterator

        public GridCellIterator iterator​(org.eclipse.swt.graphics.Device device,
                                         org.eclipse.swt.graphics.GC gc)