@Tag(value="iron-icon") @NpmPackage(value="@polymer/iron-icon", version="3.0.1") @JsModule(value="@polymer/iron-icon/iron-icon.js") public class IronIcon extends Component implements HasStyle, ClickNotifier<IronIcon>
Constructor and Description |
---|
IronIcon(String collection,
String icon)
Creates an Icon component that displays the given
icon from the
given collection . |
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, isAttached, 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 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 © 2021. All rights reserved.