|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CellViewInterface
Defines the required interface for TableView cell views.
Cell views are the views used to format, display, and edit the data associated with TableView cells. Different data types require different viewers. For example, a different view is needed to display image data than to display string data.
Cell views must provide a default (no argument) constructor so that they can be instantiated via Class.newInstance.
Cell.getView()
,
CellStyle.VIEW_CLASS
,
CellView
,
TableView
,
TextCell
Field Summary | |
---|---|
static int |
FORMATTED_DATA
Formatted data constant; potential return value from getPreferredInputType and getPreferredOutputType. |
static int |
RAW_DATA
Raw data constant; potential return value from getPreferredInputType and getPreferredOutputType. |
Method Summary | |
---|---|
Cell |
getCell()
Returns the Cell this view is associated with. |
java.lang.String |
getFormattedData()
Returns the cell view's data as a formatted string. |
int |
getMinimumHeight(java.awt.Graphics g)
Returns the minimum amount of vertical space needed to display the cell in the given graphics context. |
int |
getMinimumWidth(java.awt.Graphics g)
Returns the minimum amount of horizontal space needed to display the cell in the given graphics context. |
int |
getPreferredHeight(java.awt.Graphics g,
int widthConstraint)
Returns the preferred amount of vertical space needed to display the cell in the given graphics context. |
int |
getPreferredInputType()
Returns the preferred input type, RAW_DATA or FORMATTED_DATA, of the cell view's data. |
int |
getPreferredOutputType()
Returns the preferred output type, RAW_DATA or FORMATTED_DATA, of the cell view's data. |
int |
getPreferredWidth(java.awt.Graphics g,
int heightConstraint)
Returns the preferred amount of horizontal space needed to display the cell in the given graphics context. |
boolean |
isPartiallyDisplayed()
Indicates whether the cell's contents are currently displayed by the table view, but also clipped. |
void |
onActiveStateChanged(int oldValue,
int newValue,
java.awt.Point point)
Notifies the view of a change to Cell.activeState. |
void |
paint(java.awt.Graphics g)
Paints the cell view. |
void |
processFocusEvent(java.awt.event.FocusEvent event)
Processes focus events. |
void |
processKeyEvent(java.awt.event.KeyEvent event)
Processes key events. |
void |
processMouseEvent(java.awt.event.MouseEvent event)
Processes mouse events. |
void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
Processes mouse motion events. |
void |
setCell(Cell cell)
Informs the view of the cell that owns it. |
void |
setFormattedData(java.lang.String data)
Sets the cell view's data from a formatted string. |
Field Detail |
---|
static final int RAW_DATA
static final int FORMATTED_DATA
Method Detail |
---|
Cell getCell()
setCell(com.sas.table.Cell)
java.lang.String getFormattedData()
setFormattedData(java.lang.String)
int getMinimumHeight(java.awt.Graphics g)
g
- The graphics context to measure the cell in.
int getMinimumWidth(java.awt.Graphics g)
g
- The graphics context to measure the cell in.
int getPreferredHeight(java.awt.Graphics g, int widthConstraint)
g
- The graphics context to measure the cell in.widthConstraint
- The width (in pixels) to constrain by. Specify -1 to not constrain.
int getPreferredInputType()
int getPreferredOutputType()
int getPreferredWidth(java.awt.Graphics g, int heightConstraint)
g
- The graphics context to measure the cell in.heightConstraint
- The height (in pixels) to constrain by. Specify -1 to not constrain.
boolean isPartiallyDisplayed()
true
if the cell's contents are displayed but clipped, and
false
otherwise.void onActiveStateChanged(int oldValue, int newValue, java.awt.Point point)
oldValue
- The previous value of Cell.activeState.newValue
- The new value of Cell.activeState.point
- Optional xy-coordinate (relative to the view's origin) where the
activation was initiated. Could be used to position a text cursor,
for example.void paint(java.awt.Graphics g)
g
- The graphics context to use for painting.void processFocusEvent(java.awt.event.FocusEvent event)
event
- The focus event.void processKeyEvent(java.awt.event.KeyEvent event)
event
- The key event.void processMouseEvent(java.awt.event.MouseEvent event)
event
- The mouse event.void processMouseMotionEvent(java.awt.event.MouseEvent event)
event
- The mouse motion event.void setCell(Cell cell)
cell
- Cell instance that owns this view.getCell()
void setFormattedData(java.lang.String data)
data
- The formatted data String.getFormattedData()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |