|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.util.NamedObject com.dlsc.flexgantt.model.treetable.TreeTableColumn<T>
T
- the object type of the header valuepublic class TreeTableColumn<T>
A tree table column encapsulates all information required in order to render a header for the column, to control the user interaction with the column (e.g. sorting), and to assist in the lookup of the appropriate cell editors and renderers. Columns can be added to, removed from, or inserted into a column model. Each column has a name. Each column can also have an optional header value object, which can be used by a column header renderer to draw the column's header. Each column also has a model index that is used to retrieve values from a tree table model. The name of a column is used in various other UI controls (column chooser, popup menu).
IColumnModel
,
KeyColumn
,
IColumnHeaderRenderer
,
ITreeTableModel.getColumnValue(Object, int)
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_COLUMN_CLASS
A property constant used for property change events that get fired when the column class of the column gets changed. |
static java.lang.String |
PROPERTY_HEADER_VALUE
A property constant used for property change events that get fired when the header value of the column gets changed. |
static java.lang.String |
PROPERTY_MAX_WIDTH
A property constant used for property change events that get fired when the maximum width of the column gets changed. |
static java.lang.String |
PROPERTY_MIN_WIDTH
A property constant used for property change events that get fired when the minimum width of the column gets changed. |
static java.lang.String |
PROPERTY_MODEL_INDEX
A property constant used for property change events that get fired when the model index of the column gets changed. |
static java.lang.String |
PROPERTY_WIDTH
A property constant used for property change events that get fired when the width of the column gets changed. |
Fields inherited from class com.dlsc.flexgantt.util.NamedObject |
---|
PROPERTY_NAME |
Constructor Summary | |
---|---|
TreeTableColumn(java.lang.String name,
java.lang.Class columnClass)
Constructs a new tree table column. |
|
TreeTableColumn(java.lang.String name,
java.lang.Class columnClass,
int modelIndex)
Constructs a new tree table column. |
Method Summary | |
---|---|
java.lang.Class |
getColumnClass()
Returns the object type of the data shown in the column. |
T |
getHeaderValue()
Returns the object that represents the value used for the header renderer. |
int |
getMaximumWidth()
Returns the column's maximum width. |
int |
getMinimumWidth()
Returns the minimum width of the column. |
int |
getModelIndex()
Returns the column's model index which is independent of the column's current position within the tree table. |
SortDirection[] |
getSupportedSortDirections()
Returns the sort directions that are supported by the tree table header. |
int |
getWidth()
Returns the current width of the column. |
boolean |
isSortable()
Determines if the column is sortable at all, when it supports SortDirection.ASCENDING or SortDirection.DESCENDING . |
boolean |
isSupported(SortDirection direction)
Determines if the given sort direction is supported by the tree table header. |
void |
setColumnClass(java.lang.Class cl)
Specifies a new object type for the data shown in the column. |
void |
setHeaderValue(T value)
Sets a new value that will be used by a IColumnHeaderRenderer to
draw a header for the column. |
void |
setMaximumWidth(int maxWidth)
Sets a new maximum width on the column. |
void |
setMinimumWidth(int minWidth)
Sets a new minimum width on the column. |
void |
setModelIndex(int index)
Specifies a new model index represented by the column. |
void |
setSupportedSortDirections(SortDirection[] directions)
Sets the sort directions that are supported by the tree table header. |
void |
setWidth(int width)
Sets the preferred width of the column. |
java.lang.String |
toString()
Returns the result of headerValue.toString() . |
Methods inherited from class com.dlsc.flexgantt.util.NamedObject |
---|
addPropertyChangeListener, compareTo, getChangeSupport, getName, removePropertyChangeListener, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_WIDTH
public static final java.lang.String PROPERTY_HEADER_VALUE
public static final java.lang.String PROPERTY_MIN_WIDTH
public static final java.lang.String PROPERTY_MAX_WIDTH
public static final java.lang.String PROPERTY_COLUMN_CLASS
public static final java.lang.String PROPERTY_MODEL_INDEX
Constructor Detail |
---|
public TreeTableColumn(java.lang.String name, java.lang.Class columnClass, int modelIndex)
name
- the name of the column (used for sorting and in menus)columnClass
- the object type of the objects shown in the column (used for
looking up the correct editor and renderer for cells where no
value can be found)modelIndex
- the index of the data in the tree table modelpublic TreeTableColumn(java.lang.String name, java.lang.Class columnClass)
name
- the name of the column (used for sorting and in menus)columnClass
- the object type of the objects shown in the column (used for
looking up the correct editor and renderer for cells where no
value can be found)Method Detail |
---|
public T getHeaderValue()
IColumnHeaderRenderer
public void setHeaderValue(T value)
IColumnHeaderRenderer
to
draw a header for the column.
value
- the new value used for rendering the header of the columnpublic boolean isSortable()
SortDirection.ASCENDING
or SortDirection.DESCENDING
.
isSupported(SortDirection)
public int getModelIndex()
public void setModelIndex(int index)
index
- public void setWidth(int width)
PROPERTY_WIDTH
.
width
- the width of the columnpublic int getWidth()
setWidth(int)
public java.lang.String toString()
headerValue.toString()
.
toString
in class NamedObject
NamedObject.getName()
public int getMinimumWidth()
setMinimumWidth(int)
public void setMinimumWidth(int minWidth)
PROPERTY_MIN_WIDTH
.
minWidth
- the new minimum width of the columngetMinimumWidth()
public int getMaximumWidth()
setMaximumWidth(int)
public void setMaximumWidth(int maxWidth)
PROPERTY_MAX_WIDTH
.
maxWidth
- the new maximum width of the columngetMaximumWidth()
public java.lang.Class getColumnClass()
setColumnClass(Class)
public void setColumnClass(java.lang.Class cl)
cl
- the column value's object typegetColumnClass()
public SortDirection[] getSupportedSortDirections()
public void setSupportedSortDirections(SortDirection[] directions)
directions
- the supported sort directionspublic boolean isSupported(SortDirection direction)
direction
- the sort direction to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |