All Packages  Class Hierarchy  This Package  Previous  Next  Index


Class jclass.table.JCTable

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----jclass.table.Table
                                   |
                                   +----jclass.table.JCTable


public class JCTable
extends Table

JCTable enables the following functionality:


Constructor Index

 o JCTable()
Creates a table.
 o JCTable(Applet, String)
Creates a table which reads parameters from an HTML file.

Method Index

 o addColumn(int, Object, Vector)
Inserts a new column into the table, shifting any cell values and attributes (such as background color) to the right of the insertion.
 o addRow(int, Object, Vector)
Inserts a new row into the table, shifting any cell values and attributes (such as background color) below the insertion.
 o cancelEdit(boolean)
Cancels interactive editing of a cell and, as an option, hides the Text component.
 o clearCells()
Sets clears the values of all cells by setting them to null.
 o clearSelectedCells()
All selected cells are unselected.
 o commitEdit(boolean)
Commits interactive cell editing internally, saving any changes made by the user.
 o deleteColumns(int, int)
Deletes columns from the table.
 o deleteRows(int, int)
Deletes rows from the table.
 o eventToCell(Event)
Determines the cell or label in which an event occurred.
 o findSpan(int, int, JCCellRange, Dimension)
Finds the first range which the specified cell or label spans.
 o getAllowCellResize()
Gets the table's AllowCellResize value.
 o getBounds(int, int, Rectangle)
Gets the bounding rectangle of a cell or label.
 o getCallback(int)
Gets the callback object for the specified reason.
 o getCell(int, int)
This gets the value of a cell or label.
 o getCells()
Returns the internal cell values.
 o getColumnLabel(int)
This gets a column label.
 o getColumnLabelOffset()
Gets the table's ColumnLabelOffset value.
 o getColumnLabelPlacement()
Gets the table's ColumnLabelPlacement value.
 o getColumnLabels()
Gets the table's ColumnLabels value.
 o getColumnLabelSort()
Gets the table's ColumnLabelSort value.
 o getComponent(int, int)
Locates the component currently displayed in the cell, and returns null if there is no component in the cell or if the component is not currently displayed.
 o getCurrentCell()
Determines the cell being edited.
 o getDisplayClipArrows()
Gets the table's DisplayClipArrows value.
 o getDoubleBuffer()
Gets the table's DoubleBuffer value.
 o getEditable(int, int)
Returns the editable value for a cell.
 o getFrameBorderType()
Gets the table's FrameBorderType value.
 o getFrameShadowThickness()
Gets the table's FrameShadowThickness value.
 o getFrozenColumnPlacement()
Gets the table's FrozenColumnPlacement value.
 o getFrozenColumns()
Gets the table's FrozenColumns value.
 o getFrozenRowPlacement()
Gets the table's FrozenRowPlacement value.
 o getFrozenRows()
Gets the table's FrozenRows value.
 o getHorizSBAttachment()
Gets the table's HorizSBAttachment value.
 o getHorizSBDisplay()
Gets the table's HorizSBDisplay value.
 o getHorizSBOffset()
Gets the table's HorizSBOffset value.
 o getHorizSBPosition()
Gets the table's HorizSBPosition value.
 o getJumpScroll()
Gets the table's JumpScroll value.
 o getLeftColumn()
Gets the table's LeftColumn value.
 o getMarginHeight()
Gets the table's MarginHeight value.
 o getMarginWidth()
Gets the table's MarginWidth value.
 o getMaxLength(int, int)
Returns the maxLength value for a cell.
 o getMinCellVisibility()
Gets the table's MinCellVisibility value.
 o getMode()
Gets the table's Mode value.
 o getMultiline(int, int)
Returns the multiline value for a cell.
 o getNumColumns()
Gets the table's NumColumns value.
 o getNumRows()
Gets the table's NumRows value.
 o getParameters(Applet)
Reads the parameter values from the HTML page using the specified applet.
 o getParameters(Applet, String)
Reads the parameter values from the file.
 o getPosition(Component, JCCellPosition)
Finds the location of any component set in a cell/label.
 o getRepaint()
Gets the table's Repaint value.
 o getRepeatBackgroundColors()
Gets the table's RepeatBackgroundColors value.
 o getRepeatForegroundColors()
Gets the table's RepeatForegroundColors value.
 o getRowLabel(int)
This gets a row label.
 o getRowLabelOffset()
Gets the table's RowLabelOffset value.
 o getRowLabelPlacement()
Gets the table's RowLabelPlacement value.
 o getRowLabels()
Gets the table's RowLabels value.
 o getSelectedBackground()
Gets the table's SelectedBackground value.
 o getSelectedCells()
Gets the table's SelectedCells value.
 o getSelectedForeground()
Gets the table's SelectedForeground value.
 o getSelectedRange(int, JCCellRange)
Retrieves a currently-selected range from the SelectedCellList.
 o getSelectionPolicy()
Gets the table's SelectionPolicy value.
 o getShadowThickness()
Gets the table's ShadowThickness value.
 o getSpans()
Gets the table's Spans value.
 o getStringCase(int, int)
Returns the stringCase value for a cell.
 o getTextComponent()
Returns the currently displayed Text component.
 o getTopRow()
Gets the table's TopRow value.
 o getTrackCursor()
Gets the table's TrackCursor value.
 o getTraversable(int, int)
Returns the traversable value for a cell.
 o getUserdata(int, int)
Returns the userdata object for a cell or label.
 o getValidatePolicy()
Gets the table's ValidatePolicy value.
 o getVertSBAttachment()
Gets the table's VertSBAttachment value.
 o getVertSBDisplay()
Gets the table's VertSBDisplay value.
 o getVertSBOffset()
Gets the table's VertSBOffset value.
 o getVertSBPosition()
Gets the table's VertSBPosition value.
 o getVisibleColumns()
Gets the table's VisibleColumns value.
 o getVisibleRows()
Gets the table's VisibleRows value.
 o hasCallback(int)
Returns true if a callback has been registered for the specified reason.
 o isCell(int, int)
If key is LEFT, RIGHT, DOWN, UP, TAB, or SHIFT-TAB, the adjacent cell is traversed to.
 o isColumnLabel(int, int)
This returns true if the row and column constitute a valid column label.
 o isLabel(int, int)
This returns true if the row and column constitute a valid label.
 o isRowLabel(int, int)
This returns true if the row and column constitute a valid row label.
 o isSelected(int, int)
Determines whether the cell is selected.
 o isTraversable(int, int)
Returns true if the cell can be traversed to -- in other words, if its traverse property is true, and is not spanned by another cell.
 o isVisible(int, int)
This checks whether a cell is visible.
 o keyDown(Event, int)
If key is PGDN or PGUP, the table is scrolled.
 o makeColumnVisible(int)
This scrolls a column so it is visible on the screen.
 o makeRowVisible(int)
This scrolls a row so it is visible on the screen.
 o makeVisible(int, int)
This scrolls a frozen or non-frozen cell or label so it is visible on the screen.
 o mouseExit(Event, int, int)
This tracks the cursor if TrackCursor is true.
 o mouseDown(Event, int, int)
If the SHIFT key or CONTROL key is pressed, a new range is selected.
 o mouseDrag(Event, int, int)
Resizes a cell or selects it.
 o mouseMove(Event, int, int)
This tracks the cursor if TrackCursor is true.
 o mouseUp(Event, int, int)
Resizes a cell or selects it.
 o moveColumns(int, int, int)
Moves a range of columns.
 o moveRows(int, int, int)
Moves a range of rows.
 o preferredSize()
Returns the preferred size of the component.
 o setAlignment(int, int, int)
Sets the alignment of cell/label text and/or image.
 o setAllowCellResize(int)
Sets how an end-user can interactively resize rows/columns.
 o setBackground(int, int, Color)
Sets the background color of cells and labels.
 o setBackground(int, int, int)
Allows the background color of a cell or label to be set to JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.
 o setBorderSides(int, int, int)
Sets the sides of a cell or label that display the border type in their border area.
 o setBorderType(int, int, int)
Sets the style used for cell and label borders.
 o setCallback(int, JCTblCallback)
Sets the callback object for the specified reason.
 o setCell(int, int, Object)
Sets the value of a cell or label.
 o setCells(String[][])
Sets the cell values as a matrix of Strings. To remove all values, call clearCells().
 o setCells(Vector)
Sets the cell values as a Vector of Vectors.
 o setCharHeight(int, int)
Sets the number of lines of text that a row can display (default: 1).
 o setCharWidth(int, int)
Sets the number of characters that a column can display (default: 10).
 o setColumnLabel(int, Object)
Sets a column label.
 o setColumnLabelOffset(int)
Sets the spacing between the column labels and the cell area in pixels (default: 0).
 o setColumnLabelPlacement(int)
Sets the position of the column labels relative to the cells.
 o setColumnLabels(String[])
Sets the column labels as an array of Strings.
 o setColumnLabels(Vector)
Sets the column labels as a Vector.
 o setColumnLabelSort(boolean)
Specifies whether or not a column is sorted when its label is clicked (default: false).
 o setComponent(int, int, Component)
Sets the component for a cell or label.
 o setDatatype(int, int, int)
Sets the data type of a cell/label value.
 o setDisplayClipArrows(boolean)
Sets whether or not to display clipping arrows when a cell/label value cannot be fully displayed in its cell/label (default: true).
 o setDoubleBuffer(boolean)
Controls whether or not double-buffering is used when displaying and updating the table.
 o setEditable(int, int, boolean)
Sets whether cell values can be changed by an end-user (default: true).
 o setFont(int, int, Font)
Sets the font to be used to display cell and/or label values.
 o setForeground(int, int, Color)
Sets the foreground color (the text color) of cells and labels.
 o setForeground(int, int, int)
Allows the foreground color of a cell or label to be set to JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.
 o setFrameBorderType(int)
Sets the type of border for the frame surrounding the cell and label areas (default: JCTblEnum.BORDER_IN).
 o setFrameShadowThickness(int)
Sets the thickness of the frame shadows surrounding the cell and label areas (default: 0).
 o setFrozenColumnPlacement(int)
Sets the location of all frozen columns within the component display.
 o setFrozenColumns(int)
Sets the number of columns from the start of the table that are not horizontally scrollable (default: 0).
 o setFrozenRowPlacement(int)
Sets the location of all frozen rows.
 o setFrozenRows(int)
Sets the number of rows from the start of the table that are not vertically scrollable (default: 0).
 o setHorizSBAttachment(int)
Sets how the end of the horizontal scrollbar is attached to the table.
 o setHorizSBDisplay(int)
Sets when to display the horizontal scrollbar.
 o setHorizSBOffset(int)
Sets the distance between the horizontal scrollbar and the table (default: 6).
 o setHorizSBPosition(int)
Sets how the horizontal scrollbar is attached to the table.
 o setJumpScroll(int)
Sets the scrolling behavior of each scrollbar.
 o setLeftColumn(int)
Sets the non-frozen column at least partially visible at the left side of the window.
 o setMarginHeight(int)
Sets the distance (in pixels) between the inside edge of the cell border and the top and bottom edge of the cell's contents (default: 2).
 o setMarginWidth(int)
Sets the distance (in pixels) between the inside edge of the cell border and the left/right edge of the cell's contents (default: 5).
 o setMaxLength(int, int, int)
Sets the maximum number of characters that can be entered in a cell by a user (default: MAXINT).
 o setMinCellVisibility(int)
Sets the minimum amount of a cell that is made visible when edited.
 o setMode(int)
Sets the display mode.
         JCTblEnum.MODE_LIST            list operation
         JCTblEnum.MODE_TABLE           table operates normally

When this property is set to MODE_LIST, selecting a cell causes all cells in the row to be selected.

 o setMultiline(int, int, boolean)
