|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.table.DataCell
public class DataCell
Represents a data cell in a TableView.
TableView
,
LabelCell
Field Summary |
---|
Fields inherited from class com.sas.table.TableElement |
---|
emptyModelTypesArray, emptyModelTypeStylesArray, tableView |
Fields inherited from interface com.sas.table.TableElementInterface |
---|
REFRESH_ALL, REFRESH_DATA, REFRESH_DATA_STYLE, REFRESH_LABEL, REFRESH_LABEL_STYLE, REFRESH_STYLE |
Constructor Summary | |
---|---|
DataCell(TableView table,
Row row,
Column column)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Cell obj)
Compares this and a given cell for equality. |
boolean |
equals(DataCell other)
Compares this and a given data cell for equality. |
Column |
getColumn()
Returns the column that contains this cell. |
com.sas.collection.StaticPropertyBagInterface |
getDefaultStyle()
Returns the table view's default cell style. |
int |
getDisplayedHeight()
Returns the vertical size of the area allotted to the cell in the table's current display. |
int |
getDisplayedWidth()
Returns the horizontal size of the area allotted to the cell in the table's current display. |
int |
getHeight()
Returns the vertical extent of the cell. |
int |
getHorizontalPosition()
Returns the x-coordinate of the top-left corner of the cell (relative to the top-left corner of the table). |
com.sas.collection.StaticPropertyBagInterface |
getModelDefaultStyle()
Returns the table view's model's default cell style. |
java.lang.Class |
getObjectDataClass()
Returns the class of the cell's data. |
Row |
getRow()
Returns the row that contains this cell. |
protected Cell |
getThisCell()
Returns the Cell instance to delegate all variable access to. |
protected DataCell |
getThisDataCell()
Returns the DataCell instance to delegate all variable access to. |
int |
getVerticalPosition()
Returns the y-coordinate of the top-left corner of the cell (relative to the top-left corner of the table). |
int |
getWidth()
Returns the horizontal extent of the cell. |
boolean |
isDisplayed()
Returns true if the cell is shown in the table's current view, and false otherwise, i.e. if the table has to be scrolled to see it. |
boolean |
isLabel()
Override of Cell.isLabel() to return false. |
protected void |
onGetEffectiveStylePropertyBag(java.lang.String propertyID,
com.sas.collection.PropertyBagInterface bag)
TableElement framework method for determining the effective value of a style property of type StaticPropertyBagInterface. |
protected java.lang.Object |
onGetEffectiveStylePropertyValue(java.lang.String propertyID,
java.lang.Object defaultValue)
TableElement framework method for determining the effective value of a style property. |
protected java.lang.String |
onGetFormattedData()
Cell framework method for seeding the cell's view with formatted data from the table's model. |
protected com.sas.collection.StaticPropertyBagInterface |
onGetModelStyle()
TableElement framework method for querying the table view's model for any style properties associated with the element. |
protected java.lang.Object |
onGetObjectData()
Cell framework method for seeding the cell's view with data from the table's model. |
protected java.lang.String[] |
onGetTypes()
Cell framework method for initializing the cell's type(s) from the table's model. |
protected void |
onPaintForeground(java.awt.Graphics g,
int width,
int height)
Cell.paint framework method for painting the cell's foreground. |
protected void |
onWriteObjectData()
Cell framework method for writing the cell's data to the table's model. |
void |
setObsolete()
Indicates that the data cell should be considered obsolete. |
Methods inherited from class com.sas.table.TableElement |
---|
equals, getModelStyle, getStyle, getTableView, isCurrent, isTransient, setStyle |
Constructor Detail |
---|
public DataCell(TableView table, Row row, Column column)
table
- The TableView instance that contains this cell.row
- The row that contains this cell.column
- The column that contains this cell.Method Detail |
---|
public final boolean equals(Cell obj)
equals
in class Cell
true
if obj is a DataCell and
equals((DataCell)obj)
returns true
;
false
otherwise.public boolean equals(DataCell other)
true
if this data cell has the same tableView and an
equivalent column and row as other;
false
otherwise.public final Column getColumn()
public com.sas.collection.StaticPropertyBagInterface getDefaultStyle()
getDefaultStyle
in class TableElement
getModelDefaultStyle()
public int getDisplayedHeight()
getDisplayedHeight
in class Cell
getHeight()
public int getDisplayedWidth()
getDisplayedWidth
in class Cell
getWidth()
public int getHeight()
getHeight
in class Cell
Cell.getDisplayedHeight()
public int getHorizontalPosition()
getHorizontalPosition
in class Cell
public com.sas.collection.StaticPropertyBagInterface getModelDefaultStyle()
getModelDefaultStyle
in class TableElement
getDefaultStyle()
public java.lang.Class getObjectDataClass() throws com.sas.table.TableException
getObjectDataClass
in class Cell
TableException
- Thrown if the query can not be satisfied (e.g. i/o-failure).public final Row getRow()
protected final Cell getThisCell()
this
, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
getThisCell
in class Cell
setObsolete()
protected final DataCell getThisDataCell()
this
, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
setObsolete()
public int getVerticalPosition()
getVerticalPosition
in class Cell
public int getWidth()
getWidth
in class Cell
Cell.getDisplayedWidth()
public boolean isDisplayed()
public final boolean isLabel()
isLabel
in class Cell
protected void onGetEffectiveStylePropertyBag(java.lang.String propertyID, com.sas.collection.PropertyBagInterface bag)
onGetEffectiveStylePropertyBag
in class TableElement
propertyID
- An interned String (see String.intern()) which identifies a property
of type PropertyBagInterface, for example, CellStyle.FONT_STYLE.bag
- The bag to fill with the effective values of the subproperties
associated with propertyID.TableElement.getEffectiveStylePropertyBag(java.lang.String, com.sas.collection.PropertyBagInterface, boolean)
protected java.lang.Object onGetEffectiveStylePropertyValue(java.lang.String propertyID, java.lang.Object defaultValue)
onGetEffectiveStylePropertyValue
in class TableElement
propertyID
- An interned String (see String.intern()) which identifies the property,
for example, CellStyle.FOREGROUND_COLOR.defaultValue
- Value to return if no value is found for the property.
TableElement.getEffectiveStylePropertyValue(java.lang.String, java.lang.Object)
protected java.lang.String onGetFormattedData() throws com.sas.table.TableException
onGetFormattedData
in class Cell
TableException
- Propagated from call to model.protected java.lang.Object onGetObjectData() throws com.sas.table.TableException
onGetObjectData
in class Cell
TableException
- Propagated from call to model.protected com.sas.collection.StaticPropertyBagInterface onGetModelStyle() throws com.sas.table.TableException
onGetModelStyle
in class TableElement
TableException
- Propagated from call to model.TableElement.getModelStyle()
protected java.lang.String[] onGetTypes() throws com.sas.table.TableException
onGetTypes
in class Cell
TableException
- Propagated from call to model.protected void onPaintForeground(java.awt.Graphics g, int width, int height) throws com.sas.table.TableException
onPaintForeground
in class Cell
g
- The graphics context to use for painting.
Painting should be done relative to (0, 0).width
- The paintable width of the graphics context.height
- The paintable height of the graphics context.
TableException
- Can arrise from a call to getView.protected void onWriteObjectData() throws com.sas.table.TableException
onWriteObjectData
in class Cell
TableException
- Propagated from call to model.public void setObsolete()
setObsolete
in class Cell
TableElement.isTransient()
,
TableElement.equals(java.lang.Object)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |