KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > awt > dnd > DnDConstants


1 /*
2  * @(#)DnDConstants.java 1.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.awt.dnd;
9
10 /**
11  * This class contains constant values representing
12  * the type of action(s) to be performed by a Drag and Drop operation.
13  * @version 1.19, 12/19/03
14  * @since 1.2
15  */

16
17 public final class DnDConstants {
18
19     private DnDConstants() {} // define null private constructor.
20

21     /**
22      * An <code>int</code> representing no action.
23      */

24     public static final int ACTION_NONE = 0x0;
25
26     /**
27      * An <code>int</code> representing a &quot;copy&quot; action.
28      */

29     public static final int ACTION_COPY = 0x1;
30
31     /**
32      * An <code>int</code> representing a &quot;move&quot; action.
33      */

34     public static final int ACTION_MOVE = 0x2;
35
36     /**
37      * An <code>int</code> representing a &quot;copy&quot; or
38      * &quot;move&quot; action.
39      */

40     public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE;
41
42     /**
43      * An <code>int</code> representing a &quot;link&quot; action.
44      *
45      * The link verb is found in many, if not all native DnD platforms, and the
46      * actual interpretation of LINK semantics is both platform
47      * and application dependent. Broadly speaking, the
48      * semantic is "do not copy, or move the operand, but create a reference
49      * to it". Defining the meaning of "reference" is where ambiguity is
50      * introduced.
51      *
52      * The verb is provided for completeness, but its use is not recommended
53      * for DnD operations between logically distinct applications where
54      * misinterpretation of the operations semantics could lead to confusing
55      * results for the user.
56      */

57
58     public static final int ACTION_LINK = 0x40000000;
59
60     /**
61      * An <code>int</code> representing a &quot;reference&quot;
62      * action (synonym for ACTION_LINK).
63      */

64     public static final int ACTION_REFERENCE = ACTION_LINK;
65
66 }
67
68
69
Popular Tags