| 1 | /* DragSource.java --
|
|---|
| 2 | Copyright (C) 2002 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | This file is part of GNU Classpath.
|
|---|
| 5 |
|
|---|
| 6 | GNU Classpath is free software; you can redistribute it and/or modify
|
|---|
| 7 | it under the terms of the GNU General Public License as published by
|
|---|
| 8 | the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 9 | any later version.
|
|---|
| 10 |
|
|---|
| 11 | GNU Classpath is distributed in the hope that it will be useful, but
|
|---|
| 12 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 14 | General Public License for more details.
|
|---|
| 15 |
|
|---|
| 16 | You should have received a copy of the GNU General Public License
|
|---|
| 17 | along with GNU Classpath; see the file COPYING. If not, write to the
|
|---|
| 18 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|---|
| 19 | 02111-1307 USA.
|
|---|
| 20 |
|
|---|
| 21 | Linking this library statically or dynamically with other modules is
|
|---|
| 22 | making a combined work based on this library. Thus, the terms and
|
|---|
| 23 | conditions of the GNU General Public License cover the whole
|
|---|
| 24 | combination.
|
|---|
| 25 |
|
|---|
| 26 | As a special exception, the copyright holders of this library give you
|
|---|
| 27 | permission to link this library with independent modules to produce an
|
|---|
| 28 | executable, regardless of the license terms of these independent
|
|---|
| 29 | modules, and to copy and distribute the resulting executable under
|
|---|
| 30 | terms of your choice, provided that you also meet, for each linked
|
|---|
| 31 | independent module, the terms and conditions of the license of that
|
|---|
| 32 | module. An independent module is a module which is not derived from
|
|---|
| 33 | or based on this library. If you modify this library, you may extend
|
|---|
| 34 | this exception to your version of the library, but you are not
|
|---|
| 35 | obligated to do so. If you do not wish to do so, delete this
|
|---|
| 36 | exception statement from your version. */
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 | package java.awt.dnd;
|
|---|
| 40 |
|
|---|
| 41 | import java.awt.Component;
|
|---|
| 42 | import java.awt.Cursor;
|
|---|
| 43 | import java.awt.GraphicsEnvironment;
|
|---|
| 44 | import java.awt.HeadlessException;
|
|---|
| 45 | import java.awt.Image;
|
|---|
| 46 | import java.awt.Point;
|
|---|
| 47 | import java.awt.datatransfer.FlavorMap;
|
|---|
| 48 | import java.awt.datatransfer.Transferable;
|
|---|
| 49 | import java.awt.dnd.peer.DragSourceContextPeer;
|
|---|
| 50 | import java.io.Serializable;
|
|---|
| 51 | import java.util.EventListener;
|
|---|
| 52 |
|
|---|
| 53 | public class DragSource implements Serializable
|
|---|
| 54 | {
|
|---|
| 55 | /**
|
|---|
| 56 | * Compatible with JDK 1.2+.
|
|---|
| 57 | */
|
|---|
| 58 | private static final long serialVersionUID = 6236096958971414066L;
|
|---|
| 59 |
|
|---|
| 60 | public static final Cursor DefaultCopyDrop = null;
|
|---|
| 61 | public static final Cursor DefaultMoveDrop = null;
|
|---|
| 62 | public static final Cursor DefaultLinkDrop = null;
|
|---|
| 63 | public static final Cursor DefaultCopyNoDrop = null;
|
|---|
| 64 | public static final Cursor DefaultMoveNoDrop = null;
|
|---|
| 65 | public static final Cursor DefaultLinkNoDrop = null;
|
|---|
| 66 |
|
|---|
| 67 | /**
|
|---|
| 68 | * Initializes the drag source.
|
|---|
| 69 | *
|
|---|
| 70 | * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
|---|
| 71 | */
|
|---|
| 72 | public DragSource()
|
|---|
| 73 | {
|
|---|
| 74 | if (GraphicsEnvironment.isHeadless())
|
|---|
| 75 | throw new HeadlessException ();
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | /**
|
|---|
| 79 | * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
|---|
| 80 | */
|
|---|
| 81 | public static DragSource getDefaultDragSource()
|
|---|
| 82 | {
|
|---|
| 83 | return null;
|
|---|
| 84 | }
|
|---|
| 85 |
|
|---|
| 86 | public static boolean isDragImageSupported()
|
|---|
| 87 | {
|
|---|
| 88 | return false;
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | /**
|
|---|
| 92 | * Start a drag, given the DragGestureEvent that initiated the drag.
|
|---|
| 93 | *
|
|---|
| 94 | * @exception InvalidDnDOperationException If the Drag and Drop system is
|
|---|
| 95 | * unable to initiate a drag operation, or if the user attempts to start
|
|---|
| 96 | * a drag while an existing drag operation is still executing.
|
|---|
| 97 | */
|
|---|
| 98 | public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
|
|---|
| 99 | Image dragImage, Point imageOffset,
|
|---|
| 100 | Transferable trans, DragSourceListener dsl,
|
|---|
| 101 | FlavorMap map)
|
|---|
| 102 | {
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | /**
|
|---|
| 106 | * Start a drag, given the DragGestureEvent that initiated the drag.
|
|---|
| 107 | *
|
|---|
| 108 | * @exception InvalidDnDOperationException If the Drag and Drop system is
|
|---|
| 109 | * unable to initiate a drag operation, or if the user attempts to start
|
|---|
| 110 | * a drag while an existing drag operation is still executing.
|
|---|
| 111 | */
|
|---|
| 112 | public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
|
|---|
| 113 | Transferable trans, DragSourceListener dsl,
|
|---|
| 114 | FlavorMap map)
|
|---|
| 115 | {
|
|---|
| 116 | startDrag(trigger, dragCursor, null, null, trans, dsl, map);
|
|---|
| 117 | }
|
|---|
| 118 |
|
|---|
| 119 | /**
|
|---|
| 120 | * Start a drag, given the DragGestureEvent that initiated the drag.
|
|---|
| 121 | *
|
|---|
| 122 | * @exception InvalidDnDOperationException If the Drag and Drop system is
|
|---|
| 123 | * unable to initiate a drag operation, or if the user attempts to start
|
|---|
| 124 | * a drag while an existing drag operation is still executing.
|
|---|
| 125 | */
|
|---|
| 126 | public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
|
|---|
| 127 | Image dragImage, Point imageOffset,
|
|---|
| 128 | Transferable trans, DragSourceListener dsl)
|
|---|
| 129 | {
|
|---|
| 130 | startDrag(trigger, dragCursor, dragImage, imageOffset, trans, dsl, null);
|
|---|
| 131 | }
|
|---|
| 132 |
|
|---|
| 133 | /**
|
|---|
| 134 | * Start a drag, given the DragGestureEvent that initiated the drag.
|
|---|
| 135 | *
|
|---|
| 136 | * @exception InvalidDnDOperationException If the Drag and Drop system is
|
|---|
| 137 | * unable to initiate a drag operation, or if the user attempts to start
|
|---|
| 138 | * a drag while an existing drag operation is still executing.
|
|---|
| 139 | */
|
|---|
| 140 | public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
|
|---|
| 141 | Transferable trans, DragSourceListener dsl)
|
|---|
| 142 | {
|
|---|
| 143 | startDrag(trigger, dragCursor, null, null, trans, dsl, null);
|
|---|
| 144 | }
|
|---|
| 145 |
|
|---|
| 146 | /**
|
|---|
| 147 | * Creates the DragSourceContext to handle this drag.
|
|---|
| 148 | *
|
|---|
| 149 | * @exception IllegalArgumentException FIXME
|
|---|
| 150 | * @exception NullPointerException If dscp, dgl, dragImage or t is null.
|
|---|
| 151 | */
|
|---|
| 152 | protected DragSourceContext
|
|---|
| 153 | createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge,
|
|---|
| 154 | Cursor cursor, Image image, Point offset,
|
|---|
| 155 | Transferable t, DragSourceListener dsl)
|
|---|
| 156 | {
|
|---|
| 157 | return null;
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | public FlavorMap getFlavorMap()
|
|---|
| 161 | {
|
|---|
| 162 | return null;
|
|---|
| 163 | }
|
|---|
| 164 |
|
|---|
| 165 | public DragGestureRecognizer
|
|---|
| 166 | createDragGestureRecognizer(Class recognizer, Component c, int actions,
|
|---|
| 167 | DragGestureListener dgl)
|
|---|
| 168 | {
|
|---|
| 169 | return null;
|
|---|
| 170 | }
|
|---|
| 171 |
|
|---|
| 172 | public DragGestureRecognizer
|
|---|
| 173 | createDefaultDragGestureRecognizer(Component c, int actions,
|
|---|
| 174 | DragGestureListener dgl)
|
|---|
| 175 | {
|
|---|
| 176 | return null;
|
|---|
| 177 | }
|
|---|
| 178 |
|
|---|
| 179 | public void addDragSourceListener(DragSourceListener l)
|
|---|
| 180 | {
|
|---|
| 181 | }
|
|---|
| 182 |
|
|---|
| 183 | public void removeDragSourceListener(DragSourceListener l)
|
|---|
| 184 | {
|
|---|
| 185 | }
|
|---|
| 186 |
|
|---|
| 187 | public DragSourceListener[] getDragSourceListeners()
|
|---|
| 188 | {
|
|---|
| 189 | return null;
|
|---|
| 190 | }
|
|---|
| 191 |
|
|---|
| 192 | public void addDragSourceMotionListener(DragSourceMotionListener l)
|
|---|
| 193 | {
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 | public void removeDragSourceMotionListener(DragSourceMotionListener l)
|
|---|
| 197 | {
|
|---|
| 198 | }
|
|---|
| 199 |
|
|---|
| 200 | public DragSourceMotionListener[] getDragSourceMotionListeners()
|
|---|
| 201 | {
|
|---|
| 202 | return null;
|
|---|
| 203 | }
|
|---|
| 204 |
|
|---|
| 205 | public EventListener[] getListeners(Class type)
|
|---|
| 206 | {
|
|---|
| 207 | return null;
|
|---|
| 208 | }
|
|---|
| 209 | } // class DragSource
|
|---|