|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.table.TableColumn
public class TableColumn
Describes a single table column.
Field Summary | |
---|---|
static int |
BOTTOM
A constant value to indicate alignment/positioning toward the bottom. |
static java.lang.String |
CELL_RENDERER_CHANGED_PROPERTY
|
static int |
CENTER
A constant value to indicate centered alignment/positioning. |
static java.lang.String |
HEADER_RENDERER_CHANGED_PROPERTY
|
static java.lang.String |
HEADER_VALUE_CHANGED_PROPERTY
|
static java.lang.String |
IDENTIFIER_CHANGED_PROPERTY
|
static int |
LEFT
A constant value to indicate alignment/positioning toward the left. |
static java.lang.String |
MODEL_INDEX_CHANGED_PROPERTY
|
static int |
RIGHT
A constant value to indicate alignment/positioning toward the right. |
static int |
TOP
A constant value to indicate alignment/positioning toward the top. |
static java.lang.String |
WIDTH_CHANGED_PROPERTY
|
static java.lang.String |
WIDTHUNITS_CHANGED_PROPERTY
|
Constructor Summary | |
---|---|
TableColumn()
This constructor is necessary for serialization and should otherwise not be used. |
|
TableColumn(int modelIndex)
Creates a TableColumn with the specified model index, undefined width, and undefined cell and header renderers. |
|
TableColumn(int modelIndex,
int width)
Creates a TableColumn with the specified model index and width, and undefined cell and header renderers. |
|
TableColumn(int modelIndex,
int width,
TableCellRenderer cellRenderer,
TableCellRenderer headerRenderer)
Creates a TableColumn with the specified model index, width, and cell and header renderers. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to the column. |
int |
getBottomPadding(int column,
int row,
java.lang.Object component)
Gets the bottom padding value for a given cell |
TableCellRenderer |
getCellRenderer()
Returns the cell renderer for this column. |
int |
getColumnHorizontalAlignment()
Gets the horizontal alignment of a column. |
int |
getColumnVerticalAlignment()
Gets the vertical alignment of a column. |
TableCellRenderer |
getHeaderRenderer()
Returns the header cell renderer for this column. |
java.lang.Object |
getHeaderValue()
Returns the header value for this column. |
java.lang.Object |
getIdentifier()
Returns the identifier for this column. |
int |
getLeftPadding(int column,
int row,
java.lang.Object component)
Gets the right padding value for a given cell |
int |
getModelIndex()
Returns the index of this column in the model. |
AbstractPaddingController |
getPaddingController()
Gets the padding controller used by this column. |
int |
getRightPadding(int column,
int row,
java.lang.Object component)
Gets the left padding value for a given cell |
int |
getTopPadding(int column,
int row,
java.lang.Object component)
Gets the top padding value for a given cell |
int |
getWidth()
Returns the width of this column, in pixels. |
int |
getWidthUnits()
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener from the column. |
void |
setCellRenderer(TableCellRenderer newValue)
Sets the cell renderer for this column. |
void |
setColumnHorizontalAlignment(int alignment)
Sets the horizontal alignment of a column. |
void |
setColumnVerticalAlignment(int alignment)
Sets the vertical alignment of a column. |
void |
setHeaderRenderer(TableCellRenderer newValue)
Sets the header cell renderer for this column. |
void |
setHeaderValue(java.lang.Object newValue)
Sets the header value for this column. |
void |
setIdentifer(java.lang.Object newValue)
Sets the identifier for this column. |
void |
setModelIndex(int newValue)
Sets the index of the column in the TableModel which
this TableColumn object represents. |
void |
setPaddingController(AbstractPaddingController paddingController)
Sets the padding controller used by this column. |
void |
setWidth(int newValue)
Sets the width of the column. |
void |
setWidthUnits(int widthUnits)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BOTTOM
public static final int TOP
public static final java.lang.String CELL_RENDERER_CHANGED_PROPERTY
public static final java.lang.String HEADER_RENDERER_CHANGED_PROPERTY
public static final java.lang.String HEADER_VALUE_CHANGED_PROPERTY
public static final java.lang.String IDENTIFIER_CHANGED_PROPERTY
public static final java.lang.String MODEL_INDEX_CHANGED_PROPERTY
public static final java.lang.String WIDTH_CHANGED_PROPERTY
public static final java.lang.String WIDTHUNITS_CHANGED_PROPERTY
Constructor Detail |
---|
public TableColumn()
public TableColumn(int modelIndex)
modelIndex
- The column index in the model from which this column
should display data.public TableColumn(int modelIndex, int width)
modelIndex
- The column index in the model from which this column
should display data.width
- The width of the column.public TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellRenderer headerRenderer)
modelIndex
- The column index in the model from which this column
should display data.width
- The width of the column.cellRenderer
- The cell renderer to use for rendering
values in this column. This parameter may be null if desired.headerRenderer
- The cell renderer to use for rendering header
values in this column. This parameter may be null if desired.Method Detail |
---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to add.public TableCellRenderer getCellRenderer()
public TableCellRenderer getHeaderRenderer()
public java.lang.Object getHeaderValue()
public java.lang.Object getIdentifier()
public int getModelIndex()
TableColumn
's. position within the
table.
public int getWidth()
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to remove.public void setCellRenderer(TableCellRenderer newValue)
newValue
- The new cell renderer for this column.public void setHeaderRenderer(TableCellRenderer newValue)
newValue
- The new header renderer for this column.public void setHeaderValue(java.lang.Object newValue)
newValue
- The new header value for this column.public void setIdentifer(java.lang.Object newValue)
newValue
- The new identifier for this column.public void setModelIndex(int newValue)
TableModel
which
this TableColumn
object represents. This value is
independent of the column's position within the column model, such that
columns may be displayed in an arbitrary order.
newValue
- The new model index of this column.public void setWidth(int newValue)
newValue
- The width of this column. A negative value indicates
an undefined width.public void setColumnHorizontalAlignment(int alignment)
alignment
- must be LEFT
, CENTER
or RIGHT
public int getColumnHorizontalAlignment()
public void setColumnVerticalAlignment(int alignment)
alignment
- must be TOP
, CENTER
or BOTTOM
public int getColumnVerticalAlignment()
public void setPaddingController(AbstractPaddingController paddingController)
public AbstractPaddingController getPaddingController()
public int getRightPadding(int column, int row, java.lang.Object component)
column
- column index of the cellrow
- row index of the cellcomponent
- component that resides in the cell
public int getLeftPadding(int column, int row, java.lang.Object component)
column
- column index of the cellrow
- row index of the cellcomponent
- component that resides in the cell
public int getTopPadding(int column, int row, java.lang.Object component)
column
- column index of the cellrow
- row index of the cellcomponent
- component that resides in the cell
public int getBottomPadding(int column, int row, java.lang.Object component)
column
- column index of the cellrow
- row index of the cellcomponent
- component that resides in the cell
public int getWidthUnits()
public void setWidthUnits(int widthUnits)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |