com.sencha.gxt.cell.core.client
Class ProgressBarCell

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<C>
      extended by com.sencha.gxt.cell.core.client.AbstractEventCell<C>
          extended by com.sencha.gxt.cell.core.client.ResizeCell<java.lang.Double>
              extended by com.sencha.gxt.cell.core.client.ProgressBarCell
All Implemented Interfaces:
Cell<java.lang.Double>, ResizableCell
Direct Known Subclasses:
AutoProgressBarCell

public class ProgressBarCell
extends ResizeCell<java.lang.Double>


Nested Class Summary
static interface ProgressBarCell.ProgressBarAppearance
           
static class ProgressBarCell.ProgressBarAppearanceOptions
           
 
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
 
Constructor Summary
ProgressBarCell()
           
ProgressBarCell(ProgressBarCell.ProgressBarAppearance appearance)
           
 
Method Summary
 ProgressBarCell.ProgressBarAppearance getAppearance()
          Returns the progress bar appearance.
 int getIncrement()
          Returns the bar's increment value.
 java.lang.String getProgressText()
          Returns the progress text.
 void render(Cell.Context context, java.lang.Double value, SafeHtmlBuilder sb)
           
 void reset(Cell.Context context, XElement parent)
          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 setProgressText(java.lang.String text)
          Sets the progress text to be displayed in the progress bar.
 void updateProgress(Cell.Context context, XElement parent, double value, java.lang.String text)
          Updates the progress bar value, and optionally its text.
 
Methods inherited from class com.sencha.gxt.cell.core.client.ResizeCell
getHeight, getWidth, redrawOnResize, setHeight, setSize, setSize, setWidth
 
Methods inherited from class com.sencha.gxt.cell.core.client.AbstractEventCell
addHandler, fireEvent, isDisableEvents, setDisableEvents
 
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, handlesSelection, isEditing, onBrowserEvent, resetFocus, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressBarCell

public ProgressBarCell()

ProgressBarCell

public ProgressBarCell(ProgressBarCell.ProgressBarAppearance appearance)
Method Detail

getAppearance

public ProgressBarCell.ProgressBarAppearance getAppearance()
Returns the progress bar appearance.

Returns:
the appearance

getIncrement

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

Returns:
the increment the increment

getProgressText

public java.lang.String getProgressText()
Returns the progress text.

Returns:
the progress text

render

public void render(Cell.Context context,
                   java.lang.Double value,
                   SafeHtmlBuilder sb)
Specified by:
render in interface Cell<java.lang.Double>
Specified by:
render in class AbstractCell<java.lang.Double>

reset

public void reset(Cell.Context context,
                  XElement parent)
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

setProgressText

public void setProgressText(java.lang.String text)
Sets the progress text to be displayed in the progress bar. If the text contains '{0}' it will be replaced with the current progress bar value (0 - 100).

Parameters:
text - the progress text

updateProgress

public void updateProgress(Cell.Context context,
                           XElement parent,
                           double value,
                           java.lang.String text)
Updates the progress bar value, and optionally its text. 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(com.google.gwt.cell.client.Cell.Context, com.sencha.gxt.core.client.dom.XElement) 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


Copyright © 2012. All Rights Reserved.