org.kuali.student.common.ui.client.configurable.mvc
Class DelayedToolView

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.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.LazyPanel
                      extended by org.kuali.student.common.ui.client.configurable.mvc.DelayedToolView
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, Iterable<com.google.gwt.user.client.ui.Widget>, ToolView, BreadcrumbSupport, HistorySupport, View
Direct Known Subclasses:
DocumentTool

public abstract class DelayedToolView
extends com.google.gwt.user.client.ui.LazyPanel
implements ToolView

A view that delays its generation until it requested to be shown.

Author:
Kuali Student Team

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
private  Controller controller
           
private  ModelRequestCallback<ReferenceModel> modelRequestCallback
           
private  HasReferenceId reference
           
private  Enum<?> viewEnum
           
private  String viewName
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
DelayedToolView(Controller controller, Enum<?> viewEnum, String viewName)
           
DelayedToolView(Enum<?> viewEnum, String viewName)
           
 
Method Summary
 com.google.gwt.user.client.ui.Widget asWidget()
          Get the attachable widget which represents this view
 boolean beforeHide()
          Called by the controller before the view is hidden to allow the view to perform cleanup or request confirmation from the user, etc.
 void beforeShow(Callback<Boolean> onReadyCallback)
          Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done.
 void collectBreadcrumbNames(List<String> names)
          Adds a human readable name(s) to the list passed in for use in the breadcrumb
 String collectHistory(String historyStack)
           
protected  com.google.gwt.user.client.ui.Widget createWidget()
           
 Controller getController()
          Returns the controller associated with the view
 String getName()
          Returns the view's name
 Enum<?> getViewEnum()
           
 boolean isExportButtonActive()
          This method needs to be implemented only on views that want the export button to display.
 void onHistoryEvent(String historyStack)
           
 void setController(Controller controller)
           
 void updateModel()
          Updates the model with information from this view.
 
Methods inherited from class com.google.gwt.user.client.ui.LazyPanel
ensureWidget, setVisible
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.student.common.ui.client.configurable.mvc.ToolView
getImage
 
Methods inherited from interface org.kuali.student.common.ui.client.mvc.View
clear, showExport
 

Field Detail

controller

private Controller controller

viewEnum

private Enum<?> viewEnum

viewName

private String viewName

reference

private HasReferenceId reference

modelRequestCallback

private ModelRequestCallback<ReferenceModel> modelRequestCallback
Constructor Detail

DelayedToolView

public DelayedToolView(Controller controller,
                       Enum<?> viewEnum,
                       String viewName)
Parameters:
controller -
name -

DelayedToolView

public DelayedToolView(Enum<?> viewEnum,
                       String viewName)
Method Detail

beforeShow

public void beforeShow(Callback<Boolean> onReadyCallback)
Description copied from interface: View
Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done. Executes the callback with true if when the view is ready to be shown.

Specified by:
beforeShow in interface View

beforeHide

public boolean beforeHide()
Description copied from interface: View
Called by the controller before the view is hidden to allow the view to perform cleanup or request confirmation from the user, etc. Can cancel the action by returning false.

Specified by:
beforeHide in interface View
Returns:
true if the view can be hidden, or false to cancel the action.
See Also:
View.beforeHide()

getController

public Controller getController()
Description copied from interface: View
Returns the controller associated with the view

Specified by:
getController in interface View
Returns:
See Also:
View.getController()

getName

public String getName()
Description copied from interface: View
Returns the view's name

Specified by:
getName in interface View
Returns:
See Also:
View.getName()

getViewEnum

public Enum<?> getViewEnum()
Specified by:
getViewEnum in interface ToolView
Specified by:
getViewEnum in interface View

updateModel

public void updateModel()
Description copied from interface: View
Updates the model with information from this view. If this view does not need to update the model leave this method empty.

Specified by:
updateModel in interface View
See Also:
View.updateModel()

setController

public void setController(Controller controller)
Specified by:
setController in interface ToolView

asWidget

public com.google.gwt.user.client.ui.Widget asWidget()
Description copied from interface: View
Get the attachable widget which represents this view

Specified by:
asWidget in interface View
Returns:
See Also:
SectionView

collectHistory

public String collectHistory(String historyStack)
Specified by:
collectHistory in interface HistorySupport

createWidget

protected com.google.gwt.user.client.ui.Widget createWidget()
Specified by:
createWidget in class com.google.gwt.user.client.ui.LazyPanel

onHistoryEvent

public void onHistoryEvent(String historyStack)
Specified by:
onHistoryEvent in interface HistorySupport

collectBreadcrumbNames

public void collectBreadcrumbNames(List<String> names)
Description copied from interface: BreadcrumbSupport
Adds a human readable name(s) to the list passed in for use in the breadcrumb

Specified by:
collectBreadcrumbNames in interface BreadcrumbSupport

isExportButtonActive

public boolean isExportButtonActive()
Description copied from interface: View
This method needs to be implemented only on views that want the export button to display. The default implementation is not to display the export button

Specified by:
isExportButtonActive in interface View
Returns:


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.