All Packages Class Hierarchy This Package Previous Next Index
Class jclass.table.Table
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----jclass.table.Table
- public class Table
- extends Panel
- implements Runnable
The base class for JCTable, used by the JClass LiveTable Applet.
No resource accessors are supplied.
The following resouces cannot be specified for the Applet:
- selected cells
- validation
- TABLE and LIST modes
- editing and traversal
- cell components
By default, cursor tracking and cell resizing is disabled.
-
about
-
-
cellValueListeners
-
-
createComponentListeners
-
-
displayComponentListeners
-
-
enterCellListeners
-
-
labelValueListeners
-
-
paintListeners
-
-
resizeCellListeners
-
-
scrollListeners
-
-
selectListeners
-
-
sortListeners
-
-
traverseCellListeners
-
-
validateCellListeners
-
-
version
-
-
addNotify()
- Creates the Panel's peer.
-
convert(JCVector, int, int)
- Converts the string in each cell using the cell's datatype.
-
getAbout()
- Returns vendor information.
-
getAlignment(int, int)
- Returns the alignment value for a cell or label.
-
getAWTLock()
- Returns the object used to lock layout and repaint.
-
getBackground(int, int)
- Returns the background value for a cell or label.
-
getBorderSides(int, int)
- Returns the borderSides value for a cell or label.
-
getBorderType(int, int)
- Returns the borderType value for a cell or label.
-
getCell(int, int)
- Gets the value of a cell or label.
-
getCharHeight(int)
- Returns the charHeight value of a row.
-
getCharWidth(int)
- Returns the charWidth value of a column.
-
getColumnLabel(int)
- Gets a column label.
-
getComponent(int, int)
-
-
getDatatype(int, int)
- Returns the dataType value for a cell.
-
getFont(int, int)
- Returns the font value for a cell or label.
-
getForeground(int, int)
- Returns the foreground (text) value for a cell or label.
-
getHorizSB()
-
-
getParameters(Applet)
- Reads the parameter values from the HTML page using the specified applet.
-
getPixelHeight(int)
- Returns the pixelHeight value of a row, previously set using
setPixelHeight().
-
getPixelWidth(int)
- Returns the pixelWidth value of a column, previously set using
setPixelWidth().
-
getPosition(Component, JCCellPosition)
- Stub method required by Action.eventToCell().
-
getPosition(int, int, Point)
- Returns the pixel position of a cell's top-left corner.
-
getRowLabel(int)
- Gets a row label.
-
getVersion()
- Returns the current product version.
-
getVertSB()
- Returns the vertical scrollbar
-
isCell(int, int)
- Returns true if the row and column constitute a valid cell.
-
isColumnLabel(int, int)
- Returns true if the row and column constitute a valid column label.
-
isLabel(int, int)
- Returns true if the row and column constitute a valid label.
-
isRowLabel(int, int)
- Returns true if the row and column constitute a valid row label.
-
isSelected(int, int)
- Determines whether the cell is selected.
-
isVisible(int, int)
- Cchecks whether cell is visible.
-
keyDown(Event, int)
-
-
layout()
-
-
makeColumnVisible(int)
- Scrolls a column so it is visible on the screen.
-
makeRowVisible(int)
- Scrolls a row so it is visible on the screen.
-
makeVisible(int, int)
- Scrolls a frozen or non-frozen cell or label so it is visible on the screen.
-
minimumSize()
-
-
mouseDown(Event, int, int)
- If currently over an URL anchor, returns.
Otherwise, sorts or resizes the cell.
-
mouseDrag(Event, int, int)
-
-
mouseExit(Event, int, int)
- Tracks the cursor if TrackCursor is true.
-
mouseMove(Event, int, int)
- Tracks the cursor if TrackCursor is true.
-
mouseUp(Event, int, int)
-
-
paint(Graphics)
-
Paints the container.
-
paint(int, int)
- Redraws a range of cells and/or labels if Repaint is true.
-
paint(JCCellRange)
- Redraws a range of cells and/or labels if Repaint is true.
-
preferredSize()
-
-
printAll(Graphics)
- Disables double-buffering, and calls Container.printAll
-
repaint()
- Redraws the table.
-
reshape(int, int, int, int)
- Reshapes the Container to the specified bounding box.
-
run()
-
-
setAbout(String)
- Provided for beans property editors - has no effect.
-
setBackground(Color)
- Sets the default background colour for the cells.
-
setComponent(int, int, Component)
- Sets the component for a cell or label (not supported by Applet).
-
setForeground(Color)
- Sets the default foreground colour for the cells.
-
setLayout(LayoutManager)
-
Sets the layout manager for this container.
-
setSeriesDefaults()
- Allows subclass to override series default values in the constructor.
-
setVersion(String)
- Provided for beans property editors - has no effect.
-
validate()
-
Validates this Container and all of the components contained within it.
about
public static final String about
version
public static final String version
cellValueListeners
protected JCVector cellValueListeners
createComponentListeners
protected JCVector createComponentListeners
displayComponentListeners
protected JCVector displayComponentListeners
enterCellListeners
protected JCVector enterCellListeners
labelValueListeners
protected JCVector labelValueListeners
paintListeners
protected JCVector paintListeners
resizeCellListeners
protected JCVector resizeCellListeners
scrollListeners
protected JCVector scrollListeners
selectListeners
protected JCVector selectListeners
sortListeners
protected JCVector sortListeners
traverseCellListeners
protected JCVector traverseCellListeners
validateCellListeners
protected JCVector validateCellListeners
setSeriesDefaults
protected void setSeriesDefaults()
- Allows subclass to override series default values in the constructor.
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
getAbout
public String getAbout()
- Returns vendor information.
setAbout
public void setAbout(String s)
- Provided for beans property editors - has no effect.
getVersion
public String getVersion()
- Returns the current product version.
setVersion
public void setVersion(String s)
- Provided for beans property editors - has no effect.
isCell
public static final boolean isCell(int row,
int col)
- Returns true if the row and column constitute a valid cell.
isLabel
public static final boolean isLabel(int row,
int col)
- Returns true if the row and column constitute a valid label.
isColumnLabel
public static final boolean isColumnLabel(int row,
int col)
- Returns true if the row and column constitute a valid column label.
isRowLabel
public static final boolean isRowLabel(int row,
int col)
- Returns true if the row and column constitute a valid row label.
isSelected
public boolean isSelected(int row,
int col)
- Determines whether the cell is selected.
paint
public void paint(Graphics gc)
- Paints the container.
- Overrides:
- paint in class Container
paint
public void paint(int row,
int column)
- Redraws a range of cells and/or labels if Repaint is true.
This method only needs to be called when the underlying data has changed
and the application has to force a redraw.
paint
public void paint(JCCellRange range)
- Redraws a range of cells and/or labels if Repaint is true.
This method only needs to be called when the underlying data has changed
and the application has to force a redraw.
- Parameters:
- range - the range to repaint; if null, the entire table is redrawn.
repaint
public void repaint()
- Redraws the table.
- Overrides:
- repaint in class Component
mouseMove
public boolean mouseMove(Event event,
int x,
int y)
- Tracks the cursor if TrackCursor is true.
- Overrides:
- mouseMove in class Component
- See Also:
- setTrackCursor
mouseExit
public boolean mouseExit(Event event,
int x,
int y)
- Tracks the cursor if TrackCursor is true.
- Overrides:
- mouseExit in class Component
- See Also:
- setTrackCursor
mouseDown
public boolean mouseDown(Event event,
int x,
int y)
- If currently over an URL anchor, returns.
Otherwise, sorts or resizes the cell.
- Overrides:
- mouseDown in class Component
mouseDrag
public boolean mouseDrag(Event event,
int x,
int y)
- Overrides:
- mouseDrag in class Component
mouseUp
public boolean mouseUp(Event event,
int x,
int y)
- Overrides:
- mouseUp in class Component
keyDown
public boolean keyDown(Event ev,
int key)
- Overrides:
- keyDown in class Component
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Container
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Container
getPosition
public Point getPosition(int row,
int column,
Point pos)
- Returns the pixel position of a cell's top-left corner.
- Parameters:
- row,column - the cell or label position to be found
- 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 position is invalid, pos.x will be set to JCTblEnum.MAXINT
(if pos is not null) and null is returned.
makeVisible
public boolean makeVisible(int row,
int col)
- Scrolls a frozen or non-frozen cell or label so it is visible on the screen.
- Returns:
- false if an argument is invalid
makeColumnVisible
public boolean makeColumnVisible(int column)
- Scrolls a column so it is visible on the screen.
- Returns:
- false if the column is invalid
makeRowVisible
public boolean makeRowVisible(int row)
- Scrolls a row so it is visible on the screen.
- Returns:
- false if the row is invalid
isVisible
public boolean isVisible(int row,
int col)
- Cchecks whether cell is visible.
getVertSB
public TblVertScrollbar getVertSB()
- Returns the vertical scrollbar
getHorizSB
public TblHorizScrollbar getHorizSB()
getColumnLabel
public Object getColumnLabel(int column)
- Gets a column label.
To get the AWT component currently in the label, call getComponent.
- See Also:
- getComponent
getRowLabel
public Object getRowLabel(int row)
- Gets a row label.
To get the AWT component currently in the label, call getComponent.
- See Also:
- getComponent
getCell
public Object getCell(int row,
int col)
- Gets the value of a cell or label.
To get the AWT component currently in the cell, call getComponent.
- See Also:
- getComponent
reshape
public void reshape(int x,
int y,
int width,
int height)
- Reshapes the Container to the specified bounding box.
- Overrides:
- reshape in class Component
layout
public void layout()
- Overrides:
- layout in class Container
validate
public void validate()
- Validates this Container and all of the components contained within it.
- Overrides:
- validate in class Container
addNotify
public void addNotify()
- Creates the Panel's peer.
- Overrides:
- addNotify in class Panel
convert
public void convert(JCVector cells,
int start_row,
int start_column)
- Converts the string in each cell using the cell's datatype.
- Parameters:
- start_row,start_column - the location of the first cell in the cells param
- See Also:
- setDatatype
getAlignment
public int getAlignment(int row,
int col)
- Returns the alignment value for a cell or label.
- See Also:
- setAlignment
getBackground
public Color getBackground(int row,
int col)
- Returns the background value for a cell or label.
- See Also:
- setBackground
getBorderSides
public int getBorderSides(int row,
int col)
- Returns the borderSides value for a cell or label.
- See Also:
- setBorderSides
getBorderType
public int getBorderType(int row,
int col)
- Returns the borderType value for a cell or label.
- See Also:
- setBorderType
getCharHeight
public int getCharHeight(int row)
- Returns the charHeight value of a row.
- Parameters:
- row - the row whose height is to be returned. This may be a specific row or JCTblEnum.LABEL (get the height of column labels).
- See Also:
- setCharHeight
getComponent
public Component getComponent(int row,
int col)
getCharWidth
public int getCharWidth(int col)
- Returns the charWidth value of a column.
- Parameters:
- col - the column whose width is to be returned. This may be a specific
column or JCTblEnum.LABEL (get the width of row labels).
- See Also:
- setCharWidth
getDatatype
public int getDatatype(int row,
int col)
- Returns the dataType value for a cell.
- See Also:
- setDatatype
getFont
public Font getFont(int row,
int col)
- Returns the font value for a cell or label.
- See Also:
- setFont
getForeground
public Color getForeground(int row,
int col)
- Returns the foreground (text) value for a cell or label.
- See Also:
- setForeground
getPixelHeight
public int getPixelHeight(int row)
- Returns the pixelHeight value of a row, previously set using
setPixelHeight(). To get the current row height, use getBounds().
- Parameters:
- row - the row whose height is to be returned. This may be a specific
row or JCTblEnum.LABEL (get the height of column labels).
- See Also:
- getBounds, setPixelHeight
getPixelWidth
public int getPixelWidth(int col)
- Returns the pixelWidth value of a column, previously set using
setPixelWidth(). To get the current column width, use getBounds().
- Parameters:
- col - the column whose width is to be returned. This may be a specific
column or JCTblEnum.LABEL (get the width of row labels).
- See Also:
- getBounds, setPixelWidth
setComponent
public void setComponent(int row,
int col,
Component comp)
- Sets the component for a cell or label (not supported by Applet).
run
public void run()
getPosition
public JCCellPosition getPosition(Component component,
JCCellPosition pos)
- Stub method required by Action.eventToCell(). Always returns null,
indicating that the component is not in the table. This
method is overridden by JCTable.
- See Also:
- getPosition
printAll
public void printAll(Graphics gc)
- Disables double-buffering, and calls Container.printAll
- Overrides:
- printAll in class Component
setLayout
public final void setLayout(LayoutManager mgr)
- Sets the layout manager for this container. This method is
overridden to prevent the layout mgr from being set.
- Overrides:
- setLayout in class Container
getAWTLock
public Object getAWTLock()
- Returns the object used to lock layout and repaint.
For JDK 1.0.2, it is the object instance. For JDK 1.1, it
is Component.getTreeLock()
setBackground
public void setBackground(Color c)
- Sets the default background colour for the cells.
- Overrides:
- setBackground in class Component
setForeground
public void setForeground(Color c)
- Sets the default foreground colour for the cells.
- Overrides:
- setForeground in class Component
All Packages Class Hierarchy This Package Previous Next Index