org.viewaframework.view
Class AbstractViewManager

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

public abstract class AbstractViewManager
extends Object
implements ViewManager

A default implementation of View Manager. It manages the views added to the application and those which are removed from the application. It also is resposible of launching the views lifecycle and add them to the current perspective. It's also responsible for keeping the visual part of the application stable.

Since:
1.0
Author:
Mario Garcia

Field Summary
 
Fields inherited from interface org.viewaframework.view.ViewManager
ROOT_VIEW_ID
 
Constructor Summary
AbstractViewManager()
          Default constructor.
 
Method Summary
 void addView(ViewContainer view)
          Adds a view to the manager
 void addView(ViewContainer view, PerspectiveConstraint constraint)
          Adds a view to the manager given it a specific view constraint
 Container arrangeViews()
          Arranges the views contained in the manager.
 Application getApplication()
          Returns the instance of the current application
 Map<Object,ViewContainer> getViews()
           
 void removeView(ViewContainer view)
          It removes the view passed as parameter from the manager.
 void setApplication(Application application)
          Sets the application instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.viewaframework.view.ViewManager
getPerspective, getRootView, setPerspective, setRootView
 

Constructor Detail

AbstractViewManager

public AbstractViewManager()
Default constructor. It creates a new List where the views are added.

Method Detail

addView

public void addView(ViewContainer view,
                    PerspectiveConstraint constraint)
             throws ViewException
Description copied from interface: ViewManager
Adds a view to the manager given it a specific view constraint

Specified by:
addView in interface ViewManager
Throws:
ViewException

addView

public void addView(ViewContainer view)
             throws ViewException
Description copied from interface: ViewManager
Adds a view to the manager

Specified by:
addView in interface ViewManager
Throws:
ViewException

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
Returns:
Throws:
ViewManagerException

getApplication

public Application getApplication()
Description copied from interface: ApplicationAware
Returns the instance of the current application

Specified by:
getApplication in interface ApplicationAware
Returns:

getViews

public Map<Object,ViewContainer> getViews()
Specified by:
getViews in interface ViewManager
Returns:

removeView

public void removeView(ViewContainer view)
                throws ViewException
Description copied from interface: ViewManager
It removes the view passed as parameter from the manager.

Specified by:
removeView in interface ViewManager
Throws:
ViewException

setApplication

public void setApplication(Application application)
Description copied from interface: ApplicationAware
Sets the application instance

Specified by:
setApplication in interface ApplicationAware


Copyright © 2010. All Rights Reserved.