source: trunk/gcc/libjava/java/awt/dnd/DragSource.java

Last change on this file was 1389, checked in by bird, 21 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 6.6 KB
Line 
1/* DragSource.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38
39package java.awt.dnd;
40
41import java.awt.Component;
42import java.awt.Cursor;
43import java.awt.GraphicsEnvironment;
44import java.awt.HeadlessException;
45import java.awt.Image;
46import java.awt.Point;
47import java.awt.datatransfer.FlavorMap;
48import java.awt.datatransfer.Transferable;
49import java.awt.dnd.peer.DragSourceContextPeer;
50import java.io.Serializable;
51import java.util.EventListener;
52
53public 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
Note: See TracBrowser for help on using the repository browser.