|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.util.EventManager | +--com.glaivestone.mv.ApplicationModel
ApplicationModel
is the root of the model-view
framework for implementing UI applications which follow
the design pattern of separating state and logic from
presentation rendering. The application model holds
data representing the application state and implements
operations which provide the application logic. A view
on the model provides a presentation of the state and operations
and is responsible for all rendering and user interaction.
Much of the interaction between an application model and a view is provided by configuring loosely coupled connections using event notifications.
An application model is responsible for implementing the application logic and providing data models which hold the state of the application and provide change notifications which a view can use to update its presentation. An application model should provide accessor methods for its data models to enable views to initialize their state properly and configure their dependencies to ensure that the view is correctly updated as the model data changes.
The application model-view framework is supported by a
UISessionManager
which provides session services.
A UI session manager observes window open and close
events to monitor the activity level of the session. The default
UI session control policy terminates the session when the last
main window in the session is closed. Applications can install
an alternate control policy in the session manager to obtain
a different termination policy. Applications can force session
termination using the SessionManager.shutdown
or
the SessionManager.exit
service. Application
session termination should always be done through the session
manager (not the base system System.exit
service).
The model-view framework is based on the well-known MVC (model-view-controller) design pattern that originated in the Xerox PARC Smalltalk-80. Specific techniques and conventions have also been inspired by the Visual Smalltalk ApplicationModel design for model-view architecture.
Constructor Summary | |
ApplicationModel()
Creates a new application model. |
Method Summary | |
void |
closeWindow(java.awt.Window aWindow)
Close a window which provides a view on this application. |
java.util.Collection |
getAllViews()
Answer a collection containing all ApplicationView
windows which are currently open on this application. |
static java.util.Collection |
getAllViews(ApplicationModel appModel)
Answer a collection containing all ApplicationView
windows which are currently open on the specified application model. |
static java.util.Collection |
getAllViews(java.lang.Class appModelClass)
Answer a collection containing all ApplicationView
windows which are currently open on instances of the specified
application model class. |
ApplicationView |
getView()
Answer the ApplicationView window
that is currently open on this application. |
java.awt.Window |
getWindow()
Answer the window that is currently open on the receiver. |
java.awt.Window |
openWindow()
Open a standard view on this application. |
java.awt.Window |
openWindow(java.awt.Window aWindow)
Open the given window as a view on this application. |
boolean |
requestCloseWindow(java.awt.Window aWindow)
Request that a window which provides a view on this application be closed. |
java.net.URL |
resolveResourceReference(java.lang.String resourceName)
Resolve the name of an application resource to the URL which references the resource on the CLASSPATH. |
Methods inherited from class com.glaivestone.javax.util.EventManager |
addFirstListener, addListener, getEventTable, getEventTableForEdit, getListeners, removeListener |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ApplicationModel()
Method Detail |
public static java.util.Collection getAllViews(ApplicationModel appModel)
ApplicationView
windows which are currently open on the specified application model.
public static java.util.Collection getAllViews(java.lang.Class appModelClass)
ApplicationView
windows which are currently open on instances of the specified
application model class.
public void closeWindow(java.awt.Window aWindow)
This is a absolute demand to close the view, even if under "normal" circumstances there might be reason why the close request should not be allowed to proceed (e.g., so the user can resolve some issue related to the state of the application).
requestCloseWindow(java.awt.Window)
public java.util.Collection getAllViews()
ApplicationView
windows which are currently open on this application.
public ApplicationView getView()
ApplicationView
window
that is currently open on this application.
Returns null if there is no open view.
public java.awt.Window getWindow()
public java.awt.Window openWindow()
public java.awt.Window openWindow(java.awt.Window aWindow)
public boolean requestCloseWindow(java.awt.Window aWindow)
A window close request can be vetoed if the application model or another interested observer determines that the close operation should not be allowed to proceed at this time.
closeWindow(java.awt.Window)
public java.net.URL resolveResourceReference(java.lang.String resourceName)
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |