Typesafe enumeration for an HTML tag. Although the set of HTML tags is a closed set, we have left the set open so that people can add their own tag types to their custom parser and still communicate to the reader.
Creates a new Tag with the specified id;
causesBreak and isBlock are defined
by the user.
Creates a new Tag with the specified id; causesBreak and isBlock are defined by the user.
Parameters: - id - the id of the new tag
- causesBreak - true if this tag
causes a break to the flow of data
- isBlock - true if the tag is used
to add structure to a document
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.
Returns:true if this tag causes a
line break to the flow of data, otherwise returns
false
public boolean
isBlock
()
Returns true if this tag is a block
tag, which is a tag used to add structure to a
document.
Returns true if this tag is a block tag, which is a tag used to add structure to a document.
Returns:true if this tag is a block
tag, otherwise returns false
pack-private boolean
isParagraph
()
Returns true if this tag is considered to be a paragraph
in the internal HTML model.
Returns true if this tag is considered to be a paragraph in the internal HTML model. false - otherwise.
Returns:true if this tag is considered to be a paragraph
in the internal HTML model. false - otherwise.
See Also:javax.swing.text.html.HTMLDocument#HTMLReader#ParagraphAction,
public boolean
isPreformatted
()
Returns true if this tag is pre-formatted,
which is true if the tag is either PRE or
TEXTAREA.
Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA.
Returns:true if this tag is pre-formatted,
otherwise returns false
This is a tag synthesized by the HTML reader.
Since elements are identified by their tag type,
we create a some fake tag types to mark the elements
that were manufactured.
This is a tag synthesized by the HTML reader.
Since elements are identified by their tag type,
we create a some fake tag types to mark the elements
that were manufactured.
All text content must be in a paragraph element.
If a paragraph didn't exist when content was
encountered, a paragraph is manufactured.
This is a tag synthesized by the HTML reader.
Since elements are identified by their tag type,
we create a some fake tag types to mark the elements
that were manufactured.