|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.print.layout.PrintElement
org.compiere.print.layout.TableElement
public class TableElement
Table Print Element. Maintains a logical cross page table, which is "broken up" when printing
The table is 3 pages wide, 2 pages high
+-----+-----+-----+
| 1.1 | 1.2 | 1.3 |
+-----+-----+-----+
| 2.1 | 2.2 | 2.3 |
+-----+-----+-----+
Printed
+-----+-----+-----+
| 1 | 2 | 3 |
+-----+-----+-----+
| 4 | 5 | 6 |
+-----+-----+-----+
| Field Summary | |
|---|---|
static int |
ALL
Header Row Indicator |
static int |
HEADER_ROW
Header Row Indicator |
| Fields inherited from class org.compiere.print.layout.PrintElement |
|---|
LINK_COLOR, log, p_FieldAlignmentType, p_height, p_maxHeight, p_maxWidth, p_pageLocation, p_sizeCalculated, p_width |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TableElement(ValueNamePair[] columnHeader,
int[] columnMaxWidth,
int[] columnMaxHeight,
String[] columnJustification,
boolean[] fixedWidth,
ArrayList<Integer> functionRows,
boolean multiLineHeader,
Object[][] data,
KeyNamePair[] pk,
String pkColumnName,
int pageNoStart,
Rectangle firstPage,
Rectangle nextPages,
int repeatedColumns,
HashMap<Integer,Integer> additionalLines,
HashMap<Point,Font> rowColFont,
HashMap<Point,Color> rowColColor,
HashMap<Point,Color> rowColBackground,
MPrintTableFormat tFormat,
ArrayList<Integer> pageBreak)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
calculateSize()
Layout and Calculate Size. |
Rectangle |
getBounds(int pageNo)
Get relative Bounds of Element. |
MQuery |
getDrillAcross(Point relativePoint,
int pageNo)
Get Drill Across value |
MQuery |
getDrillDown(Point relativePoint,
int pageNo)
Get Drill Down value |
float |
getHeight(int pageNo)
Get Calculated Height on page |
int |
getPageCount()
Get number of "real" pages. |
protected int |
getPageIndex(int pageNo)
Get zero based Page Index within Layout |
protected int |
getPageXCount()
Get X - Page Count |
protected int |
getPageXIndex(int pageIndex)
Get X - Page Index. |
protected int |
getPageYCount()
Get Y | Page Count |
protected int |
getPageYIndex(int pageIndex)
Get Y | Page Index. |
float |
getWidth(int pageNo)
Get Calculated Height on page |
void |
paint(Graphics2D g2D,
int pageNo,
Point2D pageStart,
Properties ctx,
boolean isView)
Paint/Print. |
void |
setHeightToLastPage()
For Multi-Page Tables, set Height to Height of last Page |
| Methods inherited from class org.compiere.print.layout.PrintElement |
|---|
getAbsoluteLocation, getBounds, getDetailInfo, getHeight, getLocation, getWidth, imageUpdate, isTranslated, layout, setLocation, setMaxHeight, setMaxWidth, toString, translate, waitForLoad |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int HEADER_ROW
public static final int ALL
| Constructor Detail |
|---|
public TableElement(ValueNamePair[] columnHeader,
int[] columnMaxWidth,
int[] columnMaxHeight,
String[] columnJustification,
boolean[] fixedWidth,
ArrayList<Integer> functionRows,
boolean multiLineHeader,
Object[][] data,
KeyNamePair[] pk,
String pkColumnName,
int pageNoStart,
Rectangle firstPage,
Rectangle nextPages,
int repeatedColumns,
HashMap<Integer,Integer> additionalLines,
HashMap<Point,Font> rowColFont,
HashMap<Point,Color> rowColColor,
HashMap<Point,Color> rowColBackground,
MPrintTableFormat tFormat,
ArrayList<Integer> pageBreak)
columnHeader - array with column headers (Key=ColumnName)columnMaxWidth - array with column max width - 0=no restrictions - negative=supress if nullcolumnMaxHeight - array with row max height for a column - 0=no restrictions; -1=one row onlycolumnJustification - field justification for columnfixedWidth - array with column fixed widthfunctionRows - list of function rowsmultiLineHeader - if true, the header is not truncated at maxWidthdata - 2D array with data to be printed [row][col]pk - array of primary keyspkColumnName - primary key namepageNoStart - page number of starting pagefirstPage - bounds on first pagenextPages - bounds on following pagesrepeatedColumns - repeat first x columns on - X Axis follow pagesadditionalLines - map of old colum to below printed columnrowColFont - HashMap with Point as key with Font overwriterowColColor - HashMap with Point as key with foreground Color overwriterowColBackground - HashMap with Point as key with background Color overwritetFormat - table formatpageBreak - Arraylist of rows with page break| Method Detail |
|---|
protected boolean calculateSize()
calculateSize in class PrintElementpublic void setHeightToLastPage()
public float getHeight(int pageNo)
getHeight in class PrintElementpageNo - layout page number
public float getWidth(int pageNo)
pageNo - page number
public int getPageCount()
getPageCount in class PrintElementprotected int getPageIndex(int pageNo)
pageNo - real page no
protected int getPageXIndex(int pageIndex)
The table is 3 pages wide, 2 pages high - index
+-----+-----+-----+
| 0.0 | 0.1 | 0.2 |
+-----+-----+-----+
| 1.0 | 1.1 | 1.2 |
+-----+-----+-----+
Page Index
+-----+-----+-----+
| 0 | 1 | 2 |
+-----+-----+-----+
| 3 | 4 | 5 |
+-----+-----+-----+
pageIndex - zero based page index
protected int getPageXCount()
protected int getPageYIndex(int pageIndex)
The table is 3 pages wide, 2 pages high - index
+-----+-----+-----+
| 0.0 | 0.1 | 0.2 |
+-----+-----+-----+
| 1.0 | 1.1 | 1.2 |
+-----+-----+-----+
Page Index
+-----+-----+-----+
| 0 | 1 | 2 |
+-----+-----+-----+
| 3 | 4 | 5 |
+-----+-----+-----+
pageIndex - zero based page index
protected int getPageYCount()
public MQuery getDrillDown(Point relativePoint,
int pageNo)
getDrillDown in class PrintElementrelativePoint - relative PointpageNo - page number
public MQuery getDrillAcross(Point relativePoint,
int pageNo)
getDrillAcross in class PrintElementrelativePoint - relative PointpageNo - page number
public Rectangle getBounds(int pageNo)
pageNo - pageNo
public void paint(Graphics2D g2D,
int pageNo,
Point2D pageStart,
Properties ctx,
boolean isView)
paint in class PrintElementg2D - GraphicspageNo - page number for multi page support (0 = header/footer)pageStart - top left Location of pagectx - contextisView - true if online view (IDs are links)
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||