|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.JTable.tableCell
tableCell represents the contents of a single cell in the table. This class is responsible for the mechanics of word wrapping.
| Field Summary | |
(package private) tableAttr |
attr
An individual cell may have a special font and colors set.. |
(package private) tableCol |
col
What column is this cell in? We use this not only to handle column-specific attributes, but also to get a reference to our baseTable when we need it for internal calculations. |
(package private) int |
currentWidth
|
(package private) java.lang.Object |
data
We may have a binary representation of the text displayed in this cell recorded for convenience. |
(package private) static boolean |
debug
|
(package private) int |
lastOfficialWidth
|
(package private) int |
nominalWidth
|
(package private) java.lang.String |
origText
The non-word-wrapped text for this cell |
private int |
rowSpan
How many rows has this cell been wrapped across? |
(package private) boolean |
selected
Remember whether we are selected or not. |
(package private) java.lang.String |
text
The word-wrapped text for this cell |
| Constructor Summary | |
tableCell(tableCol col)
|
|
tableCell(tableCol col,
java.lang.String text)
|
|
tableCell(tableCol col,
java.lang.String text,
tableAttr attr)
|
|
| Method Summary | |
private void |
calcRowSpan()
|
void |
clear()
This method reinitializes the cell to its virgin state. |
int |
getCurrentWidth()
This method returns the width of this cell at its widest point, after word wrapping has been performed. |
java.lang.Object |
getData()
This method retrieves a piece of random attendant data held with this cell. |
java.awt.Font |
getFont()
Return this cell's font |
int |
getJust()
Return this cell's justification |
java.awt.FontMetrics |
getMetrics()
Return the fontmetrics that apply to this cell. |
int |
getNominalWidth()
This method returns the width that the cell's current text would have if not wrapped. |
int |
getRowSpan()
This method returns the number of lines this cell desires to occupy. |
java.lang.String |
getText(int n)
This method returns the nth row of this cell's text, where the first row is 0. |
private boolean |
isspace(char c)
|
void |
refresh()
This method refreshes the cell's measurements, and should be called after the fontmetrics for this cell have changed. |
void |
setData(java.lang.Object data)
This method is used to record a piece of random attendant data with this cell. |
void |
setText(java.lang.String newText)
This method sets the text for this cell. |
void |
wrap(int wrap_length)
This method wraps the contained text to a certain number of pixels. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final boolean debug
java.lang.String origText
java.lang.String text
java.lang.Object data
tableAttr attr
boolean selected
tableCol col
int nominalWidth
int currentWidth
int lastOfficialWidth
private int rowSpan
| Constructor Detail |
public tableCell(tableCol col,
java.lang.String text,
tableAttr attr)
public tableCell(tableCol col,
java.lang.String text)
public tableCell(tableCol col)
| Method Detail |
public void clear()
public void setText(java.lang.String newText)
public final void setData(java.lang.Object data)
public final java.lang.Object getData()
public void refresh()
public java.awt.FontMetrics getMetrics()
public java.awt.Font getFont()
public int getJust()
public int getCurrentWidth()
public int getNominalWidth()
public java.lang.String getText(int n)
public void wrap(int wrap_length)
wrap_length - The width of the cell to wrap to, in pixelsprivate boolean isspace(char c)
private void calcRowSpan()
public int getRowSpan()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||