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

JavaDoc comments for DropTarget.get(set)FlavorMap are unclear

XMLWordPrintable

    • beta
    • x86, sparc
    • linux, solaris_2.6, solaris_7, windows_95
    • Verified



      Name: nkR10003 Date: 07/26/2001



      JavaDoc comments for DropTarget.[set|get]FlavorMap methods says:

      {

      public FlavorMap getFlavorMap()

            This method returns the FlavorMap associated with this DropTarget

            Returns:
                  the FlavorMap for this DropTarget
      -----------------
      public void setFlavorMap(FlavorMap fm)

            This method sets the FlavorMap associated with this DropTarget.

            Parameters:
                  fm - set the new FlavorMap, or null for <<default>>
      }

      It remains unclear what does <<default>> flavor map mean. What flavor map would
      be set to DropTarget object by default constuctor or constructor
      with <null> flavor map specified is unclear too.

      Spec for the constructor:

      {
      public DropTarget(Component c,
                        int ops,
                        DropTargetListener dtl,
                        boolean act,
                        FlavorMap fm)
                 throws HeadlessException

            Construct a new DropTarget given the Component to associate itself with, an int
            representing the default acceptable action(s) to support, a DropTargetListener to
            handle event processing, a boolean indicating if the DropTarget is currently
            accepting drops, and a FlavorMap to use (or null).

            The Component will receive drops only if it is enabled.

            Parameters:
                  .........................
                  fm - The FlavorMap to use or null
                  .........................
      }



      If the default flavor map is the SystemFlavorMap.getDefaultFlavorMap(),
      which spec reads:

      "Returns the default FlavorMap for this thread's ClassLoader."

      then DropTarget.getFlavorMap() should return the same instance of
      flavour map (SystemFlavorMap) as the getDefaultFlavorMap method.
      But in applet (for example) it returns another one.

      And then the problem is:
      What is the particular ClassLoader this default FlavorMap associated with.

      Please specify the correct behavior.


      ======================================================================

            shommel Scott Hommel (Inactive)
            knasunw Kna Kna (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: