|
||||||||||
| 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.WCompositeWidget
eu.webtoolkit.jwt.WPanel
public class WPanel
A WPanel provides a container with a title bar.
The panel provides a container with an optional title bar, and an optional collapse icon.
Two panels: one collapsed and one expanded (default theme)
Two panels: one collapsed and one expanded (polished theme)
A panel has the Wt-panel and Wt-outset style
classes. The look can be overridden using the following style class
selectors:
.Wt-panel .titlebar : The title bar .Wt-panel .body : The body (requires vertical padding 4px).
| Constructor Summary | |
|---|---|
WPanel()
Creates a panel. |
|
WPanel(WContainerWidget parent)
Creates a panel. |
|
| Method Summary | |
|---|---|
void |
collapse()
Collapses the panel. |
Signal |
collapsed()
Signal emitted when the panel is collapsed. |
void |
expand()
Collapses the panel. |
Signal |
expanded()
Signal emitted when the panel is expanded. |
WWidget |
getCentralWidget()
Returns the central widget. |
WString |
getTitle()
Returns the title. |
WContainerWidget |
getTitleBarWidget()
Returns the title bar widget. |
boolean |
isCollapsed()
Returns if the panel is collapsed. |
boolean |
isCollapsible()
Returns if the panel can be collapsed by the user. |
boolean |
isTitleBar()
Returns if a title bar is set. |
void |
setAnimation(WAnimation transition)
Sets an animation. |
void |
setCentralWidget(WWidget w)
Sets the central widget. |
void |
setCollapsed(boolean on)
Sets the panel expanded or collapsed. |
void |
setCollapsible(boolean on)
Makes the panel collapsible. |
void |
setTitle(java.lang.CharSequence title)
Sets a title. |
void |
setTitleBar(boolean enable)
Shows or hides the title bar for the panel. |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, isRendered, 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 |
|---|
addChild, getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WPanel(WContainerWidget parent)
public WPanel()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void setTitle(java.lang.CharSequence title)
The panel title is set in the title bar. This method also makes the title bar visible by calling setTitleBar(true).
The default value is "" (no title).
getTitle(),
setTitleBar(boolean enable)public WString getTitle()
setTitle(CharSequence title)public void setTitleBar(boolean enable)
The title bar appears at the top of the panel.
The default value is false: the title bar is not shown
unless a title is set or the panel is made collapsible.
setTitle(CharSequence title),
setCollapsible(boolean on)public boolean isTitleBar()
setTitleBar(boolean enable)public WContainerWidget getTitleBarWidget()
The title bar widget contains the collapse/expand icon (if the panel
isCollapsible()), and the title text (if a
title was set using setTitle()). You can access the title bar widget to customize the
contents of the title.
The method returns null if isTitleBar() is false. You need to call
setTitleBar() first.
setTitleBar(boolean enable)public void setCollapsible(boolean on)
When on is true, a collapse/expand icon is
added to the title bar. This also calls setTitleBar(true) to enable the
title bar.
The default value is false.
setTitleBar(boolean enable),
setCollapsed(boolean on),
isCollapsed()public boolean isCollapsible()
setCollapsible(boolean on)public void setCollapsed(boolean on)
When on is true, equivalent to
collapse(), otherwise to
expand().
The default value is false.
setCollapsible(boolean on)public boolean isCollapsed()
setCollapsed(boolean on),
collapsed(),
expanded()public void collapse()
When isCollapsible() is true, the panel is
collapsed to minimize screen real-estate.
setCollapsible(boolean on),
expand()public void expand()
When isCollapsible() is true, the panel is
expanded to its original state.
setCollapsible(boolean on),
expand()public void setAnimation(WAnimation transition)
The animation is used when collapsing or expanding the panel.
public void setCentralWidget(WWidget w)
Sets the widget that is the contents of the panel. When a widget was previously set, the old widget is deleted first.
The default value is null (no widget set).
public WWidget getCentralWidget()
setCentralWidget(WWidget w)public Signal collapsed()
Signal emitted when the panel is collapsed. The signal is only emitted
when the panel is collapsed by the user using the collapse icon in the
tible bar, not when calling setCollapsed().
expanded()public Signal expanded()
Signal emitted when the panel is expanded. The signal is only emitted
when the panel is expanded by the user using the expand icon in the title
bar, not when calling setCollapsed().
collapsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||