Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.gwt.runtime.client.ui.view
Class DefaultViewManager

java.lang.Object
  extended by org.nuxeo.ecm.gwt.runtime.client.ui.view.DefaultViewManager
All Implemented Interfaces:
ViewManager
Direct Known Subclasses:
MultiPageViewManager

public class DefaultViewManager
extends java.lang.Object
implements ViewManager

Author:
Bogdan Stefanescu

Constructor Summary
DefaultViewManager()
           
DefaultViewManager(Container mgr)
           
 
Method Summary
 void activateView(java.lang.String key)
          Activates a view given its ID.
 void addView(java.lang.String key, View view)
          Registers a view under an id.
 void deactivateView(java.lang.String key)
          Deactivates a view given its ID.
 View getActiveView()
          Gets the current view.
 Container getContainer()
          The site manager used by this view.
 View getView(java.lang.String name)
          Gets a view given its registration ID.
 View[] getViews()
          Gets all registered views.
 int getViewsCount()
          Gets the number of the view in that manager.
 ViewSite getViewSite(java.lang.String name)
           
 ViewSite getViewSiteByHandle(java.lang.Object handle)
           
 void hideView(java.lang.String key)
          Hides a view given its registration ID.
 void open(java.lang.Object input)
          Opens the given view.
 void removeView(View view)
          Removes a registered view.
 void setContainer(Container mgr)
          Sets the site manager to be used by this view manager.
 void showView(java.lang.String key)
          Shows a view given its registration ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewManager

public DefaultViewManager()

DefaultViewManager

public DefaultViewManager(Container mgr)
Method Detail

setContainer

public void setContainer(Container mgr)
Description copied from interface: ViewManager
Sets the site manager to be used by this view manager.

Specified by:
setContainer in interface ViewManager

getContainer

public Container getContainer()
Description copied from interface: ViewManager
The site manager used by this view.

Specified by:
getContainer in interface ViewManager
Returns:
the site manager

open

public void open(java.lang.Object input)
Description copied from interface: ViewManager
Opens the given view. The managed views are refreshed depending on the input so that you may expect that some views becomes hidden or restored after an open operation.

Specified by:
open in interface ViewManager
Parameters:
input - (may be null)

getViews

public View[] getViews()
Description copied from interface: ViewManager
Gets all registered views.

Specified by:
getViews in interface ViewManager
Returns:
all registered views or an empty array if none.

getViewsCount

public int getViewsCount()
Description copied from interface: ViewManager
Gets the number of the view in that manager.

Specified by:
getViewsCount in interface ViewManager

addView

public void addView(java.lang.String key,
                    View view)
Description copied from interface: ViewManager
Registers a view under an id.

Specified by:
addView in interface ViewManager
Parameters:
key - the view id
view - the view to register

removeView

public void removeView(View view)
Description copied from interface: ViewManager
Removes a registered view.

Specified by:
removeView in interface ViewManager
Parameters:
view - the view to remove

getView

public View getView(java.lang.String name)
Description copied from interface: ViewManager
Gets a view given its registration ID.

Specified by:
getView in interface ViewManager

getViewSiteByHandle

public ViewSite getViewSiteByHandle(java.lang.Object handle)

getViewSite

public ViewSite getViewSite(java.lang.String name)

getActiveView

public View getActiveView()
Description copied from interface: ViewManager
Gets the current view. This method applies only for deck style containers (e.g. that are showing only one view at a time). For other container type it does nothing.

Specified by:
getActiveView in interface ViewManager
Returns:
the active view or null if none.

hideView

public void hideView(java.lang.String key)
Description copied from interface: ViewManager
Hides a view given its registration ID. If view is already hidden, do nothing. This method may not apply for deck style containers (e.g. multi-page views) which are showing only one view at a time. In this case calling showView() on another view will hide the active view. For other container types, it does nothing.

Specified by:
hideView in interface ViewManager

showView

public void showView(java.lang.String key)
Description copied from interface: ViewManager
Shows a view given its registration ID. If view is already visible, do nothing.

Specified by:
showView in interface ViewManager

activateView

public void activateView(java.lang.String key)
Description copied from interface: ViewManager
Activates a view given its ID. This will make visible the view content (similar to expand for stack views or select for deck views).

Specified by:
activateView in interface ViewManager

deactivateView

public void deactivateView(java.lang.String key)
Description copied from interface: ViewManager
Deactivates a view given its ID. This will hide the content of the view (similar to collapse for stack views or deselect for deck views).

Specified by:
deactivateView in interface ViewManager

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.