Package com.vaadin.client.ui.colorpicker
Class VColorPickerGradient
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.google.gwt.user.client.ui.FocusPanel
-
- com.vaadin.client.ui.colorpicker.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSNAMEDefault class name for this widget.static StringCLASSNAME_BACKGROUNDDefault class name for the background element within this widget.static StringCLASSNAME_CLICKLAYERDefault class name for the clicklayer element within this widget.static StringCLASSNAME_CONTAINERDefault class name for the container sub-element that contains all other sub-elements within this widget.static StringCLASSNAME_FOREGROUNDDefault class name for the foreground element within this widget.static StringCLASSNAME_HIGHERBOXDefault class name for the higherbox element within this widget.static StringCLASSNAME_LOWERBOXDefault class name for the lowerbox element within this widget.
-
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 intgetCursorX()Returns the latest x-coordinate for pressed-down mouse cursor.intgetCursorY()Returns the latest y-coordinate for pressed-down mouse cursor.com.google.gwt.user.client.ElementgetSubPartElement(String subPart)Locates an element inside a component using the identifier provided insubPart.StringgetSubPartName(com.google.gwt.user.client.Element subElement)Provides an identifier that identifies the element within the component.voidonMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)voidonMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)voidonMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)voidsetBGColor(String bgColor)Sets the given css color as the background.voidsetCursor(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
Default class name for this widget.- See Also:
- Constant Field Values
-
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
-
-
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:
onMouseDownin interfacecom.google.gwt.event.dom.client.MouseDownHandler
-
onMouseUp
public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
- Specified by:
onMouseUpin interfacecom.google.gwt.event.dom.client.MouseUpHandler
-
onMouseMove
public void onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)
- Specified by:
onMouseMovein interfacecom.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-coordinatey- y-coordinate
-
getSubPartElement
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
Description copied from interface:SubPartAwareLocates an element inside a component using the identifier provided insubPart. ThesubPartidentifier is component specific and may be any string of characters, numbers, space characters and brackets.- Specified by:
getSubPartElementin interfaceSubPartAware- 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:SubPartAwareProvides an identifier that identifies the element within the component. ThesubElementis a part of the component and must never be null.Note!
getSubPartElement(getSubPartName(element)) == elementis not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions withsubElementare 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 assubElementbecause interactions with the DIV and the root button element produce the same result.- Specified by:
getSubPartNamein interfaceSubPartAware- Parameters:
subElement- The element the identifier string should uniquely identify- Returns:
- An identifier that uniquely identifies
subElementor null if no identifier could be provided.
-
-