/// <summary> /// Adds the specified <code>DragSourceMotionListener</code> to this /// <code>DragSource</code> to receive drag motion events during drag /// operations intiated with this <code>DragSource</code>. /// If a <code>null</code> listener is specified, no action is taken and no /// exception is thrown. /// </summary> /// <param name="dsml"> the <code>DragSourceMotionListener</code> to add /// </param> /// <seealso cref= #removeDragSourceMotionListener </seealso> /// <seealso cref= #getDragSourceMotionListeners /// @since 1.4 </seealso> public virtual void AddDragSourceMotionListener(DragSourceMotionListener dsml) { if (dsml != null) { lock (this) { MotionListener = DnDEventMulticaster.Add(MotionListener, dsml); } } }
/// <summary> /// Adds the specified <code>DragSourceListener</code> to this /// <code>DragSource</code> to receive drag source events during drag /// operations intiated with this <code>DragSource</code>. /// If a <code>null</code> listener is specified, no action is taken and no /// exception is thrown. /// </summary> /// <param name="dsl"> the <code>DragSourceListener</code> to add /// </param> /// <seealso cref= #removeDragSourceListener </seealso> /// <seealso cref= #getDragSourceListeners /// @since 1.4 </seealso> public virtual void AddDragSourceListener(DragSourceListener dsl) { if (dsl != null) { lock (this) { Listener = DnDEventMulticaster.Add(Listener, dsl); } } }