|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.ScrollPanel
A simple panel that wraps its contents in a scrollable area.
Constructor Summary | |
ScrollPanel()
Creates an empty scroll panel. |
|
ScrollPanel(Widget child)
Creates a new scroll panel with the given child widget. |
Method Summary | |
void |
addScrollListener(ScrollListener listener)
Adds a listener interface to receive scroll events. |
void |
ensureVisible(UIObject item)
Ensures that the specified item is visible, by adjusting the panel's scroll position. |
int |
getHorizontalScrollPosition()
Gets the horizontal scroll position. |
int |
getScrollPosition()
Gets the vertical scroll position. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
void |
removeScrollListener(ScrollListener listener)
Removes a previously added scroll listener. |
void |
setAlwaysShowScrollBars(boolean alwaysShow)
Sets whether this panel always shows its scroll bars, or only when necessary. |
void |
setHorizontalScrollPosition(int position)
Sets the horizontal scroll position. |
void |
setScrollPosition(int position)
Sets the vertical scroll position. |
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 |
getParent, isAttached, onAttach, onDetach, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, 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 |
public ScrollPanel()
public ScrollPanel(Widget child)
child
- the widget to be wrapped by the scroll panelMethod Detail |
public void addScrollListener(ScrollListener listener)
SourcesScrollEvents
addScrollListener
in interface SourcesScrollEvents
listener
- the listener interface to add.public void ensureVisible(UIObject item)
item
- the item whose visibility is to be ensuredpublic int getHorizontalScrollPosition()
public int getScrollPosition()
public void onBrowserEvent(Event event)
EventListener
onBrowserEvent
in interface EventListener
onBrowserEvent
in class Widget
public void removeScrollListener(ScrollListener listener)
SourcesScrollEvents
removeScrollListener
in interface SourcesScrollEvents
listener
- the listener interface to remove.public void setAlwaysShowScrollBars(boolean alwaysShow)
alwaysShow
- true
to show scroll bars at all timespublic void setHorizontalScrollPosition(int position)
position
- the new horizontal scroll position, in pixelspublic void setScrollPosition(int position)
position
- the new vertical scroll position, in pixels
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |