Class TagElement

java.lang.Object
javax.swing.text.html.parser.TagElement

public class TagElement extends Object
A generic HTML TagElement class. The methods define how white space is interpreted around the tag.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a generic HTML TagElement class with fictional equals to false.
    TagElement(Element elem, boolean fictional)
    Creates a generic HTML TagElement class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this tag causes a line break to the flow of data, otherwise returns false.
    boolean
    Returns true if the tag is fictional.
    Returns the element.
    Returns the tag constant corresponding to the name of the element
    boolean
    Returns true if this tag is pre-formatted.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Creates and returns a copy of this object.
    boolean
    Indicates whether some other object is "equal to" this one.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Finalization is deprecated and subject to removal in a future release.
    final Class<?>
    Returns the runtime class of this Object.
    int
    Returns a hash code value for this object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    Returns a string representation of the object.
    final void
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
    final void
    wait(long timeoutMillis)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
    final void
    wait(long timeoutMillis, int nanos)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
  • Constructor Details

    • TagElement

      public TagElement(Element elem)
      Creates a generic HTML TagElement class with fictional equals to false.
      Parameters:
      elem - an element
    • TagElement

      public TagElement(Element elem, boolean fictional)
      Creates a generic HTML TagElement class.
      Parameters:
      elem - an element
      fictional - if true the tag is inserted by error recovery.
  • Method Details

    • breaksFlow

      public boolean breaksFlow()
      Returns true if this tag causes a line break to the flow of data, otherwise returns false.
      Returns:
      true if this tag causes a line break to the flow of data, otherwise returns false
    • isPreformatted

      public boolean isPreformatted()
      Returns true if this tag is pre-formatted.
      Returns:
      true if this tag is pre-formatted, otherwise returns false
    • getElement

      public Element getElement()
      Returns the element.
      Returns:
      the element
    • getHTMLTag

      public HTML.Tag getHTMLTag()
      Returns the tag constant corresponding to the name of the element
      Returns:
      the tag constant corresponding to the name of the element
    • fictional

      public boolean fictional()
      Returns true if the tag is fictional.
      Returns:
      true if the tag is fictional.