|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractColorPicker
public abstract class AbstractColorPicker
An abstract class that defines default implementation for a color picker component.
Nested Class Summary | |
---|---|
static interface |
AbstractColorPicker.Coordinates2Color
Interface for converting 2d-coordinates to a Color |
static class |
AbstractColorPicker.PopupStyle
|
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.ClientConnector |
---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Field Summary | |
---|---|
protected com.vaadin.shared.ui.colorpicker.Color |
color
The color. |
protected boolean |
historyVisible
|
protected boolean |
hsvVisible
|
protected java.lang.String |
popupCaption
|
protected AbstractColorPicker.PopupStyle |
popupStyle
|
protected boolean |
rgbVisible
|
protected static java.lang.String |
STYLENAME_AREA
|
protected static java.lang.String |
STYLENAME_BUTTON
|
protected static java.lang.String |
STYLENAME_DEFAULT
|
protected boolean |
swatchesVisible
|
protected boolean |
textfieldVisible
|
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 | |
---|---|
AbstractColorPicker()
Instantiates a new color picker. |
|
AbstractColorPicker(java.lang.String popupCaption)
Instantiates a new color picker. |
|
AbstractColorPicker(java.lang.String popupCaption,
com.vaadin.shared.ui.colorpicker.Color initialColor)
Instantiates a new color picker. |
Method Summary | |
---|---|
void |
addColorChangeListener(ColorChangeListener listener)
Adds a ColorChangeListener to the component. |
protected void |
colorChanged(ColorChangeEvent event)
Fired when a color change event occurs |
void |
fireColorChanged()
Notifies the listeners that the selected color has changed |
com.vaadin.shared.ui.colorpicker.Color |
getColor()
Gets the color. |
protected com.vaadin.shared.ui.colorpicker.ColorPickerState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
void |
hidePopup()
Hides a popup-window for color selection. |
boolean |
isDefaultCaptionEnabled()
Returns true if the component shows the default caption (css-code for the currently selected color, e.g. |
boolean |
isHtmlContentAllowed()
Return HTML rendering setting |
void |
removeColorChangeListener(ColorChangeListener listener)
Removes a ColorChangeListener from the component. |
void |
setColor(com.vaadin.shared.ui.colorpicker.Color color)
Sets the color. |
void |
setDefaultCaptionEnabled(boolean enabled)
Set true if the component should show a default caption (css-code for the currently selected color, e.g. |
protected abstract void |
setDefaultStyles()
Sets the default styles of the component |
void |
setHistoryVisibility(boolean visible)
Sets the visibility of the Color History |
void |
setHSVVisibility(boolean visible)
Set the visibility of the HSV Tab |
void |
setHtmlContentAllowed(boolean htmlContentAllowed)
Set whether the caption text is rendered as HTML or not. |
void |
setPopupStyle(AbstractColorPicker.PopupStyle style)
The style for the popup window |
void |
setPosition(int x,
int y)
Sets the position of the popup window |
void |
setRGBVisibility(boolean visible)
Set the visibility of the RGB Tab |
void |
setSwatchesVisibility(boolean visible)
Set the visibility of the Swatches Tab |
void |
setTextfieldVisibility(boolean visible)
Sets the visibility of the CSS color code text field |
void |
showPopup()
Shows a popup-window for color selection. |
protected void |
showPopup(boolean open)
Shows or hides popup-window depending on the given parameter. |
void |
windowClose(Window.CloseEvent e)
Called when the user closes a window. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.Component |
---|
getUI |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Field Detail |
---|
protected static final java.lang.String STYLENAME_DEFAULT
protected static final java.lang.String STYLENAME_BUTTON
protected static final java.lang.String STYLENAME_AREA
protected AbstractColorPicker.PopupStyle popupStyle
protected com.vaadin.shared.ui.colorpicker.Color color
protected java.lang.String popupCaption
protected boolean rgbVisible
protected boolean hsvVisible
protected boolean swatchesVisible
protected boolean historyVisible
protected boolean textfieldVisible
Constructor Detail |
---|
public AbstractColorPicker()
public AbstractColorPicker(java.lang.String popupCaption)
popupCaption
- the caption of the popup windowpublic AbstractColorPicker(java.lang.String popupCaption, com.vaadin.shared.ui.colorpicker.Color initialColor)
popupCaption
- the caption of the popup windowinitialColor
- the initial colorMethod Detail |
---|
public void setColor(com.vaadin.shared.ui.colorpicker.Color color)
ColorSelector
setColor
in interface ColorSelector
color
- the new colorpublic com.vaadin.shared.ui.colorpicker.Color getColor()
ColorSelector
getColor
in interface ColorSelector
public void setDefaultCaptionEnabled(boolean enabled)
enabled
- public boolean isDefaultCaptionEnabled()
public void setPosition(int x, int y)
x
- the x-coordinatey
- the y-coordinatepublic void addColorChangeListener(ColorChangeListener listener)
HasColorChangeListener
ColorChangeListener
to the component.
addColorChangeListener
in interface HasColorChangeListener
public void removeColorChangeListener(ColorChangeListener listener)
HasColorChangeListener
ColorChangeListener
from the component.
removeColorChangeListener
in interface HasColorChangeListener
public void windowClose(Window.CloseEvent e)
Window.CloseListener
Window.CloseEvent.getWindow()
to get a reference to the
Window
that was closed.
windowClose
in interface Window.CloseListener
e
- Event containingprotected void colorChanged(ColorChangeEvent event)
event
- The color change eventpublic void fireColorChanged()
public void setPopupStyle(AbstractColorPicker.PopupStyle style)
style
- The stylepublic void setRGBVisibility(boolean visible)
visible
- The visibilitypublic void setHSVVisibility(boolean visible)
visible
- The visibilitypublic void setSwatchesVisibility(boolean visible)
visible
- The visibilitypublic void setHistoryVisibility(boolean visible)
visible
- The visibilitypublic void setTextfieldVisibility(boolean visible)
visible
- The visibilityprotected com.vaadin.shared.ui.colorpicker.ColorPickerState getState()
AbstractComponent
getState
in class AbstractComponent
protected abstract void setDefaultStyles()
public void showPopup()
public void hidePopup()
protected void showPopup(boolean open)
open
- public void setHtmlContentAllowed(boolean htmlContentAllowed)
htmlContentAllowed
- true
if caption is rendered as HTML,
false
otherwisepublic boolean isHtmlContentAllowed()
true
if the caption text is to be rendered as HTML,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |