borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.util 

MouseMulticaster class

java.lang.Object
   +----borland.jbcl.util.MouseMulticaster

About the MouseMulticaster class

Properties  Methods  

Implements MouseListener, EventListener

A class that dispatches mouse events to multiple mouse listeners. MouseMulticaster 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 events. The dispatch() method sends a mouse event to all listeners.

See also: Standard Java events, Events in JBCL


MouseMulticaster properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

MouseMulticaster methods

Methods implemented in this class

Methods implemented in java.lang.Object


MouseMulticaster methods

add(java.awt.event.MouseListener)

  public final synchronized void add(java.awt.event.MouseListener listener)
Adds an object to the array of listeners.

Parameters:

listener
The object that is added to the list of listeners for mouse events.

dispatch(java.awt.event.MouseEvent)

  public final void dispatch(java.awt.event.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_CLICKED event results in a call to the mouseClicked event in the listening object. This method is a high-speed dispatcher that does not need to be synchronized.

Parameters:

e
The mouse event sent to all listeners.

find(java.awt.event.MouseListener)

  public int find(java.awt.event.MouseListener listener)
Searches for the specified listener among the array of listening objects.

Parameters:

listener
The object you are searching for in the list of listeners.

hasListeners()

  public final boolean hasListeners()
Determines if there are any listeners for mouse events. If the method returns true, one or more listeners are present.

remove(java.awt.event.MouseListener)

  public final synchronized void remove(java.awt.event.MouseListener listener)
Removes the specified listening object from the array of listeners for mouse events.

Parameters:

listener
The listening object that is removed from the array of listeners.