|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.luc.cs.trull.EmptyComponent
edu.luc.cs.trull.TerminatingComponent
edu.luc.cs.trull.ActionComponent
public class ActionComponent
An adapter for using a simple PropertyChangeListener as a Trull component. When started, this component invokes the listener method and then terminates.
PropertyChangeListener| Field Summary | |
|---|---|
private java.beans.PropertyChangeListener |
action
The action of this component. |
private static org.apache.log4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
ActionComponent()
Creates an ActionComponent component with a null listener. |
|
ActionComponent(java.beans.PropertyChangeListener action)
Creates an ActionComponent component with the given listener as its action. |
|
| Method Summary | |
|---|---|
java.beans.PropertyChangeListener |
getAction()
Gets the action of this component. |
void |
setAction(java.beans.PropertyChangeListener action)
Sets the action of this component to the given listener. |
void |
start(java.beans.PropertyChangeEvent incoming)
Starts this startable component. |
void |
stop()
Stops this startable component. |
| Methods inherited from class edu.luc.cs.trull.TerminatingComponent |
|---|
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener |
| Methods inherited from class edu.luc.cs.trull.EmptyComponent |
|---|
addPropertyChangeListener, getPropertyChangeListeners, getTerminationListener, propertyChange, removePropertyChangeListener, resume, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.beans.PropertyChangeListener action
private static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public ActionComponent()
public ActionComponent(java.beans.PropertyChangeListener action)
action - the listener to be used as the action. May be null.| Method Detail |
|---|
public java.beans.PropertyChangeListener getAction()
public void setAction(java.beans.PropertyChangeListener action)
action - the listener to be used as the action. May be null.public void start(java.beans.PropertyChangeEvent incoming)
Startable
start in interface Startablestart in class EmptyComponentincoming - the event that triggered the invocation of this method. May be null.public void stop()
Startable
stop in interface Startablestop in class EmptyComponent
|
Trull | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||