|
||||||||||
| 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.WInteractWidget
eu.webtoolkit.jwt.WContainerWidget
eu.webtoolkit.jwt.WGroupBox
public class WGroupBox
A widget which group widgets into a frame with a title.
This is typically used in a form to group certain form elements together.
Usage example:
enum Vote { Republican , Democrate , NoVote };
// use a group box as widget container for 3 radio buttons, with a title
WGroupBox container = new WGroupBox("USA elections vote");
// use a button group to logically group the 3 options
WButtonGroup group = new WButtonGroup(this);
WRadioButton button;
button = new WRadioButton("I voted Republican", container);
new WBreak(container);
group.addButton(button, Vote.Republican.ordinal());
button = new WRadioButton("I voted Democrat", container);
new WBreak(container);
group.addButton(button, Vote.Democrate.ordinal());
button = new WRadioButton("I didn't vote", container);
new WBreak(container);
group.addButton(button, Vote.NoVote.ordinal());
group.setCheckedButton(group.button(Vote.NoVote.ordinal()));
Like WContainerWidget, WGroupBox is by default displayed as a
block.
WGroupBox example
The widget corresponds to the HTML <fieldset> tag, and the
title in a nested <legend> tag. This widget does not
provide styling, and can be styled using inline or external CSS as
appropriate.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WContainerWidget |
|---|
WContainerWidget.Overflow |
| Constructor Summary | |
|---|---|
WGroupBox()
Creates a groupbox with empty title. |
|
WGroupBox(java.lang.CharSequence title)
Creates a groupbox with given title message. |
|
WGroupBox(java.lang.CharSequence title,
WContainerWidget parent)
Creates a groupbox with given title message. |
|
WGroupBox(WContainerWidget parent)
Creates a groupbox with empty title. |
|
| Method Summary | |
|---|---|
WString |
getTitle()
Returns the title. |
protected void |
propagateSetEnabled(boolean enabled)
Propagates that a widget was enabled or disabled through children. |
void |
refresh()
Refresh the widget. |
void |
setTitle(java.lang.CharSequence title)
Returns the title. |
| Methods inherited from class eu.webtoolkit.jwt.WContainerWidget |
|---|
addWidget, clear, getContentAlignment, getCount, getIndexOf, getLayout, getPadding, getWidget, insertBefore, insertWidget, isList, isOrderedList, isUnorderedList, remove, removeWidget, scrolled, setContentAlignment, setContentAlignment, setLayout, setLayout, setLayout, setList, setList, setOverflow, setOverflow, setOverflow, setPadding, setPadding, setPadding |
| Methods inherited from class eu.webtoolkit.jwt.WInteractWidget |
|---|
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted |
| 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 |
|---|
addChild, getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WGroupBox(WContainerWidget parent)
public WGroupBox()
Calls this((WContainerWidget)null)
public WGroupBox(java.lang.CharSequence title,
WContainerWidget parent)
public WGroupBox(java.lang.CharSequence title)
Calls this(title, (WContainerWidget)null)
| Method Detail |
|---|
public WString getTitle()
public void setTitle(java.lang.CharSequence title)
public void refresh()
WWidget
The refresh method is invoked when the locale is changed using
WApplication#setLocale() or
when the user hit the refresh button.
The widget must actualize its contents in response.
refresh in class WWebWidgetprotected void propagateSetEnabled(boolean enabled)
WWidget
When enabling or disabling a widget, you usually also want to disable
contained children. This method is called by
setDisabled() to propagate
its state to all children.
You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children.
propagateSetEnabled in class WInteractWidget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||