All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCMultiColumnData

java.lang.Object
   |
   +----jclass.bwt.JCMultiColumnData

public class JCMultiColumnData
extends Object
implements JCSerializable
A class which maintains the data stored for a multi-column component.

See Also:
JCMultiColumnInterface, JCOutlinerComponent, JCMultiColumnListComponent

Variable Index

 o alignments
 o column_widths
 o column_widths_ext
 o comp
The component for which data is maintained, equal to a cast of the multi field.
 o left_margins
 o multi
The component for which data is maintained.
 o num_columns
 o right_margins

Constructor Index

 o JCMultiColumnData()
Default constructor - no component is associated with the data.
 o JCMultiColumnData(JCMultiColumnInterface)
Creates an instance and registers a component.

Method Index

 o adjustDrawingRect(int, Rectangle, Rectangle)
Adjusts the drawing rectangle for the value.
 o calcColumnWidths()
Determines the widths of variable-sized columns; calls component's calcWidth.
 o draw(Graphics, Object, Rectangle)
Draws the value as a String, Vector, JCString, or Image.
 o getColumnAlignment(int)
Gets a column's alignment (default: BWTEnum.MIDDLELEFT).
 o getColumnAlignments()
Gets the column alignments.
 o getColumnLeftMargin(int)
Gets the column's left margin value (pixels).
 o getColumnPosition(int)
Gets the position of the left boundary of the column.
 o getColumnRightMargin(int)
Gets the column's right margin value (pixels).
 o getColumnWidth(int)
Gets the current width of a column, or 0 if the column does not exist.
 o getColumnWidths()
Gets a list of the column widths set by setColumnWidths.
 o getNumColumns()
Gets the current number of columns.
 o preferredWidth()
Calculates the preferred width of the multicolumn component.
 o setColumnAlignment(int, int)
Sets a column's alignment.
 o setColumnAlignments(int[])
Sets the column's alignments.
 o setColumnLeftMargin(int, int)
Sets the column's left margin value (pixels) (default: 5).
 o setColumnRightMargin(int, int)
Sets the column's right margin value (pixels) (default: 5).
 o setColumnWidth(int, int)
Sets the width of a column.
 o setColumnWidths(int[])
Sets the list of column widths.
 o setNumColumns(int)
Sets the current number of columns (default: 1).

Variables

 o multi
  protected JCMultiColumnInterface multi
The component for which data is maintained.

 o comp
  protected JCComponent comp
The component for which data is maintained, equal to a cast of the multi field.

 o column_widths
  public int column_widths[]
 o column_widths_ext
  public int column_widths_ext[]
 o num_columns
  public int num_columns
 o alignments
  public int alignments[]
 o left_margins
  public int left_margins[]
 o right_margins
  public int right_margins[]

Constructors

 o JCMultiColumnData
  public JCMultiColumnData()
Default constructor - no component is associated with the data.

 o JCMultiColumnData
  public JCMultiColumnData(JCMultiColumnInterface multi)
Creates an instance and registers a component.

Methods

 o adjustDrawingRect
  protected void adjustDrawingRect(int col,
                                   Rectangle row_rect,
                                   Rectangle rect)
Adjusts the drawing rectangle for the value.

Parameters:
col - value's column
row_rect - rectangle within which to draw the row
rect - rectangle within which to draw the value (read-write)
 o draw
  public synchronized void draw(Graphics gc,
                                Object value,
                                Rectangle draw_rect)
Draws the value as a String, Vector, JCString, or Image.

Parameters:
draw_rect - rectangle within which to draw the value; if null, it will be calculated
 o preferredWidth
  public int preferredWidth()
Calculates the preferred width of the multicolumn component.

 o calcColumnWidths
  public void calcColumnWidths()
Determines the widths of variable-sized columns; calls component's calcWidth.

See Also:
calcWidth
 o getColumnWidths
  public int[] getColumnWidths()
Gets a list of the column widths set by setColumnWidths. To get the current width of a column, use getColumnWidth.

See Also:
setColumnWidths, getColumnWidth
 o setColumnWidths
  public void setColumnWidths(int widths[])
Sets the list of column widths. If a column's value is set to BWTEnum.VARIABLE, the width is set to the widest value in the column.

 o getColumnWidth
  public int getColumnWidth(int col)
Gets the current width of a column, or 0 if the column does not exist.

 o setColumnWidth
  public void setColumnWidth(int col,
                             int width)
Sets the width of a column. If the value is set to BWTEnum.VARIABLE, the width is set to the widest value in the column.

See Also:
calcWidth
 o getNumColumns
  public int getNumColumns()
Gets the current number of columns.

 o setNumColumns
  public void setNumColumns(int v)
Sets the current number of columns (default: 1).

 o getColumnAlignment
  public int getColumnAlignment(int col)
Gets a column's alignment (default: BWTEnum.MIDDLELEFT).

 o getColumnAlignments
  public int[] getColumnAlignments()
Gets the column alignments.

 o setColumnAlignment
  public void setColumnAlignment(int col,
                                 int align)
Sets a column's alignment.

Parameters:
alignment - one of: BWTEnum.TOPLEFT, TOPCENTER, TOPRIGHT, MIDDLELEFT (default), MIDDLECENTER, MIDDLERIGHT, BOTTOMLEFT, BOTTOMCENTER and BOTTOMRIGHT
 o setColumnAlignments
  public void setColumnAlignments(int align[])
Sets the column's alignments.

Parameters:
align - one of: BWTEnum.TOPLEFT, TOPCENTER, TOPRIGHT, MIDDLELEFT, MIDDLECENTER, MIDDLERIGHT, BOTTOMLEFT, BOTTOMCENTER and BOTTOMRIGHT
 o getColumnPosition
  public int getColumnPosition(int col)
Gets the position of the left boundary of the column.

 o getColumnLeftMargin
  public int getColumnLeftMargin(int col)
Gets the column's left margin value (pixels).

 o setColumnLeftMargin
  public void setColumnLeftMargin(int col,
                                  int value)
Sets the column's left margin value (pixels) (default: 5).

 o getColumnRightMargin
  public int getColumnRightMargin(int col)
Gets the column's right margin value (pixels).

 o setColumnRightMargin
  public void setColumnRightMargin(int col,
                                   int value)
Sets the column's right margin value (pixels) (default: 5).


All Packages  Class Hierarchy  This Package  Previous  Next  Index