1 /*
2 * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
24 */
25 package javax.swing.event;
26
27 import javax.swing.RowSorter;
28
29 /**
30 * <code>RowSorterEvent</code> provides notification of changes to
31 * a <code>RowSorter</code>. Two types of notification are possible:
32 * <ul>
33 * <li><code>Type.SORT_ORDER_CHANGED</code>: indicates the sort order has
34 * changed. This is typically followed by a notification of:
35 * <li><code>Type.SORTED</code>: indicates the contents of the model have
36 * been transformed in some way. For example, the contents may have
37 * been sorted or filtered.
38 * </ul>
39 *
40 * @see javax.swing.RowSorter
41 * @since 1.6
42 */
43 public class RowSorterEvent extends java.util.EventObject {
44 private Type type;
45 private int[] oldViewToModel;
46
47 /**
48 * Enumeration of the types of <code>RowSorterEvent</code>s.
49 *
50 * @since 1.6
51 */
52 public enum Type {
53 /**
54 * Indicates the sort order has changed.
55 */
56 SORT_ORDER_CHANGED,
57
58 /**
59 * Indicates the contents have been newly sorted or
60 * transformed in some way.
61 */
62 SORTED
63 }
|
1 /*
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
24 */
25 package javax.swing.event;
26
27 import javax.swing.RowSorter;
28
29 /**
30 * <code>RowSorterEvent</code> provides notification of changes to
31 * a <code>RowSorter</code>. Two types of notification are possible:
32 * <ul>
33 * <li><code>Type.SORT_ORDER_CHANGED</code>: indicates the sort order has
34 * changed. This is typically followed by a notification of:
35 * <li><code>Type.SORTED</code>: indicates the contents of the model have
36 * been transformed in some way. For example, the contents may have
37 * been sorted or filtered.
38 * </ul>
39 *
40 * @see javax.swing.RowSorter
41 * @since 1.6
42 */
43 public class RowSorterEvent extends java.util.EventObject {
44 private static final long serialVersionUID = -2701905455516718736L;
45
46 private Type type;
47 private int[] oldViewToModel;
48
49 /**
50 * Enumeration of the types of <code>RowSorterEvent</code>s.
51 *
52 * @since 1.6
53 */
54 public enum Type {
55 /**
56 * Indicates the sort order has changed.
57 */
58 SORT_ORDER_CHANGED,
59
60 /**
61 * Indicates the contents have been newly sorted or
62 * transformed in some way.
63 */
64 SORTED
65 }
|