Class JGrid.ICell
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.
-
highlight
- Indicate whether the cell is highlighted
-
redraw
- Indicate whether the cell needs redraw
-
ticker
- This is the ticker value for ticker cells.
-
urlStr
- Current URL address of the cell
Note: For programs not in JGrid, please use getURLStr() to access current value.
-
value
- Current value of the cell
Note: For programs not in JGrid, please use getValue() to access current value.
-
JGrid.ICell()
-
-
draw(Graphics, JGrid2)
- Draw the cell.
-
getURLStr()
- Get the URL string of the cell if it has one
-
getValue()
- Get the current value of the cell.
Note: For programs that are not in JGrid package should get the value through this method.
-
setFeature(String)
- Set the features of the cell.
-
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.
-
setURLStr(String)
- Set a new URL string to the cell
-
setValue(Object)
- Set a new value to the cell
highlight
protected boolean highlight
- Indicate whether the cell is highlighted
redraw
protected boolean redraw
- Indicate whether the cell needs redraw
ticker
public static int ticker
- This is the ticker value for ticker cells. Ticker cells changes states based on ticker value.
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.
value
protected java.lang.String value
- Current value of the cell
Note: For programs not in JGrid, please use getValue() to access current value.
ICell
public ICell()
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
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.
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.
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
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
setURLStr
public void setURLStr(String urlStr)
- Set a new URL string to the cell
- Parameters:
- urlStr - the new URL string for the cell
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