Showing the changes to java/pkg/java/awt/dnd/DnDConstants.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,83 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. | |
| 3 | + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
| 4 | + * | |
| 5 | + * This code is free software; you can redistribute it and/or modify it | |
| 6 | + * under the terms of the GNU General Public License version 2 only, as | |
| 7 | + * published by the Free Software Foundation. Oracle designates this | |
| 8 | + * particular file as subject to the "Classpath" exception as provided | |
| 9 | + * by Oracle in the LICENSE file that accompanied this code. | |
| 10 | + * | |
| 11 | + * This code is distributed in the hope that it will be useful, but WITHOUT | |
| 12 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 13 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 14 | + * version 2 for more details (a copy is included in the LICENSE file that | |
| 15 | + * accompanied this code). | |
| 16 | + * | |
| 17 | + * You should have received a copy of the GNU General Public License version | |
| 18 | + * 2 along with this work; if not, write to the Free Software Foundation, | |
| 19 | + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
| 20 | + * | |
| 21 | + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
| 22 | + * or visit www.oracle.com if you need additional information or have any | |
| 23 | + * questions. | |
| 24 | + */ | |
| 25 | + | |
| 26 | +package java.awt.dnd; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * This class contains constant values representing | |
| 30 | + * the type of action(s) to be performed by a Drag and Drop operation. | |
| 31 | + * @since 1.2 | |
| 32 | + */ | |
| 33 | + | |
| 34 | +public final class DnDConstants { | |
| 35 | + | |
| 36 | + private DnDConstants() {} // define null private constructor. | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * An <code>int</code> representing no action. | |
| 40 | + */ | |
| 41 | + public static final int ACTION_NONE = 0x0; | |
| 42 | + | |
| 43 | + /** | |
| 44 | + * An <code>int</code> representing a "copy" action. | |
| 45 | + */ | |
| 46 | + public static final int ACTION_COPY = 0x1; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * An <code>int</code> representing a "move" action. | |
| 50 | + */ | |
| 51 | + public static final int ACTION_MOVE = 0x2; | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * An <code>int</code> representing a "copy" or | |
| 55 | + * "move" action. | |
| 56 | + */ | |
| 57 | + public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * An <code>int</code> representing a "link" action. | |
| 61 | + * | |
| 62 | + * The link verb is found in many, if not all native DnD platforms, and the | |
| 63 | + * actual interpretation of LINK semantics is both platform | |
| 64 | + * and application dependent. Broadly speaking, the | |
| 65 | + * semantic is "do not copy, or move the operand, but create a reference | |
| 66 | + * to it". Defining the meaning of "reference" is where ambiguity is | |
| 67 | + * introduced. | |
| 68 | + * | |
| 69 | + * The verb is provided for completeness, but its use is not recommended | |
| 70 | + * for DnD operations between logically distinct applications where | |
| 71 | + * misinterpretation of the operations semantics could lead to confusing | |
| 72 | + * results for the user. | |
| 73 | + */ | |
| 74 | + | |
| 75 | + public static final int ACTION_LINK = 0x40000000; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * An <code>int</code> representing a "reference" | |
| 79 | + * action (synonym for ACTION_LINK). | |
| 80 | + */ | |
| 81 | + public static final int ACTION_REFERENCE = ACTION_LINK; | |
| 82 | + | |
| 83 | +} | |