public class HtmlComponent extends Component implements HasSize, HasStyle
Component that represents a single built-in HTML
element.| Modifier | Constructor and Description |
|---|---|
protected |
HtmlComponent()
Creates a component with the element type based on the
Tag
annotation of the sub class. |
|
HtmlComponent(String tagName)
Creates a component with a new element with the given tag name.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getTitle()
Gets the title of this component.
|
void |
setTitle(String title)
Sets the title of this component.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladdClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamegetElementaddAttachListeneraddDetachListenerprotected HtmlComponent()
Tag
annotation of the sub class.public HtmlComponent(String tagName)
tagName - the tag name of the element to use for this component, not
nullpublic void setTitle(String title)
title - the title value to set, or "" to remove any
previously set titlepublic Optional<String> getTitle()
setTitle(String)Copyright © 2025. All rights reserved.