com.vaadin.client.ui
Class VSlider

java.lang.Object
  extended by SimplePanel
      extended by com.vaadin.client.ui.SimpleFocusablePanel
          extended by com.vaadin.client.ui.VSlider
All Implemented Interfaces:
Focusable, Field, SubPartAware

public class VSlider
extends SimpleFocusablePanel
implements Field, SubPartAware


Field Summary
static java.lang.String CLASSNAME
           
protected  ApplicationConnection client
           
protected  boolean disabled
           
protected  java.lang.String id
           
protected  boolean immediate
           
protected  double max
           
protected  double min
           
protected  com.vaadin.shared.ui.slider.SliderOrientation orientation
           
protected  boolean readonly
           
protected  int resolution
           
protected  java.lang.Double value
           
 
Constructor Summary
VSlider()
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.Double> handler)
           
 void buildBase()
          For internal use only.
protected  int getEventPosition(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(java.lang.String subPart)
          Returns the feedback popup if subPart is "popup" and null otherwise.
 java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
          Returns "popup" if any element is or has a child that corresponds to subElement.
 java.lang.Double getValue()
           
 boolean handleNavigation(int keycode, boolean ctrl, boolean shift)
          Handles the keyboard events handled by the Slider
 void iLayout()
           
 void onBrowserEvent(Event event)
           
 void setConnection(ApplicationConnection client)
           
 void setDisabled(boolean disabled)
           
 void setFeedbackValue(double value)
           
 void setId(java.lang.String id)
           
 void setImmediate(boolean immediate)
           
 void setMaxValue(double value)
           
 void setMinValue(double value)
           
 void setOrientation(com.vaadin.shared.ui.slider.SliderOrientation orientation)
           
 void setReadOnly(boolean readonly)
           
 void setResolution(int resolution)
           
 void setStyleName(java.lang.String style)
           
 void setStylePrimaryName(java.lang.String style)
           
 void setValue(java.lang.Double value)
           
 void setValue(java.lang.Double value, boolean fireEvents)
           
protected  void updateStyleNames(java.lang.String styleName, boolean isPrimaryStyleName)
           
 
Methods inherited from class com.vaadin.client.ui.SimpleFocusablePanel
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focus, setFocus, setTabIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

client

protected ApplicationConnection client

id

protected java.lang.String id

immediate

protected boolean immediate

disabled

protected boolean disabled

readonly

protected boolean readonly

min

protected double min

max

protected double max

resolution

protected int resolution

value

protected java.lang.Double value

orientation

protected com.vaadin.shared.ui.slider.SliderOrientation orientation
Constructor Detail

VSlider

public VSlider()
Method Detail

setStyleName

public void setStyleName(java.lang.String style)

setStylePrimaryName

public void setStylePrimaryName(java.lang.String style)

updateStyleNames

protected void updateStyleNames(java.lang.String styleName,
                                boolean isPrimaryStyleName)

setFeedbackValue

public void setFeedbackValue(double value)

buildBase

public void buildBase()
For internal use only. May be removed or replaced in the future.


onBrowserEvent

public void onBrowserEvent(Event event)

getEventPosition

protected int getEventPosition(Event event)
TODO consider extracting touches support to an impl class specific for webkit (only browser that really supports touches).

Parameters:
event -
Returns:

iLayout

public void iLayout()

handleNavigation

public boolean handleNavigation(int keycode,
                                boolean ctrl,
                                boolean shift)
Handles the keyboard events handled by the Slider

Parameters:
event - The keyboard event received
Returns:
true iff the navigation event was handled

getNavigationUpKey

protected int getNavigationUpKey()
Get the key that increases the vertical slider. By default it is the up arrow key but by overriding this you can change the key to whatever you want.

Returns:
The keycode of the key

getNavigationDownKey

protected int getNavigationDownKey()
Get the key that decreases the vertical slider. By default it is the down arrow key but by overriding this you can change the key to whatever you want.

Returns:
The keycode of the key

getNavigationLeftKey

protected int getNavigationLeftKey()
Get the key that decreases the horizontal slider. By default it is the left arrow key but by overriding this you can change the key to whatever you want.

Returns:
The keycode of the key

getNavigationRightKey

protected int getNavigationRightKey()
Get the key that increases the horizontal slider. By default it is the right arrow key but by overriding this you can change the key to whatever you want.

Returns:
The keycode of the key

setConnection

public void setConnection(ApplicationConnection client)

setId

public void setId(java.lang.String id)

setImmediate

public void setImmediate(boolean immediate)

setDisabled

public void setDisabled(boolean disabled)

setReadOnly

public void setReadOnly(boolean readonly)

setOrientation

public void setOrientation(com.vaadin.shared.ui.slider.SliderOrientation orientation)

setMinValue

public void setMinValue(double value)

setMaxValue

public void setMaxValue(double value)

setResolution

public void setResolution(int resolution)

addValueChangeHandler

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<java.lang.Double> handler)

getValue

public java.lang.Double getValue()

setValue

public void setValue(java.lang.Double value)

setValue

public void setValue(java.lang.Double value,
                     boolean fireEvents)

getSubPartElement

public com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
Returns the feedback popup if subPart is "popup" and null otherwise.

Specified by:
getSubPartElement in interface SubPartAware
Parameters:
subPart - The identifier for the element inside the component
Returns:
The element identified by subPart or null if the element could not be found.
Since:
7.3.4

getSubPartName

public java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
Returns "popup" if any element is or has a child that corresponds to subElement.

Specified by:
getSubPartName in interface SubPartAware
Parameters:
subElement - The element the identifier string should uniquely identify
Returns:
An identifier that uniquely identifies subElement or null if no identifier could be provided.
Since:
7.3.4


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.