public class Slider extends Canvas implements HasValueChangedHandlers
The slider will generate events as the user interacts with it and
changes its value. If slider.sliderTarget is specified, moving the slider thumb generates a custom event named
'sliderMove', sent to the sliderTarget. If a sliderMove
handler stringMethod is defined on the target, it
will be fired when the slider is moved. The second parameter (available via the variable name eventInfo
if the handler is a string) is a pointer back to the slider.
The slider will also fire a
valueChanged()
method whenever its value is changed. This can be observed or overridden on the Slider
instance to perform some action.
config, configOnly, id, isElementSet, nativeObject, scClassName
Constructor and Description |
---|
Slider() |
Slider(com.google.gwt.core.client.JavaScriptObject jsObj) |
Slider(java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangedHandler(ValueChangedHandler handler)
Add a valueChanged handler.
|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
java.lang.Boolean |
getAnimateThumb()
Should the thumb be animated to its new position when the value is changed programmatically, or by clicking in the
slider track.
|
java.lang.Boolean |
getAnimateThumbInit()
If thumb animation is enabled, should the thumb be animated to its initial value?
|
int |
getAnimateThumbTime()
Duration of thumb animation, in milliseconds.
|
java.lang.Boolean |
getCanFocus()
Indicates whether keyboard manipulation of the slider is allowed.
|
java.lang.Boolean |
getFlipValues()
Specifies whether the value range of the slider should be flipped so that values increase as the thumb is moved down
(for a vertical slider) or to the left (for a horizontal slider).
|
java.lang.String |
getHThumbStyle()
Optional CSS style for the thumb for a horizontally oriented slider.
|
java.lang.String |
getHTrackStyle()
Optional CSS style for the track for a horizontally oriented slider.
|
int |
getLabelHeight()
The height of the labels used to display the minimum, maximum and current values of the slider.
|
int |
getLabelSpacing()
The space around the labels used to display the minimum, maximum and current values of the slider.
|
int |
getLabelWidth()
The width of the labels used to display the minimum, maximum and current values of the slider.
|
int |
getLength()
Used to set slider height if vertical, slider width if horizontal.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure() |
float |
getMaxValue()
The maximum slider value.
|
java.lang.String |
getMaxValueLabel()
The text displayed in the label for the maximum value of the slider.
|
float |
getMinValue()
The minimum slider value.
|
java.lang.String |
getMinValueLabel()
The text displayed in the label for the minimum value of the slider.
|
java.lang.Integer |
getNumValues()
The number of discrete values represented by slider.
|
static Slider |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
int |
getRoundPrecision()
If
roundValues is false, the slider value will be rounded to
this number of decimal places. |
java.lang.Boolean |
getRoundValues()
Specifies whether the slider value should be rounded to the nearest integer.
|
java.lang.Boolean |
getShowRange()
Indicates whether labels for the min and max values of the slider should be displayed.
|
java.lang.Boolean |
getShowTitle()
Indicates whether the slider's title should be displayed.
|
java.lang.Boolean |
getShowValue()
Indicates whether a label for the value of the slider should be displayed.
|
float |
getStepPercent()
The percentage of the total slider that constitutes one discrete step.
|
java.lang.String |
getThumbSrc()
The base filename for the slider thumb images.
|
int |
getThumbThickWidth()
The dimension of the thumb perpendicular to the slider track.
|
int |
getThumbThinWidth()
The dimension of the thumb parallel to the slider track.
|
java.lang.String |
getTitle()
Optional display title for the slider.
|
int |
getTrackCapSize()
The height of vertical slider start and end images, or width of horizontal slider start and end images.
|
ImageStyle |
getTrackImageType()
The imageType setting for the slider track.
|
java.lang.String |
getTrackSrc()
The base filename for the slider track images.
|
int |
getTrackWidth()
The thickness of the track.
|
float |
getValue()
The slider value.
|
java.lang.Boolean |
getVertical()
Indicates whether this is a vertical or horizontal slider.
|
java.lang.String |
getVThumbStyle()
Optional CSS style for the thumb for a vertically oriented slider.
|
java.lang.String |
getVTrackStyle()
Optional CSS style for the track for a vertically oriented slider.
|
void |
setAnimateThumb(java.lang.Boolean animateThumb)
Should the thumb be animated to its new position when the value is changed programmatically, or by clicking in the
slider track.
|
void |
setAnimateThumbInit(java.lang.Boolean animateThumbInit)
If thumb animation is enabled, should the thumb be animated to its initial value?
|
void |
setAnimateThumbTime(int animateThumbTime)
Duration of thumb animation, in milliseconds.
|
void |
setCanFocus(java.lang.Boolean canFocus)
Indicates whether keyboard manipulation of the slider is allowed.
|
static void |
setDefaultProperties(Slider sliderProperties)
Class level method to set the default properties of this class.
|
void |
setFlipValues(java.lang.Boolean flipValues)
Specifies whether the value range of the slider should be flipped so that values increase as the thumb is moved down
(for a vertical slider) or to the left (for a horizontal slider).
|
void |
setHThumbStyle(java.lang.String hThumbStyle)
Optional CSS style for the thumb for a horizontally oriented slider.
|
void |
setHTrackStyle(java.lang.String hTrackStyle)
Optional CSS style for the track for a horizontally oriented slider.
|
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
void |
setLabelHeight(int labelHeight)
The height of the labels used to display the minimum, maximum and current values of the slider.
|
void |
setLabelSpacing(int labelSpacing)
The space around the labels used to display the minimum, maximum and current values of the slider.
|
void |
setLabelWidth(int labelWidth)
The width of the labels used to display the minimum, maximum and current values of the slider.
|
void |
setLength(int length)
Used to set slider height if vertical, slider width if horizontal.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.SliderLogicalStructure s) |
void |
setMaxValue(float maxValue)
The maximum slider value.
|
void |
setMaxValueLabel(java.lang.String maxValueLabel)
The text displayed in the label for the maximum value of the slider.
|
void |
setMinValue(float minValue)
The minimum slider value.
|
void |
setMinValueLabel(java.lang.String minValueLabel)
The text displayed in the label for the minimum value of the slider.
|
void |
setNumValues(java.lang.Integer numValues)
The number of discrete values represented by slider.
|
void |
setRoundPrecision(int roundPrecision)
If
roundValues is false, the slider value will be rounded to
this number of decimal places. |
void |
setRoundValues(java.lang.Boolean roundValues)
Specifies whether the slider value should be rounded to the nearest integer.
|
void |
setShowRange(java.lang.Boolean showRange)
Indicates whether labels for the min and max values of the slider should be displayed.
|
void |
setShowTitle(java.lang.Boolean showTitle)
Indicates whether the slider's title should be displayed.
|
void |
setShowValue(java.lang.Boolean showValue)
Indicates whether a label for the value of the slider should be displayed.
|
void |
setStepPercent(float stepPercent)
The percentage of the total slider that constitutes one discrete step.
|
void |
setThumbSrc(java.lang.String thumbSrc)
The base filename for the slider thumb images.
|
void |
setThumbThickWidth(int thumbThickWidth)
The dimension of the thumb perpendicular to the slider track.
|
void |
setThumbThinWidth(int thumbThinWidth)
The dimension of the thumb parallel to the slider track.
|
void |
setTitle(java.lang.String title)
Optional display title for the slider.
|
void |
setTrackCapSize(int trackCapSize)
The height of vertical slider start and end images, or width of horizontal slider start and end images.
|
void |
setTrackImageType(ImageStyle trackImageType)
The imageType setting for the slider track.
|
void |
setTrackSrc(java.lang.String trackSrc)
The base filename for the slider track images.
|
void |
setTrackWidth(int trackWidth)
The thickness of the track.
|
void |
setValue(float value)
The slider value.
|
void |
setVertical(java.lang.Boolean vertical)
Indicates whether this is a vertical or horizontal slider.
|
void |
setVThumbStyle(java.lang.String vThumbStyle)
Optional CSS style for the thumb for a vertically oriented slider.
|
void |
setVTrackStyle(java.lang.String vTrackStyle)
Optional CSS style for the track for a vertically oriented slider.
|
java.lang.Boolean |
valueIsChanging()
Call this method in your
Slider.valueChanged handler
to determine whether the value change is due to an ongoing drag interaction (true) or due to a thumb-release, mouse
click, keypress, or programmatic event (false). |
addChild, addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTooltip, setTop, setTop, setUseBackMask, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
public Slider()
public Slider(com.google.gwt.core.client.JavaScriptObject jsObj)
public Slider(java.lang.String title)
public static Slider getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject
in class Canvas
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public void setAnimateThumb(java.lang.Boolean animateThumb)
animateThumb
- animateThumb Default value is truepublic java.lang.Boolean getAnimateThumb()
public void setAnimateThumbInit(java.lang.Boolean animateThumbInit)
animateThumbInit
- animateThumbInit Default value is falsepublic java.lang.Boolean getAnimateThumbInit()
public void setAnimateThumbTime(int animateThumbTime)
animateThumbTime
- animateThumbTime Default value is 250public int getAnimateThumbTime()
public void setCanFocus(java.lang.Boolean canFocus)
setCanFocus
in class Canvas
canFocus
- canFocus Default value is trueFocus overview and related methods
,
Focus & Tabbing Examplepublic java.lang.Boolean getCanFocus()
getCanFocus
in class Canvas
Focus overview and related methods
,
Focus & Tabbing Examplepublic void setFlipValues(java.lang.Boolean flipValues)
flipValues
property of the sliderflipValues
- flip slider values?. Default value is falsepublic java.lang.Boolean getFlipValues()
public void setHThumbStyle(java.lang.String hThumbStyle) throws java.lang.IllegalStateException
Will have the suffix "down" added when the mouse is down on the thumb, and "Disabled" added when the slider is disabled.
hThumbStyle
- . See CSSStyleName
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHThumbStyle()
Will have the suffix "down" added when the mouse is down on the thumb, and "Disabled" added when the slider is disabled.
CSSStyleName
public void setHTrackStyle(java.lang.String hTrackStyle) throws java.lang.IllegalStateException
Will have the suffix "Disabled" added when the slider is disabled.
hTrackStyle
- . See CSSStyleName
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getHTrackStyle()
Will have the suffix "Disabled" added when the slider is disabled.
CSSStyleName
public void setLabelHeight(int labelHeight)
labelHeight
property of the sliderlabelHeight
- new label height. Default value is 20public int getLabelHeight()
public void setLabelSpacing(int labelSpacing)
labelSpacing
property of the sliderlabelSpacing
- new label spacing. Default value is 5public int getLabelSpacing()
public void setLabelWidth(int labelWidth)
labelWidth
property of the sliderlabelWidth
- new label width. Default value is 50public int getLabelWidth()
public void setLength(int length)
length
- length Default value is 200public int getLength()
public void setMaxValue(float maxValue)
maximum value
of the slidermaxValue
- the new maximum value Note:Use Doubles rather Floats when manipulating decimal values. See gwtFloatVsDouble for
details. Default value is 100setFlipValues(java.lang.Boolean)
,
Slider Examplepublic float getMaxValue()
getFlipValues()
,
Slider Examplepublic void setMaxValueLabel(java.lang.String maxValueLabel)
maxValueLabel
property of the slidermaxValueLabel
- new label text. See String
. Default value is nullsetShowRange(java.lang.Boolean)
,
setMaxValue(float)
public java.lang.String getMaxValueLabel()
String
getShowRange()
,
getMaxValue()
public void setMinValue(float minValue)
minimum value
of the sliderminValue
- the new minimum value Note:Use Doubles rather Floats when manipulating decimal values. See gwtFloatVsDouble for
details. Default value is 1setFlipValues(java.lang.Boolean)
,
Slider Examplepublic float getMinValue()
getFlipValues()
,
Slider Examplepublic void setMinValueLabel(java.lang.String minValueLabel)
minValueLabel
- . See String
. Default value is nullsetShowRange(java.lang.Boolean)
,
setMinValue(float)
public java.lang.String getMinValueLabel()
String
getShowRange()
,
getMinValue()
public void setNumValues(java.lang.Integer numValues)
minValue
and maxValue
) will be divided into this many steps. As the thumb is moved along the
track it will only select these values and appear to jump between the steps.
number of values
for the slidernumValues
- the new number of values Note:Use Doubles rather Floats when manipulating decimal values. See gwtFloatVsDouble
for details. Default value is nullpublic java.lang.Integer getNumValues()
minValue
and maxValue
) will be divided into this many steps. As the thumb is moved along the
track it will only select these values and appear to jump between the steps.public void setRoundPrecision(int roundPrecision)
roundValues
is false, the slider value will be rounded to
this number of decimal places. If set to null the value will not be rounded
roundPrecision
property of the sliderroundPrecision
- new round precision. Default value is 1public int getRoundPrecision()
roundValues
is false, the slider value will be rounded to
this number of decimal places. If set to null the value will not be roundedpublic void setRoundValues(java.lang.Boolean roundValues)
roundPrecision
.
roundValues
property of the sliderroundValues
- round slider values?. Default value is truepublic java.lang.Boolean getRoundValues()
roundPrecision
.public void setShowRange(java.lang.Boolean showRange)
showRange
property of the slidershowRange
- show the slider range?. Default value is truesetMinValueLabel(java.lang.String)
,
setMaxValueLabel(java.lang.String)
public java.lang.Boolean getShowRange()
getMinValueLabel()
,
getMaxValueLabel()
public void setShowTitle(java.lang.Boolean showTitle)
showTitle
property of the slidershowTitle
- show the slider title?. Default value is truesetTitle(java.lang.String)
public java.lang.Boolean getShowTitle()
getTitle()
public void setShowValue(java.lang.Boolean showValue)
showValue
property of the slidershowValue
- show the slider value?. Default value is truesetValue(float)
public java.lang.Boolean getShowValue()
getValue()
public void setStepPercent(float stepPercent)
stepPercent
property of the sliderstepPercent
- new slider step percent. Default value is 5public float getStepPercent()
public void setThumbSrc(java.lang.String thumbSrc)
{baseName}.{extension}
h{baseName}.{extension}
:
default enabled appearance. h{baseName}_down.{extension}
: appearance when the slider is enabled and
the thumb is clicked. h{baseName}_Disabled.{extension}
: appearance when the slider is disabled.
v{baseName}.{extension}
: default enabled appearance.
v{baseName}_down.{extension}
: appearance when the slider is enabled and the thumb is clicked.
v{baseName}_Disabled.{extension}
: appearance when the slider is disabled. thumbSrc
property of the sliderthumbSrc
- new thumbSrc. See String
. Default value is "thumb.gif"public java.lang.String getThumbSrc()
{baseName}.{extension}
h{baseName}.{extension}
:
default enabled appearance. h{baseName}_down.{extension}
: appearance when the slider is enabled and
the thumb is clicked. h{baseName}_Disabled.{extension}
: appearance when the slider is disabled.
v{baseName}.{extension}
: default enabled appearance.
v{baseName}_down.{extension}
: appearance when the slider is enabled and the thumb is clicked.
v{baseName}_Disabled.{extension}
: appearance when the slider is disabled. String
public void setThumbThickWidth(int thumbThickWidth)
thumbThickWidth
property of the sliderthumbThickWidth
- new thumbThickWidth. Default value is 23public int getThumbThickWidth()
public void setThumbThinWidth(int thumbThinWidth)
thumbThinWidth
property of the sliderthumbThinWidth
- new thumbThinWidth. Default value is 17public int getThumbThinWidth()
public void setTitle(java.lang.String title)
title
of the slidersetTitle
in class Canvas
title
- new title for the slider. See String
. Default value is "Set Value"setShowTitle(java.lang.Boolean)
public java.lang.String getTitle()
getTitle
in class Canvas
String
getShowTitle()
public void setTrackCapSize(int trackCapSize)
trackCapSize
property of the slidertrackCapSize
- new trackCapSize. Default value is 6public int getTrackCapSize()
public void setTrackImageType(ImageStyle trackImageType)
trackImageType
property of the slidertrackImageType
- new trackImageType. Default value is "stretch"ImageStyle
,
StretchImg.setImageType(com.smartgwt.client.types.ImageStyle)
public ImageStyle getTrackImageType()
ImageStyle
,
StretchImg.getImageType()
public void setTrackSrc(java.lang.String trackSrc)
{baseName}.{extension}
h{baseName}_start.{extension}
:
start (left edge) of the track for a slider that is enabled. h{baseName}_stretch.{extension}
: the
track for an enabled slider; this may be centered, tiled, or stretched.
h{baseName}_end.{extension}
: end (right edge) of the track for a slider that is enabled.
h{baseName}_Disabled_start.{extension}
: start (left edge) of the track for a slider that is
disabled. h{baseName}_Disabled_stretch.{extension}
: the track for a disabled slider; this may be
centered, tiled, or stretched. h{baseName}_Disabled_end.{extension}
: end (right edge) of the track for
a slider that is disabled. v{baseName}_start.{extension}
: start
(bottom edge) of the track for a slider that is enabled. v{baseName}_stretch.{extension}
: the
track for an enabled slider; this may be centered, tiled, or stretched.
v{baseName}_end.{extension}
: end (top edge) of the track for a slider that is enabled.
v{baseName}_Disabled_start.{extension}
: start (bottom edge) of the track for a slider that is
disabled. v{baseName}_Disabled_stretch.{extension}
: the track for a disabled slider; this may be
centered, tiled, or stretched. v{baseName}_end.{extension}
: end (top edge) of the track for a slider
that is disabled. trackSrc
property of the slidertrackSrc
- new trackSrc. See String
. Default value is "track.gif"setTrackImageType(com.smartgwt.client.types.ImageStyle)
public java.lang.String getTrackSrc()
{baseName}.{extension}
h{baseName}_start.{extension}
:
start (left edge) of the track for a slider that is enabled. h{baseName}_stretch.{extension}
: the
track for an enabled slider; this may be centered, tiled, or stretched.
h{baseName}_end.{extension}
: end (right edge) of the track for a slider that is enabled.
h{baseName}_Disabled_start.{extension}
: start (left edge) of the track for a slider that is
disabled. h{baseName}_Disabled_stretch.{extension}
: the track for a disabled slider; this may be
centered, tiled, or stretched. h{baseName}_Disabled_end.{extension}
: end (right edge) of the track for
a slider that is disabled. v{baseName}_start.{extension}
: start
(bottom edge) of the track for a slider that is enabled. v{baseName}_stretch.{extension}
: the
track for an enabled slider; this may be centered, tiled, or stretched.
v{baseName}_end.{extension}
: end (top edge) of the track for a slider that is enabled.
v{baseName}_Disabled_start.{extension}
: start (bottom edge) of the track for a slider that is
disabled. v{baseName}_Disabled_stretch.{extension}
: the track for a disabled slider; this may be
centered, tiled, or stretched. v{baseName}_end.{extension}
: end (top edge) of the track for a slider
that is disabled. String
getTrackImageType()
public void setTrackWidth(int trackWidth)
trackWidth
property of the slidertrackWidth
- new trackWidth. Default value is 7public int getTrackWidth()
public void setValue(float value)
value
- the new value Note:Use Doubles rather Floats when manipulating decimal values. See gwtFloatVsDouble for details. Default value is 1setMinValue(float)
,
setMaxValue(float)
,
setFlipValues(java.lang.Boolean)
,
setShowValue(java.lang.Boolean)
public float getValue()
getMinValue()
,
getMaxValue()
,
getFlipValues()
,
getShowValue()
public void setVertical(java.lang.Boolean vertical)
vertical
property of the slidervertical
- is the slider vertical. Default value is truepublic java.lang.Boolean getVertical()
public void setVThumbStyle(java.lang.String vThumbStyle) throws java.lang.IllegalStateException
hThumbStyle
for state suffixes.vThumbStyle
- . See CSSStyleName
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getVThumbStyle()
hThumbStyle
for state suffixes.CSSStyleName
public void setVTrackStyle(java.lang.String vTrackStyle) throws java.lang.IllegalStateException
Will have the suffix "Disabled" added when the slider is disabled.
vTrackStyle
- . See CSSStyleName
. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getVTrackStyle()
Will have the suffix "Disabled" added when the slider is disabled.
CSSStyleName
public com.google.gwt.event.shared.HandlerRegistration addValueChangedHandler(ValueChangedHandler handler)
This method is called when the slider value changes. This occurs when the setValue method is called, or when the slider is moved. Observe this method to be notified when the slider value changes.
addValueChangedHandler
in interface HasValueChangedHandlers
handler
- the valueChanged handlerHandlerRegistration
used to remove this handlerpublic java.lang.Boolean valueIsChanging()
Slider.valueChanged
handler
to determine whether the value change is due to an ongoing drag interaction (true) or due to a thumb-release, mouse
click, keypress, or programmatic event (false). You may choose to execute temporary or partial updates while the slider
thumb is dragged, and final updates or persistence of the value in response to the other events.public static void setDefaultProperties(Slider sliderProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
sliderProperties
- properties that should be used as new defaults when instances of this class are createdpublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.SliderLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class Canvas