< prev index next >

src/java.desktop/share/classes/java/awt/event/ItemEvent.java

Print this page

        

*** 30,45 **** /** * A semantic event which indicates that an item was selected or deselected. * This high-level event is generated by an ItemSelectable object (such as a * List) when an item is selected or deselected by the user. ! * The event is passed to every <code>ItemListener</code> object which * registered to receive such events using the component's ! * <code>addItemListener</code> method. * <P> ! * The object that implements the <code>ItemListener</code> interface gets ! * this <code>ItemEvent</code> when the event occurs. The listener is * spared the details of processing individual mouse movements and mouse * clicks, and can instead process a "meaningful" (semantic) event like * "item selected" or "item deselected". * <p> * An unspecified behavior will be caused if the {@code id} parameter --- 30,45 ---- /** * A semantic event which indicates that an item was selected or deselected. * This high-level event is generated by an ItemSelectable object (such as a * List) when an item is selected or deselected by the user. ! * The event is passed to every {@code ItemListener} object which * registered to receive such events using the component's ! * {@code addItemListener} method. * <P> ! * The object that implements the {@code ItemListener} interface gets ! * this {@code ItemEvent} when the event occurs. The listener is * spared the details of processing individual mouse movements and mouse * clicks, and can instead process a "meaningful" (semantic) event like * "item selected" or "item deselected". * <p> * An unspecified behavior will be caused if the {@code id} parameter
*** 96,106 **** * @see #getItem() */ Object item; /** ! * <code>stateChange</code> indicates whether the <code>item</code> * was selected or deselected. * * @serial * @see #getStateChange() */ --- 96,106 ---- * @see #getItem() */ Object item; /** ! * {@code stateChange} indicates whether the {@code item} * was selected or deselected. * * @serial * @see #getStateChange() */
*** 110,135 **** * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -608708132447206933L; /** ! * Constructs an <code>ItemEvent</code> object. * <p> This method throws an ! * <code>IllegalArgumentException</code> if <code>source</code> ! * is <code>null</code>. * ! * @param source The <code>ItemSelectable</code> object * that originated the event * @param id The integer that identifies the event type. * For information on allowable values, see * the class description for {@link ItemEvent} * @param item An object -- the item affected by the event * @param stateChange An integer that indicates whether the item was * selected or deselected. * For information on allowable values, see * the class description for {@link ItemEvent} ! * @throws IllegalArgumentException if <code>source</code> is null * @see #getItemSelectable() * @see #getID() * @see #getStateChange() */ public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) { --- 110,135 ---- * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -608708132447206933L; /** ! * Constructs an {@code ItemEvent} object. * <p> This method throws an ! * {@code IllegalArgumentException} if {@code source} ! * is {@code null}. * ! * @param source The {@code ItemSelectable} object * that originated the event * @param id The integer that identifies the event type. * For information on allowable values, see * the class description for {@link ItemEvent} * @param item An object -- the item affected by the event * @param stateChange An integer that indicates whether the item was * selected or deselected. * For information on allowable values, see * the class description for {@link ItemEvent} ! * @throws IllegalArgumentException if {@code source} is null * @see #getItemSelectable() * @see #getID() * @see #getStateChange() */ public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
< prev index next >