|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ohrasys.app.AbstractAppModel
public abstract class AbstractAppModel
A basic application model which should be subclassed and specialized by specific application implementations by implementing the processEvent method.
Field Summary | |
---|---|
protected AppModelEventListener |
controller
The controller listening to this application model |
Constructor Summary | |
---|---|
AbstractAppModel()
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
A method to perform an processing of actions received by the application controller. |
protected void |
notifyController(java.awt.event.ActionEvent event)
Issues events from this application model to the application controller. |
protected abstract java.awt.event.ActionEvent |
processEvent(java.awt.event.ActionEvent evt)
The method that processes incoming events. |
void |
setController(AppModelEventListener controller)
Adds the controller as a listener of this model. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient AppModelEventListener controller
Constructor Detail |
---|
public AbstractAppModel()
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
evt
- The event to process.public void setController(AppModelEventListener controller) throws java.util.TooManyListenersException
controller
- The controller that will listen to this model
java.util.TooManyListenersException
- If more than one controller is being
registered.public java.lang.String toString()
toString
in class java.lang.Object
protected abstract java.awt.event.ActionEvent processEvent(java.awt.event.ActionEvent evt)
evt
- The incoming event from the controller
protected void notifyController(java.awt.event.ActionEvent event)
event
- The event to issue.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |