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

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<C>
      extended by com.google.gwt.cell.client.AbstractEditableCell<C,V>
          extended by com.google.gwt.cell.client.AbstractInputCell<T,V>
              extended by com.sencha.gxt.cell.core.client.AbstractEventInputCell<T,FieldCell.FieldViewData>
                  extended by com.sencha.gxt.cell.core.client.form.FieldCell<java.lang.Integer>
                      extended by com.sencha.gxt.cell.core.client.SliderCell
All Implemented Interfaces:
Cell<java.lang.Integer>, ResizableCell

public class SliderCell
extends FieldCell<java.lang.Integer>


Nested Class Summary
static interface SliderCell.HorizontalSliderAppearance
           
static interface SliderCell.SliderAppearance
           
static interface SliderCell.VerticalSliderAppearance
           
 
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.FieldCell
FieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewData
 
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
 
Constructor Summary
SliderCell()
           
SliderCell(SliderCell.SliderAppearance appearance)
           
 
Method Summary
 int getIncrement()
          Returns the increment.
 int getMaxValue()
          Returns the max value (defaults to 100).
 java.lang.String getMessage()
          Returns the tool tip message.
 int getMinValue()
          Returns the minimum value (defaults to 0).
 void onBrowserEvent(Cell.Context context, Element parent, java.lang.Integer value, NativeEvent event, ValueUpdater<java.lang.Integer> valueUpdater)
           
 void onEmpty(XElement parent, boolean empty)
           
 boolean redrawOnResize()
          Determines if the cell should be redrawn when resized by @link CellComponent.
 void render(Cell.Context context, java.lang.Integer value, SafeHtmlBuilder sb)
           
 void setIncrement(int increment)
          How many units to change the slider when adjusting by drag and drop.
 void setMaxValue(int maxValue)
          Sets the max value (defaults to 100).
 void setMessage(java.lang.String message)
          Sets the tool tip message (defaults to '{0}').
 void setMinValue(int minValue)
          Sets the minimum value (defaults to 0).
 
Methods inherited from class com.sencha.gxt.cell.core.client.form.FieldCell
disable, enable, finishEditing, getHeight, getWidth, handlesSelection, isDisabled, isReadOnly, onValid, setHeight, setName, setReadOnly, setSize, setSize, setWidth
 
Methods inherited from class com.sencha.gxt.cell.core.client.AbstractEventInputCell
addHandler, fireEvent, isDisableEvents, setDisableEvents
 
Methods inherited from class com.google.gwt.cell.client.AbstractInputCell
isEditing, resetFocus
 
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell
clearViewData, getViewData, setViewData
 
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliderCell

public SliderCell()

SliderCell

public SliderCell(SliderCell.SliderAppearance appearance)
Method Detail

getIncrement

public int getIncrement()
Returns the increment.

Returns:
the increment

getMaxValue

public int getMaxValue()
Returns the max value (defaults to 100).

Returns:
the max value

getMessage

public java.lang.String getMessage()
Returns the tool tip message.

Returns:
the tool tip message

getMinValue

public int getMinValue()
Returns the minimum value (defaults to 0).

Returns:
the minimum value

onBrowserEvent

public void onBrowserEvent(Cell.Context context,
                           Element parent,
                           java.lang.Integer value,
                           NativeEvent event,
                           ValueUpdater<java.lang.Integer> valueUpdater)
Specified by:
onBrowserEvent in interface Cell<java.lang.Integer>
Overrides:
onBrowserEvent in class FieldCell<java.lang.Integer>

onEmpty

public void onEmpty(XElement parent,
                    boolean empty)
Specified by:
onEmpty in class FieldCell<java.lang.Integer>

redrawOnResize

public boolean redrawOnResize()
Description copied from interface: ResizableCell
Determines if the cell should be redrawn when resized by @link CellComponent. If true, CellComponent.redraw() will be called.

Specified by:
redrawOnResize in interface ResizableCell
Overrides:
redrawOnResize in class FieldCell<java.lang.Integer>
Returns:
true to force a redraw

render

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

setIncrement

public void setIncrement(int increment)
How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping' (default to 10).

Parameters:
increment - the increment

setMaxValue

public void setMaxValue(int maxValue)
Sets the max value (defaults to 100).

Parameters:
maxValue - the max value

setMessage

public void setMessage(java.lang.String message)
Sets the tool tip message (defaults to '{0}'). "{0} will be substituted with the current slider value.

Parameters:
message - the tool tip message

setMinValue

public void setMinValue(int minValue)
Sets the minimum value (defaults to 0).

Parameters:
minValue - the minimum value


Copyright © 2012. All Rights Reserved.