com.jidesoft.list
Class DefaultGroupListModel
java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultListModel
com.jidesoft.list.DefaultGroupListModel
- All Implemented Interfaces:
- GroupListModel, Serializable, ListModel
public class DefaultGroupListModel
- extends DefaultListModel
- implements GroupListModel
- See Also:
- Serialized Form
Method Summary |
int[] |
getGroupCellIndices()
Returns all group cell indices |
int |
getGroupRowIndex(int row)
Returns the group row index where the group has the specified row. |
int |
getNextGroupRowIndex(int row)
Returns the next group row index where the previous group has the specified row, if any. |
boolean |
isGroupRow(int row)
Returns true if the specified row is a header, false otherwise. |
void |
setGroupRow(int row,
boolean group)
Set the specified row be group or not |
Methods inherited from class javax.swing.DefaultListModel |
add, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize |
_headers
protected Set<Integer> _headers
DefaultGroupListModel
public DefaultGroupListModel()
- Creates a new instance of DefaultGroupListModel
getGroupRowIndex
public int getGroupRowIndex(int row)
- Description copied from interface:
GroupListModel
- Returns the group row index where the group has the specified row.
- Specified by:
getGroupRowIndex
in interface GroupListModel
- Parameters:
row
- the row index.
- Returns:
- the group row index where the group has the specified row
getNextGroupRowIndex
public int getNextGroupRowIndex(int row)
- Description copied from interface:
GroupListModel
- Returns the next group row index where the previous group has the specified row, if any.
- Specified by:
getNextGroupRowIndex
in interface GroupListModel
- Parameters:
row
- the row index.
- Returns:
- the next group row index where the previous group has the specified row
isGroupRow
public boolean isGroupRow(int row)
- Returns true if the specified row is a header, false otherwise.
- Specified by:
isGroupRow
in interface GroupListModel
- Parameters:
row
- the row to be checked
- Returns:
- true if the specified row is a header, false otherwise
setGroupRow
public void setGroupRow(int row,
boolean group)
- Set the specified row be group or not
- Parameters:
row
- the specified row to be setgroup
- true if setting the row be group
getGroupCellIndices
public int[] getGroupCellIndices()
- Description copied from interface:
GroupListModel
- Returns all group cell indices
- Specified by:
getGroupCellIndices
in interface GroupListModel
- Returns:
- all group cell indices