Nuxeo Enterprise Platform 5.4

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

java.lang.Object
  extended by org.nuxeo.ecm.gwt.runtime.client.ui.view.ViewSite
All Implemented Interfaces:
Site
Direct Known Subclasses:
EditorSite, ViewPageSite

public class ViewSite
extends java.lang.Object
implements Site

Author:
Bogdan Stefanescu

Constructor Summary
ViewSite(java.lang.String name, View view)
           
 
Method Summary
 void activate()
          Activate this site.
 void close()
          Close this site.
 void deactivate()
          Deactivate this site.
 void disable()
          Disable this site.
 void enable()
          Enable this site.
 java.lang.Object getHandle()
          The handle is an object created by the underlying widget framework and is used to associate a view site with a real widget.
 java.lang.String getIcon()
          Gets the icon to be used for that site.
 java.lang.String getName()
          Gets the site name.
 java.lang.String getTitle()
          Gets the title to be used for this site.
 View getView()
          Gets the view attached to that site.
 boolean isActive()
          Whether or not this view is activated.
 boolean isEnabled()
          Whether or not this site is enabled.
 void open(Container container, java.lang.Object input)
          Opens an input in that site.
 void updateIcon()
          Ask the site to update its icon based on its view icon.
 void updateTitle()
          Ask the site to update its title based on its view title.
 void updateWidget()
          Ask the site to update its widget based on its view widget.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewSite

public ViewSite(java.lang.String name,
                View view)
Method Detail

getView

public View getView()
Description copied from interface: Site
Gets the view attached to that site.

Specified by:
getView in interface Site

getName

public java.lang.String getName()
Description copied from interface: Site
Gets the site name.

Specified by:
getName in interface Site
Returns:
the site name

getHandle

public java.lang.Object getHandle()
Description copied from interface: Site
The handle is an object created by the underlying widget framework and is used to associate a view site with a real widget. The handle will be created by a Container object that is connected to the view manager. The type of the handle is specific to each UI implementation

Specified by:
getHandle in interface Site
Returns:
the handle. can be null if the handle was not yet initialized

getTitle

public java.lang.String getTitle()
Description copied from interface: Site
Gets the title to be used for this site. This is generally asking the view to get a title based on the current input.

Specified by:
getTitle in interface Site
Returns:
the title, or the site name if none

getIcon

public java.lang.String getIcon()
Description copied from interface: Site
Gets the icon to be used for that site. This is generally asking the view to get an icon based on the current input.

Specified by:
getIcon in interface Site
Returns:
the icon or null if none

open

public void open(Container container,
                 java.lang.Object input)
Description copied from interface: Site
Opens an input in that site.

The connection to the container will be created if it is not yet existing. In that case the container will create a handle for that site.

Then the view is asked if it is accepting the input. If not the container will be asked to hide this site.

If the view is accepting the input it will be installed in the container if it is not installed.

Then the view will have its input refreshed which may trigger UI updates like view content, title or icon.

The site is remembering its container so that methods like Site.enable() or Site.activate() can be called later.

Specified by:
open in interface Site

updateIcon

public void updateIcon()
Description copied from interface: Site
Ask the site to update its icon based on its view icon. This will trigger a View.getIcon() operation.

Specified by:
updateIcon in interface Site

updateTitle

public void updateTitle()
Description copied from interface: Site
Ask the site to update its title based on its view title. This will trigger a View.getTitle() operation.

Specified by:
updateTitle in interface Site

updateWidget

public void updateWidget()
Description copied from interface: Site
Ask the site to update its widget based on its view widget. This will trigger a Drawable.getWidget() operation.

Specified by:
updateWidget in interface Site

enable

public void enable()
Description copied from interface: Site
Enable this site. This will ask the container to enable the site. How enablement affect widget state is up to the container implementation. The container may show/hide the widget or may disable/enable it.

Specified by:
enable in interface Site

disable

public void disable()
Description copied from interface: Site
Disable this site. This will ask the container to disable the site. How enablement affect widget state is up to the container implementation. The container may show/hide the widget or may disable/enable it.

Specified by:
disable in interface Site

activate

public void activate()
Description copied from interface: Site
Activate this site. This will ask the container to activate the site. Activating means selecting the site. In a tab view it means selecting the site tab, in an accordion view it means expanding the site section.

Specified by:
activate in interface Site

deactivate

public void deactivate()
Description copied from interface: Site
Deactivate this site. This will ask the container to deactivate the site. Deactivating means deselecting the site. In a tab view it means deselecting the site tab, in an accordion view it means collapsing the site section.

Specified by:
deactivate in interface Site

close

public void close()
Description copied from interface: Site
Close this site. After a site was closed it cannot be reused (a new one will be created). This can be used for example in tab views that support closeable tabs.

Specified by:
close in interface Site

isActive

public boolean isActive()
Description copied from interface: Site
Whether or not this view is activated.

Specified by:
isActive in interface Site

isEnabled

public boolean isEnabled()
Description copied from interface: Site
Whether or not this site is enabled.

Specified by:
isEnabled in interface Site

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.