|
||||||||||
| 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.WProgressBar
public class WProgressBar
A progress bar.
The progress bar can be used to indicate the progress of a certain operation.
The text displayed in the progress bar can be customized by specializing
getText().
To use the progress bar, you need to give it a range (minimum and maximum
value), and update the progress using
setValue().
WProgressBar is an inline widget.
Using HTML4, the widget is implemented using a set of nested DIVs. The
element can be styled using the Wt-progressbar style. It may be
styled through the current theme, or you can override the style using
internal or external CSS as appropriate.
Note: With the advent of HTML5, this widget will be implemented using the native HTML5 control when available.
| Constructor Summary | |
|---|---|
WProgressBar()
Creates a progress bar. |
|
WProgressBar(WContainerWidget parent)
Creates a progress bar. |
|
| Method Summary | |
|---|---|
WString |
getFormat()
Returns the progress format string. |
double |
getMaximum()
Returns the maximum value. |
double |
getMinimum()
Returns the minimum value. |
WString |
getText()
Returns the text displayed inside the progress bar. |
double |
getValue()
Returns the current progress. |
Signal |
progressCompleted()
A signal that indicates when 100% is reached. |
void |
resize(WLength width,
WLength height)
Resizes the widget. |
void |
setFormat(java.lang.CharSequence format)
Sets the progress format string. |
void |
setMaximum(double maximum)
Sets the maximum value. |
void |
setMinimum(double minimum)
Sets the minimum value. |
void |
setRange(double minimum,
double maximum)
Sets the range. |
void |
setState(double minimum,
double maximum,
double value)
|
void |
setValue(double value)
Sets the current progress. |
void |
setValueStyleClass(java.lang.String valueStyleClass)
|
Signal1<java.lang.Double> |
valueChanged()
A signal that indicates when the value has changed. |
| 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, propagateSetEnabled, remove, 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 WProgressBar(WContainerWidget parent)
public WProgressBar()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void setMinimum(double minimum)
The minimum value is the value that corresponds to 0%.
The default value is 0.
public double getMinimum()
setMinimum(double minimum)public void setMaximum(double maximum)
The maximum value is the value that corresponds to 100%.
The default value is 100.
public double getMaximum()
setMaximum(double maximum)
public void setRange(double minimum,
double maximum)
setMinimum(double minimum),
setMaximum(double maximum)public void setValue(double value)
value must be a value between
getMinimum() and
getMaximum().
public double getValue()
public void setFormat(java.lang.CharSequence format)
The format is used by getText() to
indicate the progress value.
The default value is "%.0f %%"
public WString getFormat()
setFormat(CharSequence format)public WString getText()
This text must be an XHTML formatted text fragment. The default text
prints the current progress using getFormat(). You may want to reimplement this method to display a
different text corresponding to the current
getValue().
public Signal1<java.lang.Double> valueChanged()
This signal is emitted when setValue() is called.
setValue(double value)public Signal progressCompleted()
This signal is emitted when setValue(getMaximum()) is called.
setValue(double value)
public void resize(WLength width,
WLength height)
WWidget
Specify a new size for this widget, by specifying width and height. By
default a widget has automatic width and height, see
WLength#isAuto().
This applies to CSS-based layout, and only
block widgets can be given a
size reliably.
When inserted in a layout manager, the widget may be informed about its
current size using setLayoutSizeAware(). If you have defined a
"wtResize()" JavaScript method for the widget,
then this method will also be called. operation.
resize in class WWebWidgetWWidget.getWidth(),
WWidget.getHeight()public void setValueStyleClass(java.lang.String valueStyleClass)
public void setState(double minimum,
double maximum,
double value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||