Sets whether or not a user can enter multiple lines of text into a cell (that is, whether the Text component's editMode property is set to MULTI_LINE_EDIT) (default: false).
 o setNumColumns(int)
Sets the current number of columns in the table (default: 5).
 o setNumRows(int)
Sets the current number of rows in the table (default: 10).
 o setPixelHeight(int, int)
Sets a row height in pixels.
 o setPixelWidth(int, int)
Sets a column width in pixels.
 o setRepaint(boolean)
Sets whether the table should be redrawn and recomputed whenever one of its properties is set (default: true).
 o setRepeatBackgroundColors(Color[])
An array of colors to be used when a Background value is JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.
 o setRepeatForegroundColors(Color[])
An array of colors to be used when a Foreground value is JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.
 o setRowLabel(int, Object)
Sets a row label.
 o setRowLabelOffset(int)
Sets the spacing between the row labels and the cell area in pixels (default: 0).
 o setRowLabelPlacement(int)
Sets the position of the row labels relative to the cells.
 o setRowLabels(String[])
Sets the row labels as an array of Strings.
 o setRowLabels(Vector)
Sets the row labels as a Vector.
 o setSelectedBackground(Color)
Sets the background color of selected cells (default: cell's foreground color).
 o setSelectedCells(JCCellRange)
Sets a range of selected cells.
 o setSelectedCells(Vector)
Sets an array of currently-selected ranges of cells.
 o setSelectedForeground(Color)
Sets the foreground color of selected cells (default: cell's background color).
 o setSelectionPolicy(int)
Sets the selection behavior allowed on the table, both by end-users, and by the application.
 o setShadowThickness(int)
Sets the thickness of the shadows surrounding each cell and label (default: 1).
 o setSpans(Vector)
Sets an array of currently-spanned ranges of cells or labels.
 o setStringCase(int, int, int)
Sets the case of cell values of cells edited by the user.
 o setTopRow(int)
Sets the non-frozen row at least partially visible at the top of the window.
 o setTrackCursor(boolean)
Sets whether the mouse pointer should be tracked as a user moves the mouse across the table.
 o setTraversable(int, int, boolean)
Sets whether the cell can be traversed to (default: true).
 o setUserdata(int, int, Object)
Sets a user data object that the application can attach.
 o setValidatePolicy(int)
Sets when to validate changes to cell or label values against its data type (specified by DataType).
 o setVertSBAttachment(int)
Sets the attachment of the vertical scrollbar to the table.
 o setVertSBDisplay(int)
Sets when to display the vertical scrollbar.
 o setVertSBOffset(int)
Sets the distance between the vertical scrollbar and the table (default: 6).
 o setVertSBPosition(int)
Sets attachment of the horizontal scrollbar to the table.
 o setVisibleColumns(int)
Sets the number of columns currently visible or partially visible.
 o setVisibleRows(int)
Sets the number of rows currently visible or partially visible.
 o sortByColumn(int, JCSortInterface)
Sorts the rows in the table based on a specified column, using the String equivalents of cell values.
 o traverse(int, int, boolean, boolean)
Attempts to move the current cell focus to a new location.

Constructors

 o JCTable

  public JCTable()
Creates a table. No parameters are read from a HTML file.

 o JCTable

  public JCTable(Applet applet,
                 String name)
Creates a table which reads parameters from the applet's HTML file.
Parameters:
applet - applet whose PARAM tags are to be read
name - if not null, only the parameters preceded by this name are read
See Also:
getParameter

Methods

 o getCallback

  public JCTblCallback getCallback(int reason)
Gets the callback object for the specified reason.
Returns:
null if no callback has been registered
See Also:
JCTblCallback, setCallback

 o hasCallback

  public boolean hasCallback(int reason)
Returns true if a callback has been registered for the specified reason.
Returns:
false if no callback has been registered
See Also:
JCTblCallback, setCallback

 o isCell

  public static boolean isCell(int row,
                               int col)
This returns true if the row and column constitute a valid cell.

 o isLabel

  public static boolean isLabel(int row,
                                int col)
This returns true if the row and column constitute a valid label.

 o isColumnLabel

  public static boolean isColumnLabel(int row,
                                      int col)
This returns true if the row and column constitute a valid column label.

 o isRowLabel

  public static boolean isRowLabel(int row,
                                   int col)
This returns true if the row and column constitute a valid row label.

 o setCallback

  public void setCallback(int reason,
                          JCTblCallback cb)
Sets the callback object for the specified reason. The callback object must implement the JCTblCallback interface.
Parameters:
reason - one of the JCTblCallback reasons
cb - the callback instance; if null, any previously registered callback is removed.
See Also:
JCTblCallback

 o getAllowCellResize

  public int getAllowCellResize()
Gets the table's AllowCellResize value.
See Also:
setAllowCellResize

 o setAllowCellResize

  public void setAllowCellResize(int v)
Sets how an end-user can interactively resize rows/columns. Valid values are:

 o getDisplayClipArrows

  public boolean getDisplayClipArrows()
Gets the table's DisplayClipArrows value.
See Also:
setDisplayClipArrows

 o setDisplayClipArrows

  public void setDisplayClipArrows(boolean v)
Sets whether or not to display clipping arrows when a cell/label value cannot be fully displayed in its cell/label (default: true). Clipping arrows appear at the bottom-right corner of a cell/label.

 o getDoubleBuffer

  public boolean getDoubleBuffer()
Gets the table's DoubleBuffer value.
See Also:
setDoubleBuffer

 o setDoubleBuffer

  public void setDoubleBuffer(boolean v)
Controls whether or not double-buffering is used when displaying and updating the table.

 o getFrameBorderType

  public int getFrameBorderType()
Gets the table's FrameBorderType value.
See Also:
setFrameBorderType

 o setFrameBorderType

  public void setFrameBorderType(int v)
Sets the type of border for the frame surrounding the cell and label areas (default: JCTblEnum.BORDER_IN). Possible values are:

FrameShadowThickness must be set for the border to be visible.

See Also:
setFrameShadowThickness

 o getFrameShadowThickness

  public int getFrameShadowThickness()
Gets the table's FrameShadowThickness value.
See Also:
setFrameShadowThickness

 o setFrameShadowThickness

  public void setFrameShadowThickness(int v)
Sets the thickness of the frame shadows surrounding the cell and label areas (default: 0).
See Also:
setFrameBorderType

 o getFrozenColumnPlacement

  public int getFrozenColumnPlacement()
Gets the table's FrozenColumnPlacement value.
See Also:
setFrozenColumnPlacement

 o setFrozenColumnPlacement

  public void setFrozenColumnPlacement(int v)
Sets the location of all frozen columns within the component display. Changing the placement of frozen columns does not change the location of the columns in the table's internal CellValues: JCTblEnum.PLACE_LEFT or JCTblEnum.PLACE_RIGHT.

 o getFrozenColumns

  public int getFrozenColumns()
Gets the table's FrozenColumns value.
See Also:
setFrozenColumns

 o setFrozenColumns

  public void setFrozenColumns(int v)
Sets the number of columns from the start of the table that are not horizontally scrollable (default: 0). Placement of the frozen columns on the screen is specified by FrozenColumnPlacement.

 o getFrozenRowPlacement

  public int getFrozenRowPlacement()
Gets the table's FrozenRowPlacement value.
See Also:
setFrozenRowPlacement

 o setFrozenRowPlacement

  public void setFrozenRowPlacement(int v)
Sets the location of all frozen rows. Changing the placement of frozen rows does not change the location of the rows in the table's internal CellValues. Valid values are JCTblEnum.PLACE_TOP and JCTblEnum.PLACE_BOTTOM.

 o getFrozenRows

  public int getFrozenRows()
Gets the table's FrozenRows value.
See Also:
setFrozenRows

 o setFrozenRows

  public void setFrozenRows(int v)
Sets the number of rows from the start of the table that are not vertically scrollable (default: 0). Placement of the frozen rows on the screen is specified by FrozenRowPlacement.

 o getJumpScroll

  public int getJumpScroll()
Gets the table's JumpScroll value.
See Also:
setJumpScroll

 o setJumpScroll

  public void setJumpScroll(int v)
Sets the scrolling behavior of each scrollbar. Scrollbars can either scroll smoothly or "jump" scroll in whole row/column increments. When set to JCTblEnum.JUMP_NONE, both scrollbars will scroll smoothly. When set to JCTblEnum.JUMP_HORIZONTAL, the horizontal scrollbar jump scrolls. When set to JCTblEnum.JUMP_VERTICAL, the vertical scrollbar jump scrolls. When set to JCTblEnum.JUMP_ALL, both scrollbars jump scroll.

 o getLeftColumn

  public int getLeftColumn()
Gets the table's LeftColumn value.
See Also:
setLeftColumn

 o setLeftColumn

  public void setLeftColumn(int v)
Sets the non-frozen column at least partially visible at the left side of the window. This value is updated as a user scrolls through a table. When set, the table scrolls to display the column at the left side of the window. This value is always larger or equal to the number of frozen columns.

 o getMarginHeight

  public int getMarginHeight()
Gets the table's MarginHeight value.
See Also:
setMarginHeight

 o setMarginHeight

  public void setMarginHeight(int v)
Sets the distance (in pixels) between the inside edge of the cell border and the top and bottom edge of the cell's contents (default: 2).

 o getMarginWidth

  public int getMarginWidth()
Gets the table's MarginWidth value.
See Also:
setMarginWidth

 o setMarginWidth

  public void setMarginWidth(int v)
Sets the distance (in pixels) between the inside edge of the cell border and the left/right edge of the cell's contents (default: 5). This property affects the entire table.

 o getHorizSBAttachment

  public int getHorizSBAttachment()
Gets the table's HorizSBAttachment value.
See Also:
setHorizSBAttachment

 o setHorizSBAttachment

  public void setHorizSBAttachment(int v)
Sets how the end of the horizontal scrollbar is attached to the table. When set to JCTblEnum.ATTACH_CELLS (default), the scrollbar ends at the edge of the visible cells. When set to JCTblEnum.ATTACH_SIDE, the scrollbar ends at the edge of the table.

 o getHorizSBPosition

  public int getHorizSBPosition()
Gets the table's HorizSBPosition value.
See Also:
setHorizSBPosition

 o setHorizSBPosition

  public void setHorizSBPosition(int v)
Sets how the horizontal scrollbar is attached to the table. When set to JCTblEnum.SBPOSITION_CELLS (default), the scrollbar is attached to the cell/label viewport. When set to JCTblEnum.SBPOSITION_SIDE, the scrollbar is attached to the side of the table.

 o getHorizSBOffset

  public int getHorizSBOffset()
Gets the table's HorizSBOffset value.
See Also:
setHorizSBOffset

 o setHorizSBOffset

  public void setHorizSBOffset(int v)
Sets the distance between the horizontal scrollbar and the table (default: 6).

 o getHorizSBDisplay

  public int getHorizSBDisplay()
Gets the table's HorizSBDisplay value.
See Also:
setHorizSBDisplay

 o setHorizSBDisplay

  public void setHorizSBDisplay(int v)
Sets when to display the horizontal scrollbar. Valid values are:
        JCTblEnum.SBDISPLAY_ALWAYS     always displayed
        JCTblEnum.SBDISPLAY_NEVER      never displayed
        JCTblEnum.SBDISPLAY_AS_NEEDED  displayed when the rows or columns are not visible

 o getVertSBAttachment

  public int getVertSBAttachment()
Gets the table's VertSBAttachment value.
See Also:
setVertSBAttachment

 o setVertSBAttachment

  public void setVertSBAttachment(int v)
Sets the attachment of the vertical scrollbar to the table. When set to JCTblEnum.ATTACH_CELLS (default), the scrollbar ends at the edge of the visible cells. When set to JCTblEnum.ATTACH_SIDE, the scrollbar ends at the edge of the table.

 o getVertSBPosition

  public int getVertSBPosition()
Gets the table's VertSBPosition value.
See Also:
setVertSBPosition

 o setVertSBPosition

  public void setVertSBPosition(int v)
Sets attachment of the horizontal scrollbar to the table. When set to JCTblEnum.SBPOSITION_CELLS (default), the scrollbar is attached to the cell/label viewport. When set to JCTblEnum.SBPOSITION_SIDE, the scrollbar is attached to the side of the table.

 o getVertSBOffset

  public int getVertSBOffset()
Gets the table's VertSBOffset value.
See Also:
setVertSBOffset

 o setVertSBOffset

  public void setVertSBOffset(int v)
Sets the distance between the vertical scrollbar and the table (default: 6).

 o getVertSBDisplay

  public int getVertSBDisplay()
Gets the table's VertSBDisplay value.
See Also:
setVertSBDisplay

 o setVertSBDisplay

  public void setVertSBDisplay(int v)
Sets when to display the vertical scrollbar. Valid values are:
            JCTblEnum.SBDISPLAY_ALWAYS     always displayed
            JCTblEnum.SBDISPLAY_NEVER      never displayed
            JCTblEnum.SBDISPLAY_AS_NEEDED  displayed when the rows or columns are not visible

 o getMinCellVisibility

  public int getMinCellVisibility()
Gets the table's MinCellVisibility value.
See Also:
setMinCellVisibility

 o setMinCellVisibility

  public void setMinCellVisibility(int v)
Sets the minimum amount of a cell that is made visible when edited. When the table scrolls to edit a non-visible cell, this property determines the percentage of the cell scrolled into view. When set to 100, the cell is made completely visible. When set to 10, only 10% of the cell is made visible. If set to 0, the cell will not scroll to be made visible. This property affects the behavior of makeVisible().

 o getMode

  public int getMode()
Gets the table's Mode value.
See Also:
setMode

 o setMode

  public void setMode(int v)
Sets the display mode.
         JCTblEnum.MODE_LIST            list operation
         JCTblEnum.MODE_TABLE           table operates normally

When this property is set to MODE_LIST, selecting a cell causes all cells in the row to be selected. In addition, the following resources are set:

The SelectionPolicy value controls whether users are allowed to select single rows, a range of rows, or multiple ranges of rows.

See Also:
setHorizSBAttachment, setHorizSBPosition, setSelectionPolicy, setShadowThickness, setTraversable, setVertSBAttachment, setVertSBPosition

 o getNumColumns

  public int getNumColumns()
Gets the table's NumColumns value.
See Also:
setNumColumns

 o setNumColumns

  public void setNumColumns(int v)
Sets the current number of columns in the table (default: 5). This value does not affect the table's internal CellValues vector. JCTable.addColumn() and JCTable.deleteColumns() update this property by the number of columns added/deleted. If set to zero, no cells are displayed.

 o getNumRows

  public int getNumRows()
Gets the table's NumRows value.
See Also:
setNumRows

 o setNumRows

  public void setNumRows(int v)
Sets the current number of rows in the table (default: 10). This value does not affect the table's internal CellValues vector. JCTable.addRow() and JCTable.deleteRow() update this property by the number of rows added/deleted. If set to zero, no cells are displayed.

 o getParameters

  public void getParameters(Applet applet)
Reads the parameter values from the HTML page using the specified applet. The values will override those previously set.
See Also:
getParameter

 o getParameters

  public void getParameters(Applet applet,
                            String file)
Reads the parameter values from the file. The values will override those previously set.
Parameters:
applet - if not null and in a browser, its documentBase() is used to construct a complete filename if necessary.
file - if an http protocol is not specified (if a ":" is not present), the current working directory is used.

 o getRepaint

  public boolean getRepaint()
Gets the table's Repaint value.
See Also:
setRepaint

 o setRepaint

  public void setRepaint(boolean v)
Sets whether the table should be redrawn and recomputed whenever one of its properties is set (default: true). If false, setting a property will have no effect until repaint is switched to true.

 o getRepeatBackgroundColors

  public Color[] getRepeatBackgroundColors()
Gets the table's RepeatBackgroundColors value.
See Also:
setRepeatBackgroundColors

 o setRepeatBackgroundColors

  public void setRepeatBackgroundColors(Color v[])
An array of colors to be used when a Background value is JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.

 o getRepeatForegroundColors

  public Color[] getRepeatForegroundColors()
Gets the table's RepeatForegroundColors value.
See Also:
setRepeatForegroundColors

 o setRepeatForegroundColors

  public void setRepeatForegroundColors(Color v[])
An array of colors to be used when a Foreground value is JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN.

 o getSelectedBackground

  public Color getSelectedBackground()
Gets the table's SelectedBackground value.
See Also:
setSelectedBackground

 o setSelectedBackground

  public void setSelectedBackground(Color v)
Sets the background color of selected cells (default: cell's foreground color). When set to null, selected cells look identical to unselected cells - the background and foreground colors are the same as the colors defined for the cells (Foreground and Background).

 o getSelectedCells

  public Vector getSelectedCells()
Gets the table's SelectedCells value.
See Also:
setSelectedCells

 o clearSelectedCells

  public void clearSelectedCells()
All selected cells are unselected.
See Also:
setSelectedCells

 o setSelectedCells

  public void setSelectedCells(Vector v)
Sets an array of currently-selected ranges of cells. Each element of the vector is an instance of a JCCellRange. This value is updated dynamically as a user selects cells. The selection policy controls the amount of selection allowed on the table, both by users and by the application. Users can select in any direction, so start_row and/or start_column may be greater than end_row and/or end_column. When a user clicks a row/column label to select an entire row or column, end_row or end_column are set to MAXINT.

Use JCTable.getSelectedRange() to conveniently retrieve one range from the selected range list.

To unselect all cells, call clearSelectedCells.

See Also:
getSelectedRange, JCCellRange, clearSelectedCells

 o setSelectedCells

  public void setSelectedCells(JCCellRange r)
Sets a range of selected cells. To unselect all cells, call clearSelectedCells.
See Also:
clearSelectedCells

 o getSelectedForeground

  public Color getSelectedForeground()
Gets the table's SelectedForeground value.
See Also:
setSelectedForeground

 o setSelectedForeground

  public void setSelectedForeground(Color v)
Sets the foreground color of selected cells (default: cell's background color). If set to null when SelectedBackground is not null, the foreground of selected cells is the same as the foreground colors defined for the cells (Foreground). This value is ignored when SelectedBackground is set to null.

 o getSelectedRange

  public boolean getSelectedRange(int pos,
                                  JCCellRange range)
Retrieves a currently-selected range from the SelectedCellList.
Parameters:
pos - this is the position within the selected cell list
range - this is the returned range, rationalized to read from top to bottom and from left to right. Special values such as MAXINT are converted to valid range values.
Returns:
false if no cells are selected, or any argument is invalid

 o getSelectionPolicy

  public int getSelectionPolicy()
Gets the table's SelectionPolicy value.
See Also:
setSelectionPolicy

 o setSelectionPolicy

  public void setSelectionPolicy(int v)
Sets the selection behavior allowed on the table, both by end-users, and by the application. Valid values are:
 JCTblEnum.SELECT_NONE          No selection is allowed
 JCTblEnum.SELECT_SINGLE        Selection of only one cell allowed
 JCTblEnum.SELECT_RANGE         Selection of only one range of cells allowed
 JCTblEnum.SELECT_MULTIRANGE    Selection of multiple ranges of cells allowed

When SelectionPolicy is set to JCTblEnum.SELECT_NONE, SELECT callbacks are not called as a user edits or attempts to select cells. Setting this property does not change the selected cell list.

 o getShadowThickness

  public int getShadowThickness()
Gets the table's ShadowThickness value.
See Also:
setShadowThickness

 o setShadowThickness

  public void setShadowThickness(int v)
Sets the thickness of the shadows surrounding each cell and label (default: 1).

 o getSpans

  public Vector getSpans()
Gets the table's Spans value.
See Also:
setSpans

 o setSpans

  public void setSpans(Vector v)
Sets an array of currently-spanned ranges of cells or labels. Each element of the vector is an instance of a JCCellRange. A spanned range is a range of cells or labels that appear joined and can be treated as one cell. The top-left cell (specified by the start_row and start_column members) is the source cell for the spanned range. The cell/label value and attributes of the source cell are displayed in the spanned cell. Attributes for the spanned range must be set on the source cell. A spanned range cannot include both cells and labels. There must also be more than one cell/label in a spanned range; when a single-cell range is specified, it is removed from the list.
See Also:
JCCellRange

 o getTopRow

  public int getTopRow()
Gets the table's TopRow value.
See Also:
setTopRow

 o setTopRow

  public void setTopRow(int v)
Sets the non-frozen row at least partially visible at the top of the window. This value is updated as a user scrolls through a table. When set, the table scrolls to display the row at the top of the window.

 o getTrackCursor

  public boolean getTrackCursor()
Gets the table's TrackCursor value.
See Also:
setTrackCursor

 o setTrackCursor

  public void setTrackCursor(boolean v)
Sets whether the mouse pointer should be tracked as a user moves the mouse across the table. When true, JCTable tracks the mouse pointer and changes its shape to reflect the interactions available to the user at location. When set to false, the table uses the application-defined pointer.

 o getValidatePolicy

  public int getValidatePolicy()
Gets the table's ValidatePolicy value.
See Also:
setValidatePolicy

 o setValidatePolicy

  public void setValidatePolicy(int v)
Sets when to validate changes to cell or label values against its data type (specified by DataType). When set to JCTblEnum.VALIDATE_USER_EDIT, only changes made by a user are validated. When set to JCTblEnum.VALIDATE_SET, only changes made by an application are validated. When set to JCTblEnum.VALIDATE_ALWAYS, changes made by both a user and an application are validated. When set to JCTblEnum.VALIDATE_NEVER, changes are never validated.

 o getVisibleColumns

  public int getVisibleColumns()
Gets the table's VisibleColumns value.
See Also:
setVisibleColumns

 o setVisibleColumns

  public void setVisibleColumns(int v)
Sets the number of columns currently visible or partially visible. This value is updated when a user interactively resizes columns or the table. When set, the table attempts to resize to display the specified number of columns. Setting this property to JCTblEnum.NOVALUE causes the table to attempt to resize to make all columns visible, and sets VisibleColumns equal to NumColumns (this happens also when creating the component if this value is defaulted). If set to greater than NumColumns, a theoretical value is calculated based on 10-character columns.

 o getVisibleRows

  public int getVisibleRows()
Gets the table's VisibleRows value.
See Also:
setVisibleRows

 o setVisibleRows

  public void setVisibleRows(int v)
Sets the number of rows currently visible or partially visible. This value is updated when a user interactively resizes rows or the table. When set, the table attempts to resize to display the specified number of rows. Setting this property to JCTblEnum.NOVALUE causes the table to attempt to resize to make all rows visible, and sets VisibleRows equal to NumRows (this happens also when creating the component if this value is defaulted). If set to greater than NumRows, a theoretical value is calculated based on 1-line rows.

 o addColumn

  public boolean addColumn(int position,
                           Object label,
                           Vector values)
Inserts a new column into the table, shifting any cell values and attributes (such as background color) to the right of the insertion. The column labels will be shifted unless a LABEL_VALUE callback has been registered.
Parameters:
position - this is the column index before which to add the new column (if set to JCTblEnum.MAXINT, the column is added after the last column)
label - this is the column label (can be null)
values - an array of objects to be inserted (can be null)
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o addRow

  public boolean addRow(int position,
                        Object label,
                        Vector values)
Inserts a new row into the table, shifting any cell values and attributes (such as background color) below the insertion. The row labels will be shifted unless a LABEL_VALUE callback has been registered.
Parameters:
position - this is the row index before which to add the new row (if set to JCTblEnum.MAXINT, the row is added after the last row)
label - this is the row label (can be null)
values - an array of objects to be inserted (can be null)
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o cancelEdit

  public boolean cancelEdit(boolean hide)
Cancels interactive editing of a cell and, as an option, hides the Text component. Any text entered or changed in the current cell by a user is discarded.
Parameters:
hide - determines whether or not to hide the Text component
Returns:
false if no edit is in progress

 o commitEdit

  public boolean commitEdit(boolean hide)
Commits interactive cell editing internally, saving any changes made by the user. The VALIDATE_CELL callback is called first to verify that the changes are valid.
Parameters:
hide - determines whether to hide the Text component
Returns:
false if no edit is in progress
See Also:
VALIDATE_CELL

 o deleteColumns

  public boolean deleteColumns(int pos,
                               int num_columns)
Deletes columns from the table. The attributes (such as background color) of the remaining columns are unaffected by the deletion. The column labels will be shifted unless a LABEL_VALUE callback has been registered.
Parameters:
pos - this is the first column number to delete
num_columns - this is the number of columns to be deleted
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o deleteRows

  public boolean deleteRows(int pos,
                            int num_rows)
Deletes rows from the table. The attributes (such as background color) of the remaining rows are unaffected by the deletion. The row labels will be shifted unless a LABEL_VALUE callback has been registered.
Parameters:
pos - this is the first row number to delete
num_rows - this is the number of rows to be deleted
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o traverse

  public boolean traverse(int row,
                          int column,
                          boolean show_text,
                          boolean select)
Attempts to move the current cell focus to a new location. commitEdit() is first called to commit the edit in the current cell. If commitEdit() returns false, traverse() returns false and does not move the focus. Otherwise, traverse() attempts to traverse to the specified cell. If the cell is not traversable, the method returns false. The ENTER_CELL callback is called for the cell to notify the application. If traversing to a new cell, a 2-pixel black border is drawn inside the cell to indicate that it has focus. If traversing to the cell which currently has focus, a Text component is displayed on top of the cell, and an ENTER_CELL callback is called with the "stage" member set to END.
Parameters:
row,column - this is the index of the cell to be edited
show_text - if this is true, the Text component is displayed in the cell. getTextComponent can then be used to retrieve it. If false, then the cell is highlighted.
select - this determines whether the cell should be selected if SelectionPolicy is not NONE (i.e., whether the SELECT callback should be called)
Returns:
false if any argument is invalid
See Also:
ENTER_CELL, getTextComponent

 o getTextComponent

  public TextComponent getTextComponent()
Returns the currently displayed Text component. If no cell is being edited, null is returned.
See Also:
traverse

 o eventToCell

  public JCCellPosition eventToCell(Event event)
Determines the cell or label in which an event occurred.
Parameters:
event - the event to be processed
Returns:
null if the event was not within a cell or label

 o getCurrentCell

  public JCCellPosition getCurrentCell()
Determines the cell being edited.
Returns:
null if there is no current cell
See Also:
traverse

 o findSpan

  public int findSpan(int row,
                      int column,
                      JCCellRange range,
                      Dimension size)
Finds the first range which the specified cell or label spans. Otherwise, the first range which includes the specified cell is returned.
Parameters:
range - if not null, it contains the spanning cell
size - if not null, it contains the size of the spanned range
Returns:
the index within the span list, or JCTblEnum.NOTFOUND if no range was found
See Also:
setSpans

 o moveColumns

  public boolean moveColumns(int source,
                             int num_columns,
                             int destination)
Moves a range of columns. All attributes (such as the background color) move along with the columns. The column labels will be moved unless a LABEL_VALUE callback has been registered.
Parameters:
source - this is the first column in the range
num_columns - this is the number of columns to move
destination - this is the column number before which to insert the moved columns
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o moveRows

  public boolean moveRows(int source,
                          int num_rows,
                          int destination)
Moves a range of rows. All attributes (such as the background color) move along with the rows. The row labels will be shifted unless a LABEL_VALUE callback has been registered.
Parameters:
source - this is the first row in the range
num_rows - this is the number of rows to move
destination - this is the row number before which to insert the moved rows
shift_labels - this determines whether to move the row labels as well
Returns:
false if any argument is invalid
See Also:
LABEL_VALUE

 o makeVisible

  public boolean makeVisible(int row,
                             int col)
This scrolls a frozen or non-frozen cell or label so it is visible on the screen.
Returns:
false if an argument is invalid

 o makeColumnVisible

  public boolean makeColumnVisible(int column)
This scrolls a column so it is visible on the screen.
Returns:
false if the column is invalid

 o makeRowVisible

  public boolean makeRowVisible(int row)
This scrolls a row so it is visible on the screen.
Returns:
false if the row is invalid

 o isVisible

  public boolean isVisible(int row,
                           int col)
This checks whether a cell is visible.

 o getColumnLabel

  public Object getColumnLabel(int column)
This gets a column label. To get the AWT component currently in the label, call getComponent.
See Also:
getComponent

 o getRowLabel

  public Object getRowLabel(int row)
This gets a row label. To get the AWT component currently in the label, call getComponent.
See Also:
getComponent

 o getCell

  public Object getCell(int row,
                        int col)
This gets the value of a cell or label. To get the AWT component currently in the cell, call getComponent.
See Also:

getComponent

 o sortByColumn

  public boolean sortByColumn(int column,
                              JCSortInterface sort_if)
Sorts the rows in the table based on a specified column, using the String equivalents of cell values. It does not sort cell values supplied by the CELL_VALUE callback. Calling this method has no effect on the spanned ranges, cell properties or selected cells of the table, as only the values stored in the table are changed. After the table has been sorted, the SORT callback is called.
Parameters:
sort_if - An optional interface whose compare method is called during sorting, to provide a mechanism for the application to specify whether one object is greater than another (similar to qsort's compare function). If this parameter is null, the column is sorted by numerical or string comparison as applicable.
See Also:
JCSortInterface, CELL_VALUE, SORT

 o makeVisible

  public boolean makeVisible(int row,
                             int col)
This scrolls a frozen or non-frozen cell or label so it is visible on the screen.
Returns:

false if an argument is invalid

 o mouseDown

  public boolean mouseDown(Event event,
                           int x,
                           int y)
If the SHIFT key or CONTROL key is pressed, a new range is selected. If currently over an URL anchor, returns.

Otherwise, resizes a cell, traverses, sorts or selects.

See Also:
RESIZE_CELL, SELECT, SORT, TRAVERSE_CELL

 o mouseDrag

  public boolean mouseDrag(Event event,
                           int x,
                           int y)
Resizes a cell or selects it.
See Also:
RESIZE_CELL, SELECT

 o mouseExit

  public boolean mouseExit(Event event,
                           int x,
                           int y)
This tracks the cursor if TrackCursor is true.
Overrides:
mouseExit in class Component
See Also:

setTrackCursor

 o mouseMove

  public boolean mouseMove(Event event,
                           int x,
                           int y)
This tracks the cursor if TrackCursor is true.
Overrides:
mouseMove in class Component
See Also:

setTrackCursor

 o mouseUp

  public boolean mouseUp(Event event,
                         int x,
                         int y)
Resizes a cell or selects it. If the cursor is currently over an URL anchor, it displays it.
See Also:
RESIZE_CELL, SELECT

 o preferredSize

Overrides:
preferredSize in class Container

 o keyDown

  public boolean keyDown(Event ev,
                         int key)
If key is PGDN or PGUP, the table is scrolled.

If key is LEFT, RIGHT, DOWN, UP, TAB, or SHIFT-TAB, the adjacent cell is traversed to. If key is ESC, current resizing, selecting or editing is cancelled.

See Also:
RESIZE_CELL, SCROLL, SELECT, SORT, TRAVERSE_CELL, setMode

 o getBounds

  public boolean getBounds(int row,
                           int col,
                           Rectangle bounds)
Gets the bounding rectangle of a cell or label.
Parameters:
row,col - cell location
bounds - returned position and size
Returns:
false if cell or label does not exist

 o isSelected

  public boolean isSelected(int row,
                            int col)
Determines whether the cell is selected.

 o isTraversable

  public boolean isTraversable(int row,
                               int col)
Returns true if the cell can be traversed to -- in other words, if its traverse property is true, and is not spanned by another cell.
See Also:
setTraversable, setSpans

 o getColumnLabels

  public Vector getColumnLabels()
Gets the table's ColumnLabels value.
See Also:
setColumnLabels

 o getRowLabels

  public Vector getRowLabels()
Gets the table's RowLabels value.
See Also:
setRowLabels

 o getColumnLabelPlacement

  public int getColumnLabelPlacement()
Gets the table's ColumnLabelPlacement value.
See Also:
setColumnLabelPlacement

 o setColumnLabelPlacement

  public void setColumnLabelPlacement(int v)
Sets the position of the column labels relative to the cells. Valid values are JCTblEnum.PLACE_TOP (default) and JCTblEnum.PLACE_BOTTOM.

 o getColumnLabelSort

  public boolean getColumnLabelSort()
Gets the table's ColumnLabelSort value.
See Also:
setColumnLabelSort

 o setColumnLabelSort

  public void setColumnLabelSort(boolean v)
Specifies whether or not a column is sorted when its label is clicked (default: false). If true, sortByColumn() will be called, and the column will not be selected regardless of the value of SelectionPolicy.
See Also:
setSelectionPolicy, sortByColumn

 o getRowLabelOffset

  public int getRowLabelOffset()
Gets the table's RowLabelOffset value.
See Also:
setRowLabelOffset

 o setRowLabelOffset

  public void setRowLabelOffset(int v)
Sets the spacing between the row labels and the cell area in pixels (default: 0). If a negative value is specified, the labels will overlap the cell area.

 o getColumnLabelOffset

  public int getColumnLabelOffset()
Gets the table's ColumnLabelOffset value.
See Also:
setColumnLabelOffset

 o setColumnLabelOffset

  public void setColumnLabelOffset(int v)
Sets the spacing between the column labels and the cell area in pixels (default: 0). If a negative value is specified, the labels will overlap the cell area.

 o getRowLabelPlacement

  public int getRowLabelPlacement()
Gets the table's RowLabelPlacement value.
See Also:
setRowLabelPlacement

 o setRowLabelPlacement

  public void setRowLabelPlacement(int v)
Sets the position of the row labels relative to the cells. Valid values are JCTblEnum.PLACE_LEFT (default) and PLACE_RIGHT.

 o clearCells

  public void clearCells()
Sets clears the values of all cells by setting them to null.
See Also:
setCells

 o setCells

  public void setCells(String v[][])
Sets the cell values as a matrix of Strings.

To remove all values, call clearCells().

See Also:
clearCells

 o setCells

  public void setCells(Vector v)
Sets the cell values as a Vector of Vectors. Each element of the vector may be an instance of a String, JCString, Image, or other Object. If an Object, the instance's toString() method is used to get a text representation for display.

To remove all values, call clearCells.

To set an AWT component in a cell, call setComponent

See Also:
setComponent, clearCells

 o getCells

  public JCVector getCells()
Returns the internal cell values.
See Also:
setCells

 o setColumnLabels

  public void setColumnLabels(Vector labels)
Sets the column labels as a Vector. Each element of the vector may be an instance of a String, JCString, Image, Component or other Object. If an Object, the instance's toString() method will be used to get a text representation for display. To clear the labels, call this method with a null argument.

 o setColumnLabels

  public void setColumnLabels(String labels[])
Sets the column labels as an array of Strings.

 o setColumnLabel

  public void setColumnLabel(int column,
                             Object v)
Sets a column label. The element may be an instance of a String, JCString, Image, Component or other Object. If an Object, the instance's toString() method will be used to get a text representation for display. To clear the label, call this method with a null argument.

 o setRowLabels

  public void setRowLabels(Vector labels)
Sets the row labels as a Vector. Each element of the vector may be an instance of a String, JCString, Image, Component or other Object. If an Object, the instance's toString() method will be used to get a text representation for display. To clear the labels, call this method with a null argument.

 o setRowLabels

  public void setRowLabels(String labels[])
Sets the row labels as an array of Strings.

 o setRowLabel

  public void setRowLabel(int row,
                          Object v)
Sets a row label. The element may be an instance of a String, JCString, Image, Component or other Object. If an Object, the instance's toString() method will be used to get a text representation for display. To clear the label, call this method with a null argument.

 o setCell

  public void setCell(int row,
                      int col,
                      Object v)
Sets the value of a cell or label.

 o setAlignment

  public void setAlignment(int row,
                           int col,
                           int v)
Sets the alignment of cell/label text and/or image. Valid values are: JCTblEnum.TOPLEFT, JCTblEnum.TOPCENTER, JCTblEnum.TOPRIGHT, JCTblEnum.MIDDLELEFT, JCTblEnum.MIDDLECENTER, JCTblEnum.MIDDLERIGHT, JCTblEnum.BOTTOMLEFT, JCTblEnum.BOTTOMCENTER and JCTblEnum.BOTTOMRIGHT

 o setBackground

  public void setBackground(int row,
                            int col,
                            Color v)
Sets the background color of cells and labels. When set to null the color is inherited from Component's background value.

 o setBackground

  public void setBackground(int row,
                            int col,
                            int v)
Allows the background color of a cell or label to be set to JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN. The color is then taken from the list specified by RepeatBackgroundColors, repeating in row or column order.
See Also:
setRepeatBackgroundColors

 o setBorderSides

  public void setBorderSides(int row,
                             int col,
                             int v)
Sets the sides of a cell or label that display the border type in their border area. The value is a bitwise OR of the following: JCTblEnum.BORDERSIDE_NONE, JCTblEnum.BORDERSIDE_ALL, JCTblEnum.BORDERSIDE_LEFT, JCTblEnum.BORDERSIDE_RIGHT, JCTblEnum.BORDERSIDE_TOP, JCTblEnum.BORDERSIDE_BOTTOM The width of all cell/label borders is specified by ShadowThickness.

 o setBorderType

  public void setBorderType(int row,
                            int col,
                            int v)
Sets the style used for cell and label borders. Valid values are:
 JCTblEnum.BORDER_ETCHED_IN        double line; cell appears inset
 JCTblEnum.BORDER_ETCHED_OUT       double line; cell appears raised
 JCTblEnum.BORDER_FRAME_IN         1-pixel shadow-in at edge; cell appears framed
 JCTblEnum.BORDER_FRAME_OUT        1-pixel shadow-out at edge; cell appears framed
 JCTblEnum.BORDER_IN               cell appears inset
 JCTblEnum.BORDER_OUT              cell appears raised
 JCTblEnum.BORDER_PLAIN            shadow drawn in foreground color
 JCTblEnum.BORDER_NONE             no border

The width of all cell/label borders is specified by ShadowThickness. ShadowThickness must be greater than 5 pixels to see the effects of the ETCHED and FRAME borders.

See Also:
setShadowThickness

 o setCharHeight

  public void setCharHeight(int row,
                            int v)
Sets the number of lines of text that a row can display (default: 1). Multi-line cell values that do not fit in a cell or label are clipped. This property controls the height only if pixelHeight is JCTblEnum.NOVALUE. This property works best with lists that use fixed-width fonts. When a user interactively resizes a row, this property is overridden by the pixel height. pixelHeight updates to specify the pixel height of the user-resized row.
Parameters:
row - row whose height is to be set. This may be a specific row, JCTblEnum.LABEL (set height of column labels), or ALL (set height of all rows).
See Also:
setPixelHeight

 o setCharWidth

  public void setCharWidth(int col,
                           int v)
Sets the number of characters that a column can display (default: 10). Cell values that do not fit in a cell or label are clipped. This property controls the width only if PixelWidth is JCTblEnum.NOVALUE. This property works best with lists that use fixed-width fonts. When a user interactively resizes a column, this property is overridden by the pixelWidth. pixelWidth updates to specify the pixel width of the user-resized column.
Parameters:
col - column whose width is to be set. This may be a specific column, JCTblEnum.LABEL (set width of row labels), or ALL (set width of all columns).
See Also:
setPixelWidth

 o getComponent

  public Component getComponent(int row,
                                int col)
Locates the component currently displayed in the cell, and returns null if there is no component in the cell or if the component is not currently displayed.
Parameters:
row,col - the cell or label position to be found
See Also:
setComponent

 o getPosition

  public JCCellPosition getPosition(Component component,
                                    JCCellPosition pos)
Finds the location of any component set in a cell/label.
Parameters:
component - the component whose location is to be found, which may be a child of a component in a cell.
pos - the object to be used to return the position, or null
Returns:
if pos is null, the position is returned; otherwise null. If the component is not currently displayed, pos.row will be set to JCTblEnum.NOVALUE (if pos is not null) and null is returned.
See Also:
setComponent

 o setComponent

  public void setComponent(int row,
                           int col,
                           Component comp)
Sets the component for a cell or label.

 o setDatatype

  public void setDatatype(int row,
                          int col,
                          int v)
Sets the data type of a cell/label value. When set, this property affects cell and/or label value changes from that point on. Before committing a changed cell/label value, the table additionally calls the VALIDATE_CELL callback if one has been registered.

Valid data types: JCTblEnum.TYPE_STRING, TYPE_DOUBLE, TYPE_INTEGER, TYPE_FLOAT, and TYPE_BOOLEAN.

 o getEditable

  public boolean getEditable(int row,
                             int col)
Returns the editable value for a cell.
See Also:
setEditable

 o setEditable

  public void setEditable(int row,
                          int col,
                          boolean v)
Sets whether cell values can be changed by an end-user (default: true).

 o setFont

  public void setFont(int row,
                      int col,
                      Font v)
Sets the font to be used to display cell and/or label values.

 o setForeground

  public void setForeground(int row,
                            int col,
                            Color v)
Sets the foreground color (the text color) of cells and labels. When set to null the table's foreground value is used.

 o setForeground

  public void setForeground(int row,
                            int col,
                            int v)
Allows the foreground color of a cell or label to be set to JCTblEnum.REPEAT_ROW or JCTblEnum.REPEAT_COLUMN. The color is then taken from the list specified by RepeatForegroundColors, repeating in row or column order.
See Also:
setRepeatForegroundColors

 o getMaxLength

  public int getMaxLength(int row,
                          int col)
Returns the maxLength value for a cell.
See Also:
 o setMaxLength
  public void setMaxLength(int row,
                           int col,
                           int v)
Sets the maximum number of characters that can be entered in a cell by a user (default: MAXINT). This property does not affect cell values changed with setCells() and setCell(). Newline characters in multi-line cells count as one character.
See Also:
setCell, setCells

 o getMultiline

  public boolean getMultiline(int row,
                              int col)
Returns the multiline value for a cell.
See Also:
setMultiline

 o setMultiline

  public void setMultiline(int row,
                           int col,
                           boolean v)
Sets whether or not a user can enter multiple lines of text into a cell (default: false). This property does not affect cell values added or changed by the application. If the cell's value is already multiple lines, a TextArea component is displayed when the cell is edited, regardless of the multiline value.

 o setPixelHeight

  public void setPixelHeight(int row,
                             int v)
Sets a row height in pixels. Cell values, images, or components that do not fit vertically in a cell are clipped. This property controls the height unless it is set to JCTblEnum.NOVALUE -- charHeight then controls the height.

The following special values are valid:

   JCTblEnum.VARIABLE     set to the highest value in the row
   JCTblEnum.AS_IS        do not change

When a user interactively resizes a row, this property updates. If character specification was in effect for the row, it is overridden by the pixel height of the user-resized row.

Parameters:
row - row whose height is to be set. This may be a specific row, JCTblEnum.LABEL (set height of column labels), or ALL (set height of all rows).
See Also:
setCharHeight

 o setPixelWidth

  public void setPixelWidth(int col,
                            int v)
Sets a column width in pixels. Cell values, images, or components that do not fit vertically in a cell are clipped. This property controls the width unless it is set to JCTblEnum.NOVALUE - charWidth then controls the width.

The following special values are valid:

   JCTblEnum.VARIABLE     set to the highest value in the column
   JCTblEnum.AS_IS        do not change

When a user interactively resizes a column, this property updates. If character specification was in effect for the column, it is overridden by the pixel width of the user-resized column.

Parameters:
col - column whose width is to be set. This may be a specific column, JCTblEnum.LABEL (set width of row labels), or ALL (set width of all columns).
See Also:
setCharWidth

 o getStringCase

  public int getStringCase(int row,
                           int col)
Returns the stringCase value for a cell.
See Also:
setStringCase

 o setStringCase

  public void setStringCase(int row,
                            int col,
                            int v)
Sets the case of cell values of cells edited by the user. This property does not convert the case of existing cell values. This property is only used when the cell's DataType is JCTblEnum.TYPE_STRING. Valid values are:
    JCTblEnum.CASE_LOWER       Convert to lower case
    JCTblEnum.CASE_AS_IS       No conversion
    JCTblEnum.CASE_UPPER       Convert to upper case

 o getTraversable

  public boolean getTraversable(int row,
                                int col)
Returns the traversable value for a cell.
See Also:
setTraversable

 o setTraversable

  public void setTraversable(int row,
                             int col,
                             boolean v)
Sets whether the cell can be traversed to (default: true).

 o getUserdata

  public Object getUserdata(int row,
                            int col)
Returns the userdata object for a cell or label.
See Also:
setUserdata

 o setUserdata

  public void setUserdata(int row,
                          int col,
                          Object v)
Sets a user data object that the application can attach. This property is not used by JCTable.


All Packages  Class Hierarchy  This Package  Previous  Next  Index