public class VSlider extends SimpleFocusablePanel implements Field, com.google.gwt.user.client.ui.HasValue<Double>, SubPartAware
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME
Default classname for this widget.
|
protected ApplicationConnection |
client
Deprecated.
this field is no longer used by the framework
|
protected boolean |
disabled
Is this widget disabled.
|
protected String |
id
Deprecated.
this field is no longer used by the framework
|
protected double |
max
Maximum value of slider.
|
protected double |
min
Minimum value of slider.
|
protected SliderOrientation |
orientation
Current orientation (vertical/horizontal) of slider.
|
protected boolean |
readonly
Is this widget read-only.
|
protected int |
resolution
Resolution (precision level) of slider.
|
protected Double |
value
Current value of slider.
|
| Constructor and Description |
|---|
VSlider()
Constructs a widget for the Slider component.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Double> handler) |
void |
buildBase()
For internal use only.
|
protected int |
getEventPosition(com.google.gwt.user.client.Event event)
TODO consider extracting touches support to an impl class specific for
webkit (only browser that really supports touches).
|
protected int |
getNavigationDownKey()
Get the key that decreases the vertical slider.
|
protected int |
getNavigationLeftKey()
Get the key that decreases the horizontal slider.
|
protected int |
getNavigationRightKey()
Get the key that increases the horizontal slider.
|
protected int |
getNavigationUpKey()
Get the key that increases the vertical slider.
|
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in
subPart. |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component.
|
Double |
getValue() |
boolean |
handleNavigation(int keycode,
boolean ctrl,
boolean shift)
Handles the keyboard events handled by the Slider.
|
void |
iLayout()
Run internal layouting.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
setConnection(ApplicationConnection client)
Deprecated.
the updated field is no longer used by the framework
|
void |
setDisabled(boolean disabled)
Disables or enables this slider.
|
void |
setFeedbackValue(double value)
Updates the value shown in the feedback pop-up when the slider is moved.
|
void |
setId(String id)
Deprecated.
the updated field is no longer used by the framework
|
void |
setMaxValue(double value)
Sets the maximum value for slider.
|
void |
setMinValue(double value)
Sets the minimum value for slider.
|
void |
setOrientation(SliderOrientation orientation)
Sets the slider orientation.
|
void |
setReadOnly(boolean readonly)
Sets the read-only status of this slider.
|
void |
setResolution(int resolution)
Sets the resolution (precision level) for slider as the number of
fractional digits that are considered significant.
|
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setUpdateValueOnClick(boolean updateValueOnClick)
Specifies whether or not click event should update the Slider's value.
|
void |
setValue(Double value) |
void |
setValue(Double value,
boolean fireEvents) |
protected void |
updateStyleNames(String styleName,
boolean isPrimaryStyleName)
Updates the style names for this widget and the child elements.
|
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focus, getTabIndex, setAccessKey, setFocus, setTabIndexadd, getContainerElement, getWidget, iterator, remove, setWidget, setWidgetadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, 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, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String CLASSNAME
@Deprecated protected ApplicationConnection client
@Deprecated protected String id
protected boolean disabled
protected boolean readonly
protected double min
protected double max
protected int resolution
protected Double value
protected SliderOrientation orientation
public void setStyleName(String style)
setStyleName in class com.google.gwt.user.client.ui.UIObjectpublic void setStylePrimaryName(String style)
setStylePrimaryName in class com.google.gwt.user.client.ui.UIObjectprotected void updateStyleNames(String styleName, boolean isPrimaryStyleName)
styleName - the new style nameisPrimaryStyleName - true if the new style name is primary, false
otherwisepublic void setFeedbackValue(double value)
value - the new value to showpublic void buildBase()
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetprotected int getEventPosition(com.google.gwt.user.client.Event event)
event - the event whose position to checkpublic void iLayout()
public boolean handleNavigation(int keycode,
boolean ctrl,
boolean shift)
keycode - The key code receivedctrl - Whether CTRL was pressedshift - Whether SHIFT was pressedprotected int getNavigationUpKey()
protected int getNavigationDownKey()
protected int getNavigationLeftKey()
protected int getNavigationRightKey()
@Deprecated public void setConnection(ApplicationConnection client)
client - the application connection that manages this component@Deprecated public void setId(String id)
id - the connector idpublic void setDisabled(boolean disabled)
disabled - a boolean value specifying whether the slider should be
disabled or notsetReadOnly(boolean)public void setReadOnly(boolean readonly)
readonly - a boolean value specifying whether the slider should be in
read-only mode or notsetDisabled(boolean)public void setOrientation(SliderOrientation orientation)
orientation - the orientation to usepublic void setMinValue(double value)
value - the minimum value to usepublic void setMaxValue(double value)
value - the maximum value to usepublic void setResolution(int resolution)
resolution - the number of digits after the decimal pointpublic com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<Double> handler)
addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Double>public Double getValue()
public void setValue(Double value)
public void setValue(Double value, boolean fireEvents)
setValue in interface com.google.gwt.user.client.ui.HasValue<Double>public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement because interactions with the DIV and the
root button element produce the same result.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identifysubElement or null
if no identifier could be provided.public void setUpdateValueOnClick(boolean updateValueOnClick)
updateValueOnClick - true if a click should update slider's value,
false otherwiseCopyright © 2023 Vaadin Ltd. All rights reserved.