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

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.Panel
              extended bycom.google.gwt.user.client.ui.SplitPanel
                  extended bycom.google.gwt.user.client.ui.VerticalSplitPanel
All Implemented Interfaces:
EventListener, HasWidgets

public final class VerticalSplitPanel
extends com.google.gwt.user.client.ui.SplitPanel

A panel that arranges two widgets in a single vertical column and allows the user to interactively change the proportion of the height dedicated to each of the two widgets. Widgets contained within a VerticalSplitterPanel will be automatically decorated with scrollbars when neccessary.

CSS Style Rules


Constructor Summary
VerticalSplitPanel()
          Creates an empty vertical split panel.
 
Method Summary
 void add(Widget w)
          Adds a child widget.
 Widget getBottomWidget()
          Gets the widget in the bottom of the panel.
protected  Element getElement(int index)
          Gets the content element for the given index.
protected  Element getSplitElement()
          Gets the element that is acting as the splitter.
 Widget getTopWidget()
          Gets the widget in the top of the panel.
protected  Widget getWidget(int index)
          Gets one of the contained widgets.
 boolean isResizing()
          Indicates whether the split panel is being resized.
 java.util.Iterator iterator()
          Gets an iterator for the contained widgets.
 void onBrowserEvent(Event event)
          Fired whenever a browser event is received.
 boolean remove(Widget widget)
          Removes a child widget.
 void setBottomWidget(Widget w)
          Sets the widget in the bottom of the panel.
 void setSplitPosition(java.lang.String size)
          Moves the position of the splitter.
 void setTopWidget(Widget w)
          Sets the widget in the top of the panel.
protected  void setWidget(int index, Widget w)
          Sets one of the contained widgets.
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, clear, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getTitle, isVisible, isVisible, removeStyleName, resetStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerticalSplitPanel

public VerticalSplitPanel()
Creates an empty vertical split panel.

Method Detail

getBottomWidget

public final Widget getBottomWidget()
Gets the widget in the bottom of the panel.

Returns:
the widget, null if there is not one

getTopWidget

public final Widget getTopWidget()
Gets the widget in the top of the panel.

Returns:
the widget, null if there is not one

setBottomWidget

public final void setBottomWidget(Widget w)
Sets the widget in the bottom of the panel.

Parameters:
w - the widget

setSplitPosition

public final void setSplitPosition(java.lang.String size)
Description copied from class: com.google.gwt.user.client.ui.SplitPanel
Moves the position of the splitter.

Parameters:
size - the new size of the left region in CSS units (e.g. "10px", "1em")

setTopWidget

public final void setTopWidget(Widget w)
Sets the widget in the top of the panel.

Parameters:
w - the widget

add

public void add(Widget w)
Description copied from interface: HasWidgets
Adds a child widget.

Specified by:
add in interface HasWidgets
Overrides:
add in class Panel

isResizing

public boolean isResizing()
Indicates whether the split panel is being resized.

Returns:
true if the user is dragging the splitter, false otherwise

iterator

public java.util.Iterator iterator()
Description copied from interface: HasWidgets
Gets an iterator for the contained widgets. This iterator is required to implement Iterator.remove().


onBrowserEvent

public void onBrowserEvent(Event event)
Description copied from interface: EventListener
Fired whenever a browser event is received.

Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class Widget

remove

public boolean remove(Widget widget)
Description copied from interface: HasWidgets
Removes a child widget.

Parameters:
widget - the widget to be removed
Returns:
true if the widget was present

getElement

protected Element getElement(int index)
Gets the content element for the given index.

Parameters:
index - the index of the element, only 0 and 1 are valid.
Returns:
the element

getSplitElement

protected Element getSplitElement()
Gets the element that is acting as the splitter.

Returns:
the element

getWidget

protected Widget getWidget(int index)
Gets one of the contained widgets.

Parameters:
index - the index of the widget, only 0 and 1 are valid.
Returns:
the widget

setWidget

protected final void setWidget(int index,
                               Widget w)
Sets one of the contained widgets.

Parameters:
index - the index, only 0 and 1 are valid
w - the widget