JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class JCPageTable.Row

java.lang.Object
  |
  +--com.klg.jclass.page.JCPageTable.Row
Enclosing class:
JCPageTable

public class JCPageTable.Row
extends Object

The Row object describes a single row of a JCPageTable.


Field Summary
protected  int arrivingSpans
          A count of the number of spans which begin on this row.
protected  Color background
          The color used as a default background for table elements.
protected  JCUnit.Measure borderWidth
          The amount of space required to accomodate the row's border.
protected  com.klg.jclass.page.JCDrawStyle bottomBorder
          The bottom border is drawn at the bottom of the row.
protected  List cellList
          The cell list is an ordered list of cell in the row.
protected  JCPageTable.Cell defaultCell
          A template cell to use as a source of default cell attributes.
protected  int departingSpans
          The number of spans which began above, but which appear in this row.
protected  JCUnit.Measure extraHeight
          Extra height can be added to equalise vertical spans.
protected  boolean fixedHeight
          Flag if the row height has been overriden.
protected  JCUnit.Measure rowHeight
          The height of the row is based on the tallest cell.
protected  int rowNumber
          The number of this row in the table.
 
Constructor Summary
JCPageTable.Row()
          Creates an empty row object.
JCPageTable.Row(int position)
          Creates a row object as a child of this table.
 
Method Summary
protected  JCUnit.Measure basicHeight()
          Computes the height of the row based on cell heights.
protected  int getArrivingSpans()
          Gets the number of spanned cells which enter this row.
 Color getBackgroundColor()
          Gets the color specified for painting the row background.
 com.klg.jclass.page.JCDrawStyle getBorderStyle()
          Gets the draw style used for the row's border.
protected  JCUnit.Measure getBorderWidth()
          Returns the width of the row's border, computing it if necessary.
protected  JCUnit.Measure getBottomBorderWidth()
          Computes the space required for this row's bottom border.
protected  JCUnit.Measure getBottomBorderWidth(boolean fullWidth)
          Computes the space required for the border of this row at the bottom of a table or table section.
 JCPageTable.Cell getCell(int column)
          Gets a particular cell from the row (instantiating it if necessary).
 List getCellList()
          Returns the list of cells.
 JCUnit.Measure getDefaultBottomMargin()
          Gets the default width of the bottom margin.
 int getDefaultCellAlignment()
          Gets the alignment (within each row) of the cells in this column.
 Object getDefaultCellValue()
          Gets the default contents for cells in this row.
 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 style.
 JCUnit.Measure getDefaultTopMargin()
          Gets the default width of the top margin.
protected  int getDepartingSpans()
          Gets the number of spanned cells which leave this row.
protected  JCUnit.Measure getDrawnHeight(boolean first, boolean last)
          Computes the height of this row (including extra space and border width) based on the given information about its position in the table part.
protected  JCUnit.Measure getExtraHeight()
          Gets the amount of extra height added to the row for alignment purposes.
 JCUnit.Measure getHeight()
          Gets the height of the row.
 int getRowNumber()
          Gets the number (position) of this row.
protected  JCUnit.Measure getTopBorderWidth()
          Computes the space required for this row's border at the top.
protected  JCUnit.Measure getTopBorderWidth(boolean fullWidth)
          Computes the space required for the border of this row at the top of a table or table section.
protected  boolean hasFixedHeight()
          Determine if the height of the row has been fixed.
 boolean isBackgroundColorInherited()
          Determines if the background color is inherited from the table.
 boolean isBorderStyleInherited()
          Determine if the value being reported for the row's border is inherited.
 boolean isDefaultBottomMarginInherited()
          Determines whether the default bottom margin is inherited.
 boolean isDefaultCellAlignmentInherited()
          Determines if the vertical cell alignment is inherited.
 boolean isDefaultCellValueInherited()
          Determines if the default cell value is inherited.
 boolean isDefaultLeftMarginInherited()
          Determines if the default left margin is inherited.
 boolean isDefaultRightMarginInherited()
          Determine if the default right margin is inherited.
 boolean isDefaultStyleInherited()
          Determines if the default style is inherited.
 boolean isDefaultTopMarginInherited()
          Determine if the default top margin is inherited.
 void setBackgroundColor(Color color)
          Sets the color specified for painting the row's background.
 void setBorderStyle(com.klg.jclass.page.JCDrawStyle border)
          Sets the border style for the row's border.
 void setDefaultBottomMargin(JCUnit.Measure width)
          Sets the default width of a cell's bottom margin.
 void setDefaultCellAlignment(int alignment)
          Sets the alignment (within each row) of the cells in this column.
 void setDefaultCellValue(Object obj)
          Sets the default contents for cells in this row.
 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.
protected  void setExtraHeight(JCUnit.Measure height)
          Sets the amount of extra height added to the row for alignment purposes.
 void setHeight(JCUnit.Measure height)
          Sets the row's height; this may override the dynamic sizing of the row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cellList

protected List cellList
The cell list is an ordered list of cell in the row.


bottomBorder

protected com.klg.jclass.page.JCDrawStyle bottomBorder
The bottom border is drawn at the bottom of the row.


background

protected Color background
The color used as a default background for table elements.


defaultCell

protected JCPageTable.Cell defaultCell
A template cell to use as a source of default cell attributes.


rowHeight

protected JCUnit.Measure rowHeight
The height of the row is based on the tallest cell.


fixedHeight

protected boolean fixedHeight
Flag if the row height has been overriden.


extraHeight

protected JCUnit.Measure extraHeight
Extra height can be added to equalise vertical spans.


borderWidth

protected JCUnit.Measure borderWidth
The amount of space required to accomodate the row's border.


arrivingSpans

protected int arrivingSpans
A count of the number of spans which begin on this row.


departingSpans

protected int departingSpans
The number of spans which began above, but which appear in this row.


rowNumber

protected int rowNumber
The number of this row in the table.

Constructor Detail

JCPageTable.Row

public JCPageTable.Row()
Creates an empty row object.


JCPageTable.Row

public JCPageTable.Row(int position)
Creates a row object as a child of this table.

Parameters:
position - The position of the row in the table
Method Detail

isBackgroundColorInherited

public boolean isBackgroundColorInherited()
Determines if the background color is inherited from the table.

Returns:
true if the background color is inherited

getBackgroundColor

public Color getBackgroundColor()
Gets the color specified for painting the row background.

Returns:
The row's background color

setBackgroundColor

public void setBackgroundColor(Color color)
Sets the color specified for painting the row's background.

Parameters:
color - The row's background color

isBorderStyleInherited

public boolean isBorderStyleInherited()
Determine if the value being reported for the row's border is inherited.

Returns:
true if the row's border style is inherited from the table

getBorderStyle

public com.klg.jclass.page.JCDrawStyle getBorderStyle()
Gets the draw style used for the row's border.

Returns:
The draw style which defines the row's (bottom) border

setBorderStyle

public void setBorderStyle(com.klg.jclass.page.JCDrawStyle border)
Sets the border style for the row's border.

Parameters:
border - The draw style that describes the border

getCell

public JCPageTable.Cell getCell(int column)
Gets a particular cell from the row (instantiating it if necessary).

Parameters:
column - The column to find (create) the cell in
Returns:
The table cell which occupies or obscures (spans) this cell

getCellList

public List getCellList()
Returns the list of cells.

Returns:
An ordered list of table cells in this row

isDefaultCellAlignmentInherited

public boolean isDefaultCellAlignmentInherited()
Determines if the vertical cell alignment is inherited.

Returns:
true if the table is examined to get the cell alignment

getDefaultCellAlignment

public int getDefaultCellAlignment()
Gets the alignment (within each row) of the cells in this column.

Returns:
The vertical alignment of each cell with respect to its row

setDefaultCellAlignment

public void setDefaultCellAlignment(int alignment)
Sets the alignment (within each row) of the cells in this column.

Parameters:
alignment - The vertical alignment of each cell versus its row

isDefaultStyleInherited

public boolean isDefaultStyleInherited()
Determines if the default style is inherited.

Returns:
true if the table is examined to get the default style

getDefaultStyle

public com.klg.jclass.page.JCTextStyle getDefaultStyle()
Gets the default cell style.

Returns:
The default text style used in cell text for cells in this row

setDefaultStyle

public void setDefaultStyle(com.klg.jclass.page.JCTextStyle style)
Sets the default cell text style.

Parameters:
style - A text style to apply to printing in table cells

isDefaultBottomMarginInherited

public boolean isDefaultBottomMarginInherited()
Determines whether the default bottom margin is inherited.

Returns:
true if we need to get the default bottom margin from the parent

getDefaultBottomMargin

public JCUnit.Measure getDefaultBottomMargin()
Gets the default width of the bottom margin.

Returns:
The width of the default bottom margin for cells in this row

setDefaultBottomMargin

public void setDefaultBottomMargin(JCUnit.Measure width)
Sets the default width of a cell's bottom margin.

Parameters:
width - The size of the bottom margin for table cells

isDefaultTopMarginInherited

public boolean isDefaultTopMarginInherited()
Determine if the default top margin is inherited.

Returns:
true if we need to get the default top margin from the parent

getDefaultTopMargin

