Class HtmlComponent

    • 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, not null
    • 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
      • getTitle

        public Optional<String> getTitle()
        Gets the title of this component.
        Returns:
        an optional title, or an empty optional if no title has been set
        See Also:
        setTitle(String)