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
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME
Default class name for this widget.
|
static String |
CLASSNAME_BACKGROUND
Default class name for the background element within this widget.
|
static String |
CLASSNAME_CLICKLAYER
Default class name for the clicklayer element within this widget.
|
static String |
CLASSNAME_CONTAINER
Default class name for the container sub-element that contains all other
sub-elements within this widget.
|
static String |
CLASSNAME_FOREGROUND
Default class name for the foreground element within this widget.
|
static String |
CLASSNAME_HIGHERBOX
Default class name for the higherbox element within this widget.
|
static String |
CLASSNAME_LOWERBOX
Default class name for the lowerbox element within this widget.
|
| Constructor and Description |
|---|
VColorPickerGradient()
Instantiates the client side component for a color picker gradient.
|
| Modifier and Type | Method and 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.
|
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, setTabIndexadd, getContainerElement, getWidget, iterator, remove, setWidget, setWidgetadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String CLASSNAME
public static final String CLASSNAME_CONTAINER
public static final String CLASSNAME_BACKGROUND
public static final String CLASSNAME_FOREGROUND
public static final String CLASSNAME_LOWERBOX
public static final String CLASSNAME_HIGHERBOX
public static final String CLASSNAME_CLICKLAYER
public VColorPickerGradient()
public int getCursorX()
public int getCursorY()
public void setBGColor(String bgColor)
bgColor - the color to setpublic void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandlerpublic void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandlerpublic void onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)
onMouseMove in interface com.google.gwt.event.dom.client.MouseMoveHandlerpublic void setCursor(int x,
int y)
x - x-coordinatey - y-coordinatepublic com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAwaresubPart. The subPart identifier is component specific and
may be any string of characters, numbers, space characters and brackets.getSubPartElement in interface SubPartAwaresubPart - The identifier for the element inside the componentpublic String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAwaresubElement 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.
getSubPartName in interface SubPartAwaresubElement - The element the identifier string should uniquely identifysubElement or null
if no identifier could be provided.Copyright © 2023 Vaadin Ltd. All rights reserved.