public class MaterialRange extends AbstractValueWidget<Integer> implements com.google.gwt.event.dom.client.HasChangeHandlers, HasError
<m:MaterialRange value="2" min="20" max="50" value="25"/>
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledcom.google.gwt.editor.client.Editor.Ignore, com.google.gwt.editor.client.Editor.Path$this| Constructor and Description |
|---|
MaterialRange()
Creates a range
|
MaterialRange(Integer min,
Integer max,
Integer value)
Creates a range with specified values
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
Register the ChangeHandler to become notified if the user changes the slider.
|
void |
clearErrorOrSuccess()
Clear the error or success states.
|
MaterialLabel |
getErrorLabel() |
ErrorMixin<AbstractValueWidget,MaterialLabel> |
getErrorMixin() |
protected Integer |
getIntFromRangeElement(String attribute)
Retrieve the Integer value from the given Attribute of the range element
|
Integer |
getMax()
Read the max value
|
Integer |
getMin()
Read the min value
|
Paragraph |
getParagraph() |
MaterialInput |
getRangeInputElement() |
Span |
getThumb() |
Integer |
getValue()
Read the current value
|
protected void |
onLoad() |
void |
reset()
Reset the form element to blank and clear error messages.
|
void |
setError(String error)
Errors occur when an app fails to complete what is expected, such as:
- The app does not understand user input
- The system or app fails
- A user intends to run incompatible operations concurrently
|
void |
setHelperText(String helperText)
Apply a widgets help text.
|
protected void |
setIntToRangeElement(String attribute,
Integer val)
Set the given Integer value to the attribute of the range element.
|
void |
setMax(Integer max)
Write the current max value
|
void |
setMin(Integer min)
Write the current min value
|
void |
setSuccess(String success)
Set the success message marking a widget as success.
|
void |
setValue(Integer value,
boolean fireEvents) |
addValidationChangedHandler, addValidator, addValueChangeHandler, createBlankValidator, getErrorHandler, getErrorHandlerMixin, getErrorHandlerType, getValidatorMixin, isAllowBlank, isValidateOnBlur, removeValidator, setAllowBlank, setErrorHandler, setErrorHandlerType, setupBlurValidation, setValidateOnBlur, setValidators, setValue, setValue, showErrors, validate, validate$this, add, add, addAttachHandler, addBlurHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addOrientationChangeHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, body, clearActiveClass, enableFeature, getBackfaceVisibility, getBackgroundColor, getBorder, getBorderBottom, getBorderLeft, getBorderMixin, getBorderRadius, getBorderRight, getBorderTop, getCenterOn, getCenterOnMixin, getChildren, getChildrenList, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getDimensionMixin, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHandlerRegistry, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getLayoutPosition, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOrientation, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isEnabled, isFeatureEnabled, isHoverable, isSeparator, isTruncate, onUnload, registerHandler, removeHandler, setAccessKey, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, setDisplay, setEnabled, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffset, setOpacity, setOrientation, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic MaterialRange()
public MaterialRange(Integer min, Integer max, Integer value)
min - - start min valuemax - - end max valuevalue - - default range valuepublic void reset()
HasValidatorsreset in interface HasValidators<Integer>reset in class AbstractValueWidget<Integer>protected void onLoad()
onLoad in class MaterialWidgetprotected Integer getIntFromRangeElement(String attribute)
attribute - The name of the attribute on the range elementprotected void setIntToRangeElement(String attribute, Integer val)
public void setValue(Integer value, boolean fireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<Integer>setValue in class AbstractValueWidget<Integer>public void setMin(Integer min)
min - value must be < maxpublic void setMax(Integer max)
max - value must be > minpublic void setError(String error)
HasErrorsetError in interface HasErrorsetError in class AbstractValueWidget<Integer>public void setSuccess(String success)
HasErrorsetSuccess in interface HasErrorsetSuccess in class AbstractValueWidget<Integer>public void setHelperText(String helperText)
HasErrorsetHelperText in interface HasErrorsetHelperText in class AbstractValueWidget<Integer>public void clearErrorOrSuccess()
HasErrorclearErrorOrSuccess in interface HasErrorclearErrorOrSuccess in class AbstractValueWidget<Integer>public MaterialLabel getErrorLabel()
public MaterialInput getRangeInputElement()
public Paragraph getParagraph()
public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
addChangeHandler in interface com.google.gwt.event.dom.client.HasChangeHandlerspublic ErrorMixin<AbstractValueWidget,MaterialLabel> getErrorMixin()
getErrorMixin in class AbstractValueWidget<Integer>Copyright © 2018. All rights reserved.