org.xwiki.gwt.user.client.ui
Class VerticalResizePanel

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.ComplexPanel
                  extended by com.google.gwt.user.client.ui.FlowPanel
                      extended by org.xwiki.gwt.user.client.ui.VerticalResizePanel
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.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>

public class VerticalResizePanel
extends com.google.gwt.user.client.ui.FlowPanel

Panel that allows one of the contained widgets to be resized so that it vertically fills all the space left in this container after its siblings are drawn. The desired container size will be considered to be its current size so it needs to be correctly sized from CSS or otherwise before any refresh is triggered.
The layout is always automatically done on attaching this container, and it can also be requested manually by calling refreshHeights(). refreshHeights() must always be called when the children of this container are modified (their content, their size, or visibility), children are added or removed or when the size of this widget is changed.

Version:
$Id: 4077015e4ec2e057fd01aaf4f80b038a82102da4 $

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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
VerticalResizePanel()
           
 
Method Summary
protected  void onLoad()
           
 void refreshHeights()
          Recomputes the heights of the child widgets, setting the appropriate height for the expanded widget.
 void setExpandingWidget(com.google.gwt.user.client.ui.Widget expandingWidget, boolean needsReload)
           
 
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, clear, insert, insert
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, resolvePotentialElement, 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.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Constructor Detail

VerticalResizePanel

public VerticalResizePanel()
Method Detail

setExpandingWidget

public void setExpandingWidget(com.google.gwt.user.client.ui.Widget expandingWidget,
                               boolean needsReload)
Parameters:
expandingWidget - the widget that will be expanded expand to vertically fill all remaining height after all its siblings have been displayed
needsReload - true if the set widget will be reloaded on each size change, false otherwise. Set this to true if the expanding widget needs to recompute its layout any time its size changes.

refreshHeights

public void refreshHeights()
Recomputes the heights of the child widgets, setting the appropriate height for the expanded widget.


onLoad

protected void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget


Copyright © 2004–2015 XWiki. All rights reserved.