|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.swing.event
|
Nested Class Summary | |
---|---|
static class |
RowSorterEvent.Type
Enumeration of the types of RowSorterEvent s. |
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
RowSorterEvent(RowSorter source)
Creates a RowSorterEvent of type
SORT_ORDER_CHANGED . |
|
RowSorterEvent(RowSorter source,
RowSorterEvent.Type type,
int[] previousRowIndexToModel)
Creates a RowSorterEvent . |
Method Summary | |
---|---|
int |
convertPreviousRowIndexToModel(int index)
Returns the location of index in terms of the
model prior to the sort. |
int |
getPreviousRowCount()
Returns the number of rows before the sort. |
RowSorter |
getSource()
Returns the source of the event as a RowSorter . |
RowSorterEvent.Type |
getType()
Returns the type of event. |
Methods inherited from class java.util.EventObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RowSorterEvent(RowSorter source)
RowSorterEvent
of type
SORT_ORDER_CHANGED
.
source
- the source of the change
IllegalArgumentException
- if source
is
null
public RowSorterEvent(RowSorter source, RowSorterEvent.Type type, int[] previousRowIndexToModel)
RowSorterEvent
.
source
- the source of the changetype
- the type of eventpreviousRowIndexToModel
- the mapping from model indices to
view indices prior to the sort, may be null
IllegalArgumentException
- if source or type
is
null
Method Detail |
---|
public RowSorter getSource()
RowSorter
.
getSource
in class EventObject
RowSorter
public RowSorterEvent.Type getType()
public int convertPreviousRowIndexToModel(int index)
index
in terms of the
model prior to the sort. This method is only useful for events
of type SORTED
. This method will return -1 if the
index is not valid, or the locations prior to the sort have not
been provided.
index
- the index in terms of the view
public int getPreviousRowCount()
SORTED
and if the
last locations have not been provided will return 0.