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
23 * questions.
24 */
25
26 package javax.swing;
27
28 import javax.swing.event.*;
29 import java.io.Serializable;
30 import java.util.EventListener;
31
32 /**
33 * A generic implementation of SingleSelectionModel.
34 * <p>
35 * <strong>Warning:</strong>
36 * Serialized objects of this class will not be compatible with
37 * future Swing releases. The current serialization support is
38 * appropriate for short term storage or RMI between applications running
39 * the same version of Swing. As of 1.4, support for long term storage
40 * of all JavaBeans™
41 * has been added to the <code>java.beans</code> package.
42 * Please see {@link java.beans.XMLEncoder}.
43 *
44 * @author Dave Moore
45 * @since 1.2
46 */
47 @SuppressWarnings("serial") // Same-version serialization only
48 public class DefaultSingleSelectionModel implements SingleSelectionModel,
49 Serializable {
50 /**
51 * Only one ModelChangeEvent is needed per model instance since the
52 * event's only (read-only) state is the source property. The source
53 * of events generated here is always "this".
54 */
55 protected transient ChangeEvent changeEvent = null;
56 /** The collection of registered listeners */
57 protected EventListenerList listenerList = new EventListenerList();
58
59 private int index = -1;
60
|
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
23 * questions.
24 */
25
26 package javax.swing;
27
28 import javax.swing.event.*;
29 import java.io.Serializable;
30 import java.util.EventListener;
31
32 /**
33 * A generic implementation of SingleSelectionModel.
34 * <p>
35 * <strong>Warning:</strong>
36 * Serialized objects of this class will not be compatible with
37 * future Swing releases. The current serialization support is
38 * appropriate for short term storage or RMI between applications running
39 * the same version of Swing. As of 1.4, support for long term storage
40 * of all JavaBeans
41 * has been added to the <code>java.beans</code> package.
42 * Please see {@link java.beans.XMLEncoder}.
43 *
44 * @author Dave Moore
45 * @since 1.2
46 */
47 @SuppressWarnings("serial") // Same-version serialization only
48 public class DefaultSingleSelectionModel implements SingleSelectionModel,
49 Serializable {
50 /**
51 * Only one ModelChangeEvent is needed per model instance since the
52 * event's only (read-only) state is the source property. The source
53 * of events generated here is always "this".
54 */
55 protected transient ChangeEvent changeEvent = null;
56 /** The collection of registered listeners */
57 protected EventListenerList listenerList = new EventListenerList();
58
59 private int index = -1;
60
|