jbcl.util Package
java.lang.Object +----com.borland.jbcl.util.MouseMotionMulticaster
Properties Methods
Implements MouseMotionListener, EventListener
A component that dispatches mouse events to multiple mouse-motion listeners. MouseMotionMulticaster
maintains an array of listeners. The add()
, remove()
, and find()
methods maintain this list.
The hasListeners()
method determines whether any objects are listening for mouse-motion events. The dispatch()
method sends a mouse event to all listeners.
public final synchronized void add(MouseMotionListener listener)Adds an object to the array of listeners.
Parameters:
listener
public final void dispatch(MouseEvent e)
Sends a mouse event to all listeners. Which method is called in the listener depends on the type of mouse event. For example, a MouseEvent.MOUSE_DRAGGED
event results in a call to the mouseDragged
event in the listening object. This method is a high-speed dispatcher that does not need to be synchronized.
Parameters:
e
public int find(MouseMotionListener listener)Searches for the specified listener among the array of listening objects.
Parameters:
listener
public final boolean hasListeners()Determines if there are any listeners for mouse-motion events. If the method returns true, one or more listeners are present.
public final synchronized void remove(MouseMotionListener listener)Removes the specified listening object from the array of listeners for mouse-motion events.
Parameters:
listener