org.vostok.vaadin.addon.dialog
Class SimpleColourWindow.ColourButton

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractFocusable
              extended by com.vaadin.ui.Button
                  extended by org.vostok.vaadin.addon.dialog.SimpleColourWindow.ColourButton
All Implemented Interfaces:
com.vaadin.event.Action.ShortcutNotifier, com.vaadin.event.ContextClickEvent.ContextClickNotifier, com.vaadin.event.FieldEvents.BlurNotifier, com.vaadin.event.FieldEvents.FocusNotifier, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.Component.Focusable, java.io.Serializable
Enclosing class:
SimpleColourWindow

public static class SimpleColourWindow.ColourButton
extends com.vaadin.ui.Button

A friendly button lanncher with a preview. You can set and get colour with setColour/getColour

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.Button
com.vaadin.ui.Button.ClickEvent, com.vaadin.ui.Button.ClickListener, com.vaadin.ui.Button.ClickShortcut
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
 
Field Summary
 
Fields inherited from class com.vaadin.ui.Button
clickShortcut
 
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
SimpleColourWindow.ColourButton()
          create a new launcher button with default caption, no listener, init to black
SimpleColourWindow.ColourButton(com.vaadin.shared.ui.colorpicker.Color colour)
           
SimpleColourWindow.ColourButton(com.vaadin.shared.ui.colorpicker.Color colour, com.vaadin.ui.components.colorpicker.ColorChangeListener listener)
          create a new launcher button
SimpleColourWindow.ColourButton(java.lang.String caption)
          create a new launcher button with no listener, init to black
SimpleColourWindow.ColourButton(java.lang.String caption, com.vaadin.ui.Button.ClickListener listener)
          backward compatibility, always fail.
SimpleColourWindow.ColourButton(java.lang.String caption, com.vaadin.shared.ui.colorpicker.Color colour, com.vaadin.ui.components.colorpicker.ColorChangeListener listener)
          create a new launcher button
 
Method Summary
 com.vaadin.shared.ui.colorpicker.Color getColour()
           
 SimpleColourWindow getSimpleColourWindow()
          SimpleColourWindow for this preview button.
 boolean isModal()
           
 void setColour(com.vaadin.shared.ui.colorpicker.Color colour)
          set colour for preview and on dialog
 void setModal(boolean modal)
           
 
Methods inherited from class com.vaadin.ui.Button
addClickListener, addListener, click, fireClick, fireClick, getCustomAttributes, getIconAlternateText, getState, getState, isDisableOnClick, isHtmlContentAllowed, readDesign, removeClickListener, removeClickShortcut, removeListener, setClickShortcut, setDisableOnClick, setHtmlContentAllowed, setIcon, setIconAlternateText, writeDesign
 
Methods inherited from class com.vaadin.ui.AbstractFocusable
addBlurListener, addFocusListener, addListener, addListener, focus, getTabIndex, removeBlurListener, removeFocusListener, removeListener, removeListener, setTabIndex
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, 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, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
 

Constructor Detail

SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton()
create a new launcher button with default caption, no listener, init to black


SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton(java.lang.String caption)
create a new launcher button with no listener, init to black

Parameters:
caption - String for this button. Default to none

SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton(java.lang.String caption,
                                       com.vaadin.ui.Button.ClickListener listener)
backward compatibility, always fail.
Use ColourButton(final String caption, final Color colour, final ColorChangeListener clickListener)

Parameters:
caption -
listener -
Throws:
java.lang.UnsupportedOperationException - always

SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton(java.lang.String caption,
                                       com.vaadin.shared.ui.colorpicker.Color colour,
                                       com.vaadin.ui.components.colorpicker.ColorChangeListener listener)
create a new launcher button

Parameters:
caption - caption for the dialog, can be null ; to add a caption for the button, use setCaption instead
colour - default colour. can be null, default to black
listener - ColorChangeListener for change. can be null

SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton(com.vaadin.shared.ui.colorpicker.Color colour,
                                       com.vaadin.ui.components.colorpicker.ColorChangeListener listener)
create a new launcher button

Parameters:
colour - default colour. can be null, default to black
listener - ColorChangeListener for change. can be null

SimpleColourWindow.ColourButton

public SimpleColourWindow.ColourButton(com.vaadin.shared.ui.colorpicker.Color colour)
Parameters:
colour -
Method Detail

getColour

public com.vaadin.shared.ui.colorpicker.Color getColour()
Returns:
Color current colour

setColour

public void setColour(com.vaadin.shared.ui.colorpicker.Color colour)
set colour for preview and on dialog

Parameters:
colour - Color for colour for preview et select window

getSimpleColourWindow

public SimpleColourWindow getSimpleColourWindow()
SimpleColourWindow for this preview button.
Note window is realized only when needed i.e. after first button click

Returns:
SimpleColourWindow instance or null

isModal

public boolean isModal()
Returns:
boolean window modal mode. defautl to false

setModal

public void setModal(boolean modal)
Parameters:
modal -