Package com.vaadin.v7.ui
Class AbstractColorPicker
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.v7.ui.AbstractLegacyComponent
-
- com.vaadin.v7.ui.AbstractColorPicker
-
- All Implemented Interfaces:
ContextClickEvent.ContextClickNotifier
,MethodEventSource
,SerializableEventListener
,ClientConnector
,Sizeable
,com.vaadin.shared.Connector
,Component
,Window.CloseListener
,ColorSelector
,HasColorChangeListener
,Serializable
,EventListener
- Direct Known Subclasses:
ColorPicker
,ColorPickerArea
@Deprecated public abstract class AbstractColorPicker extends AbstractLegacyComponent implements Window.CloseListener, ColorSelector
Deprecated.An abstract class that defines default implementation for a color picker component.- Since:
- 7.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractColorPicker.Coordinates2Color
Deprecated.static class
AbstractColorPicker.PopupStyle
Deprecated.-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
color
Deprecated.The color.protected boolean
historyVisible
Deprecated.protected boolean
hsvVisible
Deprecated.protected String
popupCaption
Deprecated.protected AbstractColorPicker.PopupStyle
popupStyle
Deprecated.protected boolean
rgbVisible
Deprecated.protected static String
STYLENAME_AREA
Deprecated.protected static String
STYLENAME_BUTTON
Deprecated.protected static String
STYLENAME_DEFAULT
Deprecated.protected boolean
swatchesVisible
Deprecated.protected boolean
textfieldVisible
Deprecated.-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Constructor Summary
Constructors Constructor Description AbstractColorPicker()
Deprecated.Instantiates a new color picker.AbstractColorPicker(String popupCaption)
Deprecated.Instantiates a new color picker.AbstractColorPicker(String popupCaption, Color initialColor)
Deprecated.Instantiates a new color picker.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addColorChangeListener(ColorChangeListener listener)
Deprecated.Adds aColorChangeListener
to the component.protected void
colorChanged(ColorChangeEvent event)
Deprecated.Fired when a color change event occurs.void
fireColorChanged()
Deprecated.Notifies the listeners that the selected color has changed.Color
getColor()
Deprecated.Gets the color.protected Collection<String>
getCustomAttributes()
Deprecated.boolean
getHistoryVisibility()
Deprecated.Gets the visibility of the Color History.boolean
getHSVVisibility()
Deprecated.Gets the visibility of the HSV Tab.AbstractColorPicker.PopupStyle
getPopupStyle()
Deprecated.Gets the style for the popup window.boolean
getRGBVisibility()
Deprecated.Gets the visibility of the RGB Tab.protected ColorPickerState
getState()
Deprecated.protected ColorPickerState
getState(boolean markAsDirty)
Deprecated.boolean
getSwatchesVisibility()
Deprecated.Gets the visibility of the Swatches Tab.boolean
getTextfieldVisibility()
Deprecated.Gets the visibility of CSS color code text field.void
hidePopup()
Deprecated.Hides a popup-window for color selection.boolean
isDefaultCaptionEnabled()
Deprecated.Returns true if the component shows the default caption (css-code for the currently selected color, e.g.boolean
isHtmlContentAllowed()
Deprecated.as of , useAbstractComponent.isCaptionAsHtml()
insteadvoid
readDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Deprecated.void
removeColorChangeListener(ColorChangeListener listener)
Deprecated.Removes aColorChangeListener
from the component.void
setColor(Color color)
Deprecated.Sets the color.void
setDefaultCaptionEnabled(boolean enabled)
Deprecated.Set true if the component should show a default caption (css-code for the currently selected color, e.g.protected abstract void
setDefaultStyles()
Deprecated.Sets the default styles of the component.void
setHistoryVisibility(boolean visible)
Deprecated.Sets the visibility of the Color History.void
setHSVVisibility(boolean visible)
Deprecated.Set the visibility of the HSV Tab.void
setHtmlContentAllowed(boolean htmlContentAllowed)
Deprecated.as of , useAbstractComponent.setCaptionAsHtml(boolean)
insteadvoid
setPopupStyle(AbstractColorPicker.PopupStyle style)
Deprecated.The style for the popup window.void
setPosition(int x, int y)
Deprecated.Sets the position of the popup window.void
setRGBVisibility(boolean visible)
Deprecated.Set the visibility of the RGB Tab.void
setSwatchesVisibility(boolean visible)
Deprecated.Set the visibility of the Swatches Tab.void
setTextfieldVisibility(boolean visible)
Deprecated.Sets the visibility of the CSS color code text field.void
showPopup()
Deprecated.Shows a popup-window for color selection.protected void
showPopup(boolean open)
Deprecated.Shows or hides popup-window depending on the given parameter.void
windowClose(Window.CloseEvent e)
Deprecated.void
writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Deprecated.-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
beforeClientResponse, getExplicitImmediateValue, isImmediate, isReadOnly, setImmediate, setReadOnly
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addStyleNames, getUI, removeStyleNames, setStyleName
-
-
-
-
Field Detail
-
STYLENAME_DEFAULT
protected static final String STYLENAME_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
STYLENAME_BUTTON
protected static final String STYLENAME_BUTTON
Deprecated.- See Also:
- Constant Field Values
-
STYLENAME_AREA
protected static final String STYLENAME_AREA
Deprecated.- See Also:
- Constant Field Values
-
popupStyle
protected AbstractColorPicker.PopupStyle popupStyle
Deprecated.
-
color
protected Color color
Deprecated.The color.
-
popupCaption
protected String popupCaption
Deprecated.
-
rgbVisible
protected boolean rgbVisible
Deprecated.
-
hsvVisible
protected boolean hsvVisible
Deprecated.
-
swatchesVisible
protected boolean swatchesVisible
Deprecated.
-
historyVisible
protected boolean historyVisible
Deprecated.
-
textfieldVisible
protected boolean textfieldVisible
Deprecated.
-
-
Constructor Detail
-
AbstractColorPicker
public AbstractColorPicker()
Deprecated.Instantiates a new color picker.
-
AbstractColorPicker
public AbstractColorPicker(String popupCaption)
Deprecated.Instantiates a new color picker.- Parameters:
popupCaption
- the caption of the popup window
-
-
Method Detail
-
setColor
public void setColor(Color color)
Deprecated.Description copied from interface:ColorSelector
Sets the color.- Specified by:
setColor
in interfaceColorSelector
- Parameters:
color
- the new color
-
getColor
public Color getColor()
Deprecated.Description copied from interface:ColorSelector
Gets the color.- Specified by:
getColor
in interfaceColorSelector
- Returns:
- the color
-
setDefaultCaptionEnabled
public void setDefaultCaptionEnabled(boolean enabled)
Deprecated.Set true if the component should show a default caption (css-code for the currently selected color, e.g. #ffffff) when no other caption is available.- Parameters:
enabled
-
-
isDefaultCaptionEnabled
public boolean isDefaultCaptionEnabled()
Deprecated.Returns true if the component shows the default caption (css-code for the currently selected color, e.g. #ffffff) if no other caption is available.
-
setPosition
public void setPosition(int x, int y)
Deprecated.Sets the position of the popup window.- Parameters:
x
- the x-coordinatey
- the y-coordinate
-
addColorChangeListener
public void addColorChangeListener(ColorChangeListener listener)
Deprecated.Description copied from interface:HasColorChangeListener
Adds aColorChangeListener
to the component.- Specified by:
addColorChangeListener
in interfaceHasColorChangeListener
-
removeColorChangeListener
public void removeColorChangeListener(ColorChangeListener listener)
Deprecated.Description copied from interface:HasColorChangeListener
Removes aColorChangeListener
from the component.- Specified by:
removeColorChangeListener
in interfaceHasColorChangeListener
-
windowClose
public void windowClose(Window.CloseEvent e)
Deprecated.- Specified by:
windowClose
in interfaceWindow.CloseListener
-
colorChanged
protected void colorChanged(ColorChangeEvent event)
Deprecated.Fired when a color change event occurs.- Parameters:
event
- The color change event
-
fireColorChanged
public void fireColorChanged()
Deprecated.Notifies the listeners that the selected color has changed.
-
setPopupStyle
public void setPopupStyle(AbstractColorPicker.PopupStyle style)
Deprecated.The style for the popup window.- Parameters:
style
- The style
-
getPopupStyle
public AbstractColorPicker.PopupStyle getPopupStyle()
Deprecated.Gets the style for the popup window.- Returns:
- popup window style
- Since:
- 7.5.0
-
setRGBVisibility
public void setRGBVisibility(boolean visible)
Deprecated.Set the visibility of the RGB Tab.- Parameters:
visible
- The visibility
-
getRGBVisibility
public boolean getRGBVisibility()
Deprecated.Gets the visibility of the RGB Tab.- Returns:
- visibility of the RGB tab
- Since:
- 7.5.0
-
setHSVVisibility
public void setHSVVisibility(boolean visible)
Deprecated.Set the visibility of the HSV Tab.- Parameters:
visible
- The visibility
-
getHSVVisibility
public boolean getHSVVisibility()
Deprecated.Gets the visibility of the HSV Tab.- Returns:
- visibility of the HSV tab
- Since:
- 7.5.0
-
setSwatchesVisibility
public void setSwatchesVisibility(boolean visible)
Deprecated.Set the visibility of the Swatches Tab.- Parameters:
visible
- The visibility
-
getSwatchesVisibility
public boolean getSwatchesVisibility()
Deprecated.Gets the visibility of the Swatches Tab.- Returns:
- visibility of the swatches tab
- Since:
- 7.5.0
-
setHistoryVisibility
public void setHistoryVisibility(boolean visible)
Deprecated.Sets the visibility of the Color History.- Parameters:
visible
- The visibility
-
getHistoryVisibility
public boolean getHistoryVisibility()
Deprecated.Gets the visibility of the Color History.- Returns:
- visibility of color history
- Since:
- 7.5.0
-
setTextfieldVisibility
public void setTextfieldVisibility(boolean visible)
Deprecated.Sets the visibility of the CSS color code text field.- Parameters:
visible
- The visibility
-
getTextfieldVisibility
public boolean getTextfieldVisibility()
Deprecated.Gets the visibility of CSS color code text field.- Returns:
- visibility of css color code text field
- Since:
- 7.5.0
-
getState
protected ColorPickerState getState()
Deprecated.- Overrides:
getState
in classAbstractLegacyComponent
-
getState
protected ColorPickerState getState(boolean markAsDirty)
Deprecated.- Overrides:
getState
in classAbstractLegacyComponent
-
setDefaultStyles
protected abstract void setDefaultStyles()
Deprecated.Sets the default styles of the component.
-
showPopup
public void showPopup()
Deprecated.Shows a popup-window for color selection.
-
hidePopup
public void hidePopup()
Deprecated.Hides a popup-window for color selection.
-
showPopup
protected void showPopup(boolean open)
Deprecated.Shows or hides popup-window depending on the given parameter. If there is no such window yet, one is created.- Parameters:
open
-
-
setHtmlContentAllowed
@Deprecated public void setHtmlContentAllowed(boolean htmlContentAllowed)
Deprecated.as of , useAbstractComponent.setCaptionAsHtml(boolean)
insteadSet whether the caption text is rendered as HTML or not. You might need to re-theme component to allow higher content than the original text style. If set to true, the captions are passed to the browser as html and the developer is responsible for ensuring no harmful html is used. If set to false, the content is passed to the browser as plain text.- Parameters:
htmlContentAllowed
-true
if caption is rendered as HTML,false
otherwise
-
isHtmlContentAllowed
@Deprecated public boolean isHtmlContentAllowed()
Deprecated.as of , useAbstractComponent.isCaptionAsHtml()
insteadReturn HTML rendering setting.- Returns:
true
if the caption text is to be rendered as HTML,false
otherwise
-
readDesign
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Deprecated.- Specified by:
readDesign
in interfaceComponent
- Overrides:
readDesign
in classAbstractLegacyComponent
-
writeDesign
public void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Deprecated.- Specified by:
writeDesign
in interfaceComponent
- Overrides:
writeDesign
in classAbstractLegacyComponent
-
getCustomAttributes
protected Collection<String> getCustomAttributes()
Deprecated.- Overrides:
getCustomAttributes
in classAbstractComponent
-
-