Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.gwt.runtime.client.ui
Class AbstractView

java.lang.Object
  extended by org.nuxeo.ecm.gwt.runtime.client.ui.AbstractView
All Implemented Interfaces:
Drawable, View
Direct Known Subclasses:
SmartView

public abstract class AbstractView
extends java.lang.Object
implements View

Author:
Bogdan Stefanescu

Constructor Summary
AbstractView(java.lang.String name)
           
 
Method Summary
 boolean acceptInput(java.lang.Object input)
          Whether or not this view accepts the given input.
 java.lang.String getIcon()
          Gets a icon suitable for this view.
 java.lang.Object getInput()
          Gets the current input if the view if any.
 java.lang.String getName()
          Gets the view name the view an can be used to find out a view from its container.
 java.lang.String getTitle()
          Gets a title suitable for this view.
 com.google.gwt.user.client.ui.Widget getWidget()
          Gets the underlying widget of this object.
 boolean hasWidget()
          Whether or not the view widget was created.
 void hideBusy()
          Hides busy state.
 void install(Site site, java.lang.Object input)
          Installs the view into a site and sets is input to the given one.
 boolean isInstalled()
          Whether or not this view is installed into a site (its widget was created).
 void refresh()
          Refreshes this view using current input.
 void setInput(java.lang.Object input)
          Sets the input object for the view.
 void showBusy()
          Shows busy state.
 java.lang.String toString()
           
 void uninstall()
          Uninstalls the view from its site.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractView

public AbstractView(java.lang.String name)
Method Detail

install

public void install(Site site,
                    java.lang.Object input)
Description copied from interface: View
Installs the view into a site and sets is input to the given one. The view widget will be created at this point after setting the input.

Specified by:
install in interface View
Parameters:
site - the site to host the view
input - the input object

uninstall

public void uninstall()
Description copied from interface: View
Uninstalls the view from its site. All cached data should be removed such as the view widget etc. The view itself should not be destroyed to be able to re-install it later if needed.

Specified by:
uninstall in interface View

isInstalled

public boolean isInstalled()
Description copied from interface: View
Whether or not this view is installed into a site (its widget was created).

Specified by:
isInstalled in interface View
Returns:
true if installed, false otherwise.

hasWidget

public boolean hasWidget()
Description copied from interface: View
Whether or not the view widget was created.

Specified by:
hasWidget in interface View

getName

public java.lang.String getName()
Description copied from interface: View
Gets the view name the view an can be used to find out a view from its container.

Specified by:
getName in interface View

getTitle

public java.lang.String getTitle()
Description copied from interface: View
Gets a title suitable for this view. This is a hint to the site view ad should reflect the current view input.

Specified by:
getTitle in interface View
Returns:
the title or null if none

getIcon

public java.lang.String getIcon()
Description copied from interface: View
Gets a icon suitable for this view. This is a hint to the view site and should reflect the current view input.

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

refresh

public void refresh()
Description copied from interface: View
Refreshes this view using current input. This should be called by a setInput after setting the input. Optional operation - if container doesn't supports refresh do nothing

Specified by:
refresh in interface View

showBusy

public void showBusy()
Description copied from interface: View
Shows busy state. Called when busy state is required.

Specified by:
showBusy in interface View

hideBusy

public void hideBusy()
Description copied from interface: View
Hides busy state. Called when busy state terminated.

Specified by:
hideBusy in interface View

getWidget

public com.google.gwt.user.client.ui.Widget getWidget()
Description copied from interface: Drawable
Gets the underlying widget of this object.

Specified by:
getWidget in interface Drawable
Returns:
the widget. cannot be null.

acceptInput

public boolean acceptInput(java.lang.Object input)
Description copied from interface: View
Whether or not this view accepts the given input. This is an optional operation and should return false if not supported

Specified by:
acceptInput in interface View
Returns:
true if input can be rendered by the view

setInput

public void setInput(java.lang.Object input)
Description copied from interface: View
Sets the input object for the view. This is an optional operation and should be implemented only by views that supports input (e.g. editors)

Specified by:
setInput in interface View

getInput

public java.lang.Object getInput()
Description copied from interface: View
Gets the current input if the view if any.

Specified by:
getInput in interface View
Returns:
the input if any input or null if none

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.