< prev index next >

src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java

Print this page

        

*** 36,46 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author Dave Moore * @since 1.2 */ --- 36,46 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. * * @author Dave Moore * @since 1.2 */
*** 92,119 **** } return ret; } /** ! * Adds a <code>ChangeListener</code> to the button. */ public void addChangeListener(ChangeListener l) { listenerList.add(ChangeListener.class, l); } /** ! * Removes a <code>ChangeListener</code> from the button. */ public void removeChangeListener(ChangeListener l) { listenerList.remove(ChangeListener.class, l); } /** * Returns an array of all the change listeners ! * registered on this <code>DefaultSingleSelectionModel</code>. * ! * @return all of this model's <code>ChangeListener</code>s * or an empty * array if no change listeners are currently registered * * @see #addChangeListener * @see #removeChangeListener --- 92,119 ---- } return ret; } /** ! * Adds a {@code ChangeListener} to the button. */ public void addChangeListener(ChangeListener l) { listenerList.add(ChangeListener.class, l); } /** ! * Removes a {@code ChangeListener} from the button. */ public void removeChangeListener(ChangeListener l) { listenerList.remove(ChangeListener.class, l); } /** * Returns an array of all the change listeners ! * registered on this {@code DefaultSingleSelectionModel}. * ! * @return all of this model's {@code ChangeListener}s * or an empty * array if no change listeners are currently registered * * @see #addChangeListener * @see #removeChangeListener
*** 150,163 **** * <code><em>Foo</em>Listener</code>s * upon this model. * <code><em>Foo</em>Listener</code>s * are registered using the <code>add<em>Foo</em>Listener</code> method. * <p> ! * You can specify the <code>listenerType</code> argument * with a class literal, such as <code><em>Foo</em>Listener.class</code>. ! * For example, you can query a <code>DefaultSingleSelectionModel</code> ! * instance <code>m</code> * for its change listeners * with the following code: * * <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> * --- 150,163 ---- * <code><em>Foo</em>Listener</code>s * upon this model. * <code><em>Foo</em>Listener</code>s * are registered using the <code>add<em>Foo</em>Listener</code> method. * <p> ! * You can specify the {@code listenerType} argument * with a class literal, such as <code><em>Foo</em>Listener.class</code>. ! * For example, you can query a {@code DefaultSingleSelectionModel} ! * instance {@code m} * for its change listeners * with the following code: * * <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> *
*** 165,183 **** * this method returns an empty array. * * @param <T> the type of {@code EventListener} class being requested * @param listenerType the type of listeners requested; * this parameter should specify an interface ! * that descends from <code>java.util.EventListener</code> * @return an array of all objects registered as * <code><em>Foo</em>Listener</code>s * on this model, * or an empty array if no such * listeners have been added ! * @exception ClassCastException if <code>listenerType</code> doesn't * specify a class or interface that implements ! * <code>java.util.EventListener</code> * * @see #getChangeListeners * * @since 1.3 */ --- 165,183 ---- * this method returns an empty array. * * @param <T> the type of {@code EventListener} class being requested * @param listenerType the type of listeners requested; * this parameter should specify an interface ! * that descends from {@code java.util.EventListener} * @return an array of all objects registered as * <code><em>Foo</em>Listener</code>s * on this model, * or an empty array if no such * listeners have been added ! * @exception ClassCastException if {@code listenerType} doesn't * specify a class or interface that implements ! * {@code java.util.EventListener} * * @see #getChangeListeners * * @since 1.3 */
< prev index next >