|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.JCPageTable
JCPageTable
provides methods for creating and customizing tables
into which data is flowed. Content may be added in the form of formatted,
flowed text, or it can be added as content Objects to the underlying
TableDataModel
, in which case the appropriate CellRenderers
are used
to render/layout the content.
A JCPageTable
consists of an ordered set of JCPageTable.Columns
which
define the columns of the table and their attributes and an ordered
set of JCPageTable.Rows
. A Row contains both the row attributes and
the list of JCPageTable.Cell
objects defined in that row. Headers are
implemented using a nested JCPageTable
object.
Attributes such as background colour, cell margins, and border styles
can be set on any object in the table heirarchy (JCPageTable
, Row, Column
or Cell). The most specific setting available in a particular cell
is used when the table is drawn, according to the inheritance order.
The standard accessor methods (for example, Cell.getBackgroundColor()
)
will return the setting that will be applied at that object, even if the
value is inherited from a higher-level object. All get()
methods for
inheritable attributes are shadowed by a method which determines if
the value returned by the get method is inherited (versus being
locally specified). (for example, Cell.isBackgroundColorInherited()
)
Because of the ambiguity created by inheriting Cell attributes from
both the Row and Column, the method setRowColumnDominance(int)
takes the constants ROW_DOMINANCE
and
COLUMN_DOMINANCE
to define whether or values are inherited
first from the Row or the Column, respectively.
Nested Class Summary | |
class |
JCPageTable.Cell
The Cell object describes a single cell of a JCPageTable. |
class |
JCPageTable.Column
The Column object describes a single column of a JCPageTable . |
class |
JCPageTable.Row
The Row object describes a single row of a JCPageTable . |
Field Summary | |
protected int |
alignment
Tables use the paragraph alignment options for horizontal alignment. |
static int |
BORDER_USE_EXTERNAL
|
static int |
BORDER_USE_INTERNAL
|
protected int |
borderMode
Controls the borders drawn on the perimeter of a table range. |
static int |
CELL_ALIGNMENT_BOTTOM
|
static int |
CELL_ALIGNMENT_CENTER
|
static int |
CELL_ALIGNMENT_NONE
|
static int |
CELL_ALIGNMENT_TOP
|
static int |
COLUMN_DOMINANCE
|
protected int |
columnCount
Number of columns in the table. |
protected List |
columnList
The column list is an ordered list of columns in the table. |
protected JCPageTable.Cell |
defaultCell
A template cell to use as a source of default cell attributes. |
protected com.klg.jclass.page.JCDocument |
document
The document to which this table belongs. |
protected int |
dominance
Specifies which of a conflicting row or column attribute has dominance. |
protected com.klg.jclass.page.JCPageTable |
header
The header table describes the table row displayed as a header. |
protected boolean |
isComplete
True if this table has had all frames completed and heights calculated. |
protected boolean |
isHeader
True if this table is created as the header of another table. |
protected com.klg.jclass.page.JCPageTable |
mainTable
The main table is the body of the table. |
static int |
OVERFLOW_CLIP_COLUMNS
Clips table columns to page. |
static int |
OVERFLOW_TEAROFF_COLUMNS
Internal use only. |
static int |
OVERFLOW_WRAP_COLUMNS
Wraps table columns to same page. |
static int |
OVERFLOW_WRAP_COLUMNS_NEXT
Wraps table columns to next frame column or flow frame. |
protected int |
overflowMode
Controls where extra columns in a too-wide table appear in the flow. |
static int |
ROW_DOMINANCE
|
protected int |
rowCount
Number of rows in the table. |
protected List |
rowList
The row list is an ordered list of rows in the table. |
protected com.klg.jclass.table.EditableTableDataModel |
tableData
This stores data associated with cells on the table. |
protected com.klg.jclass.page.JCTableStyle |
tableStyle
The predefined table style for this table. |
static JCPageTable.Cell |
UNINITIALISED_CELL
|
static JCPageTable.Row |
UNINITIALISED_ROW
|
Constructor Summary | |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
int columnCount)
Creates a new table with the number of columns specified where each column is the default width. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
int columnCount,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with the number of columns specified where each column is the default width. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
int columnCount,
JCUnit.Measure columnWidth)
Creates a new table with the number of columns specified, where each column is a specified width. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
int columnCount,
JCUnit.Measure columnWidth,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with the number of columns specified where each column is a specified width. |
protected |
JCPageTable(com.klg.jclass.page.JCDocument doc,
com.klg.jclass.page.JCPageTable mainTable,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with unset columns. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
JCUnit.Measure[] columnWidths)
Creates a new table with columns as specified in the list of widths. |
protected |
JCPageTable(com.klg.jclass.page.JCDocument doc,
JCUnit.Measure[] columnWidths,
com.klg.jclass.page.JCPageTable mainTable,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with columns as specified in the list of widths. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
JCUnit.Measure[] columnWidths,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with columns as specified in the list of widths. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
List columnWidths)
Creates a new table with columns as specified in the list of widths. |
protected |
JCPageTable(com.klg.jclass.page.JCDocument doc,
List columnWidths,
com.klg.jclass.page.JCPageTable mainTable,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with columns as specified in the list of widths. |
|
JCPageTable(com.klg.jclass.page.JCDocument doc,
List columnWidths,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with columns as specified in the list of widths. |
protected |
JCPageTable(com.klg.jclass.page.JCDocument doc,
Object[] columnWidths,
com.klg.jclass.page.JCPageTable mainTable,
com.klg.jclass.page.JCTableStyle tableStyle)
Creates a new table with columns as specified in the list of widths. |
Method Summary | |
void |
addRow(int rowNumber,
int columnNumber,
Object[] cellValues)
Adds a row of cell values (or as many values as are provided) to the table starting at a given position. |
void |
addRow(int rowNumber,
int columnNumber,
String[] cellText)
Adds a row of cells (or as many cells as are provided) to the table starting at a given position. |
void |
addRow(int rowNumber,
Object[] cellValues)
Adds a row of cell values (or as many values as are provided) to the table in the given position. |
void |
addRow(int rowNumber,
String[] cellText)
Adds a row of cells (or as many cells as are provided) to the table, given the row number. |
void |
addRow(com.klg.jclass.page.JCTextStyle style,
String[] cellText)
Adds a row of cells (or as many cells as are provided) to the table. |
void |
addRow(Object[] cellValues)
Adds a row of cell values (or as many values as are provided on one line) to the end of the table. |
void |
addRow(String[] cellText)
Adds a row of cells (or as many cells as are provided) to the table. |
void |
completeLayout()
Completes the layout tasks for a table, such as computing frame and row heights. |
protected void |
createColumn(JCUnit.Measure width,
int ordinal)
Creates a Column and adds it to the column list. |
com.klg.jclass.page.JCPageTable |
createHeaders()
Creates a header table for this table. |
void |
drawTablePart(com.klg.jclass.page.JCFrame frame,
int startRow,
int startColumn,
int endRow,
int endColumn,
JCUnit.Measure headerH,
JCUnit.Measure tableH,
JCUnit.Measure tableW)
This method is used internally by JClass PageLayout and should not be used by applications. |
void |
fitToFrame(com.klg.jclass.page.JCFrame frame,
com.klg.jclass.page.JCTextStyle style)
Fits the table into the specified frame, scaling the columns in proportion to their original widths. |
int |
getAlignment()
Gets the alignment of the table within its frame/column. |
Color |
getBackgroundColor()
Gets the color specified for painting the table background. |
int |
getBorderMode()
Determines the mode of selecting perimeter borders for a range of cells. |
com.klg.jclass.page.JCDrawStyle |
getBottomBorder()
Gets the draw style used for the bottom border. |
JCPageTable.Cell |
getCell(int row,
int column)
Gets a particular cell from the table, instantiating it if necessary. |
com.klg.jclass.page.JCFrame |
getCellFrame(int row,
int column)
Gets the frame that holds the contents of a given cell. |
JCPageTable.Column |
getColumn(int column)
Gets a column object corresponding to a column number. |
com.klg.jclass.page.JCDrawStyle |
getColumnBorder()
Gets the draw style used for the column border. |
protected JCUnit.Measure |
getColumnBorderWidth()
Gets the width of the default column border based on consideration both of this table and any header or parent table it may have. |
int |
getColumnCount()
Gives the number of columns in the table. |
List |
getColumnList()
Returns the list of columns. |
JCUnit.Measure |
getColumnRangeWidth(int first_column,
int last_column)
Determines the width required for a given range of columns. |
int |
getColumnSet(int startColumn,
JCUnit.Measure available,
JCUnit.Measure consumed)
Determines the range of columns that fits in a space, given the start column. |
JCUnit.Measure |
getDefaultBottomMargin()
Gets the default width of the bottom margin. |
int |
getDefaultCellAlignment()
Gets the vertical alignment of the cells in this table. |
JCUnit.Measure |
getDefaultLeftMargin()
Gets the default width of the left margin. |
JCUnit.Measure |
getDefaultRightMargin()
Gets the default width of the right margin. |
com.klg.jclass.page.JCTextStyle |
getDefaultStyle()
Gets the default cell text style. |
JCUnit.Measure |
getDefaultTopMargin()
Gets the default width of the top margin. |
com.klg.jclass.page.JCDocument |
getDocument()
Gets the document to which this table belongs. |
com.klg.jclass.page.JCDrawStyle |
getHeaderBorder()
Gets the draw style used for the header border. |
com.klg.jclass.page.JCPageTable |
getHeaders()
Gets the table which defines the header of this table. |
JCPageTable.Column |
getHeadersColumn(int columnIndex)
Returns the header table's columnIndex column. |
com.klg.jclass.page.JCDrawStyle |
getLeftBorder()
Gets the draw style used for the left border. |
protected JCUnit.Measure |
getLeftBorderWidth()
Gets the width of the left side border based on consideration both of this table and any header or parent table it may have. |
int |
getOverflowMode()
Gets the mode switch which controls the placement of columns that do not fit. |
com.klg.jclass.page.JCDrawStyle |
getRightBorder()
Gets the draw style used for the right border. |
protected JCUnit.Measure |
getRightBorderWidth()
Gets the width of the right side border based on consideration both of this table and any header or parent table it may have. |
JCPageTable.Row |
getRow(int row)
Gets a row from the table, creating it if it doesn't exist. |
com.klg.jclass.page.JCDrawStyle |
getRowBorder()
Gets the draw style used for the row border. |
int |
getRowColumnDominance()
Gets the dominant direction for precedence of row and column attributes. |
int |
getRowCount()
Gives the number of rows in the table. |
List |
getRowList()
Returns the list of rows. |
JCUnit.Measure |
getRowRangeHeight(int first_row,
int last_row)
Determines the height required for a given range of rows. |
int |
getRowSet(int startRow,
JCUnit.Measure available,
JCUnit.Measure consumed)
Determines the range of rows that fits in a certain space, given a start row. |
com.klg.jclass.table.TableDataModel |
getTableData()
Gets the table data which stores values associated with the table. |
com.klg.jclass.page.JCDrawStyle |
getTopBorder()
Gets the draw style used for the top border. |
boolean |
hasHeaders()
Determines if this table has a header. |
boolean |
isBackgroundColorInherited()
Determines if the background color is inherited from a higher-level table. |
boolean |
isBottomBorderInherited()
Determines if the value reported for the bottom border is inherited. |
boolean |
isColumnBorderInherited()
Determines if the value reported for the column border is inherited. |
boolean |
isDefaultBottomMarginInherited()
Determines if the default bottom margin is inherited. |
boolean |
isDefaultCellAlignmentInherited()
Determines if the vertical cell alignment is inherited. |
boolean |
isDefaultLeftMarginInherited()
Determines if the default left margin is inherited. |
boolean |
isDefaultRightMarginInherited()
Determines if the default right margin is inherited. |
boolean |
isDefaultStyleInherited()
Determines if the default style is inherited. |
boolean |
isDefaultTopMarginInherited()
Determines if the default top margin is inherited. |
boolean |
isHeader()
Determines if this table forms the header of another table. |
boolean |
isHeaderBorderInherited()
Determines if the value being reported for the header border is inherited. |
boolean |
isLeftBorderInherited()
Determines if the value reported for the left border is inherited. |
boolean |
isRightBorderInherited()
Determines if the value reported for the right border is inherited. |
boolean |
isRowBorderInherited()
Determines if the value being reported for the row border is inherited. |
boolean |
isTopBorderInherited()
Determines if the value reported for the top border is inherited. |
void |
printToCell(int row,
int column,
com.klg.jclass.page.JCTextStyle style,
String text)
Prints the given text to a specified cell using the given style. |
void |
printToCell(int row,
int column,
String text)
Prints the given text to a specified cell, using the cell's style. |
void |
setAlignment(int alignment)
Sets the alignment of the table within its frame/column. |
void |
setAllBorders(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for all table borders. |
void |
setBackgroundColor(Color color)
Sets the color specified for painting the table background. |
void |
setBorderMode(int mode)
Specifies the mode of selecting perimeter borders for a range of cells. |
void |
setBottomBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the bottom border. |
void |
setColumnBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the column border. |
void |
setColumnWidth(int columnIndex,
JCUnit.Measure width)
Sets the width of a particular column. |
void |
setColumnWidths(JCUnit.Measure[] columnWidths)
Sets the width of a particular column. |
void |
setColumnWidths(List columnWidths)
Sets the width of a particular column. |
protected void |
setColumnWidths(Object[] widths)
|
void |
setDefaultBottomMargin(JCUnit.Measure width)
Sets the default width of a cell's bottom margin. |
void |
setDefaultCellAlignment(int alignment)
Sets the vertical alignment of the cells in this table. |
void |
setDefaultLeftMargin(JCUnit.Measure width)
Sets the default width of a cell's left margin. |
void |
setDefaultRightMargin(JCUnit.Measure width)
Sets the default width of a cell's right margin. |
void |
setDefaultStyle(com.klg.jclass.page.JCTextStyle style)
Sets the default cell text style. |
void |
setDefaultTopMargin(JCUnit.Measure width)
Sets the default width of a cell's top margin. |
void |
setDocument(com.klg.jclass.page.JCDocument doc)
Sets the document to which this table belongs. |
void |
setEdgeBorders(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for all borders in the table's perimeter. |
void |
setHeaderBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the header border. |
void |
setHorizontalBorders(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the table's horizontal borders. |
void |
setInternalBorders(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the table's internal borders. |
void |
setLeftBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the left border. |
void |
setOverflowMode(int overflow_mode)
Sets the mode switch which controls the placement of columns that do not fit. |
void |
setRightBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the right border. |
void |
setRowBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the row border. |
void |
setRowColumnDominance(int dominance)
Sets the dominant direction for precedence of row and column attributes. |
void |
setTopBorder(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the top border. |
void |
setVerticalBorders(com.klg.jclass.page.JCDrawStyle border)
Sets the draw style used for the table's vertical borders. |
void |
spanCells(int startRow,
int startColumn,
int rows,
int columns)
Creates a span across the given range of cells. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.klg.jclass.page.JCDocument document
protected com.klg.jclass.page.JCPageTable header
protected com.klg.jclass.page.JCPageTable mainTable
protected List rowList
protected List columnList
protected com.klg.jclass.page.JCTableStyle tableStyle
protected JCPageTable.Cell defaultCell
protected int alignment
protected int borderMode
protected int dominance
protected int overflowMode
protected int columnCount
protected int rowCount
protected boolean isHeader
True
if this table is created as the header of another table.
protected boolean isComplete
True
if this table has had all frames completed and heights calculated.
protected com.klg.jclass.table.EditableTableDataModel tableData
public static final int OVERFLOW_CLIP_COLUMNS
public static final int OVERFLOW_WRAP_COLUMNS
public static final int OVERFLOW_TEAROFF_COLUMNS
public static final int OVERFLOW_WRAP_COLUMNS_NEXT
public static final int BORDER_USE_INTERNAL
public static final int BORDER_USE_EXTERNAL
public static final int ROW_DOMINANCE
public static final int COLUMN_DOMINANCE
public static final int CELL_ALIGNMENT_NONE
public static final int CELL_ALIGNMENT_TOP
public static final int CELL_ALIGNMENT_CENTER
public static final int CELL_ALIGNMENT_BOTTOM
public static final JCPageTable.Row UNINITIALISED_ROW
public static final JCPageTable.Cell UNINITIALISED_CELL
Constructor Detail |
public JCPageTable(com.klg.jclass.page.JCDocument doc, List columnWidths)
doc
- the document to which this table belongscolumnWidths
- a List of column widths of which the table is composedpublic JCPageTable(com.klg.jclass.page.JCDocument doc, List columnWidths, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnWidths
- a List of column widths of which the table is composedtableStyle
- a JCTableStyle
which predefines the table stylepublic JCPageTable(com.klg.jclass.page.JCDocument doc, JCUnit.Measure[] columnWidths)
doc
- the document to which this table belongscolumnWidths
- an array of column widths of which the table is composedpublic JCPageTable(com.klg.jclass.page.JCDocument doc, JCUnit.Measure[] columnWidths, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnWidths
- an array of column widths of which the table is composedtableStyle
- a JCTableStyle
which predefines the table stylepublic JCPageTable(com.klg.jclass.page.JCDocument doc, int columnCount, JCUnit.Measure columnWidth)
doc
- the document to which this table belongscolumnCount
- the number of columns in this tablecolumnWidth
- a JCUnit.Measure
for the width of the columnspublic JCPageTable(com.klg.jclass.page.JCDocument doc, int columnCount, JCUnit.Measure columnWidth, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnCount
- the number of columns in this tablecolumnWidth
- a JCUnit.Measure
for the width of the columnstableStyle
- a JCTableStyle
which predefines the table stylepublic JCPageTable(com.klg.jclass.page.JCDocument doc, int columnCount)
doc
- the document to which this table belongscolumnCount
- the number of columns in this tablepublic JCPageTable(com.klg.jclass.page.JCDocument doc, int columnCount, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnCount
- the number of columns in this tabletableStyle
- a JCTableStyle
which predefines the table styleprotected JCPageTable(com.klg.jclass.page.JCDocument doc, List columnWidths, com.klg.jclass.page.JCPageTable mainTable, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnWidths
- a List of column widths of which the table is composedmainTable
- null if the table being created is a full (main) tabletableStyle
- a JCTableStyle
which predefines the table styleprotected JCPageTable(com.klg.jclass.page.JCDocument doc, JCUnit.Measure[] columnWidths, com.klg.jclass.page.JCPageTable mainTable, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnWidths
- a List of column widths of which the table is composedmainTable
- true
if the table being created is a full (main) tabletableStyle
- a JCTableStyle
which predefines the table styleprotected JCPageTable(com.klg.jclass.page.JCDocument doc, Object[] columnWidths, com.klg.jclass.page.JCPageTable mainTable, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongscolumnWidths
- a list of column widths of which the table is composedmainTable
- true
if the table being created is a full (main) tabletableStyle
- a JCTableStyle
which predefines the table styleprotected JCPageTable(com.klg.jclass.page.JCDocument doc, com.klg.jclass.page.JCPageTable mainTable, com.klg.jclass.page.JCTableStyle tableStyle)
doc
- the document to which this table belongsmainTable
- true
if the table being created is a full (main) tabletableStyle
- a JCTableStyle
which predefines the table styleMethod Detail |
public void fitToFrame(com.klg.jclass.page.JCFrame frame, com.klg.jclass.page.JCTextStyle style)
frame
- the frame into which the table must fit; if the frame
is multi-column, then the table will be sized to the width of a columnstyle
- style to be used to render the table (needed to get the
margins used so that the constructor can accurately calculate
the width of the table)public JCPageTable.Column getHeadersColumn(int columnIndex)
columnIndex
column.
columnIndex
-
columnIndex
public void setColumnWidth(int columnIndex, JCUnit.Measure width)
columnIndex
- width
- public void setColumnWidths(List columnWidths)
columnWidths
- public void setColumnWidths(JCUnit.Measure[] columnWidths)
columnWidths
- protected void setColumnWidths(Object[] widths)
public void addRow(String[] cellText)
cellText
- an array of Strings that contain the cell textpublic void addRow(com.klg.jclass.page.JCTextStyle style, String[] cellText)
style
- the style to use for the textcellText
- an array of Strings that contain the cell textpublic void addRow(int rowNumber, String[] cellText)
rowNumber
- the row the cells are to be added incellText
- an array of Strings that contain the cell textpublic void addRow(int rowNumber, int columnNumber, String[] cellText)
rowNumber
- the row in which to add the cellscolumnNumber
- the first column in which to place cell textcellText
- an array of Strings that contain the cell textpublic void addRow(Object[] cellValues)
cellValues
- an array of Objects which contain the cell valuespublic void addRow(int rowNumber, Object[] cellValues)
rowNumber
- the row in which to add the cell valuescellValues
- an array of Objects which contain the cell valuespublic void addRow(int rowNumber, int columnNumber, Object[] cellValues)
rowNumber
- the row in which to add the cell valuescolumnNumber
- the first column in which to place a cell valuecellValues
- an array of Objects which contain the cell valuespublic int getAlignment()
public void setAlignment(int alignment)
alignment
- the horizontal alignment (justification) of the tablepublic boolean isBackgroundColorInherited()
true
if the background color is inheritedpublic Color getBackgroundColor()
public void setBackgroundColor(Color color)
color
- the table's background colorpublic int getBorderMode()
public void setBorderMode(int mode)
mode
- the border mode (whether cell or table borders are used)public com.klg.jclass.page.JCDrawStyle getTopBorder()
public boolean isTopBorderInherited()
true
if the top border style is inherited from a higher levelpublic void setTopBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's top borderpublic com.klg.jclass.page.JCDrawStyle getBottomBorder()
public boolean isBottomBorderInherited()
true
if the bottom border style is inherited from a higher levelpublic void setBottomBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's bottom borderpublic com.klg.jclass.page.JCDrawStyle getLeftBorder()
public boolean isLeftBorderInherited()
true
if the left border style is inherited from a higher levelpublic void setLeftBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's left borderpublic com.klg.jclass.page.JCDrawStyle getRightBorder()
public boolean isRightBorderInherited()
true
if the right border style is inherited from a higher levelpublic void setRightBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's right borderpublic com.klg.jclass.page.JCDrawStyle getRowBorder()
public boolean isRowBorderInherited()
true
if the row border style is inherited from a higher levelpublic void setRowBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's row borderpublic com.klg.jclass.page.JCDrawStyle getColumnBorder()
public boolean isColumnBorderInherited()
true
if the column border style is inherited from a higher levelpublic void setColumnBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's column borderpublic com.klg.jclass.page.JCDrawStyle getHeaderBorder()
public boolean isHeaderBorderInherited()
true
if the header border style is inherited from a higher levelpublic void setHeaderBorder(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to the table's header borderpublic void setAllBorders(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to all the table's borderspublic void setEdgeBorders(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to all the table's edge borderspublic void setHorizontalBorders(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to all horizontal borderspublic void setInternalBorders(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply internally between rows and columnspublic void setVerticalBorders(com.klg.jclass.page.JCDrawStyle border)
border
- the draw style to apply to all vertical borderspublic JCPageTable.Cell getCell(int row, int column)
row
- the row in which to find or create the cellcolumn
- the column that holds the cell
public com.klg.jclass.page.JCFrame getCellFrame(int row, int column)
row
- the cell's rowcolumn
- the cell's column
public void printToCell(int row, int column, String text)
row
- the cell's rowcolumn
- the cell's columntext
- the text to be printed in the cellpublic void printToCell(int row, int column, com.klg.jclass.page.JCTextStyle style, String text)
row
- the cell's rowcolumn
- the cell's columnstyle
- the style to use to print the texttext
- the text to be printed in the cellpublic boolean isDefaultCellAlignmentInherited()
true
if the table is examined to get the cell alignmentpublic int getDefaultCellAlignment()
public void setDefaultCellAlignment(int alignment)
alignment
- the alignment of each cell with respect to its rowpublic JCPageTable.Column getColumn(int column)
column
- the number of the column to retrieve
public int getColumnCount()
public List getColumnList()
public boolean isDefaultStyleInherited()
true
if there is a parent table from which to get the default stylepublic com.klg.jclass.page.JCTextStyle getDefaultStyle()
public void setDefaultStyle(com.klg.jclass.page.JCTextStyle style)
style
- a text style to apply to printing in table cellspublic boolean isDefaultBottomMarginInherited()
true
if there is a parent to provide the default bottom marginpublic JCUnit.Measure getDefaultBottomMargin()
public void setDefaultBottomMargin(JCUnit.Measure width)
width
- the size of the bottom margin for table cellspublic boolean isDefaultTopMarginInherited()
true
if there is a parent to get the default top margin frompublic JCUnit.Measure getDefaultTopMargin()
public void setDefaultTopMargin(JCUnit.Measure width)
width
- the size of the top margin for table cellspublic boolean isDefaultLeftMarginInherited()
true
if there is a parent to get the default left margin frompublic JCUnit.Measure getDefaultLeftMargin()
public void setDefaultLeftMargin(JCUnit.Measure width)
width
- the size of the left margin for table cellspublic boolean isDefaultRightMarginInherited()
true
if there is a parent to provide the default right marginpublic JCUnit.Measure getDefaultRightMargin()
public void setDefaultRightMargin(JCUnit.Measure width)
width
- the size of the right margin for table cellspublic com.klg.jclass.table.TableDataModel getTableData()
TableDataModel
which can store values and expressionspublic com.klg.jclass.page.JCDocument getDocument()
public void setDocument(com.klg.jclass.page.JCDocument doc)
doc
- the document which is to own this tablepublic int getRowColumnDominance()
public void setRowColumnDominance(int dominance)
dominance
- the direction to give dominance for attributespublic com.klg.jclass.page.JCPageTable getHeaders()
public com.klg.jclass.page.JCPageTable createHeaders()
public boolean hasHeaders()
true
if this table is associated with a header tablepublic boolean isHeader()
true
if this table's rows are the header for another tablepublic int getOverflowMode()
public void setOverflowMode(int overflow_mode)
overflow_mode
- the overflow mode of the tablepublic JCPageTable.Row getRow(int row)
row
- the number of the row to retrieve
public int getRowCount()
public List getRowList()
public void spanCells(int startRow, int startColumn, int rows, int columns)
startRow
- the row index of the upper-left cell of the spanstartColumn
- the column index of the upper-left cell of the spanrows
- the number of rows to span downwardcolumns
- the number of columns to span to the rightpublic JCUnit.Measure getRowRangeHeight(int first_row, int last_row)
first_row
- the number of the first row in the rangelast_row
- the number of the last row in the range
public JCUnit.Measure getColumnRangeWidth(int first_column, int last_column)
first_column
- the number of the first column in the rangelast_column
- the number of the last column in the range
public int getRowSet(int startRow, JCUnit.Measure available, JCUnit.Measure consumed)
startRow
- the first row of the rangeavailable
- the space in which to fit the range of rowsconsumed
- this is set to the amount of space actually used
public int getColumnSet(int startColumn, JCUnit.Measure available, JCUnit.Measure consumed)
startColumn
- the first column of the rangeavailable
- the space in which to fit the range of columnsconsumed
- this is set to the amount of space actually used
public void completeLayout()
public void drawTablePart(com.klg.jclass.page.JCFrame frame, int startRow, int startColumn, int endRow, int endColumn, JCUnit.Measure headerH, JCUnit.Measure tableH, JCUnit.Measure tableW)
Draws a set (rectangular row/column range) of cells from a table.
frame
- the frame in which the table is being constructedstartRow
- the first row of the table from which to paste cellsstartColumn
- the first column of the table from which to paste cellsendRow
- the last row of the table from which to paste cellsendColumn
- the last column of the table from which to paste cellsheaderH
- the amount of vertical space required for headerstableH
- the amount of vertical space computed for the tabletableW
- the amount of horizontal space allocated to the table partprotected void createColumn(JCUnit.Measure width, int ordinal)
width
- the width for this columnordinal
- the position of this columnprotected JCUnit.Measure getLeftBorderWidth()
protected JCUnit.Measure getRightBorderWidth()
protected JCUnit.Measure getColumnBorderWidth()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |