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, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFull
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
getElement
addAttachListener
addDetachListener
protected HtmlComponent()
Tag
annotation of the sub class.public HtmlComponent(String tagName)
tagName
- the tag name of the element to use for this component, not
null
public void setTitle(String title)
title
- the title value to set, or ""
to remove any
previously set titlepublic Optional<String> getTitle()
setTitle(String)
Copyright © 2019. All rights reserved.