|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.cruxframework.crux.core.client.screen.views.ViewContainer
public abstract class ViewContainer
| 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 | |
|---|---|
protected static Logger |
logger
|
protected FastMap<View> |
views
|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ViewContainer(com.google.gwt.user.client.ui.Widget mainWidget)
Constructor |
|
ViewContainer(com.google.gwt.user.client.ui.Widget mainWidget,
boolean clearPanelsForDeactivatedViews)
Constructor |
|
| Method Summary | ||
|---|---|---|
protected boolean |
activate(View view,
com.google.gwt.user.client.ui.Panel containerPanel,
Object parameter)
This method must be called by subclasses when any of your views is rendered. |
|
boolean |
add(View view)
Loads a new view into the container |
|
protected boolean |
add(View view,
boolean render,
Object parameter)
Loads a new view into the container |
|
boolean |
addLazy(View view)
Adds a new view into the container, but does not load the view. |
|
protected boolean |
addView(View view,
boolean lazy,
Object parameter)
|
|
protected void |
adoptView(View view)
|
|
protected void |
bindToDOM()
This method must be called by subclasses when the container is attached to DOM |
|
void |
clear()
Remove all view inside this container |
|
static void |
createView(String viewName,
String viewId,
ViewFactory.CreateCallback callback)
Creates the view referenced by the given name and associate a custom identifier with the view created |
|
static void |
createView(String viewName,
ViewFactory.CreateCallback callback)
Creates the view referenced by the given name |
|
protected boolean |
deactivate(View view,
com.google.gwt.user.client.ui.Panel containerPanel,
boolean skipEvent)
This method must be called by subclasses when any of your views currently rendered is removed from view. |
|
protected boolean |
doAdd(View view,
boolean lazy,
Object parameter)
Loads a new view into the container |
|
protected boolean |
doRemove(View view,
boolean skipEvent)
|
|
protected abstract com.google.gwt.user.client.ui.Panel |
getContainerPanel(View view)
|
|
protected
|
getMainWidget()
|
|
View |
getView(String viewId)
Retrieve the view associated to viewId |
|
static ViewFactory |
getViewFactory()
Retrieve the views factory associated with this screen. |
|
protected abstract void |
handleViewTitle(String title,
com.google.gwt.user.client.ui.Panel containerPanel,
String viewId)
|
|
protected abstract boolean |
hasHistoryHandlers()
|
|
protected abstract boolean |
hasOrientationChangeHandlers()
|
|
protected abstract boolean |
hasResizeHandlers()
|
|
protected abstract boolean |
hasWindowCloseHandlers()
|
|
protected abstract boolean |
hasWindowClosingHandlers()
|
|
protected void |
loadAndRenderView(String viewName,
String viewId,
Object parameter)
|
|
void |
loadView(String viewName,
boolean render)
Loads a view into the current container |
|
void |
loadView(String viewName,
String viewId,
boolean render)
Loads a view into the current container |
|
protected void |
loadView(String viewName,
String viewId,
boolean render,
Object parameter)
Loads a view into the current container |
|
protected abstract void |
notifyViewsAboutHistoryChange(com.google.gwt.event.logical.shared.ValueChangeEvent<String> event)
|
|
protected abstract void |
notifyViewsAboutOrientationChange()
|
|
protected abstract void |
notifyViewsAboutWindowClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.Window> event)
|
|
protected abstract void |
notifyViewsAboutWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
|
|
protected abstract void |
notifyViewsAboutWindowResize(com.google.gwt.event.logical.shared.ResizeEvent event)
|
|
boolean |
remove(View view)
Remove the view from this container |
|
boolean |
remove(View view,
boolean skipEvents)
Remove the view from this container |
|
protected boolean |
renderView(View view,
Object parameter)
Render the view into the container |
|
void |
showView(String viewName)
Render the requested view into the container. |
|
void |
showView(String viewName,
String viewId)
Render the requested view into the container. |
|
protected void |
showView(String viewName,
String viewId,
Object parameter)
Render the requested view into the container. |
|
protected void |
unbindToDOM()
This method must be called by subclasses when the container is detached from DOM |
|
| 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, unsinkEvents |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static Logger logger
protected FastMap<View> views
| Constructor Detail |
|---|
public ViewContainer(com.google.gwt.user.client.ui.Widget mainWidget)
mainWidget - main widget on this container
public ViewContainer(com.google.gwt.user.client.ui.Widget mainWidget,
boolean clearPanelsForDeactivatedViews)
mainWidget - Main widget on this containerclearPanelsForDeactivatedViews - If true, makes the container clear the container panel for a view, when the view is deactivated.| Method Detail |
|---|
public boolean add(View view)
view - View to be added
public boolean addLazy(View view)
view - View to be added
public void clear()
public boolean remove(View view)
view - View to be removed
public boolean remove(View view,
boolean skipEvents)
view - View to be removedskipEvents - skip the events fired during view removal
public void showView(String viewName)
viewName - View name
public void showView(String viewName,
String viewId)
viewId - View identifierviewId - View namepublic View getView(String viewId)
viewId - View identifier
public static ViewFactory getViewFactory()
public static void createView(String viewName,
ViewFactory.CreateCallback callback)
viewName - View namecallback - Called when the view creation is completed.
public static void createView(String viewName,
String viewId,
ViewFactory.CreateCallback callback)
viewName - View nameviewId - View identifiercallback - Called when the view creation is completed.
public void loadView(String viewName,
boolean render)
viewName - View namerender - If true also render the view
public void loadView(String viewName,
String viewId,
boolean render)
viewName - View nameviewId - View identifierrender - If true also render the view
protected void loadView(String viewName,
String viewId,
boolean render,
Object parameter)
viewName - View nameviewId - View identifierparameter - A parameter passed that will be bound to the view load and activate eventsrender - If true also render the view
protected boolean add(View view,
boolean render,
Object parameter)
view - View to be addedrender - If true, call the render methodparameter - A parameter passed that will be bound to the view load and activate events
protected void showView(String viewName,
String viewId,
Object parameter)
viewId - View identifierviewId - View nameparameter - to be passed to activate event
protected void loadAndRenderView(String viewName,
String viewId,
Object parameter)
protected <T extends com.google.gwt.user.client.ui.Widget> T getMainWidget()
protected void bindToDOM()
protected void unbindToDOM()
protected boolean activate(View view,
com.google.gwt.user.client.ui.Panel containerPanel,
Object parameter)
view - containerPanel - parameter -
protected boolean deactivate(View view,
com.google.gwt.user.client.ui.Panel containerPanel,
boolean skipEvent)
view - containerPanel - skipEvent -
protected boolean doAdd(View view,
boolean lazy,
Object parameter)
view - View to be added
protected boolean doRemove(View view,
boolean skipEvent)
view - skipEvent -
protected boolean renderView(View view,
Object parameter)
view - parameter -
protected boolean addView(View view,
boolean lazy,
Object parameter)
view - lazy -
protected void adoptView(View view)
view - protected abstract boolean hasResizeHandlers()
protected abstract boolean hasWindowCloseHandlers()
protected abstract boolean hasWindowClosingHandlers()
protected abstract boolean hasOrientationChangeHandlers()
protected abstract boolean hasHistoryHandlers()
protected abstract void notifyViewsAboutWindowResize(com.google.gwt.event.logical.shared.ResizeEvent event)
protected abstract void notifyViewsAboutWindowClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.Window> event)
protected abstract void notifyViewsAboutWindowClosing(com.google.gwt.user.client.Window.ClosingEvent event)
protected abstract void notifyViewsAboutOrientationChange()
protected abstract void notifyViewsAboutHistoryChange(com.google.gwt.event.logical.shared.ValueChangeEvent<String> event)
protected abstract com.google.gwt.user.client.ui.Panel getContainerPanel(View view)
protected abstract void handleViewTitle(String title,
com.google.gwt.user.client.ui.Panel containerPanel,
String viewId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||