public class ColumnGroupModel extends Object implements IPersistable
Modifier and Type | Class and Description |
---|---|
class |
ColumnGroupModel.ColumnGroup |
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
ColumnGroupModel() |
Modifier and Type | Method and Description |
---|---|
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 index(s) 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) |
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) |
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
- to add the indexes tocolumnIndexesToInsert
- 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 grouptrue
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 grouptrue
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.Copyright © 2013. All Rights Reserved.