|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.table.Row
public class Row
Represents a row in a TableView.
A Row is essentially an array of cells with properties and methods for introspecting and manipulating the row itself. The properties include an integer index to uniquely identify the row, a label, a style, a position, and a size.
TableView,
Column,
RowStyle| 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 | |
|---|---|
Row(TableView table,
int index)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(DataCell cell)
Test for the presence of a cell in the row. |
int |
count(int maxCount)
Returns the number of cells in the row, not including the label, up to a specified count if the real number is not readily determined. |
boolean |
equals(CellVector obj)
Compares this and a given cell vector for equality. |
boolean |
equals(Row other)
Compares this and a given row for equality. |
int |
getBottomEdge()
Returns the y-coordinate of the bottom side of the row (relative to the top-left corner of the table) when displayed is true; it is undefined when displayed is false. |
DataCell |
getCell(int colIndex)
Returns the cell at a given column index. |
com.sas.collection.StaticPropertyBagInterface |
getDefaultStyle()
Returns the table view's default row style. |
int |
getHeight()
Alias for "getSize()". |
int |
getIndex()
Returns the row's one-based position in the table view's model. |
LabelCell |
getLabel()
Returns the label associated with the row. |
int |
getMaxPosition()
Returns the bottom edge of the table. |
com.sas.collection.StaticPropertyBagInterface |
getModelDefaultStyle()
Returns the table view's model's default row style. |
java.lang.String |
getPixelUnit()
Returns the pixel unit that getSize is in terms of. |
protected CellVector |
getThisCellVector()
Returns the CellVector instance to delegate all variable access to. |
protected Row |
getThisRow()
Returns the Row instance to delegate all variable access to. |
boolean |
isHeld()
Indicates whether the row is "held". |
boolean |
isSelected()
Returns whether or not the row is selected in the table. |
boolean |
isTransient()
Indicates whether the row is transient. |
Row |
nextRow()
Returns the next row if any, otherwise null. |
protected int |
onComputePreferredSize(java.awt.Graphics g)
Framework method called by computePreferredSize. |
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 CellVector |
onNext()
Framework method called by next for determining the Row that follows this. |
protected CellVector |
onPrevious()
Framework method called by previous for determining the Row that precedes this. |
protected void |
onResized()
Framework method called by setSize to notify subclasses of a change in size. |
Row |
previousRow()
Returns the previous row if any, otherwise null. |
void |
refresh(int flags)
Refreshes the row's cells to their state as maintained by the table view's model. |
void |
repaint()
Repaints the row. |
void |
setObsolete()
Indicates that the row should be considered obsolete. |
| Methods inherited from class com.sas.table.CellVector |
|---|
computePreferredSize, contains, contains, count, equals, getCellsToSizeCount, getDisplayedSize, getModelTypes, getModelTypeStyles, getPosition, getPreferredSize, getSize, getThis, hashCode, isDisplayed, isModified, isPartiallyDisplayed, isResizable, isResized, next, previous, remeasure, resize, resize, setPreferredSize, setSize |
| Methods inherited from class com.sas.table.TableElement |
|---|
equals, getEffectiveStylePropertyBag, getEffectiveStylePropertyValue, getModelStyle, getStyle, getTableView, isCurrent, onGetEffectiveStylePropertyBag, onGetEffectiveStylePropertyValue, setStyle |
| Constructor Detail |
|---|
public Row(TableView table,
int index)
table - The TableView instance that contains this row.index - The one-based position of the row in the table view's model.| Method Detail |
|---|
public boolean contains(DataCell cell)
contains in class CellVectorcell - The cell to check for.public int count(int maxCount)
count in class CellVectormaxCount - Defines a limiting factor for cases where the number of cells is
not readily determined. Such a case is a function of the table
view's model. maxCount allows you to limit how much
computation is done. If the count is already known to be larger
than maxCount without doing any computation, then the
larger number is returned. Specifying a maxCount of
zero will force the computation of the total count no matter the
cost.
StaticTableInterface.countColumns(int)public final boolean equals(CellVector obj)
equals in class CellVectortrue if obj is a Row and
equals((Row)obj) returns true;
false otherwise.public boolean equals(Row other)
true if this row has the same index and
tableView as other; false otherwise.public int getBottomEdge()
public DataCell getCell(int colIndex)
getCell in class CellVectorcolIndex - A one-based index that identifies the cell's column.
java.lang.IndexOutOfBoundsException - If colIndex is not in the range [1, count()].public com.sas.collection.StaticPropertyBagInterface getDefaultStyle()
getDefaultStyle in class TableElementnull).getModelDefaultStyle()public final int getHeight()
public int getIndex()
getIndex in class CellVectorpublic LabelCell getLabel()
getLabel in class CellVectornull.public int getMaxPosition()
getMaxPosition in class CellVectorpublic com.sas.collection.StaticPropertyBagInterface getModelDefaultStyle()
getModelDefaultStyle in class TableElementgetDefaultStyle()public java.lang.String getPixelUnit()
getPixelUnit in class CellVectorprotected final CellVector getThisCellVector()
this, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
getThisCellVector in class CellVectorsetObsolete()protected final Row getThisRow()
this, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
setObsolete()public boolean isHeld()
isHeld in class CellVectortrue if the row is held and
false otherwise.TableView.getHeldRows()public boolean isSelected()
public boolean isTransient()
Augments super to treat rows with intransient labels
or cells as intransient.
isTransient in class CellVectortrue if the row is transient,
and false otherwise.TableElement.isTransient()public Row nextRow()
null.
null.CellVector.previous()protected int onComputePreferredSize(java.awt.Graphics g)
onComputePreferredSize in class CellVectorg - The graphics context to measure the row in.
CellVector.computePreferredSize(java.awt.Graphics)
protected com.sas.collection.StaticPropertyBagInterface onGetModelStyle()
throws com.sas.table.TableException
onGetModelStyle in class TableElementTableException - Propagated from call to model.TableElement.getModelStyle()protected CellVector onNext()
onNext in class CellVectornull.CellVector.next()protected CellVector onPrevious()
onPrevious in class CellVectornull.CellVector.previous()protected void onResized()
onResized in class CellVectorCellVector.setSize(int)public Row previousRow()
null.
null.CellVector.next()public void refresh(int flags)
refresh in interface TableElementInterfacerefresh in class TableElementflags - Bitmask of REFRESH_* flags.public void repaint()
public void setObsolete()
setObsolete in class TableElementTableElement.isTransient(),
TableElement.equals(java.lang.Object)
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||