JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class JCPageTable.Column

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

public class JCPageTable.Column
extends Object

The Column object describes a single column of a JCPageTable.


Field Summary
protected  int arrivingSpans
          The number of spans which began left of and appear in this column.
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 column's border.
protected  int columnNumber
          The number of this column in the table.
protected  JCPageTable.Cell defaultCell
          A template cell to use as a source of default cell attributes.
protected  int departingSpans
          The number of spans which leave this column to the right.
protected  com.klg.jclass.page.JCDrawStyle rightBorder
          The right border is drawn on the right side of the column.
protected  JCUnit.Measure width
          The width of the column.
 
Constructor Summary
JCPageTable.Column()
          Creates an empty column object.
JCPageTable.Column(int position)
          Creates a column object as a child of the given table.
JCPageTable.Column(JCUnit.Measure width, int position)
          Creates a column object as a child of the given table.
 
Method Summary
protected  void addArrivingSpan()
          Increments the number of spans in this column which begin to the left.
protected  void addDepartingSpan()
          Increments the number of spans in this column which continue to the right.
protected  int getArrivingSpans()
          Gets the number of spans which begin left of this column.
 Color getBackgroundColor()
          Gets the color specified for painting the column background.
 com.klg.jclass.page.JCDrawStyle getBorderStyle()
          Gets the draw style used for the column's border.
protected  JCUnit.Measure getBorderWidth()
          Returns the width of the column's border, computing it if necessary.
 int getColumnNumber()
          Gets the position of the column in the table.
 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 column.
 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 spans which contine right of this column.
protected  JCUnit.Measure getDrawnWidth(boolean first, boolean last)
          Computes the width of this column (including border width) based on the given information about its position in the table part.
protected  JCUnit.Measure getLeftBorderWidth()
          Computes the space required for the border of this column at the left.
protected  JCUnit.Measure getLeftBorderWidth(boolean fullWidth)
          Computes the space required for the border of this column at the left side of a table or table section.
protected  JCUnit.Measure getRightBorderWidth()
          Computes the space required for the border of this column at the right side of a table or table section.
protected  JCUnit.Measure getRightBorderWidth(boolean fullWidth)
          Computes the space required for the border of this column at the right side of a table or table section.
 JCUnit.Measure getWidth()
          Gets the width of the column.
 boolean isBackgroundColorInherited()
          Determines if the background color is inherited from the table.
 boolean isBorderStyleInherited()
          Determines if the value being reported for the border is inherited.
 boolean isDefaultBottomMarginInherited()
          Determines if the default bottom margin is inherited.
 boolean isDefaultCellAlignmentInherited()
          Determines if the vertical cell alignment is inherited.
 boolean isDefaultCellValueInherited()
          Determine if the default cell value 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.
protected  boolean noArrivingSpans()
          Returns whether or not there are arriving spans in the same column in this or related table (ie header table or main table).
protected  boolean noDepartingSpans()
          Returns whether or not there are departing spans in the same column in this or a related table (ie header table or main table).
 void setBackgroundColor(Color color)
          Sets the color specified for painting the column's background.
 void setBorderStyle(com.klg.jclass.page.JCDrawStyle border)
          Sets the border style for the column'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 column.
 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 setWidth(JCUnit.Measure width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rightBorder

protected com.klg.jclass.page.JCDrawStyle rightBorder
The right border is drawn on the right side of the column.


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.


width

protected JCUnit.Measure width
The width of the column.


borderWidth

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


arrivingSpans

protected int arrivingSpans
The number of spans which began left of and appear in this column.


departingSpans

protected int departingSpans
The number of spans which leave this column to the right.


columnNumber

protected int columnNumber
The number of this column in the table.

Constructor Detail

JCPageTable.Column

public JCPageTable.Column()
Creates an empty column object.


JCPageTable.Column

public JCPageTable.Column(int position)
Creates a column object as a child of the given table.

Parameters:
position - The position of the column in the table

JCPageTable.Column

public JCPageTable.Column(JCUnit.Measure width,
                          int position)
Creates a column object as a child of the given table.

Parameters:
width - The width of the column
position - The position of the column 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 column background.

Returns:
The column's background color

setBackgroundColor

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

Parameters:
color - The column's background color

isBorderStyleInherited

public boolean isBorderStyleInherited()
Determines if the value being reported for the border is inherited.

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

getBorderStyle

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

Returns:
The draw style which defines the column's (right) border

setBorderStyle

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

Parameters:
border - The draw style that describes the border

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 column

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 cells in this column

isDefaultBottomMarginInherited

public boolean isDefaultBottomMarginInherited()
Determines if 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 column

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()
Determines 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 column

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 column

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()
Determines 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 column

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()
Determine if the default cell value is inherited.

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

getDefaultCellValue

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

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

setDefaultCellValue

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

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

getWidth

public JCUnit.Measure getWidth()
Gets the width of the column.

Returns:
The column's width

setWidth

public void setWidth(JCUnit.Measure width)

getColumnNumber

public int getColumnNumber()
Gets the position of the column in the table.

Returns:
This column's index in the table

addArrivingSpan

protected void addArrivingSpan()
Increments the number of spans in this column which begin to the left.


getArrivingSpans

protected int getArrivingSpans()
Gets the number of spans which begin left of this column.

Returns:
the number of spanned cells which continue into this column

addDepartingSpan

protected void addDepartingSpan()
Increments the number of spans in this column which continue to the right.


getDepartingSpans

protected int getDepartingSpans()
Gets the number of spans which contine right of this column.

Returns:
the number of spanned cells which leave this column to the right

getLeftBorderWidth

protected JCUnit.Measure getLeftBorderWidth()
Computes the space required for the border of this column at the left. side of a table or table section

Returns:
The space required for the widest border before this column

noArrivingSpans

protected boolean noArrivingSpans()
Returns whether or not there are arriving spans in the same column in this or related table (ie header table or main table).

Returns:
whether or not there are arriving spans in the same column

noDepartingSpans

protected boolean noDepartingSpans()
Returns whether or not there are departing spans in the same column in this or a related table (ie header table or main table).

Returns:
whether or not there are departing spans in the same column

getLeftBorderWidth

protected JCUnit.Measure getLeftBorderWidth(boolean fullWidth)
Computes the space required for the border of this column at the left side of a table or table section.

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

getRightBorderWidth

protected JCUnit.Measure getRightBorderWidth()
Computes the space required for the border of this column at the right side of a table or table section.

Returns:
The space required for the widest border following this column

getRightBorderWidth

protected JCUnit.Measure getRightBorderWidth(boolean fullWidth)
Computes the space required for the border of this column at the right side of a table or table section.

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

getDrawnWidth

protected JCUnit.Measure getDrawnWidth(boolean first,
                                       boolean last)
Computes the width of this column (including border width) based on the given information about its position in the table part.

Parameters:
first - True if the column is the first column of the table part
last - True if the column is the last column of the table part
Returns:
the width of this column in the specified position

getBorderWidth

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

Returns:
the space required for the column's border

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