Package 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.HasClickHandlersClient 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 Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.event.shared.HandlerRegistrationaddClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)Adds a click handler to the widget and sinks the click event.StringgetColor()Gets the color.StringgetHTML()Gets the caption's contents as HTML.StringgetText()Gets the caption's contents as text.booleanisOpen()Check the popup's marked state.voidonBrowserEvent(com.google.gwt.user.client.Event event)voidonClick(com.google.gwt.event.dom.client.ClickEvent event)voidrefreshColor()Update the color area with the currently set color.voidsetColor(String color)Sets the color for the area.voidsetHeight(String height)Sets the color area's height.voidsetHTML(String html)Sets the caption's content to the given HTML.voidsetOpen(boolean open)Mark the popup opened/closed.voidsetStylePrimaryName(String style)voidsetText(String text)Sets the caption's content to the given text.voidsetWidth(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:
- Constant Field Values
-
-
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:
addClickHandlerin 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:
onClickin interfacecom.google.gwt.event.dom.client.ClickHandler
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin 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:
setTextin 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:
getTextin 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:
setHTMLin interfacecom.google.gwt.user.client.ui.HasHTML- Parameters:
html-
-
getHTML
public String getHTML()
Gets the caption's contents as HTML.- Specified by:
getHTMLin 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:
setStylePrimaryNamein 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:
setHeightin 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:
setWidthin classcom.google.gwt.user.client.ui.UIObject
-
-