@Tag(value="iron-icon") @HtmlImport(value="frontend://bower_components/vaadin-icons/vaadin-icons.html") public class Icon extends Component implements HasStyle, ClickNotifier<Icon>
VaadinIcon
,
Serialized FormConstructor and Description |
---|
Icon()
Creates an Icon component that displays a Vaadin logo.
|
Icon(String collection,
String icon)
Creates an Icon component that displays the given
icon from the
given collection . |
Icon(VaadinIcon icon)
Creates an Icon component that displays the given icon from
VaadinIcon . |
Modifier and Type | Method and Description |
---|---|
String |
getColor()
Gets the fill color of this icon as a String.
|
void |
setColor(String color)
Sets the fill color of the icon.
|
void |
setSize(String size)
Sets the width and the height of the icon.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
getElement
addClickListener, addClickShortcut
addAttachListener
addDetachListener
public Icon()
public Icon(VaadinIcon icon)
VaadinIcon
.icon
- the icon to displaypublic void setSize(String size)
The size should be in a format understood by the browser, e.g. "100px" or "2.5em".
size
- the size to set, may be null
to clear the valuepublic void setColor(String color)
The color should be in a format understood by the browser, e.g. "orange", "#FF9E2C" or "rgb(255, 158, 44)".
color
- the fill color to set, may be null
to clear the
valuepublic String getColor()
null
if the color has
not been setCopyright © 2019. All rights reserved.