JIDE 3.5.15

com.jidesoft.list
Class DefaultGroupListModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by javax.swing.DefaultListModel
          extended by com.jidesoft.list.DefaultGroupListModel
All Implemented Interfaces:
GroupListModel, Serializable, ListModel

public class DefaultGroupListModel
extends DefaultListModel
implements GroupListModel

See Also:
Serialized Form

Field Summary
protected  Set<Integer> _headers
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
DefaultGroupListModel()
          Creates a new instance of DefaultGroupListModel
 
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
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Field Detail

_headers

protected Set<Integer> _headers
Constructor Detail

DefaultGroupListModel

public DefaultGroupListModel()
Creates a new instance of DefaultGroupListModel

Method Detail

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 set
group - 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

JIDE 3.5.15