com.sencha.gxt.widget.core.client
Class ProgressBar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.cell.CellComponent<Double>
                  extended by com.sencha.gxt.widget.core.client.ProgressBar
All Implemented Interfaces:
Editor<Double>, LeafValueEditor<Double>, HasAttachHandlers, HasResizeHandlers, HasValueChangeHandlers<Double>, HasHandlers, EventListener, TakesValue<Double>, HasValue<Double>, HasVisibility, IsWidget, HasKeyProvider<Double>, BeforeHideEvent.HasBeforeHideHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId
Direct Known Subclasses:
AutoProgressBar

public class ProgressBar
extends CellComponent<Double>

An manual mode updateable progress bar widget.

You are responsible for showing, updating (via updateProgress(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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor
Editor.Ignore, Editor.Path
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ProgressBar()
          Creates a new progress bar with the default progress bar cell.
ProgressBar(ProgressBarCell cell)
          Creates a new progress bar with the specified progress bar cell.
 
Method Summary
 ProgressBarCell getCell()
          Get the Cell wrapped by this widget.
 int getIncrement()
          Returns the bar's increment value.
 void reset()
          Resets the progress bar value to 0 and text to empty string.
 void setIncrement(int increment)
          The number of progress update segments to display within the progress bar (defaults to 10).
 void updateProgress(double value, String text)
          Updates the progress bar value, and optionally its text.
 void updateText(String text)
          Updates the progress bar text.
 
Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent
addValueChangeHandler, getElement, getKeyProvider, getValue, onBrowserEvent, redraw, setValue, setValue, setValue
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

ProgressBar

public ProgressBar()
Creates a new progress bar with the default progress bar cell.


ProgressBar

public ProgressBar(ProgressBarCell cell)
Creates a new progress bar with the specified progress bar cell.

Parameters:
cell - the progress bar cell
Method Detail

getIncrement

public int getIncrement()
Returns the bar's increment value.

Returns:
the increment the increment

reset

public void reset()
Resets the progress bar value to 0 and text to empty string.


setIncrement

public void setIncrement(int increment)
The number of progress update segments to display within the progress bar (defaults to 10). If the bar reaches the end and is still updating, it will automatically wrap back to the beginning.

Parameters:
increment - the new increment

updateProgress

public void updateProgress(double value,
                           String text)
Updates the progress bar value, and optionally its text. Any instances of {0} in the given text will be substituted with the progress bar's value (0 - 100).If the text argument is not specified, any existing text value will be unchanged. To blank out existing text, pass "". 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 - A value between 0 and 1 (e.g., .5, defaults to 0)
text - the string to display in the progress text element or null

getCell

public ProgressBarCell getCell()
Description copied from class: CellComponent
Get the Cell wrapped by this widget.

Overrides:
getCell in class CellComponent<Double>
Returns:
the Cell being wrapped

updateText

public void updateText(String text)
Updates the progress bar text.

Parameters:
text - the text to display


Copyright © 2012. All Rights Reserved.