Class 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.logical.shared.HasValueChangeHandlers<Double>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue<Double>, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.Focusable, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasValue<Double>, 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, Focusable, Field, SubPartAware, Iterable<com.google.gwt.user.client.ui.Widget>

    public class VSlider
    extends SimpleFocusablePanel
    implements Field, com.google.gwt.user.client.ui.HasValue<Double>, SubPartAware
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      VSlider()  
    • Field Detail

      • 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 Double value
    • Constructor Detail

      • VSlider

        public VSlider()
    • Method Detail

      • setStyleName

        public void setStyleName​(String style)
        Overrides:
        setStyleName in class com.google.gwt.user.client.ui.UIObject
      • setStylePrimaryName

        public void setStylePrimaryName​(String style)
        Overrides:
        setStylePrimaryName in class com.google.gwt.user.client.ui.UIObject
      • updateStyleNames

        protected void updateStyleNames​(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​(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()
      • handleNavigation

        public boolean handleNavigation​(int keycode,
                                        boolean ctrl,
                                        boolean shift)
        Handles the keyboard events handled by the Slider.
        Parameters:
        keycode - The key code received
        ctrl - Whether CTRL was pressed
        shift - Whether SHIFT was pressed
        Returns:
        true if 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
      • setId

        public void setId​(String id)
      • setImmediate

        public void setImmediate​(boolean immediate)
      • setDisabled

        public void setDisabled​(boolean disabled)
      • setReadOnly

        public void setReadOnly​(boolean readonly)
      • 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<Double> handler)
        Specified by:
        addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<Double>
      • getValue

        public Double getValue()
        Specified by:
        getValue in interface com.google.gwt.user.client.ui.HasValue<Double>
        Specified by:
        getValue in interface com.google.gwt.user.client.TakesValue<Double>
      • setValue

        public void setValue​(Double value)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<Double>
        Specified by:
        setValue in interface com.google.gwt.user.client.TakesValue<Double>
      • setValue

        public void setValue​(Double value,
                             boolean fireEvents)
        Specified by:
        setValue in interface com.google.gwt.user.client.ui.HasValue<Double>