BasicTreeUI should use factory method to construct drop target listener

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: client-libs

      A DESCRIPTION OF THE REQUEST :
      The BasicTreeUI installListeners() method directly instantiates a TreeDropTargetListener to respond to DropTarget events. The rest of the installListeners() method use factory methods to add a level of indirection in creating these listener classes.


      JUSTIFICATION :
      A factory method should be used for TreeDropTargetListener too to allow custom L&Fs to provide custom TreeDropTargetListener.

      The pattern of using factory methods should be part of the L&F coding standards.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I'd like to see a createDropTargetListener() method in BasicTreeUI with installListeners() calling it.

      CUSTOMER SUBMITTED WORKAROUND :
      The workaround is to copy the BasicTreeUI installListeners() method to BasicTreeUI subclass and change the creation of TreeDropTargetListener to desired class.
      ###@###.### 10/26/04 22:30 GMT

            Assignee:
            Shannon Hickey (Inactive)
            Reporter:
            Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: