com.google.gwt.user.client.ui
Class LazyPanel

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
All Implemented Interfaces:
HasHandlers, EventListener, HasWidgets, java.lang.Iterable<Widget>

public abstract class LazyPanel
extends SimplePanel

Convenience class to help lazy loading. The bulk of a LazyPanel is not instantiated until setVisible(boolean)(true) or ensureWidget() is called.

Example


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
LazyPanel()
           
 
Method Summary
 void ensureWidget()
          Ensures that the widget has been created by calling createWidget() if SimplePanel.getWidget() returns null.
 void setVisible(boolean visible)
          Sets whether this object is visible.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
clear
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getLayoutData, getParent, isAttached, onBrowserEvent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyPanel

public LazyPanel()
Method Detail

ensureWidget

public void ensureWidget()
Ensures that the widget has been created by calling createWidget() if SimplePanel.getWidget() returns null. Typically it is not necessary to call this directly, as it is called as a side effect of a setVisible(true) call.


setVisible

public void setVisible(boolean visible)
Description copied from class: UIObject
Sets whether this object is visible.

Overrides:
setVisible in class UIObject
Parameters:
visible - true to show the object, false to hide it