KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > dnd > DragSource


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4  
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7  
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9  
10    $Log: DragSource.java,v $
11    Revision 1.1 2004/05/05 12:43:19 bobintetley
12    Patches/new files from Laurent Martell
13
14  
15  */

16
17 package swingwt.awt.dnd;
18
19 import swingwt.awt.GraphicsEnvironment;
20 import swingwt.awt.HeadlessException;
21 import swingwt.awt.dnd.DragGestureListener;
22 import swingwt.awt.Component;
23
24
25 /** @author Laurent Martell */
26 public class DragSource {
27     public DragSource() {
28     }
29
30     private static final DragSource defaultDragSource =
31         (GraphicsEnvironment.isHeadless()) ? null : new DragSource();
32
33     public static DragSource getDefaultDragSource() {
34         if (GraphicsEnvironment.isHeadless()) {
35             throw new HeadlessException("");
36         } else {
37             return defaultDragSource;
38         }
39     }
40
41     public DragGestureRecognizer createDefaultDragGestureRecognizer(
42         Component c,
43         int actions,
44         DragGestureListener dgl)
45     {
46         return null;
47     }
48 }
49
Popular Tags