< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XDragSourceProtocol.java

Print this page




  57     protected XDragSourceProtocol(XDragSourceProtocolListener listener) {
  58         if (listener == null) {
  59             throw new NullPointerException("Null XDragSourceProtocolListener");
  60         }
  61         this.listener = listener;
  62     }
  63 
  64     protected final XDragSourceProtocolListener getProtocolListener() {
  65         return listener;
  66     }
  67 
  68     /**
  69      * Returns the protocol name. The protocol name cannot be null.
  70      */
  71     public abstract String getProtocolName();
  72 
  73     /**
  74      * Initializes a drag operation with the specified supported drop actions,
  75      * contents and data formats.
  76      *
  77      * @param actions a bitwise mask of <code>DnDConstants</code> that represent
  78      *                the supported drop actions.
  79      * @param contents the contents for the drag operation.
  80      * @param formats an array of Atoms that represent the supported data formats.
  81      * @param formats an array of Atoms that represent the supported data formats.
  82      * @throws InvalidDnDOperationException if a drag operation is already
  83      * initialized.
  84      * @throws IllegalArgumentException if some argument has invalid value.
  85      * @throws XException if some X call failed.
  86      */
  87     public final void initializeDrag(int actions, Transferable contents,
  88                                      Map<Long, DataFlavor> formatMap, long[] formats)
  89       throws InvalidDnDOperationException,
  90              IllegalArgumentException, XException {
  91         XToolkit.awtLock();
  92         try {
  93             try {
  94                 if (initialized) {
  95                     throw new InvalidDnDOperationException("Already initialized");
  96                 }
  97 




  57     protected XDragSourceProtocol(XDragSourceProtocolListener listener) {
  58         if (listener == null) {
  59             throw new NullPointerException("Null XDragSourceProtocolListener");
  60         }
  61         this.listener = listener;
  62     }
  63 
  64     protected final XDragSourceProtocolListener getProtocolListener() {
  65         return listener;
  66     }
  67 
  68     /**
  69      * Returns the protocol name. The protocol name cannot be null.
  70      */
  71     public abstract String getProtocolName();
  72 
  73     /**
  74      * Initializes a drag operation with the specified supported drop actions,
  75      * contents and data formats.
  76      *
  77      * @param actions a bitwise mask of {@code DnDConstants} that represent
  78      *                the supported drop actions.
  79      * @param contents the contents for the drag operation.
  80      * @param formats an array of Atoms that represent the supported data formats.
  81      * @param formats an array of Atoms that represent the supported data formats.
  82      * @throws InvalidDnDOperationException if a drag operation is already
  83      * initialized.
  84      * @throws IllegalArgumentException if some argument has invalid value.
  85      * @throws XException if some X call failed.
  86      */
  87     public final void initializeDrag(int actions, Transferable contents,
  88                                      Map<Long, DataFlavor> formatMap, long[] formats)
  89       throws InvalidDnDOperationException,
  90              IllegalArgumentException, XException {
  91         XToolkit.awtLock();
  92         try {
  93             try {
  94                 if (initialized) {
  95                     throw new InvalidDnDOperationException("Already initialized");
  96                 }
  97 


< prev index next >