jv.object
Class PsActionSupport
- java.lang.Object
-
- jv.object.PsActionSupport
-
public final class PsActionSupport extends java.lang.ObjectThis class may be used to add the functionality of sending ActionEvents to registered listeners to some class.
Put an instance ofPsActionSupportinto your class (as a member variable) and write methodsaddActionListenerandremoveActionListenerthat only call the methods fromPsActionSupportwith the same name. Whenever you want an ActionEvent to be posted, just callfireAction(ActionEvent)of yourPsActionSupportinstance.- Author:
- Eike Preuss
- Version:
- 22.10.01, 1.10 revised (ep) Made compatible to JavaBeans specification.
03.09.01, 1.00 created (ep)
-
-
Constructor Summary
Constructors Constructor and Description PsActionSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddActionListener(java.awt.event.ActionListener listener)Adds a listener to internal list.voidfireAction(java.awt.event.ActionEvent event)Calls theactionPerformedmethod from all registered listeners with givenActionEvent.voidremoveActionListener(java.awt.event.ActionListener listener)Removes (one occurrence of) a listener from internal list.
-
-
-
Method Detail
-
addActionListener
public void addActionListener(java.awt.event.ActionListener listener)
Adds a listener to internal list. Registered listeners will be effected byfireAction(ActionEvent).
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener listener)
Removes (one occurrence of) a listener from internal list. Registered listeners will be effected byfireAction(ActionEvent).
-
fireAction
public void fireAction(java.awt.event.ActionEvent event)
Calls theactionPerformedmethod from all registered listeners with givenActionEvent.
-
-
"