info.magnolia.ui.vaadin.icon
Class Icon

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by info.magnolia.ui.vaadin.icon.Icon
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, Serializable

public class Icon
extends com.vaadin.ui.AbstractComponent

The Icon is a lightweight component that outputs a simple scalable icon. The client-side implementation is based on the icon font technique, which means it only allows for monochromatic icons. For multilayer icons, please head to the CompositeIcon.

See Also:
Serialized Form

Nested Class Summary
 
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
static String COLOR_ERROR
           
static String COLOR_GREEN_BADGE
           
static String COLOR_HELP
           
static String COLOR_INFO
           
static String COLOR_WARNING
           
static int SIZE_DEFAULT
           
 
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
Icon(String iconName)
           
Icon(String iconName, int size)
           
Icon(String iconName, int size, String color)
           
Icon(String iconName, String color)
           
 
Method Summary
 String getColor()
           
 String getIconName()
           
 int getSize()
           
protected  IconState getState()
           
protected  IconState getState(boolean markDirty)
           
 void setColor(String color)
           
 void setIconName(String iconName)
           
 void setSize(int size)
           
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
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, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 

Field Detail

COLOR_ERROR

public static final transient String COLOR_ERROR
See Also:
Constant Field Values

COLOR_WARNING

public static final transient String COLOR_WARNING
See Also:
Constant Field Values

COLOR_INFO

public static final transient String COLOR_INFO
See Also:
Constant Field Values

COLOR_GREEN_BADGE

public static final transient String COLOR_GREEN_BADGE
See Also:
Constant Field Values

COLOR_HELP

public static final transient String COLOR_HELP
See Also:
Constant Field Values

SIZE_DEFAULT

public static final transient int SIZE_DEFAULT
See Also:
Constant Field Values
Constructor Detail

Icon

public Icon(String iconName)

Icon

public Icon(String iconName,
            int size)

Icon

public Icon(String iconName,
            String color)

Icon

public Icon(String iconName,
            int size,
            String color)
Method Detail

getState

protected IconState getState(boolean markDirty)
Overrides:
getState in class com.vaadin.ui.AbstractComponent

getState

protected IconState getState()
Overrides:
getState in class com.vaadin.ui.AbstractComponent

getIconName

public String getIconName()

setIconName

public void setIconName(String iconName)

getSize

public int getSize()

setSize

public void setSize(int size)

getColor

public String getColor()

setColor

public void setColor(String color)


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.