|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.table.CellView
public abstract class CellView
Defines an abstract base class for implementations of CellViewInterface. Default behavior is provided where possible. A method stub is provided for methods that won't be supported by all subclasses, e.g. processKeyEvent. Methods that are required by subclasses are defined as abstract, e.g. paint. See CellViewInterface for more information about cell views.
Cell
,
CellStyle
,
CellViewInterface
,
TableView
,
TextCell
Field Summary | |
---|---|
protected Cell |
cell
Alias for "getCell()". |
Fields inherited from interface com.sas.table.CellViewInterface |
---|
FORMATTED_DATA, RAW_DATA |
Constructor Summary | |
---|---|
CellView()
|
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 |
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. |
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 |
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. |
Methods inherited from interface com.sas.table.CellViewInterface |
---|
getPreferredHeight, getPreferredWidth, paint |
Field Detail |
---|
protected Cell cell
Constructor Detail |
---|
public CellView()
Method Detail |
---|
public Cell getCell()
getCell
in interface CellViewInterface
setCell(com.sas.table.Cell)
public java.lang.String getFormattedData()
getFormattedData
in interface CellViewInterface
setFormattedData(java.lang.String)
public int getMinimumHeight(java.awt.Graphics g)
getMinimumHeight
in interface CellViewInterface
g
- The graphics context to measure the cell in.
public int getMinimumWidth(java.awt.Graphics g)
getMinimumWidth
in interface CellViewInterface
g
- The graphics context to measure the cell in.
public int getPreferredInputType()
getPreferredInputType
in interface CellViewInterface
public int getPreferredOutputType()
getPreferredOutputType
in interface CellViewInterface
public boolean isPartiallyDisplayed()
isPartiallyDisplayed
in interface CellViewInterface
true
if the cell's contents are displayed but clipped, and
false
otherwise.public void onActiveStateChanged(int oldValue, int newValue, java.awt.Point point)
onActiveStateChanged
in interface CellViewInterface
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.public void processFocusEvent(java.awt.event.FocusEvent event)
processFocusEvent
in interface CellViewInterface
event
- The focus event.public void processKeyEvent(java.awt.event.KeyEvent event)
processKeyEvent
in interface CellViewInterface
event
- The key event.public void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent
in interface CellViewInterface
event
- The mouse event.public void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent
in interface CellViewInterface
event
- The mouse motion event.public void setCell(Cell cell)
setCell
in interface CellViewInterface
cell
- Cell instance that owns this view.getCell()
public void setFormattedData(java.lang.String data)
setFormattedData
in interface CellViewInterface
data
- The formatted data String.getFormattedData()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |