2362N/A * Copyright (c) 1998, 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 <code>DragGestureEvent</code> is passed 0N/A * to <code>DragGestureListener</code>'s 0N/A * dragGestureRecognized() method 0N/A * when a particular <code>DragGestureRecognizer</code> detects that a 0N/A * platform dependent drag initiating gesture has occurred 0N/A * on the <code>Component</code> that it is tracking. 217N/A * The {@code action} field of any {@code DragGestureEvent} instance should take one of the following 217N/A * <li> {@code DnDConstants.ACTION_COPY} 217N/A * <li> {@code DnDConstants.ACTION_MOVE} 217N/A * <li> {@code DnDConstants.ACTION_LINK} 217N/A * Assigning the value different from listed above will cause an unspecified behavior. 0N/A * @see java.awt.dnd.DragGestureRecognizer 0N/A * @see java.awt.dnd.DragGestureListener 0N/A * @see java.awt.dnd.DragSource 217N/A * @see java.awt.dnd.DnDConstants 217N/A * Constructs a <code>DragGestureEvent</code> object given by the 217N/A * <code>DragGestureRecognizer</code> instance firing this event, 217N/A * an {@code act} parameter representing 217N/A * the user's preferred action, an {@code ori} parameter 217N/A * indicating the origin of the drag, and a {@code List} of 217N/A * events that comprise the gesture({@code evs} parameter). 0N/A * @param dgr The <code>DragGestureRecognizer</code> firing this event 217N/A * @param act The user's preferred action. 217N/A * For information on allowable values, see 217N/A * the class description for {@link DragGestureEvent} 0N/A * @param ori The origin of the drag 0N/A * @param evs The <code>List</code> of events that comprise the gesture 217N/A * @throws IllegalArgumentException if any parameter equals {@code null} 217N/A * @throws IllegalArgumentException if the act parameter does not comply with 217N/A * the values given in the class 217N/A * description for {@link DragGestureEvent} 217N/A * @see java.awt.dnd.DnDConstants 0N/A * Returns the source as a <code>DragGestureRecognizer</code>. 0N/A * @return the source as a <code>DragGestureRecognizer</code> 0N/A * Returns the <code>Component</code> associated 0N/A * with this <code>DragGestureEvent</code>. 0N/A * @return the Component 0N/A * Returns the <code>DragSource</code>. 0N/A * @return the <code>DragSource</code> 0N/A * Returns a <code>Point</code> in the coordinates 0N/A * of the <code>Component</code> over which the drag originated. 0N/A * @return the Point where the drag originated in Component coords. 0N/A * Returns an <code>Iterator</code> for the events 0N/A * comprising the gesture. 0N/A * @return an Iterator for the events comprising the gesture 0N/A * Returns an <code>Object</code> array of the 0N/A * events comprising the drag gesture. 0N/A * @return an array of the events comprising the gesture 0N/A * Returns an array of the events comprising the drag gesture. 0N/A * @param array the array of <code>EventObject</code> sub(types) 0N/A * @return an array of the events comprising the gesture 0N/A * Returns an <code>int</code> representing the 0N/A * action selected by the user. 0N/A * @return the action selected by the user 0N/A * Returns the initial event that triggered the gesture. 0N/A * @return the first "triggering" event in the sequence of the gesture 0N/A * Starts the drag operation given the <code>Cursor</code> for this drag 0N/A * operation and the <code>Transferable</code> representing the source data 0N/A * for this drag operation. 0N/A * If a <code>null</code> <code>Cursor</code> is specified no exception will 0N/A * be thrown and default drag cursors will be used instead. 0N/A * If a <code>null</code> <code>Transferable</code> is specified 0N/A * <code>NullPointerException</code> will be thrown. 0N/A * @param dragCursor The initial {@code Cursor} for this drag operation 0N/A * or {@code null} for the default cursor handling; 0N/A * for more details on the cursor handling mechanism 0N/A * during drag and drop 0N/A * @param transferable The <code>Transferable</code> representing the source 0N/A * data for this drag operation. 0N/A * @throws InvalidDnDOperationException if the Drag and Drop 0N/A * system is unable to initiate a drag operation, or if the user 0N/A * attempts to start a drag while an existing drag operation is 0N/A * @throws NullPointerException if the {@code Transferable} is {@code null} 0N/A * Starts the drag given the initial <code>Cursor</code> to display, 0N/A * the <code>Transferable</code> object, 0N/A * and the <code>DragSourceListener</code> to use. 0N/A * @param dragCursor The initial {@code Cursor} for this drag operation 0N/A * or {@code null} for the default cursor handling; 0N/A * for more details on the cursor handling mechanism 0N/A * during drag and drop 0N/A * @param transferable The source's Transferable 0N/A * @param dsl The source's DragSourceListener 0N/A * @throws InvalidDnDOperationException if 0N/A * the Drag and Drop system is unable to 0N/A * initiate a drag operation, or if the user 0N/A * attempts to start a drag while an existing 0N/A * drag operation is still executing. 0N/A * Start the drag given the initial <code>Cursor</code> to display, 0N/A * a drag <code>Image</code>, the offset of 0N/A * the <code>Image</code>, 0N/A * the <code>Transferable</code> object, and 0N/A * the <code>DragSourceListener</code> to use. 0N/A * @param dragCursor The initial {@code Cursor} for this drag operation 0N/A * or {@code null} for the default cursor handling; 0N/A * for more details on the cursor handling mechanism 0N/A * during drag and drop 0N/A * @param dragImage The source's dragImage 0N/A * @param imageOffset The dragImage's offset 0N/A * @param transferable The source's Transferable 0N/A * @param dsl The source's DragSourceListener 0N/A * @throws InvalidDnDOperationException if 0N/A * the Drag and Drop system is unable to 0N/A * initiate a drag operation, or if the user 0N/A * attempts to start a drag while an existing 0N/A * drag operation is still executing. 0N/A * Serializes this <code>DragGestureEvent</code>. Performs default 0N/A * serialization and then writes out this object's <code>List</code> of 0N/A * gesture events if and only if the <code>List</code> can be serialized. 0N/A * If not, <code>null</code> is written instead. In this case, a 0N/A * <code>DragGestureEvent</code> created from the resulting deserialized 0N/A * stream will contain an empty <code>List</code> of gesture events. 0N/A * @serialData The default serializable fields, in alphabetical order, 0N/A * followed by either a <code>List</code> instance, or 0N/A * <code>null</code>. 0N/A * Deserializes this <code>DragGestureEvent</code>. This method first 0N/A * performs default deserialization for all non-<code>transient</code> 0N/A * fields. An attempt is then made to deserialize this object's 0N/A * <code>List</code> of gesture events as well. This is first attempted 0N/A * by deserializing the field <code>events</code>, because, in releases 0N/A * prior to 1.4, a non-<code>transient</code> field of this name stored the 0N/A * <code>List</code> of gesture events. If this fails, the next object in 0N/A * the stream is used instead. If the resulting <code>List</code> is 0N/A * <code>null</code>, this object's <code>List</code> of gesture events 0N/A * is set to an empty <code>List</code>. 0N/A // Pre-1.4 support. 'events' was previously non-transient 0N/A // 1.4-compatible byte stream. 'events' was written explicitly 0N/A // Implementation assumes 'events' is never null. 0N/A * The DragSource associated with this DragGestureEvent. 0N/A * The Component associated with this DragGestureEvent. 0N/A * The origin of the drag. 0N/A * The user's preferred action.