|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel
public class ColumnGroupModel
Tracks: Columns (by index) in a column Group. Does not keep the column indexes in any defined order. Expand/collapse state of the Group. Name of the Column Group (CG)
Nested Class Summary | |
---|---|
class |
ColumnGroupModel.ColumnGroup
|
Field Summary |
---|
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable |
---|
DOT, VALUE_SEPARATOR |
Constructor Summary | |
---|---|
ColumnGroupModel()
|
Method Summary | |
---|---|
void |
addColumnGroup(ColumnGroupModel.ColumnGroup columnGroup)
|
void |
addColumnsIndexesToGroup(String colGroupName,
int... bodyColumnIndexs)
Creates the column group if one does not exist with the given name and adds the column indexes to it. |
void |
clear()
|
List<Integer> |
getAllIndexesInGroups()
|
int |
getCollapsedColumnCount()
|
ColumnGroupModel.ColumnGroup |
getColumnGroupByIndex(int columnIndex)
|
ColumnGroupModel.ColumnGroup |
getColumnGroupByName(String groupName)
|
int |
getColumnGroupPositionFromIndex(int bodyColumnIndex)
|
boolean |
insertColumnIndexes(String colGroupName,
int... columnIndexesToInsert)
This method will add column indexes to an existing group. |
void |
insertStaticColumnIndexes(String colGroupName,
int... columnIndexesToInsert)
This method will add static column index(s) to an existing group |
boolean |
isAGroup(String cellValue)
|
boolean |
isEmpty()
|
boolean |
isPartOfACollapseableGroup(int columnIndex)
Check if the column at the specified column index belongs to a ColumnGroupModel.ColumnGroup and if this ColumnGroupModel.ColumnGroup is collabseable. |
boolean |
isPartOfAGroup(int bodyColumnIndex)
|
boolean |
isPartOfAnUnbreakableGroup(int columnIndex)
Check if the column at the specified column index belongs to a ColumnGroupModel.ColumnGroup and if this ColumnGroupModel.ColumnGroup is unbreakable. |
boolean |
isStaticColumn(int bodyColumnIndex)
|
void |
loadState(String prefix,
Properties properties)
Restore the state out of the given Properties identified by the specified prefix. |
void |
notifyListeners()
|
void |
registerColumnGroupModelListener(IColumnGroupModelListener listener)
|
void |
removeColumnGroup(ColumnGroupModel.ColumnGroup columnGroup)
|
boolean |
removeColumnIndexes(String colGroupName,
int... columnIndexesToRemove)
This method will remove column indexes from an existing group. |
void |
saveState(String prefix,
Properties properties)
Saves the state to the given Properties using the specified prefix. |
void |
setColumnGroupCollapseable(int columnIndex,
boolean collabseable)
Set the ColumnGroupModel.ColumnGroup to which the column and the specified column
index belongs to, to be collapseable or not. |
void |
setColumnGroupUnbreakable(int columnIndex,
boolean unbreakable)
Set the ColumnGroupModel.ColumnGroup to which the column and the specified column
index belongs to, to be unbreakable/breakable. |
void |
setStaticColumnIndexesByGroup(String colGroupName,
int[] staticColumnIndexes)
Add static columns identified by staticColumnIndexes to the
given columnGroup colGroupName . |
int |
size()
|
String |
toString()
|
void |
unregisterColumnGroupModelListener(IColumnGroupModelListener listener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColumnGroupModel()
Method Detail |
---|
public void registerColumnGroupModelListener(IColumnGroupModelListener listener)
public void unregisterColumnGroupModelListener(IColumnGroupModelListener listener)
public void notifyListeners()
public void saveState(String prefix, Properties properties)
IPersistable
saveState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the
state configuration name.properties
- The Properties instance to save the state to.public void loadState(String prefix, Properties properties)
IPersistable
loadState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the
state configuration name.properties
- The Properties instance to load the state from.public void addColumnsIndexesToGroup(String colGroupName, int... bodyColumnIndexs)
insertColumnIndexes(String, int[])
public boolean insertColumnIndexes(String colGroupName, int... columnIndexesToInsert)
colGroupName
- The name of the column group to which the column indexes
should be added tocolumnIndexesToInsert
- The column indexes to insert.
public boolean removeColumnIndexes(String colGroupName, int... columnIndexesToRemove)
colGroupName
- The name of the column group from which the column indexes
should be removed.columnIndexesToRemove
- The column indexes to remove.
true
if at least one column was removed from the
column group.public void setStaticColumnIndexesByGroup(String colGroupName, int[] staticColumnIndexes)
staticColumnIndexes
to the
given columnGroup colGroupName
. Static columns remains
visible when a column group is collapsed.
colGroupName
- to add the indexes tostaticColumnIndexes
- public void insertStaticColumnIndexes(String colGroupName, int... columnIndexesToInsert)
colGroupName
- to add the indexes tocolumnIndexesToInsert
- public ColumnGroupModel.ColumnGroup getColumnGroupByName(String groupName)
public ColumnGroupModel.ColumnGroup getColumnGroupByIndex(int columnIndex)
public void addColumnGroup(ColumnGroupModel.ColumnGroup columnGroup)
public void removeColumnGroup(ColumnGroupModel.ColumnGroup columnGroup)
public boolean isPartOfAGroup(int bodyColumnIndex)
public boolean isAGroup(String cellValue)
public void clear()
public int size()
public boolean isEmpty()
public List<Integer> getAllIndexesInGroups()
public boolean isStaticColumn(int bodyColumnIndex)
bodyColumnIndex
is contained in the list of
static columns of the column group this index belongs topublic int getCollapsedColumnCount()
public int getColumnGroupPositionFromIndex(int bodyColumnIndex)
bodyColumnIndex
-
public boolean isPartOfACollapseableGroup(int columnIndex)
ColumnGroupModel.ColumnGroup
and if this ColumnGroupModel.ColumnGroup
is collabseable.
columnIndex
- The column index used to retrieve the corresponding column
group
true
if the column at the specified column index
belongs to a ColumnGroupModel.ColumnGroup
and this ColumnGroupModel.ColumnGroup
is
collabseable, false
if not.public void setColumnGroupCollapseable(int columnIndex, boolean collabseable)
ColumnGroupModel.ColumnGroup
to which the column and the specified column
index belongs to, to be collapseable or not.
columnIndex
- The column index used to retrieve the corresponding column
groupcollabseable
- true
to set the column group collapseable,
false
to set it not to be collapseable.public boolean isPartOfAnUnbreakableGroup(int columnIndex)
ColumnGroupModel.ColumnGroup
and if this ColumnGroupModel.ColumnGroup
is unbreakable.
columnIndex
- The column index used to retrieve the corresponding column
group
true
if the column at the specified column index
belongs to a ColumnGroupModel.ColumnGroup
and this ColumnGroupModel.ColumnGroup
is
unbreakable, false
if not.public void setColumnGroupUnbreakable(int columnIndex, boolean unbreakable)
ColumnGroupModel.ColumnGroup
to which the column and the specified column
index belongs to, to be unbreakable/breakable.
columnIndex
- The column index used to retrieve the corresponding column
groupunbreakable
- true
to set the column group unbreakable,
false
to remove the unbreakable state.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |