|
|||||||||
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.gwtext.client.widgets.Component
com.gwtext.client.widgets.BoxComponent
com.gwtext.client.widgets.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 (via updateProgress) 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 wait 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 asymchronous 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.gwtext.client.widgets.Component |
---|
config, id |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
ProgressBar()
|
|
ProgressBar(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
void |
addListener(ProgressBarListener listener)
Add a ProgressBar listener. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
java.lang.String |
getText()
The progress bar text. |
float |
getValue()
|
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
boolean |
isWaiting()
Returns true if the progress bar is currently in a wait(com.gwtext.client.widgets.WaitConfig) operation. |
void |
reset()
Resets the progress bar value to 0 and text to empty string. |
void |
reset(boolean hide)
Resets the progress bar value to 0 and text to empty string. |
void |
setSize(int width,
int height)
Sets the size of the progress bar. |
void |
setText(java.lang.String text)
The progress bar text (defaults to ''). |
void |
setTextEl(com.google.gwt.user.client.Element textEl)
The element to render the progress text to (defaults to the progress bar's internal text element). |
void |
setTextEl(java.lang.String textElID)
The element to render the progress text to (defaults to the progress bar's internal text element). |
void |
setValue(float value)
The value of the progress bar. |
void |
updateProgress(float value)
Updates the progress bar value. |
void |
updateProgress(float value,
java.lang.String text)
Updates the progress bar value, and its text. |
void |
updateText(java.lang.String text)
Updates the progress bar text. |
void |
wait(WaitConfig waitConfig)
Initiates an auto-updating progress bar. |
Methods inherited from class com.gwtext.client.widgets.BoxComponent |
---|
addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setWidth, setWidth, syncSize, updateBox |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProgressBar()
public ProgressBar(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype
in class BoxComponent
public java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType
in class BoxComponent
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
create
in class BoxComponent
public boolean isWaiting()
wait(com.gwtext.client.widgets.WaitConfig)
operation.
public void reset()
public void reset(boolean hide)
hide
- true to hide the progress bar (defaults to false)public void setSize(int width, int height)
setSize
in class BoxComponent
width
- the widthheight
- the heightpublic void updateProgress(float value)
value
- the new valuepublic void updateProgress(float value, java.lang.String text)
value
- the new valuetext
- the new textpublic void updateText(java.lang.String text)
text
- the text to displaypublic void wait(WaitConfig waitConfig)
waitConfig
- the wait configurationpublic void addListener(ProgressBarListener listener)
listener
- the listenerpublic void setText(java.lang.String text)
text
- the progress bar textpublic java.lang.String getText()
public void setTextEl(java.lang.String textElID) throws java.lang.IllegalStateException
textElID
- the text element ID
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setTextEl(com.google.gwt.user.client.Element textEl) throws java.lang.IllegalStateException
textEl
- the text element
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setValue(float value)
value
- the value of the progress barpublic float getValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |