|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object | +--CoffeeTable.Grid.GridAttributes
GridAttributes is a class that encapsulates the drawing attributes for a grid's cells, row, columns and header. It contains a Font, text Color, background Color and justification information that will be used by the GridPanel while drawing.
| Constructor Summary | |
GridAttributes(java.awt.Component itsComponent,
java.awt.Font aFont,
java.awt.Color textColor,
java.awt.Color backColor,
int justification)
Constructs and creates a new GridAttributes Object using the passed in parameters. |
|
GridAttributes(java.awt.Component itsComponent,
java.awt.Font aFont,
java.awt.Color textColor,
java.awt.Color backColor,
int justification,
int cellType)
Constructs and creates a new GridAttributes Object using the passed in parameters. |
|
GridAttributes(java.awt.Component itsComponent,
java.awt.Font aFont,
java.awt.Color textColor,
java.awt.Color backColor,
int justification,
int cellType,
java.lang.String[] items)
|
|
| Method Summary | |
void |
beginDrawing(java.awt.Graphics g)
Saves the Graphics objects drawing state (Font and Color). |
java.lang.Object |
clone()
Clones the GridAttributes object. |
void |
endDrawing(java.awt.Graphics g)
Restores the Graphics objects drawing state (Font and Color). |
protected void |
finalize()
|
int |
getAscent()
Get the Font ascent. |
java.awt.Color |
getBackColor()
Get the cell background color. |
int |
getCellType()
Get the cell type. |
int |
getDescent()
Get the Font descent. |
java.awt.Font |
getFont()
Get the Font. |
java.awt.FontMetrics |
getFontMetrics()
Get the FontMetrics. |
int |
getHeight()
Get the Font height. |
java.lang.String[] |
getItems()
Return the list of item strings for the choice list. |
int |
getJustification()
Get the Justification style. |
int |
getLeading()
Get the Font leading. |
java.awt.Color |
getTextColor()
Get the cell text color. |
void |
setBackColor(java.awt.Color backColor)
Set the cell background color. |
void |
setCellType(int cellType)
Set the cell type. |
void |
setFont(java.awt.Font aFont)
Set the Font. |
void |
setItems(java.lang.String[] items)
Set the list of item strings for the choice list. |
void |
setJustification(int justification)
Set the Justification style. |
void |
setTextColor(java.awt.Color textColor)
Set the cell text color. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public GridAttributes(java.awt.Component itsComponent, java.awt.Font aFont, java.awt.Color textColor, java.awt.Color backColor, int justification)
itsComponent - a component used to get the font metrics, can pass a reference to the AppletaFont - the FonttextColor - the text ColorbackColor - the background Colorjustification - the justification style (GridPanelInterface.JUST_LEFT, GridPanelInterface.JUST_CENTER, GridPanelInterface.JUST_RIGHT), you can
specify word wrapping by doing a bitwise OR with GridPanelInterface.WORD_WRAP or truncate (with ellipsis) by by doing a
bitwise OR with GridPanelInterface.TRUNC_STRINGGridPanelInterface.JUST_LEFT,
GridPanelInterface.JUST_CENTER,
GridPanelInterface.JUST_RIGHT,
GridPanelInterface.WORD_WRAP,
GridPanelInterface.TRUNC_STRINGpublic GridAttributes(java.awt.Component itsComponent, java.awt.Font aFont, java.awt.Color textColor, java.awt.Color backColor, int justification, int cellType)
itsComponent - a component used to get the font metrics, can pass a reference to the AppletaFont - the FonttextColor - the text ColorbackColor - the background Colorjustification - the justification style (GridPanelInterface.JUST_LEFT, GridPanelInterface.JUST_CENTER, GridPanelInterface.JUST_RIGHT), you can
specify word wrapping by doing a bitwise OR with GridPanelInterface.WORD_WRAP or truncate (with ellipsis) by by doing a
bitwise OR with GridPanelInterface.TRUNC_STRINGcellType - the cell type (GridPanelInterface.TEXT, GridPanelInterface.EDIT_TEXT, GridPanelInterface.URL, GridPanelInterface.MAIL)GridPanelInterface.JUST_LEFT,
GridPanelInterface.JUST_CENTER,
GridPanelInterface.JUST_RIGHT,
GridPanelInterface.WORD_WRAP,
GridPanelInterface.TRUNC_STRING,
GridPanelInterface.TEXT,
GridPanelInterface.EDIT_TEXT,
GridPanelInterface.URL,
GridPanelInterface.MAILpublic GridAttributes(java.awt.Component itsComponent, java.awt.Font aFont, java.awt.Color textColor, java.awt.Color backColor, int justification, int cellType, java.lang.String[] items)
| Method Detail |
protected void finalize()
public java.lang.Object clone()
public final int getHeight()
public final int getAscent()
public final int getDescent()
public final int getLeading()
public final java.awt.Font getFont()
public final void setFont(java.awt.Font aFont)
aFont - the Fontpublic final java.awt.FontMetrics getFontMetrics()
public final int getJustification()
public final void setJustification(int justification)
justification - the Justification stylepublic final int getCellType()
public final void setCellType(int cellType)
cellType - the cell typepublic final java.awt.Color getBackColor()
public final void setBackColor(java.awt.Color backColor)
backColor - the background colorpublic final java.awt.Color getTextColor()
public final void setTextColor(java.awt.Color textColor)
textColor - the text colorpublic final void setItems(java.lang.String[] items)
items - array of item stringspublic final java.lang.String[] getItems()
public final void beginDrawing(java.awt.Graphics g)
g - the Graphics objectendDrawing(java.awt.Graphics)public final void endDrawing(java.awt.Graphics g)
beginDrawing(java.awt.Graphics)
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||