Package com.storedobject.vaadin
Class ButtonIcon
java.lang.Object
com.vaadin.flow.component.Component
com.storedobject.vaadin.ButtonIcon
- All Implemented Interfaces:
HasElement,HasIcon,HasSquareElement,HasThemeStyle,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.ClickNotifier<ButtonIcon>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable
@Tag("paper-icon-button")
@NpmPackage(value="@polymer/paper-icon-button",
version="3.0.2")
@JsModule("@polymer/paper-icon-button/paper-icon-button.js")
public class ButtonIcon
extends com.vaadin.flow.component.Component
implements HasSquareElement, HasIcon, com.vaadin.flow.component.ClickNotifier<ButtonIcon>
Vaadin Flow wrapper around the Web Component: Paper Icon Button.
Note: Vaadin icons can't be used here because Vaadin icons are not "Iron" icons.
- Author:
- Syam
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionButtonIcon(String icon) Create with an Iron icon nameButtonIcon(String icon, ClickHandler clickHandler) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the ink colorvoidsetInkColor(String color) Set the ink colorvoidsetPlaceholder(String placeholder) Show tooltip/placeholderwithBox()Draw a box around ans set the overall size to 25x25 pixels.withBox(int sizeInPixels) Draw a box around after sizing it.Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.storedobject.vaadin.HasElement
getAttribute, getStyle, setAttribute, setStyleMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.storedobject.vaadin.HasSquareElement
getSize, setSizeMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.storedobject.vaadin.HasThemeStyle
addTheme, asPrimary, asSmall, clearThemes, getInternalElement, removeTheme, setTheme
-
Constructor Details
-
ButtonIcon
Constructor- Parameters:
icon- Text label to display and the respective icon will be usedclickHandler- Click handler
-
ButtonIcon
Create with an Iron icon name- Parameters:
icon- Name of the Iron icon
-
-
Method Details
-
setInkColor
Set the ink color- Parameters:
color- Color value to set. Passing null value will remove the current value.
-
getInkColor
-
setPlaceholder
Show tooltip/placeholder- Parameters:
placeholder- Tooltip text to show
-
withBox
Draw a box around ans set the overall size to 25x25 pixels.- Returns:
- Self
-
withBox
Draw a box around after sizing it.- Parameters:
sizeInPixels- Size- Returns:
- Self
-