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

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.SimplePanel
                  extended bycom.google.gwt.user.client.ui.ScrollPanel
All Implemented Interfaces:
EventListener, HasWidgets

public class ScrollPanel
extends SimplePanel

A simple panel that wraps its contents in a scrollable area.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
ScrollPanel()
          Creates an empty scroll panel.
ScrollPanel(Widget child)
          Creates a new scroll panel with the given child widget.
 
Method Summary
 void ensureVisible(UIObject item)
          Ensures that the specified item is visible, by adjusting the panel's scroll position.
 int getScrollPosition()
          Gets the vertical scroll position.
 void setAlwaysShowScrollBars(boolean alwaysShow)
          Sets whether this panel always shows its scroll bars, or only when necessary.
 void setScrollPosition(int position)
          Sets the vertical scroll position.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, clear, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 

Constructor Detail

ScrollPanel

public ScrollPanel()
Creates an empty scroll panel.


ScrollPanel

public ScrollPanel(Widget child)
Creates a new scroll panel with the given child widget.

Parameters:
child - the widget to be wrapped by the scroll panel
Method Detail

ensureVisible

public void ensureVisible(UIObject item)
Ensures that the specified item is visible, by adjusting the panel's scroll position.

Parameters:
item - the item whose visibility is to be ensured

setScrollPosition

public void setScrollPosition(int position)
Sets the vertical scroll position.

Parameters:
position - the new vertical scroll position, in pixels

getScrollPosition

public int getScrollPosition()
Gets the vertical scroll position.

Returns:
the vertical scroll position, in pixels

setAlwaysShowScrollBars

public void setAlwaysShowScrollBars(boolean alwaysShow)
Sets whether this panel always shows its scroll bars, or only when necessary.

Parameters:
alwaysShow - true to show scroll bars at all times


This javadoc distribution was not produced by Google. The official documentation is here.