public abstract class BasicGridLookPainter extends java.lang.Object implements GridLookPainter
Subclasses must have the following methods implemented:
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.graphics.Device |
device
The printer device on which the look is being painted.
|
Constructor and Description |
---|
BasicGridLookPainter(org.eclipse.swt.graphics.Device device)
Constructs a BasicGridLook painter.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(org.eclipse.swt.graphics.GC gc,
int x,
int y,
int[] columns,
int[] headerRows,
int[][] headerColSpans,
int firstRowIndex,
boolean topOpen,
int[] bodyRows,
int[][] bodyColSpans,
boolean bottomOpen,
int[] footerRows,
int[][] footerColSpans)
Paints the grid look onto the GC.
|
protected abstract void |
paintBodyCell(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds,
int row,
int col,
int colspan,
boolean topOpen,
boolean bottomOpen)
Paint the decorations for the described body cell.
|
protected abstract void |
paintFooterCell(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds,
int row,
int col,
int colspan)
Paint the decorations for the described footer cell.
|
protected abstract void |
paintHeaderCell(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle bounds,
int row,
int col,
int colspan)
Paint the decorations for the described header cell.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getMargins
protected final org.eclipse.swt.graphics.Device device
public BasicGridLookPainter(org.eclipse.swt.graphics.Device device)
device
- the printer device (may not be null). This argument will be
saved in the protected device
field.public void paint(org.eclipse.swt.graphics.GC gc, int x, int y, int[] columns, int[] headerRows, int[][] headerColSpans, int firstRowIndex, boolean topOpen, int[] bodyRows, int[][] bodyColSpans, boolean bottomOpen, int[] footerRows, int[][] footerColSpans)
GridLookPainter
paint
in interface GridLookPainter
gc
- the graphics context to paint on.x
- the x coordinate of the top-left of the grid.y
- the y coordinate of the top-left of the grid.columns
- the column widths. The left and right margins of each cell are
included in the column widths.headerRows
- the header row heights.headerColSpans
- a two-dimensional array of cell spans in the header. Each
element in the outer array is a header row. Each element of an
inner array is a cell, where the element value indicates how
many columns the cell spans.firstRowIndex
- the zero-based index of the first row displayed on the page.topOpen
- whether the top body row should be drawn with the top edge of
the cell border "open." An open top border is a visual
indication that the top row is being continued from the
previous page.bodyRows
- the body row heights.bodyColSpans
- a two-dimensional array of cell spans in the body. Each
element in the outer array is a body row. Each element of an
inner array is a cell, where the element value indicates how
many columns the cell spans.bottomOpen
- whether the bottom body row should be drawn with the bottom
edge of the cell border "open." An open bottom border is a
visual indication that the bottom row will be continued on the
next page.footerRows
- the footer row heights.footerColSpans
- a two-dimensional array of cell spans in the footer. Each
element in the outer array is a footer row. Each element of an
inner array is a cell, where the element value indicates how
many columns the cell spans.protected abstract void paintHeaderCell(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, int row, int col, int colspan)
gc
- the graphics context to use for painting.bounds
- the bounds of the cell, excluding margins.row
- the row offset of the cell within the header.col
- the column offset of the cell within the header.colspan
- the number of columns that this cell spans.protected abstract void paintBodyCell(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, int row, int col, int colspan, boolean topOpen, boolean bottomOpen)
gc
- the graphics context to use for painting.bounds
- the bounds of the cell, excluding margins.row
- the row offset of the cell within the header.col
- the column offset of the cell within the header.colspan
- the number of columns that this cell spans.topOpen
- whether the cell should be drawn with the top edge of the cell
border "open." An open top border is a visual cue that the
cell is being continued from the previous page.bottomOpen
- whether the cell should be drawn with the bottom edge of the
cell border "open." An open bottom border is a visual cue that
the cell will be continued on the next page.protected abstract void paintFooterCell(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle bounds, int row, int col, int colspan)
gc
- the graphics context to use for painting.bounds
- the bounds of the cell, excluding margins.row
- the row offset of the cell within the header.col
- the column offset of the cell within the header.colspan
- the number of columns that this cell spans.