java.lang.Object | |
↳ | sun.awt.EventListenerAggregate |
A class that assists in managing EventListener
s of
the specified type. Its instance holds an array of listeners of the same
type and allows to perform the typical operations on the listeners.
This class is thread-safe.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an
EventListenerAggregate object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the listener to this aggregate.
| |||||||||||
Returns an array of all the listeners contained in this aggregate.
| |||||||||||
Returns an array of all the listeners contained in this aggregate.
| |||||||||||
Returns
true if this aggregate contains no listeners,
false otherwise. | |||||||||||
Removes a listener that is equal to the given one from this aggregate.
| |||||||||||
Returns the number of lisetners in this aggregate.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs an EventListenerAggregate
object.
listenerClass | the type of the listeners to be managed by this object |
---|
NullPointerException | if listenerClass is
null |
---|---|
ClassCastException | if listenerClass is not
assignable to java.util.EventListener
|
Adds the listener to this aggregate.
listener | the listener to be added |
---|
ClassCastException | if listener is not
an instatce of listenerClass specified
in the constructor
|
---|
Returns an array of all the listeners contained in this aggregate.
The array is a copy of the data structure in which listeners are stored
internally.
The runtime type of the returned array is "array of listenerClass
"
(listenerClass
has been specified as a parameter to
the constructor of this class).
Returns an array of all the listeners contained in this aggregate.
The array is the data structure in which listeners are stored internally.
The runtime type of the returned array is "array of listenerClass
"
(listenerClass
has been specified as a parameter to
the constructor of this class).
Returns true
if this aggregate contains no listeners,
false
otherwise.
true
if this aggregate contains no listeners,
false
otherwise
Removes a listener that is equal to the given one from this aggregate.
equals()
method is used to compare listeners.
listener | the listener to be removed |
---|
true
if this aggregate contained the specified
listener
; false
otherwiseClassCastException | if listener is not
an instatce of listenerClass specified
in the constructor
|
---|
Returns the number of lisetners in this aggregate.