Class JGrid.JCell
All Packages Class Hierarchy This Package Previous Next Index
Class JGrid.JCell
Object
|
+----ICell
|
+----JGrid.JCell
- public class JCell
- extends ICell
This class defines several frequently used cell types, i.e. normal string, stock, currency.
-
CURRENCYCELL
- currency type
-
DEFAULTBGCOLOR
- default background color
-
DEFAULTFONT
- default font
-
DEFAULTHLCOLOR
- default highlight color
-
DEFAULTHLTEXTCOLOR
- default highlight text color
-
DEFAULTTEXTCOLOR
- default text color
-
NORMALCELL
- normal string
-
STOCKCELL
- stock type
-
alignment
- text alignment
-
tailImg
- Images(up & down arrows) used for the cells with stock type; they are shared globally.
-
JGrid.JCell()
-
-
draw(Graphics, JGrid2)
- Call this method to draw the contents of the cell in the
rectangle rect with default values.
-
setFeature(String)
- set the features of the cell
For JCell, feature has the format "type,background color,text color,alignment"
where: type should be NORMALCELL,STOCKCELL,CURRENCYCELL
background color and text color are in hex format.
-
setValue(Object)
- set a new value to the cell
CURRENCYCELL
public static final int CURRENCYCELL
- currency type
DEFAULTBGCOLOR
protected static final java.awt.Color DEFAULTBGCOLOR
- default background color
DEFAULTFONT
protected static final java.awt.Font DEFAULTFONT
- default font
DEFAULTHLCOLOR
protected static final java.awt.Color DEFAULTHLCOLOR
- default highlight color
DEFAULTHLTEXTCOLOR
protected static final java.awt.Color DEFAULTHLTEXTCOLOR
- default highlight text color
DEFAULTTEXTCOLOR
protected static final java.awt.Color DEFAULTTEXTCOLOR
- default text color
NORMALCELL
public static final int NORMALCELL
- normal string
STOCKCELL
public static final int STOCKCELL
- stock type
alignment
protected int alignment
- text alignment
tailImg
public static java.awt.Image[] tailImg
- Images(up & down arrows) used for the cells with stock type; they are shared globally.
JCell
public JCell()
draw
protected void draw(Graphics g,
JGrid2 grid)
- Call this method to draw the contents of the cell in the
rectangle rect with default values.
- Parameters:
- rect - rectangle where the cell is drawn
- g - graphics context
- grid - the grid itself
- Overrides:
- draw in class ICell
setFeature
public void setFeature(String feature)
- set the features of the cell
For JCell, feature has the format "type,background color,text color,alignment"
where: type should be NORMALCELL,STOCKCELL,CURRENCYCELL
background color and text color are in hex format. For example, "FFFFFF"
alignment can be Label.CENTER,Label.LEFT,Label.RIGHT
- Parameters:
- feature - the new feature for the cell
- Overrides:
- setFeature in class ICell
setValue
public void setValue(Object value)
- set a new value to the cell
- Parameters:
- value - new value for the cell
- Overrides:
- setValue in class ICell
All Packages Class Hierarchy This Package Previous Next Index