jdk/src/share/classes/java/awt/dnd/DnDConstants.java
changeset 16734 da1901d79073
parent 12813 c10ab96dcf41
equal deleted inserted replaced
16733:9267ec7004a1 16734:da1901d79073
     1 /*
     1 /*
     2  * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package java.awt.dnd;
    26 package java.awt.dnd;
    27 
    27 
    28 import javax.tools.annotation.GenerateNativeHeader;
    28 import java.lang.annotation.Native;
    29 
    29 
    30 /**
    30 /**
    31  * This class contains constant values representing
    31  * This class contains constant values representing
    32  * the type of action(s) to be performed by a Drag and Drop operation.
    32  * the type of action(s) to be performed by a Drag and Drop operation.
    33  * @since 1.2
    33  * @since 1.2
    34  */
    34  */
    35 /* No native methods here, but the constants are needed in the supporting JNI code */
       
    36 @GenerateNativeHeader
       
    37 public final class DnDConstants {
    35 public final class DnDConstants {
    38 
    36 
    39     private DnDConstants() {} // define null private constructor.
    37     private DnDConstants() {} // define null private constructor.
    40 
    38 
    41     /**
    39     /**
    42      * An <code>int</code> representing no action.
    40      * An <code>int</code> representing no action.
    43      */
    41      */
    44     public static final int ACTION_NONE         = 0x0;
    42     @Native public static final int ACTION_NONE         = 0x0;
    45 
    43 
    46     /**
    44     /**
    47      * An <code>int</code> representing a &quot;copy&quot; action.
    45      * An <code>int</code> representing a &quot;copy&quot; action.
    48      */
    46      */
    49     public static final int ACTION_COPY         = 0x1;
    47     @Native public static final int ACTION_COPY         = 0x1;
    50 
    48 
    51     /**
    49     /**
    52      * An <code>int</code> representing a &quot;move&quot; action.
    50      * An <code>int</code> representing a &quot;move&quot; action.
    53      */
    51      */
    54     public static final int ACTION_MOVE         = 0x2;
    52     @Native public static final int ACTION_MOVE         = 0x2;
    55 
    53 
    56     /**
    54     /**
    57      * An <code>int</code> representing a &quot;copy&quot; or
    55      * An <code>int</code> representing a &quot;copy&quot; or
    58      * &quot;move&quot; action.
    56      * &quot;move&quot; action.
    59      */
    57      */
    60     public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE;
    58     @Native public static final int ACTION_COPY_OR_MOVE = ACTION_COPY | ACTION_MOVE;
    61 
    59 
    62     /**
    60     /**
    63      * An <code>int</code> representing a &quot;link&quot; action.
    61      * An <code>int</code> representing a &quot;link&quot; action.
    64      *
    62      *
    65      * The link verb is found in many, if not all native DnD platforms, and the
    63      * The link verb is found in many, if not all native DnD platforms, and the
    73      * for DnD operations between logically distinct applications where
    71      * for DnD operations between logically distinct applications where
    74      * misinterpretation of the operations semantics could lead to confusing
    72      * misinterpretation of the operations semantics could lead to confusing
    75      * results for the user.
    73      * results for the user.
    76      */
    74      */
    77 
    75 
    78     public static final int ACTION_LINK         = 0x40000000;
    76     @Native public static final int ACTION_LINK         = 0x40000000;
    79 
    77 
    80     /**
    78     /**
    81      * An <code>int</code> representing a &quot;reference&quot;
    79      * An <code>int</code> representing a &quot;reference&quot;
    82      * action (synonym for ACTION_LINK).
    80      * action (synonym for ACTION_LINK).
    83      */
    81      */
    84     public static final int ACTION_REFERENCE    = ACTION_LINK;
    82     @Native public static final int ACTION_REFERENCE    = ACTION_LINK;
    85 
    83 
    86 }
    84 }