com.vaadin.terminal.gwt.client.ui.slider
Class VSlider

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.vaadin.terminal.gwt.client.ui.SimpleFocusablePanel
                      extended by com.vaadin.terminal.gwt.client.ui.slider.VSlider
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, ContainerResizedListener, Focusable, Field, Iterable<com.google.gwt.user.client.ui.Widget>

public class VSlider
extends SimpleFocusablePanel
implements Field, ContainerResizedListener


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
static String CLASSNAME
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
VSlider()
           
 
Method Summary
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.
 boolean handleNavigation(int keycode, boolean ctrl, boolean shift)
          Handles the keyboard events handled by the Slider
 void iLayout()
          This function is run when container box has been resized.
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
 
Methods inherited from class com.vaadin.terminal.gwt.client.ui.SimpleFocusablePanel
addBlurHandler, addFocusHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, focus, setFocus, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
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, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values
Constructor Detail

VSlider

public VSlider()
Method Detail

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

getEventPosition

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).

Parameters:
event -
Returns:

iLayout

public void iLayout()
Description copied from interface: ContainerResizedListener
This function is run when container box has been resized. Object implementing ContainerResizedListener is responsible to call the same function on its ancestors that implement NeedsLayout in case their container has resized. runAnchestorsLayout(HasWidgets parent) function from Util class may be a good helper for this.

Specified by:
iLayout in interface ContainerResizedListener

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


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