Class JGrid.ICell
Make your own free website on Tripod.com
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JGrid.ICell

Object
   |
   +----JGrid.ICell

public abstract class ICell
extends Object
abstract class for a cell. It should be the parent of all kinds of cells. Many of the functions in this class will be overridden by its sub-classes.


Variable Index

 o highlight
Indicate whether the cell is highlighted
 o redraw
Indicate whether the cell needs redraw
 o ticker
This is the ticker value for ticker cells.
 o urlStr
Current URL address of the cell
Note: For programs not in JGrid, please use getURLStr() to access current value.
 o value
Current value of the cell
Note: For programs not in JGrid, please use getValue() to access current value.

Constructor Index

 o JGrid.ICell()

Method Index

 o draw(Graphics, JGrid2)
Draw the cell.
 o getURLStr()
Get the URL string of the cell if it has one
 o getValue()
Get the current value of the cell.
Note: For programs that are not in JGrid package should get the value through this method.
 o setFeature(String)
Set the features of the cell.
 o setMousePosition(int, int, int)
set the current mouse position in the cell NOTE: this method is only useful for those cell types which needs to catch the position of the mouse action within the cell.
 o setURLStr(String)
Set a new URL string to the cell
 o setValue(Object)
Set a new value to the cell

Variables

 o highlight
protected boolean highlight
Indicate whether the cell is highlighted

 o redraw
protected boolean redraw
Indicate whether the cell needs redraw

 o ticker
public static int ticker
This is the ticker value for ticker cells. Ticker cells changes states based on ticker value.

 o urlStr
protected java.lang.String urlStr
Current URL address of the cell
Note: For programs not in JGrid, please use getURLStr() to access current value.

 o value
protected java.lang.String value
Current value of the cell
Note: For programs not in JGrid, please use getValue() to access current value.

Constructors

 o ICell
public ICell()

Methods

 o draw
protected abstract void draw(Graphics g,
                             JGrid2 grid)
Draw the cell. This function will be implemented by its derived classes.

Parameters:
rect - rectangle area in which the cell will be drawn
g - graphics context for the draw
grid - the grid itself
 o getURLStr
public java.lang.String getURLStr()
Get the URL string of the cell if it has one

Returns:
String the URL string of the cell; null if not available.
 o getValue
public java.lang.Object getValue()
Get the current value of the cell.
Note: For programs that are not in JGrid package should get the value through this method.

Returns:
Object get the current value of the cell.
 o setFeature
public void setFeature(String feature)
Set the features of the cell. This method can be overridden by its derived classes.

Parameters:
feature - new features of the cell
 o setMousePosition
protected boolean setMousePosition(int internalX,
                                   int internalY,
                                   int eventType)
set the current mouse position in the cell NOTE: this method is only useful for those cell types which needs to catch the position of the mouse action within the cell. For other cells, do nothing.

Parameters:
internalX - x position inside the cell
internalY - y position inside the cell
eventType - mouse event type, could be mouse move(0),mouse down(1),mouse up(2),etc.
Returns:
boolean whether the reposition requires the grid to repaint itself
 o setURLStr
public void setURLStr(String urlStr)
Set a new URL string to the cell

Parameters:
urlStr - the new URL string for the cell
 o setValue
public abstract void setValue(Object value)
Set a new value to the cell

Parameters:
value - new value for the cell

All Packages  Class Hierarchy  This Package  Previous  Next  Index