com.vaadin.client.ui.
Class VColorPickerArea
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.vaadin.client.ui.VColorPickerArea
-
All Implemented Interfaces:
com.google.gwt.event.dom.client.ClickHandler
,com.google.gwt.event.dom.client.HasClickHandlers
,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.HasHTML
,com.google.gwt.user.client.ui.HasText
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsWidget
public class VColorPickerArea extends com.google.gwt.user.client.ui.Widget implements com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.event.dom.client.HasClickHandlers
Client side implementation for ColorPickerArea.
Since:
7.0.0
-
-
Constructor Summary
Constructors Constructor Description VColorPickerArea()
Initializes an area-style color picker widget.
-
Method Summary
All Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistration
addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
Adds a click handler to the widget and sinks the click event.
String
getColor()
Gets the color.
String
getHTML()
Gets the caption's contents as HTML.
String
getText()
Gets the caption's contents as text.
boolean
isOpen()
Check the popup's marked state.
void
onBrowserEvent(com.google.gwt.user.client.Event event)
void
onClick(com.google.gwt.event.dom.client.ClickEvent event)
void
refreshColor()
Update the color area with the currently set color.
void
setColor(String color)
Sets the color for the area.
void
setHeight(String height)
Sets the color area's height.
void
setHTML(String html)
Sets the caption's content to the given HTML.
void
setOpen(boolean open)
Mark the popup opened/closed.
void
setStylePrimaryName(String style)
void
setText(String text)
Sets the caption's content to the given text.
void
setWidth(String width)
Sets the color area's width.
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, 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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
See Also:
-
-
Method Detail
-
addClickHandler
public com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
Adds a click handler to the widget and sinks the click event.
Specified by:
addClickHandler
in interfacecom.google.gwt.event.dom.client.HasClickHandlers
Parameters:
handler
-Returns:
HandlerRegistration used to remove the handler
-
onClick
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
Specified by:
onClick
in interfacecom.google.gwt.event.dom.client.ClickHandler
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
-
setOpen
public void setOpen(boolean open)
Mark the popup opened/closed.
Parameters:
open
-
-
isOpen
public boolean isOpen()
Check the popup's marked state.
Returns:
true if the popup has been marked being open, false otherwise.
-
setText
public void setText(String text)
Sets the caption's content to the given text.
Specified by:
setText
in interfacecom.google.gwt.user.client.ui.HasText
Parameters:
text
-See Also:
Label.setText(String)
-
getText
public String getText()
Gets the caption's contents as text.
Specified by:
getText
in interfacecom.google.gwt.user.client.ui.HasText
Returns:
the caption's text
-
setHTML
public void setHTML(String html)
Sets the caption's content to the given HTML.
Specified by:
setHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
Parameters:
html
-
-
getHTML
public String getHTML()
Gets the caption's contents as HTML.
Specified by:
getHTML
in interfacecom.google.gwt.user.client.ui.HasHTML
Returns:
the caption's HTML
-
setColor
public void setColor(String color)
Sets the color for the area.
Parameters:
color
-
-
getColor
public String getColor()
Gets the color.
Returns:
the color
Since:
8.4
-
refreshColor
public void refreshColor()
Update the color area with the currently set color.
-
setStylePrimaryName
public void setStylePrimaryName(String style)
Overrides:
setStylePrimaryName
in classcom.google.gwt.user.client.ui.UIObject
-
setHeight
public void setHeight(String height)
Sets the color area's height. This height does not include caption or decorations such as border, margin, and padding.
Overrides:
setHeight
in classcom.google.gwt.user.client.ui.UIObject
-
setWidth
public void setWidth(String width)
Sets the color area's width. This width does not include caption or decorations such as border, margin, and padding.
Overrides:
setWidth
in classcom.google.gwt.user.client.ui.UIObject
-
-