com.vaadin.flow.component.
Class HtmlComponent
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.HtmlComponent
-
All Implemented Interfaces:
AttachNotifier, DetachNotifier, HasElement, HasSize, HasStyle, Serializable
Direct Known Subclasses:
public class HtmlComponent extends Component implements HasSize, HasStyle
Base class for a
Component
that represents a single built-in HTML element.Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors 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.
-
Method Summary
All Methods 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.
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeightFull, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFull
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
HtmlComponent
protected HtmlComponent()
Creates a component with the element type based on the
Tag
annotation of the sub class.
-
HtmlComponent
public HtmlComponent(String tagName)
Creates a component with a new element with the given tag name.
Parameters:
tagName
- the tag name of the element to use for this component, notnull
-
-
Method Detail
-
setTitle
public void setTitle(String title)
Sets the title of this component. Browsers typically use the title to show a tooltip when hovering an element or any descendant without a title value of its own.
Parameters:
title
- the title value to set, or""
to remove any previously set title
-
-