|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.table.LabelCell
public class LabelCell
Represents a label cell in a TableView.
TableView,
DataCell| Field Summary | |
|---|---|
static LabelCellTypeInterface |
COLUMN_LABEL
Column label constant to pass as labelType parameter to constructor. |
static LabelCellTypeInterface |
ORIGIN_LABEL
Origin label constant to pass as labelType parameter to constructor. |
static LabelCellTypeInterface |
ROW_LABEL
Row label constant to pass as labelType parameter to constructor. |
| 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 | |
|---|---|
LabelCell(TableView table,
LabelCellTypeInterface labelType,
java.lang.Object child)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Cell obj)
Compares this and a given cell for equality. |
boolean |
equals(LabelCell other)
Compares this and a given label cell for equality. |
java.lang.Object |
getChild()
Returns the child associated with this label, i-e. the thing being labeled. |
StaticPropertyBagInterface |
getDefaultStyle()
Returns the table view's default label style. |
int |
getDisplayedHeight()
Returns the vertical size of the area allotted to the label in the table's current display. |
int |
getDisplayedWidth()
Returns the horizontal size of the area allotted to the label in the table's current display. |
int |
getHeight()
Returns the vertical extent of the label. |
int |
getHorizontalPosition()
Returns the x-coordinate of the top-left corner of the label (relative to the top-left corner of the table). |
LabelCellTypeInterface |
getLabelType()
The type (e.g. |
StaticPropertyBagInterface |
getModelDefaultStyle()
Returns the table view's model's default label style. |
java.lang.Class |
getObjectDataClass()
Returns the class of the cell's data. |
protected Cell |
getThisCell()
Returns the Cell instance to delegate all variable access to. |
protected LabelCell |
getThisLabelCell()
Returns the LabelCell instance to delegate all variable access to. |
int |
getVerticalPosition()
Returns the y-coordinate of the top-left corner of the label (relative to the top-left corner of the table). |
int |
getWidth()
Returns the horizontal extent of the label. |
int |
hashCode()
Returns a hash code value for the label. |
boolean |
isColumnLabel()
Alias for "getLabelType() == COLUMN_LABEL". |
boolean |
isDisplayed()
Returns true if the label 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 true. |
boolean |
isOriginLabel()
Alias for "getLabelType() == ORIGIN_LABEL". |
boolean |
isRowLabel()
Alias for "getLabelType() == ROW_LABEL". |
protected void |
onGetEffectiveStylePropertyBag(java.lang.String propertyID,
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 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 label's view with data from the table's model. |
protected java.lang.String[] |
onGetTypes()
Cell framework method for initializing the label's type(s) from the table's model. |
protected void |
onWriteObjectData()
Cell framework method for writing the label's data to the table's model. |
void |
setObsolete()
Indicates that the label cell should be considered obsolete. |
| Methods inherited from class com.sas.table.TableElement |
|---|
equals, getModelStyle, getStyle, getTableView, isCurrent, isTransient, setStyle |
| Field Detail |
|---|
public static final LabelCellTypeInterface COLUMN_LABEL
LabelCell(com.sas.table.TableView, com.sas.table.LabelCellTypeInterface, java.lang.Object)public static final LabelCellTypeInterface ROW_LABEL
LabelCell(com.sas.table.TableView, com.sas.table.LabelCellTypeInterface, java.lang.Object)public static final LabelCellTypeInterface ORIGIN_LABEL
LabelCell(com.sas.table.TableView, com.sas.table.LabelCellTypeInterface, java.lang.Object)| Constructor Detail |
|---|
public LabelCell(TableView table,
LabelCellTypeInterface labelType,
java.lang.Object child)
table - The TableView instance that contains this label.labelType - The type (e.g. COLUMN_LABEL, ROW_LABEL, ORIGIN_LABEL) of label to
create.child - The item being labeled.
If labelType is COLUMN_LABEL, child should be a Column.
If labelType is ROW_LABEL, child should be a Row.
If labelType is ORIGIN_LABEL, child should be null.COLUMN_LABEL,
ROW_LABEL,
ORIGIN_LABEL| Method Detail |
|---|
public final boolean equals(Cell obj)
equals in class Celltrue if obj is a LabelCell and
equals((LabelCell)obj) returns true;
false otherwise.public boolean equals(LabelCell other)
true if this label cell has the same tableView and an
equivalent child as other; false otherwise.public final java.lang.Object getChild()
If getLabelType() is COLUMN_LABEL, child will be a Column.
If getLabelType() is ROW_LABEL, child will be a Row.
If getLabelType() is ORIGIN_LABEL, child will be null.
User-defined or subclass-defined types will have different child class
relationships; refer to documentation on those types for details.
getLabelType(),
Column,
Rowpublic StaticPropertyBagInterface getDefaultStyle()
getDefaultStyle in class TableElementgetModelDefaultStyle()public int getDisplayedHeight()
getDisplayedHeight in class CellgetHeight()public int getDisplayedWidth()
getDisplayedWidth in class CellgetWidth()public int getHeight()
getHeight in class CellCell.getDisplayedHeight()public int getHorizontalPosition()
getHorizontalPosition in class Cellpublic java.lang.Class getObjectDataClass()
getObjectDataClass in class Cellpublic StaticPropertyBagInterface getModelDefaultStyle()
getModelDefaultStyle in class TableElementgetDefaultStyle()protected final Cell getThisCell()
this, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
getThisCell in class CellsetObsolete(),
getThisLabelCell()protected LabelCell getThisLabelCell()
this, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
setObsolete()public final LabelCellTypeInterface getLabelType()
LabelCell(com.sas.table.TableView, com.sas.table.LabelCellTypeInterface, java.lang.Object)public int getVerticalPosition()
getVerticalPosition in class Cellpublic int getWidth()
getWidth in class CellCell.getDisplayedWidth()public int hashCode()
hashCode in class java.lang.ObjectgetChild().hashCode() if the child
isn't null; else to super.hashCode().equals(com.sas.table.Cell)public final boolean isColumnLabel()
public boolean isDisplayed()
public final boolean isLabel()
isLabel in class Cellpublic final boolean isOriginLabel()
public final boolean isRowLabel()
protected void onGetEffectiveStylePropertyBag(java.lang.String propertyID,
PropertyBagInterface bag)
onGetEffectiveStylePropertyBag in class TableElementpropertyID - 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 TableElementpropertyID - 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.Object onGetObjectData()
throws com.sas.table.TableException
onGetObjectData in class CellTableException - Propagated from call to model.
protected StaticPropertyBagInterface onGetModelStyle()
throws com.sas.table.TableException
onGetModelStyle in class TableElementTableException - Propagated from call to model.TableElement.getModelStyle()
protected java.lang.String[] onGetTypes()
throws com.sas.table.TableException
onGetTypes in class CellTableException - Propagated from call to model.
protected void onWriteObjectData()
throws com.sas.table.TableException
onWriteObjectData in class CellTableException - Propagated from call to model.public void setObsolete()
setObsolete in class CellTableElement.isTransient(),
TableElement.equals(java.lang.Object)
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||