public final class PsActionSupport
extends java.lang.Object
PsActionSupport
into your class (as a member variable)
and write methods addActionListener
and removeActionListener
that only call the methods from PsActionSupport
with the same name.
Whenever you want an ActionEvent to be posted, just call
fireAction(ActionEvent)
of your
PsActionSupport
instance.Constructor and Description |
---|
PsActionSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener to internal list.
|
void |
fireAction(java.awt.event.ActionEvent event)
Calls the
actionPerformed method from all registered listeners
with given ActionEvent . |
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes (one occurrence of) a listener from internal list.
|
public void addActionListener(java.awt.event.ActionListener listener)
fireAction(ActionEvent)
.public void removeActionListener(java.awt.event.ActionListener listener)
fireAction(ActionEvent)
.public void fireAction(java.awt.event.ActionEvent event)
actionPerformed
method from all registered listeners
with given ActionEvent
."