org.viewaframework.view
Class DefaultViewManager

java.lang.Object
  extended by org.viewaframework.view.AbstractViewManager
      extended by org.viewaframework.view.DefaultViewManager
All Implemented Interfaces:
ApplicationAware, ViewManager

public class DefaultViewManager
extends AbstractViewManager

The default implementation of the AbstractViewManager. It has a JFrame as its principal component. It also has a main perspective where all the views are going to be arranged.

Since:
1.0
Author:
Mario Garcia

Field Summary
 
Fields inherited from interface org.viewaframework.view.ViewManager
ROOT_VIEW_ID
 
Constructor Summary
DefaultViewManager()
          Default Constructor
DefaultViewManager(Application app, Perspective perspective)
          This constructor gives the manager the application instance as well as the initial perspective.
 
Method Summary
 Container arrangeViews()
          Arranges the views contained in the manager.
 Perspective getPerspective()
           
 ViewContainerFrame getRootView()
           
 void setPerspective(Perspective viewLayout)
           
 void setRootView(ViewContainerFrame rootView)
          Sets the main view
 
Methods inherited from class org.viewaframework.view.AbstractViewManager
addView, addView, getApplication, getViews, removeView, setApplication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewManager

public DefaultViewManager()
Default Constructor


DefaultViewManager

public DefaultViewManager(Application app,
                          Perspective perspective)
This constructor gives the manager the application instance as well as the initial perspective.

Parameters:
app - The application instance
perspective - The current perspective
Method Detail

arrangeViews

public Container arrangeViews()
                       throws ViewManagerException
Description copied from interface: ViewManager
Arranges the views contained in the manager. It would be called by the application before the views can be viewed.

Specified by:
arrangeViews in interface ViewManager
Overrides:
arrangeViews in class AbstractViewManager
Returns:
Throws:
ViewManagerException

getPerspective

public Perspective getPerspective()
Returns:

getRootView

public ViewContainerFrame getRootView()
Returns:

setPerspective

public void setPerspective(Perspective viewLayout)
                    throws ViewException
Throws:
ViewException

setRootView

public void setRootView(ViewContainerFrame rootView)
Description copied from interface: ViewManager
Sets the main view

Parameters:
rootView - the rootView to set


Copyright © 2010. All Rights Reserved.