|
|||||||||
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.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.ProgressBar
public class ProgressBar
An updateable progress bar component. The progress bar supports two different modes: manual and automatic.
In manual mode, you are responsible for showing, updating (viaupdateProgress(double, java.lang.String)
) and clearing the progress bar as needed from your
own code. This method is most appropriate when you want to show progress
throughout an operation that has predictable points of interest at which you
can update the control.
In automatic mode, you simply call auto
and let the progress bar run
indefinitely, only clearing it once the operation is complete. You can
optionally have the progress bar wait for a specific amount of time and then
clear itself. Automatic mode is most appropriate for timed operations or
asynchronous operations in which you have no need for indicating intermediate
progress.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
ProgressBar()
Creates a new progress bar. |
Method Summary | |
---|---|
ProgressBar |
auto()
Initiates an auto-updating progress bar using the current duration, increment, and interval. |
int |
getDuration()
Returns the duration. |
int |
getIncrement()
Returns the bar's increment value. |
int |
getInterval()
Returns the bar's interval value. |
double |
getValue()
Returns the current value. |
boolean |
isRunning()
Returns true if the progress bar is currently in a auto operation. |
protected void |
onAttach()
|
protected void |
onDetach()
|
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
protected void |
onResize(int width,
int height)
Called after the component is resized, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a resize occurs. |
ProgressBar |
reset()
Resets the progress bar value to 0 and text to empty string. |
void |
setDuration(int duration)
The length of time in milliseconds that the progress bar should run before resetting itself (defaults to DEFAULT, in which case it will run indefinitely until reset is called) |
void |
setIncrement(int increment)
The number of progress update segments to display within the progress bar (defaults to 10). |
void |
setInterval(int interval)
Sets the length of time in milliseconds between each progress update (defaults to 300 ms). |
ProgressBar |
updateProgress(double value,
java.lang.String text)
Updates the progress bar value, and optionally its text. |
void |
updateText(java.lang.String text)
Updates the progress bar text. |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, afterRender, createComponentEvent, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProgressBar()
Method Detail |
---|
public ProgressBar auto()
public int getDuration()
public int getIncrement()
public int getInterval()
public double getValue()
public boolean isRunning()
auto
operation.
public ProgressBar reset()
public void setDuration(int duration)
duration
- the duration in millisecondspublic void setIncrement(int increment)
increment
- the new incrementpublic void setInterval(int interval)
interval
- the interval to setpublic ProgressBar updateProgress(double value, java.lang.String text)
reset()
to
clear and/or hide the control.
value
- A value between 0 and 1 (e.g., .5, defaults to 0)text
- The string to display in the progress text element or null.
public void updateText(java.lang.String text)
text
- The string to display in the progress text elementprotected void onAttach()
onAttach
in class Component
protected void onDetach()
onDetach
in class Component
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class Component
target
- the target elementindex
- the insert locationprotected void onResize(int width, int height)
BoxComponent
onResize
in class BoxComponent
width
- the widthheight
- the height
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |