com.glaivestone.mv
Interface ApplicationView

All Known Implementing Classes:
JDialogApplicationView, JFrameApplicationView

public interface ApplicationView

The ApplicationView interface is supported by windows which implement a view on an application model.

The application model contains the state which is rendered in the view, along with services which provide the application logic that the view can invoke to perform application operations.

A view on an application model is reponsible for observing the application model and configuring dependencies on application data state changes so that the view is suitably updated to reflect the current state of the application model. *@author Deb Lewis


Method Summary
 void closeWindow()
          Close this view.
 ApplicationModel getAppModel()
          Answer the application model which this view presents.
 java.awt.Window getMainWindow()
          Answer the window which implements this view.
 boolean requestCloseWindow()
          Request that this view be closed.
 void setAppModel(ApplicationModel aModel)
          Specify the application model which this view presents.
 

Method Detail

closeWindow

public void closeWindow()
Close this view.

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).

See Also:
requestCloseWindow()

getAppModel

public ApplicationModel getAppModel()
Answer the application model which this view presents.


getMainWindow

public java.awt.Window getMainWindow()
Answer the window which implements this view.

The implementor of the view interface is generally the Window itself. This service allows clients to obtain the window type without having to perform a cast on the view. It also enables views to have more complex backing implementations if necessary.


requestCloseWindow

public boolean requestCloseWindow()
Request that this view be closed. Answer whether the close operation completed.

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.

See Also:
closeWindow()

setAppModel

public void setAppModel(ApplicationModel aModel)
Specify the application model which this view presents.


GFL 1.1 API