|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.table.Column
public class Column
Represents a column in a TableView.
A Column is essentially an array of cells with properties and methods for introspecting and manipulating the column itself. The properties include an integer index to uniquely identify the column, a label, a style, a position, and a size.
TableView,
Row,
ColumnStyle| 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 | |
|---|---|
Column(TableView table,
int index)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(DataCell cell)
Test for the presence of a cell in the column. |
int |
count(int maxCount)
Returns the number of cells in the column, 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(Column other)
Compares this and a given column for equality. |
DataCell |
getCell(int rowIndex)
Returns the cell at a given row index. |
StaticPropertyBagInterface |
getDefaultStyle()
Returns the table view's default column style. |
int |
getIndex()
Returns the column's one-based position in the table view's model. |
LabelCell |
getLabel()
Returns the label associated with the column. |
int |
getMaxPosition()
Returns the right edge of the table. |
StaticPropertyBagInterface |
getModelDefaultStyle()
Returns the table view's model's default column style. |
java.lang.String |
getPixelUnit()
Returns the pixel unit that getSize is in terms of. |
int |
getRightEdge()
Returns the x-coordinate of the right side of the column (relative to the top-left corner of the table) when displayed is true; it is undefined when displayed is false. |
protected CellVector |
getThisCellVector()
Returns the CellVector instance to delegate all variable access to. |
protected Column |
getThisColumn()
Returns the Column instance to delegate all variable access to. |
int |
getWidth()
Alias for "getSize()". |
boolean |
isHeld()
Indicates whether the column is "held". |
boolean |
isSelected()
Returns whether or not the column is selected in the table. |
boolean |
isTransient()
Indicates whether the column is transient. |
Column |
nextColumn()
Returns the next column if any, otherwise null. |
protected int |
onComputePreferredSize(java.awt.Graphics g)
Framework method called by computePreferredSize. |
protected 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 Column that follows this. |
protected CellVector |
onPrevious()
Framework method called by previous for determining the Column that precedes this. |
protected void |
onResized()
Framework method called by setSize to notify subclasses of a change in size. |
Column |
previousColumn()
Returns the previous column if any, otherwise null. |
void |
refresh(int flags)
Refreshes the column's cells to their state as maintained by the table view's model. |
void |
repaint()
Repaints the column. |
void |
setObsolete()
Indicates that the column 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 Column(TableView table,
int index)
table - The TableView instance that contains this column.index - The one-based position of the column 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.countRows(int)public final boolean equals(CellVector obj)
equals in class CellVectortrue if obj is a Column and
equals((Column)obj) returns true;
false otherwise.public boolean equals(Column other)
true if this column has the same index and
tableView as other; false otherwise.public DataCell getCell(int rowIndex)
getCell in class CellVectorrowIndex - A one-based index that identifies the cell's row.
java.lang.IndexOutOfBoundsException - If rowIndex is not in the range [1, count()].public StaticPropertyBagInterface getDefaultStyle()
getDefaultStyle in class TableElementnull).getModelDefaultStyle()public int getIndex()
getIndex in class CellVectorpublic LabelCell getLabel()
getLabel in class CellVectornull.public int getMaxPosition()
getMaxPosition in class CellVectorpublic StaticPropertyBagInterface getModelDefaultStyle()
getModelDefaultStyle in class TableElementgetDefaultStyle()public java.lang.String getPixelUnit()
getPixelUnit in class CellVectorpublic int getRightEdge()
protected 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 Column getThisColumn()
this, but if this
has been obsoleted then a different, but equivalent, instance will be
returned.
setObsolete()public final int getWidth()
public boolean isHeld()
isHeld in class CellVectortrue if the column is held and
false otherwise.TableView.getHeldColumns()public boolean isSelected()
public boolean isTransient()
Augments super to treat columns with intransient labels
as intransient.
isTransient in class CellVectortrue if the column is transient,
and false otherwise.TableElement.isTransient()public Column nextColumn()
null.
null.CellVector.previous()protected int onComputePreferredSize(java.awt.Graphics g)
onComputePreferredSize in class CellVectorg - The graphics context to measure the column in.
CellVector.computePreferredSize(java.awt.Graphics)
protected 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 Column previousColumn()
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 | |||||||||||||