public JCUnit.Measure getDefaultTopMargin()
Gets the default width of the top margin.

Returns:
The width of the default top margin for cells in this row

setDefaultTopMargin

public void setDefaultTopMargin(JCUnit.Measure width)
Sets the default width of a cell's top margin.

Parameters:
width - The size of the top margin for table cells

isDefaultLeftMarginInherited

public boolean isDefaultLeftMarginInherited()
Determines if the default left margin is inherited.

Returns:
true if we need to get the default left margin from the parent

getDefaultLeftMargin

public JCUnit.Measure getDefaultLeftMargin()
Gets the default width of the left margin.

Returns:
The width of the default left margin for cells in this row

setDefaultLeftMargin

public void setDefaultLeftMargin(JCUnit.Measure width)
Sets the default width of a cell's left margin.

Parameters:
width - The size of the left margin for table cells

isDefaultRightMarginInherited

public boolean isDefaultRightMarginInherited()
Determine if the default right margin is inherited.

Returns:
true if we need to get the default right margin from the parent

getDefaultRightMargin

public JCUnit.Measure getDefaultRightMargin()
Gets the default width of the right margin.

Returns:
The width of the default right margin for cells in this row

setDefaultRightMargin

public void setDefaultRightMargin(JCUnit.Measure width)
Sets the default width of a cell's right margin.

Parameters:
width - The size of the right margin for table cells

isDefaultCellValueInherited

public boolean isDefaultCellValueInherited()
Determines if the default cell value is inherited.

Returns:
true if the row does not specify a default cell value

getDefaultCellValue

public Object getDefaultCellValue()
Gets the default contents for cells in this row.

Returns:
The object which is the default contents for this row

setDefaultCellValue

public void setDefaultCellValue(Object obj)
Sets the default contents for cells in this row.

Parameters:
obj - The object to be the default contents for this row

hasFixedHeight

protected boolean hasFixedHeight()
Determine if the height of the row has been fixed.

Returns:
true If the row has been assigned a fixed height

getHeight

public JCUnit.Measure getHeight()
Gets the height of the row.

Returns:
The row's height

setHeight

public void setHeight(JCUnit.Measure height)
Sets the row's height; this may override the dynamic sizing of the row.

Parameters:
height - The desired height of the row

getRowNumber

public int getRowNumber()
Gets the number (position) of this row.

Returns:
the index of this row in the table

getExtraHeight

protected JCUnit.Measure getExtraHeight()
Gets the amount of extra height added to the row for alignment purposes.

Returns:
The row's flexible additional height

setExtraHeight

protected void setExtraHeight(JCUnit.Measure height)
Sets the amount of extra height added to the row for alignment purposes.

Parameters:
height - The extra height to expand the row

getArrivingSpans

protected int getArrivingSpans()
Gets the number of spanned cells which enter this row.

Returns:
the number of spans in this row which begin above

getDepartingSpans

protected int getDepartingSpans()
Gets the number of spanned cells which leave this row.

Returns:
the number of spans in this row which continue below

basicHeight

protected JCUnit.Measure basicHeight()
Computes the height of the row based on cell heights.

Returns:
The height required by the tallest cell in the row

getBorderWidth

protected JCUnit.Measure getBorderWidth()
Returns the width of the row's border, computing it if necessary.

Returns:
the space required for the row's border

getBottomBorderWidth

protected JCUnit.Measure getBottomBorderWidth()
Computes the space required for this row's bottom border.

Returns:
The width needed if this row is at the bottom of the table part

getBottomBorderWidth

protected JCUnit.Measure getBottomBorderWidth(boolean fullWidth)
Computes the space required for the border of this row at the bottom of a table or table section.

Parameters:
fullWidth - True if the total space to the next row is required; false if the half-width in this row's domain is wanted
Returns:
The space required for the widest border below this row

getTopBorderWidth

protected JCUnit.Measure getTopBorderWidth()
Computes the space required for this row's border at the top.

Returns:
The width needed if this row is at the top of the table part

getTopBorderWidth

protected JCUnit.Measure getTopBorderWidth(boolean fullWidth)
Computes the space required for the border of this row at the top of a table or table section.

Parameters:
fullWidth - True if the total space between this row and the previous one is required, otherwise false (half)
Returns:
The space required for the widest border above this row

getDrawnHeight

protected JCUnit.Measure getDrawnHeight(boolean first,
                                        boolean last)
Computes the height of this row (including extra space and border width) based on the given information about its position in the table part.

Parameters:
first - True if the row is the first (top) row of the table part
last - True if the row is the last (bottom) row of the table part
Returns:
the height of this row in the specified position

Copyright © 2004 Quest Software Inc..
All rights reserved.