Class VColorPickerGradient

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.HasAllDragAndDropHandlers, com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasAllGestureHandlers, com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.event.dom.client.HasAllMouseHandlers, com.google.gwt.event.dom.client.HasAllTouchHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasDoubleClickHandlers, com.google.gwt.event.dom.client.HasDragEndHandlers, com.google.gwt.event.dom.client.HasDragEnterHandlers, com.google.gwt.event.dom.client.HasDragHandlers, com.google.gwt.event.dom.client.HasDragLeaveHandlers, com.google.gwt.event.dom.client.HasDragOverHandlers, com.google.gwt.event.dom.client.HasDragStartHandlers, com.google.gwt.event.dom.client.HasDropHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasGestureChangeHandlers, com.google.gwt.event.dom.client.HasGestureEndHandlers, com.google.gwt.event.dom.client.HasGestureStartHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.dom.client.HasMouseWheelHandlers, com.google.gwt.event.dom.client.HasTouchCancelHandlers, com.google.gwt.event.dom.client.HasTouchEndHandlers, com.google.gwt.event.dom.client.HasTouchMoveHandlers, com.google.gwt.event.dom.client.HasTouchStartHandlers, com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, 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.Focusable, com.google.gwt.user.client.ui.HasFocus, 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, com.google.gwt.user.client.ui.SourcesClickEvents, com.google.gwt.user.client.ui.SourcesFocusEvents, com.google.gwt.user.client.ui.SourcesKeyboardEvents, com.google.gwt.user.client.ui.SourcesMouseEvents, com.google.gwt.user.client.ui.SourcesMouseWheelEvents, SubPartAware, Iterable<com.google.gwt.user.client.ui.Widget>

    public class VColorPickerGradient
    extends com.google.gwt.user.client.ui.FocusPanel
    implements com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.MouseMoveHandler, SubPartAware
    Client side implementation for ColorPickerGradient.
    Since:
    7.0.0
    • 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
      VColorPickerGradient()
      Instantiates the client side component for a color picker gradient.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCursorX()
      Returns the latest x-coordinate for pressed-down mouse cursor.
      int getCursorY()
      Returns the latest y-coordinate for pressed-down mouse cursor.
      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.
      void onMouseDown​(com.google.gwt.event.dom.client.MouseDownEvent event)  
      void onMouseMove​(com.google.gwt.event.dom.client.MouseMoveEvent event)  
      void onMouseUp​(com.google.gwt.event.dom.client.MouseUpEvent event)  
      void setBGColor​(String bgColor)
      Sets the given css color as the background.
      void setCursor​(int x, int y)
      Sets the latest coordinates for pressed-down mouse cursor and updates the cross elements.
      • Methods inherited from class com.google.gwt.user.client.ui.FocusPanel

        addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, 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, clear, 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, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • 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
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Field Detail

      • CLASSNAME_CONTAINER

        public static final String CLASSNAME_CONTAINER
        Default class name for the container sub-element that contains all other sub-elements within this widget.
        See Also:
        Constant Field Values
      • CLASSNAME_BACKGROUND

        public static final String CLASSNAME_BACKGROUND
        Default class name for the background element within this widget.
        See Also:
        Constant Field Values
      • CLASSNAME_FOREGROUND

        public static final String CLASSNAME_FOREGROUND
        Default class name for the foreground element within this widget.
        See Also:
        Constant Field Values
      • CLASSNAME_LOWERBOX

        public static final String CLASSNAME_LOWERBOX
        Default class name for the lowerbox element within this widget.
        See Also:
        Constant Field Values
      • CLASSNAME_HIGHERBOX

        public static final String CLASSNAME_HIGHERBOX
        Default class name for the higherbox element within this widget.
        See Also:
        Constant Field Values
      • CLASSNAME_CLICKLAYER

        public static final String CLASSNAME_CLICKLAYER
        Default class name for the clicklayer element within this widget.
        See Also:
        Constant Field Values
    • Constructor Detail

      • VColorPickerGradient

        public VColorPickerGradient()
        Instantiates the client side component for a color picker gradient.
    • Method Detail

      • getCursorX

        public int getCursorX()
        Returns the latest x-coordinate for pressed-down mouse cursor.
        Returns:
        the latest x-coordinate
      • getCursorY

        public int getCursorY()
        Returns the latest y-coordinate for pressed-down mouse cursor.
        Returns:
        the latest y-coordinate
      • setBGColor

        public void setBGColor​(String bgColor)
        Sets the given css color as the background.
        Parameters:
        bgColor - the color to set
      • onMouseDown

        public void onMouseDown​(com.google.gwt.event.dom.client.MouseDownEvent event)
        Specified by:
        onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandler
      • onMouseUp

        public void onMouseUp​(com.google.gwt.event.dom.client.MouseUpEvent event)
        Specified by:
        onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandler
      • onMouseMove

        public void onMouseMove​(com.google.gwt.event.dom.client.MouseMoveEvent event)
        Specified by:
        onMouseMove in interface com.google.gwt.event.dom.client.MouseMoveHandler
      • setCursor

        public void setCursor​(int x,
                              int y)
        Sets the latest coordinates for pressed-down mouse cursor and updates the cross elements.
        Parameters:
        x - x-coordinate
        y - y-coordinate
      • getSubPartElement

        public com.google.gwt.user.client.Element getSubPartElement​(String subPart)
        Description copied from interface: SubPartAware
        Locates an element inside a component using the identifier provided in subPart. The subPart identifier is component specific and may be any string of characters, numbers, space characters and brackets.
        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.
      • getSubPartName

        public String getSubPartName​(com.google.gwt.user.client.Element subElement)
        Description copied from interface: SubPartAware
        Provides an identifier that identifies the element within the component. The 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.

        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.