Here are some details regarding the usage of the DragAndDrop
class in this project:
-
Component actors have two methods:
getDragSource()
: Should return aDragAndDrop.Source
object where source is the actor.getDropTarget()
: Should return aDragAndDrop.Target
object where target is the actor.
These methods are called once the actor is added to a stage.
-
Components should not couple. Use
KitchenEvent
instead and use thedispatchStageEvent
to dispatch the event onto the stage. -
DragAndDrop.Source::dragStop
should manage the payload only if drop target was found. -
DragAndDrop.Target::drop
should dispatch anKitchenEvent
and should not mess with thePayload.dragActor
. As this method is only called whenTarget::drag
returnstrue
, reduce the duplicate checking.