|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.model.treetable.DefaultColumnModel
public class DefaultColumnModel
The default column model implementation used throughout the Gantt chart framework.
IColumnModelListener
Field Summary | |
---|---|
protected KeyColumn |
keyColumn
The key column is a specialization of the regular tree table column. |
Constructor Summary | |
---|---|
DefaultColumnModel()
Constructs a new column model, which only has no columns except for the special key column. |
|
DefaultColumnModel(java.util.Collection<TreeTableColumn> cols)
Constructs a new column model, which consists of a key column and the given list of standard tree table columns. |
|
DefaultColumnModel(java.lang.String[] cols)
Constructs a new column model, which consists of a key column and the given list of standard tree table columns. |
|
DefaultColumnModel(TreeTableColumn[] cols)
Constructs a new column model, which consists of a key column and the given list of standard tree table columns. |
Method Summary | |
---|---|
void |
addColumn(TreeTableColumn col)
Adds a column to the model. |
void |
addColumnModelListener(IColumnModelListener l)
Adds a column model listener to the model. |
protected void |
fireColumnChanged(ColumnModelEvent evt)
Forwards the given model event to all column model listeners attached to the model. |
TreeTableColumn |
getColumn(int index)
Returns the tree table column at the given index. |
int |
getColumnCount()
Returns the total number of columns added to the model. |
int |
getColumnIndex(TreeTableColumn column)
Returns the index of the given column if it is a member of the model ( Integer.MAX_VALUE otherwise). |
KeyColumn |
getKeyColumn()
Returns the special key column. |
int |
getTotalColumnWidth()
Returns the total width as calculated by the widths of the individual columns. |
void |
insertColumn(TreeTableColumn col,
int index)
Inserts a new column at the given index. |
void |
moveColumn(int indexFrom,
int indexTo)
Moves a column that is already a member of the model from one location to another. |
void |
removeColumn(TreeTableColumn col)
Removes the given column from the model. |
void |
removeColumnModelListener(IColumnModelListener l)
Removes a column model listener. |
void |
setColumns(java.util.Collection<TreeTableColumn> cols)
Replaces the current list of tree table columns with the given collection of columns. |
void |
setColumns(TreeTableColumn[] cols)
Replaces the current list of tree table columns with the given array of columns. |
void |
setKeyColumn(KeyColumn column)
Sets the special key column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected KeyColumn keyColumn
ITreeTableModel.getKey(Object)
,
ITreeTableNode.getKey()
Constructor Detail |
---|
public DefaultColumnModel()
public DefaultColumnModel(TreeTableColumn[] cols)
cols
- a list of tree table columnspublic DefaultColumnModel(java.lang.String[] cols)
cols
- a list of tree table column namespublic DefaultColumnModel(java.util.Collection<TreeTableColumn> cols)
cols
- a list of tree table columnsMethod Detail |
---|
public void setKeyColumn(KeyColumn column)
IColumnModel
setKeyColumn
in interface IColumnModel
column
- the key columnpublic KeyColumn getKeyColumn()
IColumnModel
getKeyColumn
in interface IColumnModel
public void addColumn(TreeTableColumn col)
addColumn
in interface IColumnModel
col
- the column to addpublic void insertColumn(TreeTableColumn col, int index)
col
- the column to insertindex
- the position where to insert the new columnpublic void moveColumn(int indexFrom, int indexTo)
moveColumn
in interface IColumnModel
indexFrom
- the previous location of the columnindexTo
- the new location of the columnpublic void removeColumn(TreeTableColumn col)
removeColumn
in interface IColumnModel
col
- the column to removepublic void setColumns(java.util.Collection<TreeTableColumn> cols)
cols
- the new table columnssetColumns(TreeTableColumn[])
public void setColumns(TreeTableColumn[] cols)
cols
- the new table columnssetColumns(Collection)
public int getColumnCount()
IColumnModel
getColumnCount
in interface IColumnModel
public TreeTableColumn getColumn(int index)
IColumnModel
getColumn
in interface IColumnModel
index
- the index for which to return the column
public int getColumnIndex(TreeTableColumn column)
IColumnModel
getColumnIndex
in interface IColumnModel
column
- the column for which to return the index
public void addColumnModelListener(IColumnModelListener l)
IColumnModel
addColumnModelListener
in interface IColumnModel
l
- the new listenerpublic void removeColumnModelListener(IColumnModelListener l)
IColumnModel
removeColumnModelListener
in interface IColumnModel
l
- the listener to removeprotected void fireColumnChanged(ColumnModelEvent evt)
evt
- the event to forwardpublic int getTotalColumnWidth()
IColumnModel
getTotalColumnWidth
in interface IColumnModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |