| com.gwtext.client.widgets.Component com.gwtext.client.widgets.BoxComponent com.gwtext.client.widgets.ProgressBar
ProgressBar | public class ProgressBar extends BoxComponent (Code) | | 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.
|
Method Summary | |
native public void | addListener(ProgressBarListener listener) Add a ProgressBar listener. | native protected JavaScriptObject | create(JavaScriptObject config) | protected JavaScriptObject | getConfigPrototype() | public String | getText() The progress bar text. | public float | getValue() | public String | getXType() | native public boolean | isWaiting() Returns true if the progress bar is currently in a
ProgressBar.wait operation. | public void | reset() Resets the progress bar value to 0 and text to empty string. | public void | reset(boolean hide) Resets the progress bar value to 0 and text to empty string. | native public void | setSize(int width, int height) Sets the size of the progress bar. | public void | setText(String text) The progress bar text (defaults to ''). | public void | setTextEl(String textElID) The element to render the progress text to (defaults to the progress bar's internal text element). | public void | setTextEl(Element textEl) The element to render the progress text to (defaults to the progress bar's internal text element). | public void | setValue(float value) The value of the progress bar. | native public void | updateProgress(float value) Updates the progress bar value. | native public void | updateProgress(float value, String text) Updates the progress bar value, and its text. | native public void | updateText(String text) Updates the progress bar text. | native public void | wait(WaitConfig waitConfig) Initiates an auto-updating progress bar. |
ProgressBar | public ProgressBar()(Code) | | |
ProgressBar | public ProgressBar(JavaScriptObject jsObj)(Code) | | |
addListener | native public void addListener(ProgressBarListener listener)(Code) | | Add a ProgressBar listener.
Parameters: listener - the listener |
create | native protected JavaScriptObject create(JavaScriptObject config)(Code) | | |
getConfigPrototype | protected JavaScriptObject getConfigPrototype()(Code) | | |
getText | public String getText()(Code) | | The progress bar text.
the progress bar text (defaults to '') |
getValue | public float getValue()(Code) | | the value of the progress bar |
isWaiting | native public boolean isWaiting()(Code) | | Returns true if the progress bar is currently in a
ProgressBar.wait operation.
true if in wait |
reset | public void reset()(Code) | | Resets the progress bar value to 0 and text to empty string.
|
reset | public void reset(boolean hide)(Code) | | Resets the progress bar value to 0 and text to empty string. If hide = true, the progress bar will also be hidden
(using the hideMode property internally).
Parameters: hide - true to hide the progress bar (defaults to false) |
setSize | native public void setSize(int width, int height)(Code) | | Sets the size of the progress bar.
Parameters: width - the width Parameters: height - the height |
setText | public void setText(String text)(Code) | | The progress bar text (defaults to '').
Parameters: text - the progress bar text |
setTextEl | public void setTextEl(String textElID) throws IllegalStateException(Code) | | The element to render the progress text to (defaults to the progress bar's internal text element).
Note that the text element must already be rendered to the DOM before creation of the progress bar.
You can call textElComponent.render(RootPanel.getBodyElement()) to force addition of the textEl to the broswer DOM.
Parameters: textElID - the text element ID throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setTextEl | public void setTextEl(Element textEl) throws IllegalStateException(Code) | | The element to render the progress text to (defaults to the progress bar's internal text element).
Note that the text element must already be rendered to the DOM before creation of the progress bar.
You can call textElComponent.render(RootPanel.getBodyElement()) to force addition of the textEl to the broswer DOM.
Parameters: textEl - the text element throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setValue | public void setValue(float value)(Code) | | The value of the progress bar. A floating point value between 0 and 1 (e.g., .5, defaults to 0)
Parameters: value - the value of the progress bar |
updateProgress | native public void updateProgress(float value)(Code) | | Updates the progress bar value. Any existing text value will be unchanged. Note that even if the progress bar
value exceeds 1, it will never automatically reset -- you are responsible for determining when the progress is
complete and calling reset to clear and/or hide the control.
Parameters: value - the new value |
updateProgress | native public void updateProgress(float value, String text)(Code) | | Updates the progress bar value, and its text. Note that even if the progress bar value exceeds 1, it will never
automatically reset -- you are responsible for determining when the progress is complete and calling reset to
clear and/or hide the control.
Parameters: value - the new value Parameters: text - the new text |
updateText | native public void updateText(String text)(Code) | | Updates the progress bar text. If specified, textEl will be updated, otherwise the progress bar
itself will display the updated text.
Parameters: text - the text to display |
wait | native public void wait(WaitConfig waitConfig)(Code) | | Initiates an auto-updating progress bar. A duration can be specified, in which case the progress bar will automatically
reset after a fixed amount of time and optionally call a callback function if specified. If no duration is passed in,
then the progress bar will run indefinitely and must be manually cleared by calling reset.
Parameters: waitConfig - the wait configuration |
Methods inherited from com.gwtext.client.widgets.Component | public void addClass(String cls)(Code)(Java Doc) native public void addClassCreated(String cls)(Code)(Java Doc) native public void addEvent(String events)(Code)(Java Doc) public void addEvents(String[] events)(Code)(Java Doc) protected void addListener(String event, JavaScriptObject fn)(Code)(Java Doc) native public void addListener(String event, Function funtion)(Code)(Java Doc) native protected void addListener(ComponentListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected void beforeDestroy()(Code)(Java Doc) protected void check() throws IllegalStateException(Code)(Java Doc) public Component cloneComponent()(Code)(Java Doc) public Component cloneComponent(Component overrides)(Code)(Java Doc) native protected JavaScriptObject cloneConfig(JavaScriptObject config)(Code)(Java Doc) abstract protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc) native public void destroy()(Code)(Java Doc) public void disable()(Code)(Java Doc) public void enable()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void error(String message) throws IllegalStateException(Code)(Java Doc) public void focus()(Code)(Java Doc) native public void focus(boolean selectText)(Code)(Java Doc) native public void focus(boolean selectText, int delay)(Code)(Java Doc) public Element getApplyTo()(Code)(Java Doc) protected String getAttribute(String attribute)(Code)(Java Doc) protected boolean getAttributeAsBoolean(String attribute)(Code)(Java Doc) protected float getAttributeAsFloat(String attribute)(Code)(Java Doc) protected int getAttributeAsInt(String attribute)(Code)(Java Doc) protected JavaScriptObject getAttributeAsJavaScriptObject(String attribute)(Code)(Java Doc) public boolean getAutoShow()(Code)(Java Doc) public String getCls()(Code)(Java Doc) native protected static JavaScriptObject getComponentJS(String id)(Code)(Java Doc) public JavaScriptObject getConfig()(Code)(Java Doc) abstract protected JavaScriptObject getConfigPrototype()(Code)(Java Doc) public String getCtCls()(Code)(Java Doc) public String getDisabledClass()(Code)(Java Doc) native public ExtElement getEl()(Code)(Java Doc) native protected Element getElement(JavaScriptObject jsObj)(Code)(Java Doc) public Element getElement()(Code)(Java Doc) public String getHideMode()(Code)(Java Doc) public boolean getHideParent()(Code)(Java Doc) public String getId()(Code)(Java Doc) native public String getItemId()(Code)(Java Doc) public JavaScriptObject getJsObj()(Code)(Java Doc) public int getOffsetHeight()(Code)(Java Doc) public int getOffsetWidth()(Code)(Java Doc) public JavaScriptObject getOrCreateJsObj()(Code)(Java Doc) native public Container getOwnerContainer()(Code)(Java Doc) public Element getRenderTo()(Code)(Java Doc) public String[] getStateEvents()(Code)(Java Doc) public String getStateId()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) protected Element getStyleElement()(Code)(Java Doc) public String getTitle()(Code)(Java Doc) public String getXType()(Code)(Java Doc) native public String getXTypes()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void hide()(Code)(Java Doc) protected void initComponent()(Code)(Java Doc) public boolean isCreated()(Code)(Java Doc) public boolean isDisabled()(Code)(Java Doc) public boolean isHidden()(Code)(Java Doc) native public boolean isRendered()(Code)(Java Doc) native public boolean isVisible()(Code)(Java Doc) native public boolean isXType(String xtype)(Code)(Java Doc) native public boolean isXType(String xtype, boolean shallow)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) native public void removeClass(String cls)(Code)(Java Doc) native public void render(String id)(Code)(Java Doc) native public void render(String id, String position)(Code)(Java Doc) native public void render(String id, int position)(Code)(Java Doc) native public void render(Element element)(Code)(Java Doc) native public void render(Element element, String position)(Code)(Java Doc) native public void render(Element element, int position)(Code)(Java Doc) public void setApplyTo(Element element) throws IllegalStateException(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, long value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, double value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, Date value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) public void setAutoEl(String autoEl)(Code)(Java Doc) public void setAutoShow(boolean autoShow) throws IllegalStateException(Code)(Java Doc) public void setCls(String cls)(Code)(Java Doc) public void setCtCls(String ctCls) throws IllegalStateException(Code)(Java Doc) public void setDisabled(boolean disabled)(Code)(Java Doc) public void setDisabledClass(String disabledClass)(Code)(Java Doc) public void setEl(Element el) throws IllegalStateException(Code)(Java Doc) public void setEl(String elementID) throws IllegalStateException(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setHideMode(String hideMode)(Code)(Java Doc) public void setHideParent(boolean hideParent) throws IllegalStateException(Code)(Java Doc) final public void setId(String id) throws IllegalStateException(Code)(Java Doc) public void setRenderTo(Element elem) throws IllegalStateException(Code)(Java Doc) public void setStateEvents(String[] stateEvents) throws IllegalStateException(Code)(Java Doc) public void setStateId(String stateId) throws IllegalStateException(Code)(Java Doc) public void setStyle(String style) throws IllegalStateException(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc)
|
|
|