|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WWebWidget
eu.webtoolkit.jwt.WScrollArea
public class WScrollArea
A widget that adds scrolling capabilities to its content.
Use a WScrollArea to add scrolling capabilities to another widget.
When the content is bigger than the WScrollArea, scrollbars are added
so that the user can still view the entire content.
Use setScrollBarPolicy() to configure if and when the scrollbars may appear.
In many cases, it might be easier to use the CSS overflow property on a
WContainerWidget (see
WContainerWidget#setOverflow()). However, this class will behave better when
used inside a layout manager: in that case it will make sure horizontal
scrolling works properly, since otherwise the layout manager would overflow
rather than scrollbars appear.
This widget is rendered using a <div> with a CSS overflow
attribute. When in a layout manager it is positioned absolutely. It can be
styled using inline or external CSS as appropriate.
| Nested Class Summary | |
|---|---|
static class |
WScrollArea.ScrollBarPolicy
brief Policy for showing a scrollbar. |
| Constructor Summary | |
|---|---|
WScrollArea()
Creates a scroll area. |
|
WScrollArea(WContainerWidget parent)
Creates a scroll area. |
|
| Method Summary | |
|---|---|
WScrollBar |
getHorizontalScrollBar()
Returns the horizontal scrollbar. |
WScrollArea.ScrollBarPolicy |
getHorizontalScrollBarPolicy()
Returns the horizontal scroll bar policy. |
WScrollBar |
getVerticalScrollBar()
Returns the vertical scrollbar. |
WScrollArea.ScrollBarPolicy |
getVerticalScrollBarPolicy()
Returns the vertical scroll bar policy. |
WWidget |
getWidget()
Returns the widget content. |
void |
remove()
Destructor. |
void |
setHorizontalScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
Sets the horizontal scroll bar policy. |
void |
setScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
Sets the policy for both scrollbars. |
void |
setVerticalScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
Sets the vertical scroll bar policy. |
void |
setWidget(WWidget widget)
Sets the widget that is the content of the scroll area. |
WWidget |
takeWidget()
Removes the widget content. |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WScrollArea(WContainerWidget parent)
public WScrollArea()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void remove()
WWidgetDeletes a widget and all children (recursively). If the widget is contained in another widget, it is removed first.
remove in class WWebWidgetWContainerWidget.removeWidget(WWidget widget)public void setWidget(WWidget widget)
Setting a new widget will delete the previously set widget.
public WWidget takeWidget()
public WWidget getWidget()
public WScrollBar getHorizontalScrollBar()
public WScrollBar getVerticalScrollBar()
public void setScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
setHorizontalScrollBarPolicy(WScrollArea.ScrollBarPolicy
policy),
setVerticalScrollBarPolicy(WScrollArea.ScrollBarPolicy
policy)public void setHorizontalScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
setScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)public void setVerticalScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)
setScrollBarPolicy(WScrollArea.ScrollBarPolicy policy)public WScrollArea.ScrollBarPolicy getHorizontalScrollBarPolicy()
setHorizontalScrollBarPolicy(WScrollArea.ScrollBarPolicy
policy)public WScrollArea.ScrollBarPolicy getVerticalScrollBarPolicy()
setVerticalScrollBarPolicy(WScrollArea.ScrollBarPolicy
policy)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||