public class RowSorterEvent extends EventObject
RowSorterEvent提供了对RowSorter的更改RowSorter 。 
       有两种类型的通知是可能的: 
       Type.SORT_ORDER_CHANGED :表示排序顺序已更改。 这通常是以下通知: Type.SORTED :表示模型的内容已经以某种方式进行了转换。 例如,内容可能已被排序或过滤。 RowSorter 
       | Modifier and Type | Class and Description | 
|---|---|
| static class  | RowSorterEvent.Type
              枚举类型 
              RowSorterEvents。 | 
source| Constructor and Description | 
|---|
| RowSorterEvent(RowSorter source)
              创建 
              RowSorterEvent类型SORT_ORDER_CHANGED。 | 
| RowSorterEvent(RowSorter source, RowSorterEvent.Type type, int[] previousRowIndexToModel)
              创建一个 
              RowSorterEvent。 | 
| Modifier and Type | Method and Description | 
|---|---|
| int | convertPreviousRowIndexToModel(int index)
              根据排序前的模型返回 
              index的位置。 | 
| int | getPreviousRowCount()
              返回排序前的行数。 
             | 
| RowSorter | getSource()
              将事件的来源作为 
              RowSorter。 | 
| RowSorterEvent.Type | getType()
              返回事件的类型。 
             | 
toStringpublic RowSorterEvent(RowSorter source)
RowSorterEvent类型 
           SORT_ORDER_CHANGED 。 
          source - 更改的来源 
           IllegalArgumentException - 如果 
            source是 
            null 
           public RowSorterEvent(RowSorter source, RowSorterEvent.Type type, int[] previousRowIndexToModel)
RowSorterEvent 。 
          source - 更改的来源 
           type - 事件的类型 
           previousRowIndexToModel - 在排序之前从模型索引到查看索引的映射可能是 
            null 
           IllegalArgumentException - 如果来源或 
            type是 
            null 
           public RowSorter getSource()
RowSorter 。 
          getSource在 
            EventObject 
           RowSorter 
           public RowSorterEvent.Type getType()
public int convertPreviousRowIndexToModel(int index)
index的位置。 
           此方法仅适用于类型为SORTED的事件。 
           如果索引无效,或者未提供排序前的位置,此方法将返回-1。 
          index - 视图中的指数 
           public int getPreviousRowCount()
SORTED的事件,并且最后的位置未提供将返回0。 
           Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.