|
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 com.jidesoft.list.DefaultListModelWrapper com.jidesoft.list.SortableListModel com.jidesoft.list.SortableGroupableListModel
public class SortableGroupableListModel
Field Summary |
---|
Fields inherited from class com.jidesoft.list.SortableListModel |
---|
SORT_ASCENDING, SORT_DESCENDING, UNSORTED |
Fields inherited from class com.jidesoft.list.DefaultListModelWrapper |
---|
_adjustingIndexes, _indexes, _model |
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
SortableGroupableListModel()
|
|
SortableGroupableListModel(ListModel model)
Creates a SortableGroupableListModel from any list model. |
Method Summary | |
---|---|
void |
addListGroupChangeListener(ListGroupChangeListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
protected void |
fireGroupChanged(Object source)
AbstractListModel subclasses must call this method
after the group for any of the item is changed. |
Object |
getGroupAt(int index)
Returns the group of 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 |
groupChanged(ListGroupChangeEvent e)
Sent after the grouping of GroupableListModel
has been changed. |
void |
removeListGroupChangeListener(ListGroupChangeListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setActualModel(ListModel model)
Sets the actual list model. |
void |
setSortOrder(int sortOrder)
Sets the sort order. |
void |
unsort()
Unsorts the list model. |
Methods inherited from class com.jidesoft.list.SortableListModel |
---|
addSortListener, compare, compare, contentsChanged, fireSortEvent, fireSortingEvent, getComparator, getComparatorContext, getSortableListModel, getSortListeners, getSortOrder, getSortRanges, intervalAdded, intervalRemoved, isAlwaysUseComparators, isAutoResort, isOptimized, removeSortListener, reset, resort, search, setAlwaysUseComparators, setAutoResort, setComparator, setComparatorContext, setIndexes, setOptimized, sort, sort, sort |
Methods inherited from class com.jidesoft.list.DefaultListModelWrapper |
---|
addIndexChangeListener, createCompoundListDataEvent, fireEvents, fireIndexChanged, fireListDataEvent, getActualIndexAt, getActualModel, getElementAt, getIndexAt, getIndexChangeListeners, getIndexes, getSize, reallocateIndexes, removeIndexChangeListener |
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, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, getElementAt, getSize, removeListDataListener |
Constructor Detail |
---|
public SortableGroupableListModel()
public SortableGroupableListModel(ListModel model)
model
- the list modelMethod Detail |
---|
public void setActualModel(ListModel model)
setActualModel
in interface ListModelWrapper
setActualModel
in class DefaultListModelWrapper
model
- the list model.public void setSortOrder(int sortOrder)
setSortOrder
in class SortableListModel
sortOrder
- the new sort order. The value could be SortableListModel.UNSORTED
, SortableListModel.SORT_DESCENDING
, or SortableListModel.SORT_ASCENDING
.public void unsort()
unsort
in class SortableListModel
public Object getGroupAt(int index)
GroupableListModel
getGroupAt
in interface GroupableListModel
index
- the index of element
GroupableListModel.getGroups()
public Object[] getGroups()
GroupableListModel
getGroups
in interface GroupableListModel
GroupableListModel.getGroupAt(int)
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 the group for any of the item is changed.
source
- the ListModel
that changed, typically "this"public void groupChanged(ListGroupChangeEvent e)
ListGroupChangeListener
GroupableListModel
has been changed.
groupChanged
in interface ListGroupChangeListener
e
- a ListGroupChangeListener
encapsulating the
event information
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |