23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.awt; |
26 package sun.awt; |
27 |
27 |
|
28 import java.awt.Component; |
28 import java.awt.Container; |
29 import java.awt.Container; |
29 import java.awt.Frame; |
30 import java.awt.Frame; |
30 import java.awt.Graphics; |
31 import java.awt.Graphics; |
31 import java.awt.Image; |
32 import java.awt.Image; |
32 import java.awt.MenuBar; |
33 import java.awt.MenuBar; |
33 import java.awt.MenuComponent; |
34 import java.awt.MenuComponent; |
34 import java.awt.Rectangle; |
35 import java.awt.Rectangle; |
35 import java.awt.Toolkit; |
36 import java.awt.Toolkit; |
|
37 import java.awt.dnd.DragGestureEvent; |
|
38 import java.awt.dnd.DragGestureListener; |
|
39 import java.awt.dnd.DragGestureRecognizer; |
|
40 import java.awt.dnd.DragSource; |
|
41 import java.awt.dnd.DropTarget; |
|
42 import java.awt.dnd.InvalidDnDOperationException; |
|
43 import java.awt.dnd.peer.DragSourceContextPeer; |
36 import java.awt.peer.FramePeer; |
44 import java.awt.peer.FramePeer; |
37 |
45 |
38 /** |
46 /** |
39 * The class provides basic functionality for a lightweight frame |
47 * The class provides basic functionality for a lightweight frame |
40 * implementation. A subclass is expected to provide painting to an |
48 * implementation. A subclass is expected to provide painting to an |
167 hostX = x; |
175 hostX = x; |
168 hostY = y; |
176 hostY = y; |
169 hostW = w; |
177 hostW = w; |
170 hostH = h; |
178 hostH = h; |
171 } |
179 } |
|
180 |
|
181 /** |
|
182 * Create a drag gesture recognizer for the lightweight frame. |
|
183 */ |
|
184 public abstract <T extends DragGestureRecognizer> T createDragGestureRecognizer( |
|
185 Class<T> abstractRecognizerClass, |
|
186 DragSource ds, Component c, int srcActions, |
|
187 DragGestureListener dgl); |
|
188 |
|
189 /** |
|
190 * Create a drag source context peer for the lightweight frame. |
|
191 */ |
|
192 public abstract DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException; |
|
193 |
|
194 /** |
|
195 * Adds a drop target to the lightweight frame. |
|
196 */ |
|
197 public abstract void addDropTarget(DropTarget dt); |
|
198 |
|
199 /** |
|
200 * Removes a drop target from the lightweight frame. |
|
201 */ |
|
202 public abstract void removeDropTarget(DropTarget dt); |
172 } |
203 } |