Class HtmlOutput

All Implemented Interfaces:
Serializable, Cloneable, LabelableElement, ValidatableElement, Element, Node

public class HtmlOutput extends HtmlElement implements LabelableElement, ValidatableElement
Wrapper for the HTML element "output".
See Also:
  • Field Details

    • TAG_NAME

      public static final String TAG_NAME
      The HTML tag represented by this element.
      See Also:
    • customValidity_

      private String customValidity_
  • Constructor Details

    • HtmlOutput

      HtmlOutput(String qualifiedName, SgmlPage page, Map<String,DomAttr> attributes)
      Creates a new instance.
      Parameters:
      qualifiedName - the qualified name of the element type to instantiate
      page - the page that contains this element
      attributes - the initial attributes
  • Method Details

    • getDefaultStyleDisplay

      public HtmlElement.DisplayStyle getDefaultStyleDisplay()
      INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
      Returns the default display style.
      Overrides:
      getDefaultStyleDisplay in class HtmlElement
      Returns:
      the default display style
    • willValidate

      public boolean willValidate()
      Specified by:
      willValidate in interface ValidatableElement
      Returns:
      whether the element is a candidate for constraint validation
    • setCustomValidity

      public void setCustomValidity(String message)
      Sets the custom validity message for the element to the specified message.
      Specified by:
      setCustomValidity in interface ValidatableElement
      Parameters:
      message - the new message
    • isValid

      public boolean isValid()
      Returns whether this element satisfies all form validation constraints set.
      Overrides:
      isValid in class HtmlElement
      Returns:
      whether this element satisfies all form validation constraints set
    • isCustomErrorValidityState

      public boolean isCustomErrorValidityState()
      Specified by:
      isCustomErrorValidityState in interface ValidatableElement
      Returns:
      a boolean value indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method.
    • isValidValidityState

      public boolean isValidValidityState()
      Specified by:
      isValidValidityState in interface ValidatableElement
      Returns:
      true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. If true, the element matches the :valid CSS pseudo-class; the :invalid CSS pseudo-class otherwise.