public class SliderCell extends FieldCell<Integer>
Modifier and Type | Class and Description |
---|---|
static interface |
SliderCell.HorizontalSliderAppearance |
protected class |
SliderCell.MouseDragPreview |
static interface |
SliderCell.SliderAppearance |
static interface |
SliderCell.VerticalSliderAppearance |
FieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewData
bypassClearContext, focusContext, height, lastContext, lastParent, lastValue, lastValueUpdater, width
Constructor and Description |
---|
SliderCell() |
SliderCell(SliderCell.SliderAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
protected int |
constrain(int value) |
protected int |
doSnap(int v) |
SliderCell.SliderAppearance |
getAppearance()
Returns the appearance implementation used by this cell instance
|
int |
getIncrement()
Returns the increment.
|
int |
getMaxValue()
Returns the max value (defaults to 100).
|
String |
getMessage()
Returns the tool tip message.
|
int |
getMinValue()
Returns the minimum value (defaults to 0).
|
protected double |
getRatio(XElement parent) |
boolean |
isShowMessage()
Returns true if the tool tip message is shown
|
protected int |
normalizeValue(int value) |
void |
onBrowserEvent(Context context,
Element parent,
Integer value,
NativeEvent event,
<any> valueUpdater) |
void |
onEmpty(XElement parent,
boolean empty) |
protected String |
onFormatValue(int value) |
protected void |
onMouseDown(Context context,
Element parent,
NativeEvent event,
<any> valueUpdater) |
protected void |
onTap(TouchData t,
Context context,
Element parent,
Integer value,
<any> valueUpdater) |
protected void |
onTouchMove(TouchData t,
Context context,
Element parent,
Integer value,
<any> valueUpdater) |
protected void |
onTouchMoveEnd(TouchData t,
Context context,
Element parent,
Integer value,
<any> valueUpdater) |
boolean |
redrawOnResize()
Determines if the cell should be redrawn when resized by @link
CellComponent . |
void |
render(Context context,
Integer value,
SafeHtmlBuilder sb) |
protected int |
reverseValue(XElement parent,
int pos) |
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(String message)
Sets the tool tip message (defaults to '{0}').
|
void |
setMinValue(int minValue)
Sets the minimum value (defaults to 0).
|
void |
setShowMessage(boolean showMessage)
Sets if the tool tip message should be displayed (defaults to true, pre-render).
|
void |
setToolTipConfig(ToolTipConfig toolTipConfig)
Set the tooltip config.
|
protected int |
translateValue(XElement parent,
int v) |
checkViewData, clearContext, disable, enable, ensureViewData, finishEditing, getHeight, getWidth, handlesSelection, hasFocus, isDisabled, isReadOnly, onBlur, onClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseOut, onMouseOver, onMouseUp, onNavigationKey, onValid, saveContext, setHeight, setName, setReadOnly, setSize, setSize, setWidth
addCellGestureAdapter, addHandler, createHandlerManager, fireCancellableEvent, fireCancellableEvent, fireEvent, fireEvent, getCellGestureAdapter, getCellGestureAdapterCount, getConsumedEvents, isDisableEvents, onTouch, removeCellGestureAdapter, setDisableEvents
public SliderCell()
public SliderCell(SliderCell.SliderAppearance appearance)
public SliderCell.SliderAppearance getAppearance()
FieldCell
getAppearance
in class FieldCell<Integer>
public int getIncrement()
public int getMaxValue()
public String getMessage()
public int getMinValue()
public boolean isShowMessage()
public void onBrowserEvent(Context context, Element parent, Integer value, NativeEvent event, <any> valueUpdater)
onBrowserEvent
in class FieldCell<Integer>
public void onEmpty(XElement parent, boolean empty)
public boolean redrawOnResize()
ResizableCell
CellComponent
. If true, CellComponent.redraw()
will be
called.redrawOnResize
in interface ResizableCell
redrawOnResize
in class FieldCell<Integer>
public void render(Context context, Integer value, SafeHtmlBuilder sb)
public void setIncrement(int increment)
increment
- the incrementpublic void setMaxValue(int maxValue)
maxValue
- the max valuepublic void setMessage(String message)
message
- the tool tip messagepublic void setMinValue(int minValue)
minValue
- the minimum valuepublic void setShowMessage(boolean showMessage)
showMessage
- true to show tool tip messagepublic void setToolTipConfig(ToolTipConfig toolTipConfig)
Set the tooltip config. This is the tooltip for the message configuration. Set setShowMessage(boolean)
to
true to use this feature.
ToolTipConfig.setAnchor(com.sencha.gxt.core.client.Style.Side)
is a required setting for toolTipConfig.
toolTipConfig
- is the tooltip configuration.protected int constrain(int value)
protected int doSnap(int v)
protected double getRatio(XElement parent)
protected int normalizeValue(int value)
protected String onFormatValue(int value)
protected void onMouseDown(Context context, Element parent, NativeEvent event, <any> valueUpdater)
protected void onTap(TouchData t, Context context, Element parent, Integer value, <any> valueUpdater)
protected void onTouchMove(TouchData t, Context context, Element parent, Integer value, <any> valueUpdater)
protected void onTouchMoveEnd(TouchData t, Context context, Element parent, Integer value, <any> valueUpdater)
protected int reverseValue(XElement parent, int pos)
protected int translateValue(XElement parent, int v)
Copyright © 2018. All rights reserved.