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 |
protected ApplicationConnection |
client |
protected boolean |
disabled |
protected String |
id |
protected double |
max |
protected double |
min |
protected SliderOrientation |
orientation |
protected boolean |
readonly |
protected int |
resolution |
protected Double |
value |
Constructor and Description |
---|
VSlider() |
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() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
setConnection(ApplicationConnection client) |
void |
setDisabled(boolean disabled) |
void |
setFeedbackValue(double value) |
void |
setId(String id) |
void |
setMaxValue(double value) |
void |
setMinValue(double value) |
void |
setOrientation(SliderOrientation orientation) |
void |
setReadOnly(boolean readonly) |
void |
setResolution(int resolution) |
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setValue(Double value) |
void |
setValue(Double value,
boolean fireEvents) |
protected void |
updateStyleNames(String styleName,
boolean isPrimaryStyleName) |
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focus, getTabIndex, setAccessKey, setFocus, setTabIndex
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final String CLASSNAME
protected ApplicationConnection client
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.UIObject
public void setStylePrimaryName(String style)
setStylePrimaryName
in class com.google.gwt.user.client.ui.UIObject
protected void updateStyleNames(String styleName, boolean isPrimaryStyleName)
public void setFeedbackValue(double value)
public void buildBase()
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
protected int getEventPosition(com.google.gwt.user.client.Event event)
event
- public 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()
public void setConnection(ApplicationConnection client)
public void setId(String id)
public void setDisabled(boolean disabled)
public void setReadOnly(boolean readonly)
public void setOrientation(SliderOrientation orientation)
public void setMinValue(double value)
public void setMaxValue(double value)
public void setResolution(int resolution)
public 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)
SubPartAware
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement
in interface SubPartAware
subPart
- The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAware
subElement
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 SubPartAware
subElement
- The element the identifier string should uniquely identifysubElement
or null
if no identifier could be provided.Copyright © 2018 Vaadin Ltd. All rights reserved.