org.overlord.sramp.ui.client.views
Class AbstractView<A extends IActivity>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.overlord.sramp.ui.client.views.AbstractView<A>
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, IView<A>
Direct Known Subclasses:
ArtifactView, BrowseView, DashboardView

public class AbstractView<A extends IActivity>
extends com.google.gwt.user.client.ui.Composite
implements IView<A>

Base class for all view implementations.

Author:
eric.wittmann@redhat.com

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
AbstractView()
          Constructor.
 
Method Summary
 A getActivity()
          Gets the activity for this view.
protected
<T extends IService>
T
getService(Class<T> serviceType)
          Gets a service.
protected  IGrowlService growl()
          Convenience method for getting the growl service.
protected  ILocalizationService i18n()
          Convenience method for getting the localization service.
 void setActivity(A activity)
          Sets the activity for this view.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.IsWidget
asWidget
 

Constructor Detail

AbstractView

public AbstractView()
Constructor.

Method Detail

getActivity

public A getActivity()
Description copied from interface: IView
Gets the activity for this view.

Specified by:
getActivity in interface IView<A extends IActivity>
See Also:
IView.getActivity()

setActivity

public void setActivity(A activity)
Description copied from interface: IView
Sets the activity for this view.

Specified by:
setActivity in interface IView<A extends IActivity>
See Also:
IView.setActivity(org.overlord.sramp.ui.client.activities.IActivity)

getService

protected <T extends IService> T getService(Class<T> serviceType)
                                 throws ServiceNotFoundException
Gets a service.

Parameters:
serviceType - the type of service desired
Returns:
the service
Throws:
ServiceNotFoundException

i18n

protected ILocalizationService i18n()
Convenience method for getting the localization service.


growl

protected IGrowlService growl()
Convenience method for getting the growl service.



Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.