Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4143344

unclear spec for java.awt.dnd.DropTargetDragEvent

XMLWordPrintable

    • sparc
    • solaris_2.5



      Name: sdC67446 Date: 05/28/98


      spec for constructor
      java.awt.dnd.DroptargetDragEvent(DragSourceContext dsc, Point p,
                                       int dropAction, int srcActions)
      says nothing about range of valid values for 'dropAction' and 'srcActions'.
      Currently constructor accepts:
      DnDConstants.ACTION_NONE,
      DnDConstants.ACTION_COPY,
      DnDConstants.ACTION_MOVE,
      DnDConstants.ACTION_LINK for 'dropAction'
      and 'srcActions':
      'srcActions' & ~(DnDConstants.ACTION_COPY_OR_MOVE | DnDConstants.ACTION_LINK).
      For any other ints constructor throws IllegalArgumentException.

      Here is what doc says:
      -------------------------------------------------

      public DropTargetDragEvent(DropTargetContext dtc,
                                 Point cursorLocn,
                                 int dropAction,
                                 int srcActions)

            construct an Event
            Parameters:
                  dtc - The DropTargetContext for this operation
                  cursorLocn - The location of the "Drag" Cursors
                               hotspot in Component coordinates
                  dropAction - The currently selected user drop action
                  srcActions - The current set of actions supported by the source
      --------------------------------------------------
      ======================================================================

            agerasimsunw Alexander Gerasimov (Inactive)
            sdmitriesunw Sergei Dmitriev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: