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 interfaceAbstractColorPicker.Coordinates2ColorDeprecated.static classAbstractColorPicker.PopupStyleDeprecated.-
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 ColorcolorDeprecated.The color.protected booleanhistoryVisibleDeprecated.protected booleanhsvVisibleDeprecated.protected StringpopupCaptionDeprecated.protected AbstractColorPicker.PopupStylepopupStyleDeprecated.protected booleanrgbVisibleDeprecated.protected static StringSTYLENAME_AREADeprecated.protected static StringSTYLENAME_BUTTONDeprecated.protected static StringSTYLENAME_DEFAULTDeprecated.protected booleanswatchesVisibleDeprecated.protected booleantextfieldVisibleDeprecated.-
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 voidaddColorChangeListener(ColorChangeListener listener)Deprecated.Adds aColorChangeListenerto the component.protected voidcolorChanged(ColorChangeEvent event)Deprecated.Fired when a color change event occurs.voidfireColorChanged()Deprecated.Notifies the listeners that the selected color has changed.ColorgetColor()Deprecated.Gets the color.protected Collection<String>getCustomAttributes()Deprecated.booleangetHistoryVisibility()Deprecated.Gets the visibility of the Color History.booleangetHSVVisibility()Deprecated.Gets the visibility of the HSV Tab.AbstractColorPicker.PopupStylegetPopupStyle()Deprecated.Gets the style for the popup window.booleangetRGBVisibility()Deprecated.Gets the visibility of the RGB Tab.protected ColorPickerStategetState()Deprecated.protected ColorPickerStategetState(boolean markAsDirty)Deprecated.booleangetSwatchesVisibility()Deprecated.Gets the visibility of the Swatches Tab.booleangetTextfieldVisibility()Deprecated.Gets the visibility of CSS color code text field.voidhidePopup()Deprecated.Hides a popup-window for color selection.booleanisDefaultCaptionEnabled()Deprecated.Returns true if the component shows the default caption (css-code for the currently selected color, e.g.booleanisHtmlContentAllowed()Deprecated.as of , useAbstractComponent.isCaptionAsHtml()insteadvoidreadDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.voidremoveColorChangeListener(ColorChangeListener listener)Deprecated.Removes aColorChangeListenerfrom the component.voidsetColor(Color color)Deprecated.Sets the color.voidsetDefaultCaptionEnabled(boolean enabled)Deprecated.Set true if the component should show a default caption (css-code for the currently selected color, e.g.protected abstract voidsetDefaultStyles()Deprecated.Sets the default styles of the component.voidsetHistoryVisibility(boolean visible)Deprecated.Sets the visibility of the Color History.voidsetHSVVisibility(boolean visible)Deprecated.Set the visibility of the HSV Tab.voidsetHtmlContentAllowed(boolean htmlContentAllowed)Deprecated.as of , useAbstractComponent.setCaptionAsHtml(boolean)insteadvoidsetPopupStyle(AbstractColorPicker.PopupStyle style)Deprecated.The style for the popup window.voidsetPosition(int x, int y)Deprecated.Sets the position of the popup window.voidsetRGBVisibility(boolean visible)Deprecated.Set the visibility of the RGB Tab.voidsetSwatchesVisibility(boolean visible)Deprecated.Set the visibility of the Swatches Tab.voidsetTextfieldVisibility(boolean visible)Deprecated.Sets the visibility of the CSS color code text field.voidshowPopup()Deprecated.Shows a popup-window for color selection.protected voidshowPopup(boolean open)Deprecated.Shows or hides popup-window depending on the given parameter.voidwindowClose(Window.CloseEvent e)Deprecated.voidwriteDesign(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:ColorSelectorSets the color.- Specified by:
setColorin interfaceColorSelector- Parameters:
color- the new color
-
getColor
public Color getColor()
Deprecated.Description copied from interface:ColorSelectorGets the color.- Specified by:
getColorin 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:HasColorChangeListenerAdds aColorChangeListenerto the component.- Specified by:
addColorChangeListenerin interfaceHasColorChangeListener
-
removeColorChangeListener
public void removeColorChangeListener(ColorChangeListener listener)
Deprecated.Description copied from interface:HasColorChangeListenerRemoves aColorChangeListenerfrom the component.- Specified by:
removeColorChangeListenerin interfaceHasColorChangeListener
-
windowClose
public void windowClose(Window.CloseEvent e)
Deprecated.- Specified by:
windowClosein 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:
getStatein classAbstractLegacyComponent
-
getState
protected ColorPickerState getState(boolean markAsDirty)
Deprecated.- Overrides:
getStatein 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-trueif caption is rendered as HTML,falseotherwise
-
isHtmlContentAllowed
@Deprecated public boolean isHtmlContentAllowed()
Deprecated.as of , useAbstractComponent.isCaptionAsHtml()insteadReturn HTML rendering setting.- Returns:
trueif the caption text is to be rendered as HTML,falseotherwise
-
readDesign
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.- Specified by:
readDesignin interfaceComponent- Overrides:
readDesignin classAbstractLegacyComponent
-
writeDesign
public void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)Deprecated.- Specified by:
writeDesignin interfaceComponent- Overrides:
writeDesignin classAbstractLegacyComponent
-
getCustomAttributes
protected Collection<String> getCustomAttributes()
Deprecated.- Overrides:
getCustomAttributesin classAbstractComponent
-
-