    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

##

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

##

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

##

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

##

multi

     protected JCMultiColumnInterface multi

  The component for which data is maintained.

comp

     protected JCComponent comp

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

column_widths

     public int column_widths[]

column_widths_ext

     public int column_widths_ext[]

num_columns

     public int num_columns

alignments

     public int alignments[]

left_margins

     public int left_margins[]

right_margins

     public int right_margins[]

##

JCMultiColumnData

     public JCMultiColumnData()

  Default constructor - no component is associated with the data.

JCMultiColumnData

     public JCMultiColumnData(JCMultiColumnInterface multi)

  Creates an instance and registers a component.

##

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)

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

preferredWidth

     public int preferredWidth()

  Calculates the preferred width of the multicolumn component

calcColumnWidths

     public void calcColumnWidths()

  Determines the widths of variable-sized columns; calls component's calcWidth.

  See Also:
    calcWidth

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

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.

getColumnWidth

     public int getColumnWidth(int col)

  Gets the current width of a column, or 0 if the column does not exist.

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

getNumColumns

     public int getNumColumns()

  Gets the current number of columns.

setNumColumns

     public void setNumColumns(int v)

  Sets the current number of columns (default: 1).

getColumnAlignment

     public int getColumnAlignment(int col)

  Gets a column's alignment (default: BWTEnum.MIDDLELEFT).

getColumnAlignments

     public int[] getColumnAlignments()

  Gets the column alignments.

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

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

getColumnPosition

     public int getColumnPosition(int col)

  Gets the position of the left boundary of the column. If the column is last_column + 1 then total width of the columns is returned

getColumnLeftMargin

     public int getColumnLeftMargin(int col)

  Gets the column's left margin value (pixels).

setColumnLeftMargin

     public void setColumnLeftMargin(int col,
                                     int value)

  Sets the column's left margin value (pixels) (default: 5).

getColumnRightMargin

     public int getColumnRightMargin(int col)

  Gets the column's right margin value (pixels).

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