2362N/A * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A semantic event which indicates that an item was selected or deselected. 0N/A * This high-level event is generated by an ItemSelectable object (such as a 0N/A * List) when an item is selected or deselected by the user. 0N/A * The event is passed to every <code>ItemListener</code> object which 0N/A * registered to receive such events using the component's 0N/A * <code>addItemListener</code> method. 0N/A * The object that implements the <code>ItemListener</code> interface gets 0N/A * this <code>ItemEvent</code> when the event occurs. The listener is 0N/A * spared the details of processing individual mouse movements and mouse 0N/A * clicks, and can instead process a "meaningful" (semantic) event like 0N/A * "item selected" or "item deselected". 217N/A * An unspecified behavior will be caused if the {@code id} parameter 217N/A * of any particular {@code ItemEvent} instance is not 217N/A * in the range from {@code ITEM_FIRST} to {@code ITEM_LAST}. 217N/A * The {@code stateChange} of any {@code ItemEvent} instance takes one of the following 217N/A * <li> {@code ItemEvent.SELECTED} 217N/A * <li> {@code ItemEvent.DESELECTED} 217N/A * Assigning the value different from listed above will cause an unspecified behavior. 0N/A * @author Carl Quinn 0N/A * @see java.awt.ItemSelectable 0N/A * The first number in the range of ids used for item events. 0N/A * The last number in the range of ids used for item events. 0N/A * This event id indicates that an item's state changed. 0N/A * This state-change value indicates that an item was selected. 0N/A * This state-change-value indicates that a selected item was deselected. 0N/A * The item whose selection state has changed. 0N/A * <code>stateChange</code> indicates whether the <code>item</code> 0N/A * was selected or deselected. 0N/A * @see #getStateChange() 0N/A * JDK 1.1 serialVersionUID 0N/A * Constructs an <code>ItemEvent</code> object. 217N/A * <p> This method throws an 0N/A * <code>IllegalArgumentException</code> if <code>source</code> 0N/A * is <code>null</code>. 217N/A * @param source The <code>ItemSelectable</code> object 0N/A * that originated the event 217N/A * @param id The integer that identifies the event type. 217N/A * For information on allowable values, see 217N/A * the class description for {@link ItemEvent} 217N/A * @param item An object -- the item affected by the event 217N/A * @param stateChange An integer that indicates whether the item was 217N/A * selected or deselected. 217N/A * For information on allowable values, see 217N/A * the class description for {@link ItemEvent} 0N/A * @throws IllegalArgumentException if <code>source</code> is null 217N/A * @see #getItemSelectable() 217N/A * @see #getStateChange() 0N/A * Returns the originator of the event. 0N/A * @return the ItemSelectable object that originated the event. 0N/A * Returns the item affected by the event. 0N/A * @return the item (object) that was affected by the event 0N/A * Returns the type of state change (selected or deselected). 0N/A * @return an integer that indicates whether the item was selected 0N/A * Returns a parameter string identifying this item event. 0N/A * This method is useful for event-logging and for debugging. 0N/A * @return a string identifying the event and its attributes