org.viewaframework.view.perspective
Class DefaultPerspective

java.lang.Object
  extended by org.viewaframework.view.perspective.DefaultPerspective
All Implemented Interfaces:
Perspective, ViewAware

public class DefaultPerspective
extends Object
implements Perspective

Author:
Mario Garcia

Field Summary
static String DEFAULT_PERSPECTIVE_ID
           
 
Constructor Summary
DefaultPerspective()
           
 
Method Summary
 void addView(ViewContainer view)
          Add a view to the current perspective
 void addView(ViewContainer view, PerspectiveConstraint constraint)
          From version 1.0.2 all constraints must be included in PerspectiveConstraint enumeration
 Container arrange()
          Arranges the views contained in the manager.
 void clear()
          Unloads all views from this perspective
 String getId()
           
 Map<Object,ViewContainer> getViews()
          Returns all views within this perspective
 void removeView(ViewContainer view)
          Remove the given view from the current perspective
 void setId(String id)
           
 void setViews(Map<Object,ViewContainer> views)
          Sets all views used by this perspective
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PERSPECTIVE_ID

public static final String DEFAULT_PERSPECTIVE_ID
See Also:
Constant Field Values
Constructor Detail

DefaultPerspective

public DefaultPerspective()
Method Detail

addView

public void addView(ViewContainer view)
Description copied from interface: ViewAware
Add a view to the current perspective

Specified by:
addView in interface ViewAware

addView

public void addView(ViewContainer view,
                    PerspectiveConstraint constraint)
Description copied from interface: ViewAware
From version 1.0.2 all constraints must be included in PerspectiveConstraint enumeration

Specified by:
addView in interface ViewAware

arrange

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

Specified by:
arrange in interface Perspective
Returns:
Throws:
ViewManagerException

clear

public void clear()
Description copied from interface: Perspective
Unloads all views from this perspective

Specified by:
clear in interface Perspective

getId

public String getId()
Specified by:
getId in interface Perspective
Returns:

getViews

public Map<Object,ViewContainer> getViews()
Description copied from interface: ViewAware
Returns all views within this perspective

Specified by:
getViews in interface ViewAware
Returns:

removeView

public void removeView(ViewContainer view)
Description copied from interface: ViewAware
Remove the given view from the current perspective

Specified by:
removeView in interface ViewAware

setId

public void setId(String id)
Specified by:
setId in interface Perspective

setViews

public void setViews(Map<Object,ViewContainer> views)
Description copied from interface: ViewAware
Sets all views used by this perspective

Specified by:
setViews in interface ViewAware


Copyright © 2010. All Rights Reserved.