|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel javax.swing.DefaultListModel com.jidesoft.list.DefaultGroupableListModel
public class DefaultGroupableListModel
This is a default implementation for GroupableListModel. It added methods such as setGroupAt(Object,int)
,
setGroups(Object[])
and renameGroup(Object,Object)
to allow user to change groups directly.
Field Summary |
---|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultGroupableListModel()
Creates a new instance of DefaultGroupableListModel |
Method Summary | |
---|---|
void |
addListGroupChangeListener(ListGroupChangeListener l)
Adds a listener to the list that's notified each time a change to the groups of the list model occurs. |
protected void |
fireGroupChanged(Object source)
AbstractListModel subclasses must call this method after one or more elements are added to
the model. |
Object |
getGroupAt(int index)
Returns the group close before the element at the specified index. |
Object[] |
getGroups()
Returns all groups, which control the order of appearance. |
ListGroupChangeListener[] |
getListGroupChangeListeners()
Returns an array of all the list group change listeners registered on this DefaultGroupableListModel . |
void |
removeListGroupChangeListener(ListGroupChangeListener l)
Removes a listener from the list that's notified each time a change to the groups of the list model occurs. |
void |
renameGroup(Object oldGroup,
Object newGroup)
Rename a specified group. |
void |
setGroupAt(Object group,
int index)
Set the new group for the element at the specified index. |
void |
setGroups(Object[] groups)
Set a new array of groups for this DefaultGroupableListModel |
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 |
Constructor Detail |
---|
public DefaultGroupableListModel()
Method Detail |
---|
public void setGroupAt(Object group, int index)
index
- the index of elementgroup
- a group to be addedpublic void setGroups(Object[] groups)
DefaultGroupableListModel
groups
- the new array of group objectsgetGroups()
public Object getGroupAt(int index)
getGroupAt
in interface GroupableListModel
index
- the index of element
GroupableListModel.getGroups()
public Object[] getGroups()
GroupableListModel
getGroups
in interface GroupableListModel
GroupableListModel.getGroupAt(int)
public void renameGroup(Object oldGroup, Object newGroup)
oldGroup
- the old group to be changednewGroup
- the new group object.public void addListGroupChangeListener(ListGroupChangeListener l)
addListGroupChangeListener
in interface GroupableListModel
l
- the ListGroupChangeListener
to be addedpublic void removeListGroupChangeListener(ListGroupChangeListener l)
removeListGroupChangeListener
in interface GroupableListModel
l
- the ListGroupChangeListener
to be removedpublic ListGroupChangeListener[] getListGroupChangeListeners()
DefaultGroupableListModel
.
ListGroupChangeListener
s, or an empty array if no list data listeners
are currently registeredaddListGroupChangeListener(com.jidesoft.list.ListGroupChangeListener)
,
removeListGroupChangeListener(com.jidesoft.list.ListGroupChangeListener)
protected void fireGroupChanged(Object source)
AbstractListModel
subclasses must call this method after one or more elements are added to
the model. The new elements are specified by a closed interval index0, index1 -- the end points are included.
Note that index0 need not be less than or equal to index1.
source
- the GroupableListModel
that changed, typically "this"
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |