Class GridLookPainterPiece

  • All Implemented Interfaces:
    PrintPiece

    class GridLookPainterPiece
    extends java.lang.Object
    implements PrintPiece
    • Constructor Summary

      Constructors 
      Constructor Description
      GridLookPainterPiece​(GridLookPainter look, int[] colSizes, int[] headerRows, int[][] headerColSpans, int firstRowIndex, boolean topOpen, int[] bodyRows, int[][] bodyColSpans, boolean bottomOpen, int[] footerRows, int[][] footerColSpans)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static int calculateBodyHeight​(GridMargins margins, boolean topOpen, int[] bodyRows, boolean bottomOpen, boolean headerPresent, boolean footerPresent)  
      private static int calculateFooterHeight​(GridMargins margins, int[] footerRows)  
      private static int calculateHeaderHeight​(GridMargins margins, int[] headerRows)  
      private static org.eclipse.swt.graphics.Point calculateSize​(GridMargins margins, int[] columns, int[] headerRows, boolean topOpen, int[] bodyRows, boolean bottomOpen, int[] footerRows)  
      private static int calculateWidth​(GridMargins margins, int[] columns)  
      void dispose()
      Disposes the system resources allocated by this PrintPiece.
      org.eclipse.swt.graphics.Point getSize()
      Returns the dimensions of this PrintPiece, in pixels.
      void paint​(org.eclipse.swt.graphics.GC gc, int x, int y)
      Draws this PrintPiece on the given graphics device, at the given coordinates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • columns

        final int[] columns
      • headerRows

        final int[] headerRows
      • headerColSpans

        final int[][] headerColSpans
      • firstRowIndex

        final int firstRowIndex
      • topOpen

        final boolean topOpen
      • bodyRows

        final int[] bodyRows
      • bodyColSpans

        final int[][] bodyColSpans
      • bottomOpen

        final boolean bottomOpen
      • footerRows

        final int[] footerRows
      • footerColSpans

        final int[][] footerColSpans
      • size

        final org.eclipse.swt.graphics.Point size
    • Constructor Detail

      • GridLookPainterPiece

        GridLookPainterPiece​(GridLookPainter look,
                             int[] colSizes,
                             int[] headerRows,
                             int[][] headerColSpans,
                             int firstRowIndex,
                             boolean topOpen,
                             int[] bodyRows,
                             int[][] bodyColSpans,
                             boolean bottomOpen,
                             int[] footerRows,
                             int[][] footerColSpans)
    • Method Detail

      • calculateSize

        private static org.eclipse.swt.graphics.Point calculateSize​(GridMargins margins,
                                                                    int[] columns,
                                                                    int[] headerRows,
                                                                    boolean topOpen,
                                                                    int[] bodyRows,
                                                                    boolean bottomOpen,
                                                                    int[] footerRows)
      • calculateWidth

        private static int calculateWidth​(GridMargins margins,
                                          int[] columns)
      • calculateBodyHeight

        private static int calculateBodyHeight​(GridMargins margins,
                                               boolean topOpen,
                                               int[] bodyRows,
                                               boolean bottomOpen,
                                               boolean headerPresent,
                                               boolean footerPresent)
      • calculateHeaderHeight

        private static int calculateHeaderHeight​(GridMargins margins,
                                                 int[] headerRows)
      • calculateFooterHeight

        private static int calculateFooterHeight​(GridMargins margins,
                                                 int[] footerRows)
      • dispose

        public void dispose()
        Description copied from interface: PrintPiece
        Disposes the system resources allocated by this PrintPiece. The dispose method is not a permanent disposal of a PrintPiece. It is intended to reclaim system resources, however future calls to paint(GC,int,int) may require that the resources be allocated again.
        Specified by:
        dispose in interface PrintPiece
      • getSize

        public org.eclipse.swt.graphics.Point getSize()
        Description copied from interface: PrintPiece
        Returns the dimensions of this PrintPiece, in pixels.
        Specified by:
        getSize in interface PrintPiece
        Returns:
        the dimensions of this PrintPiece, in pixels.
      • paint

        public void paint​(org.eclipse.swt.graphics.GC gc,
                          int x,
                          int y)
        Description copied from interface: PrintPiece
        Draws this PrintPiece on the given graphics device, at the given coordinates.
        Specified by:
        paint in interface PrintPiece
        Parameters:
        gc - a graphics context for the graphics device.
        x - the x coordinate where this PrintPiece will be drawn.
        y - the x coordinate where this PrintPiece will be drawn.