home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 2.2 KB | 96 lines |
- /*
- * @(#)DragSourceDragEvent.java 1.3 98/03/18
- *
- * Copyright 1997, 1998 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.awt.dnd;
-
- import java.awt.dnd.DragSourceEvent;
-
- /**
- * <p>
- * The DragSourceDragEvent is delivered from the DragSourceContextPeer,
- * via the DragSourceContext, to the currently registered DragSourceListener.
- * It contains state regarding the current state of the operation to enable
- * the operations initiator to provide the end user with the appropriate
- * drag over feedback.
- * </p>
- *
- * @version 1.3
- * @since JDK1.2
- *
- */
-
- public class DragSourceDragEvent extends DragSourceEvent {
-
- /**
- * construct a DragSourceEvent
- */
-
- public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers) {
- super(dsc);
-
- targetActions = actions;
- gestureModifiers = modifiers;
- this.dropAction = dropAction;
- }
-
- /**
- * construct a DragSourceEvent
- */
-
- public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers, boolean isLocal) {
- this(dsc, dropAction, actions, modifiers);
-
- isLocalDT = isLocal;
- }
-
- /**
- * @return the DragSourceContext that sourced this event
- */
-
- public int getTargetActions() {
- return targetActions;
- }
-
- /**
- * @return the current device modifiers
- */
-
- public int getGestureModifiers() {
- return gestureModifiers;
- }
-
- /**
- * @return if the current Target is in the same JVM or not.
- */
-
- public boolean isLocalDropTarget() {
- return isLocalDT;
- }
-
- /**
- * @return the currently selected drop action
- */
-
- public int getDropAction() { return dropAction; }
-
- /*
- * fields
- */
-
- private int targetActions = DnDConstants.ACTION_NONE;
- private int dropAction = DnDConstants.ACTION_NONE;
- private int gestureModifiers = 0;
- private boolean isLocalDT = false;
- }
-