This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.event
class RowSorterEvent

java.lang.Object extended by java.util.EventObject extended by javax.swing.event.RowSorterEvent
All Implemented Interfaces:
Serializable

public class RowSorterEvent
extends EventObject

RowSorterEvent provides notification of changes to a RowSorter. Two types of notification are possible:


Nested Class Summary
static enum

           Enumeration of the types of RowSorterEvents.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary

          Creates a RowSorterEvent of type SORT_ORDER_CHANGED.
RowSorterEvent(RowSorter source, RowSorterEvent.Type type, int[] previousRowIndexToModel)

          Creates a RowSorterEvent.
 
Method Summary
 int

          Returns the location of index in terms of the model prior to the sort.
 int

          Returns the number of rows before the sort.
 RowSorter

          Returns the source of the event as a RowSorter.
 RowSorterEvent.Type

          Returns the type of event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowSorterEvent

public RowSorterEvent(RowSorter source)
Creates a RowSorterEvent of type SORT_ORDER_CHANGED.

Parameters:
source - the source of the change

RowSorterEvent

public RowSorterEvent(RowSorter source,
                      RowSorterEvent.Type type,
                      int[] previousRowIndexToModel)
Creates a RowSorterEvent.

Parameters:
source - the source of the change
type - the type of event
previousRowIndexToModel - the mapping from model indices to view indices prior to the sort, may be null
Method Detail

convertPreviousRowIndexToModel

public int convertPreviousRowIndexToModel(int index)
Returns the location of 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.

Parameters:
index - the index in terms of the view
Returns:
the index in terms of the model prior to the sort, or -1 if the location is not valid or the mapping was not provided.

getPreviousRowCount

public int getPreviousRowCount()
Returns the number of rows before the sort. This method is only useful for events of type SORTED and if the last locations have not been provided will return 0.

Returns:
the number of rows in terms of the view prior to the sort

getSource

public RowSorter getSource()
Returns the source of the event as a RowSorter.

Overrides:
getSource in class EventObject
Returns:
the source of the event as a RowSorter

getType

public RowSorterEvent.Type getType()
Returns the type of event.

Returns:
the type of event


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.