com.objectwave.appSupport
Class OkCancelModel
java.lang.Object
|
+--com.objectwave.appArch.EventSupport
|
+--com.objectwave.appArch.WindowModel
|
+--com.objectwave.appSupport.OkCancelModel
- All Implemented Interfaces:
- java.util.EventListener, PacketListener, PacketProducerIF, PresentationModelIF, java.beans.PropertyChangeListener, WindowModelIF
- Direct Known Subclasses:
- DetailModel
- public abstract class OkCancelModel
- extends WindowModel
- Version:
- 1.2
Field Summary |
protected java.lang.Object |
subject
|
Constructor Summary |
OkCancelModel()
If you use this constructor, it might not be a bad idea to call
setWindowClass(Class ). |
OkCancelModel(java.lang.Object c)
|
Method Summary |
void |
acceptChanges()
|
protected void |
acceptChanges(boolean close)
If we don't close, we just chain (start a new) the transactions. |
protected void |
actualClose()
I control the closing |
void |
cancel()
|
abstract void |
displayBusinessObject()
|
abstract java.lang.String |
getSubjectClass()
Used to make error messages more meaningful. |
protected void |
maybeRollback()
|
abstract void |
populateBusinessObject()
|
void |
setTerminateOnClose(boolean value)
override the WindowModel's method, which replaces the windowCloser. |
void |
setWindow(java.awt.Window w)
Allow the window model to clean up before a new instance is created. |
protected void |
startTransaction(java.lang.Object context)
Since some derived classes (QuoteFrameModel, for instance)
may want to call startRootTransaction(), this method can be
overridden to provide that behaviour. |
Methods inherited from class com.objectwave.appArch.WindowModel |
addConsumer, addPresentationModel, addProducer, createCache, getDefaultWindowListener, getWindow, isAllowingMultipleInstances, isCached, open, reset, setAllowingMulitpleInstances, setDefaultWindowListener, setWindowClass |
Methods inherited from class com.objectwave.appArch.EventSupport |
addPacketListener, addPropertyChangeListener, fireDataAvailable, fireDataChanged, fireDataRequest, firePacket, firePropertyChange, packetAvailable, packetAvailable, packetAvailable, propertyChange, removePacketListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subject
protected java.lang.Object subject
OkCancelModel
public OkCancelModel()
- If you use this constructor, it might not be a bad idea to call
setWindowClass(Class ). It, however, is not required.
OkCancelModel
public OkCancelModel(java.lang.Object c)
acceptChanges
public void acceptChanges()
throws java.lang.Exception
java.lang.Exception
acceptChanges
protected void acceptChanges(boolean close)
throws java.lang.Exception
- If we don't close, we just chain (start a new) the transactions.
java.lang.Exception
actualClose
protected void actualClose()
- I control the closing
cancel
public void cancel()
throws java.lang.Exception
java.lang.Exception
displayBusinessObject
public abstract void displayBusinessObject()
getSubjectClass
public abstract java.lang.String getSubjectClass()
- Used to make error messages more meaningful.
maybeRollback
protected void maybeRollback()
throws java.lang.Exception
java.lang.Exception
populateBusinessObject
public abstract void populateBusinessObject()
setTerminateOnClose
public void setTerminateOnClose(boolean value)
- override the WindowModel's method, which replaces the windowCloser.
- Overrides:
setTerminateOnClose
in class WindowModel
setWindow
public void setWindow(java.awt.Window w)
- Description copied from interface:
WindowModelIF
- Allow the window model to clean up before a new instance is created.
- Specified by:
setWindow
in interface WindowModelIF
- Overrides:
setWindow
in class WindowModel
startTransaction
protected void startTransaction(java.lang.Object context)
- Since some derived classes (QuoteFrameModel, for instance)
may want to call startRootTransaction(), this method can be
overridden to provide that behaviour.