Returns an array of all the objects currently registered as
FooListener
s
upon this model.
FooListener
s
are registered using the
addFooListener
method.
You can specify the listenerType
argument
with a class literal, such as FooListener.class
.
For example, you can query a DefaultButtonModel
instance m
for its action listeners
with the following code:
ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class));
If no such listeners exist,
this method returns an empty array.
Returns:
an array of all objects registered as
FooListener
s
on this model,
or an empty array if no such
listeners have been added
Parameters:
-
listenerType - the type of listeners requested;
this parameter should specify an interface
that descends from
java.util.EventListener
Throws:
-
ClassCastException - if
listenerType
doesn't
specify a class or interface that implements
java.util.EventListener
Since:
1.3
See Also:
DefaultButtonModel.getActionListeners()
,
DefaultButtonModel.getChangeListeners()
,
DefaultButtonModel.getItemListeners()
,