- java.lang.Object
-
- javax.swing.text.html.HTML.Tag
-
- Direct Known Subclasses:
- HTML.UnknownTag
- Enclosing class:
- HTML
public static class HTML.Tag extends Object
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.
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor and Description HTML.Tag()
protected
HTML.Tag(String id)
Creates a newTag
with the specifiedid
, and withcausesBreak
andisBlock
set tofalse
.protected
HTML.Tag(String id, boolean causesBreak, boolean isBlock)
Creates a newTag
with the specifiedid
;causesBreak
andisBlock
are defined by the user.
-
Method Summary
Methods Modifier and Type Method and Description boolean
breaksFlow()
Returnstrue
if this tag causes a line break to the flow of data, otherwise returnsfalse
.boolean
isBlock()
Returnstrue
if this tag is a block tag, which is a tag used to add structure to a document.boolean
isPreformatted()
Returnstrue
if this tag is pre-formatted, which is true if the tag is eitherPRE
orTEXTAREA
.String
toString()
Returns the string representation of the tag.
-
-
-
Field Detail
-
A
public static final HTML.Tag A
-
ADDRESS
public static final HTML.Tag ADDRESS
-
APPLET
public static final HTML.Tag APPLET
-
AREA
public static final HTML.Tag AREA
-
B
public static final HTML.Tag B
-
BASE
public static final HTML.Tag BASE
-
BASEFONT
public static final HTML.Tag BASEFONT
-
BIG
public static final HTML.Tag BIG
-
BLOCKQUOTE
public static final HTML.Tag BLOCKQUOTE
-
BODY
public static final HTML.Tag BODY
-
BR
public static final HTML.Tag BR
-
CAPTION
public static final HTML.Tag CAPTION
-
CENTER
public static final HTML.Tag CENTER
-
CITE
public static final HTML.Tag CITE
-
CODE
public static final HTML.Tag CODE
-
DD
public static final HTML.Tag DD
-
DFN
public static final HTML.Tag DFN
-
DIR
public static final HTML.Tag DIR
-
DIV
public static final HTML.Tag DIV
-
DL
public static final HTML.Tag DL
-
DT
public static final HTML.Tag DT
-
EM
public static final HTML.Tag EM
-
FONT
public static final HTML.Tag FONT
-
FORM
public static final HTML.Tag FORM
-
FRAME
public static final HTML.Tag FRAME
-
FRAMESET
public static final HTML.Tag FRAMESET
-
H1
public static final HTML.Tag H1
-
H2
public static final HTML.Tag H2
-
H3
public static final HTML.Tag H3
-
H4
public static final HTML.Tag H4
-
H5
public static final HTML.Tag H5
-
H6
public static final HTML.Tag H6
-
HEAD
public static final HTML.Tag HEAD
-
HR
public static final HTML.Tag HR
-
HTML
public static final HTML.Tag HTML
-
I
public static final HTML.Tag I
-
IMG
public static final HTML.Tag IMG
-
INPUT
public static final HTML.Tag INPUT
-
ISINDEX
public static final HTML.Tag ISINDEX
-
KBD
public static final HTML.Tag KBD
-
LI
public static final HTML.Tag LI
-
LINK
public static final HTML.Tag LINK
-
MAP
public static final HTML.Tag MAP
-
MENU
public static final HTML.Tag MENU
-
META
public static final HTML.Tag META
-
NOFRAMES
public static final HTML.Tag NOFRAMES
-
OBJECT
public static final HTML.Tag OBJECT
-
OL
public static final HTML.Tag OL
-
OPTION
public static final HTML.Tag OPTION
-
P
public static final HTML.Tag P
-
PARAM
public static final HTML.Tag PARAM
-
PRE
public static final HTML.Tag PRE
-
SAMP
public static final HTML.Tag SAMP
-
SCRIPT
public static final HTML.Tag SCRIPT
-
SELECT
public static final HTML.Tag SELECT
-
SMALL
public static final HTML.Tag SMALL
-
SPAN
public static final HTML.Tag SPAN
-
STRIKE
public static final HTML.Tag STRIKE
-
S
public static final HTML.Tag S
-
STRONG
public static final HTML.Tag STRONG
-
STYLE
public static final HTML.Tag STYLE
-
SUB
public static final HTML.Tag SUB
-
SUP
public static final HTML.Tag SUP
-
TABLE
public static final HTML.Tag TABLE
-
TD
public static final HTML.Tag TD
-
TEXTAREA
public static final HTML.Tag TEXTAREA
-
TH
public static final HTML.Tag TH
-
TITLE
public static final HTML.Tag TITLE
-
TR
public static final HTML.Tag TR
-
TT
public static final HTML.Tag TT
-
U
public static final HTML.Tag U
-
UL
public static final HTML.Tag UL
-
VAR
public static final HTML.Tag VAR
-
IMPLIED
public static final HTML.Tag IMPLIED
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.
-
CONTENT
public static final HTML.Tag CONTENT
All text content is labeled with this tag.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.
-
COMMENT
public static final HTML.Tag COMMENT
All comments are labeled with this tag.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.
-
-
Constructor Detail
-
HTML.Tag
public HTML.Tag()
- Since:
- 1.3
-
HTML.Tag
protected HTML.Tag(String id)
Creates a newTag
with the specifiedid
, and withcausesBreak
andisBlock
set tofalse
.- Parameters:
id
- the id of the new tag
-
HTML.Tag
protected HTML.Tag(String id, boolean causesBreak, boolean isBlock)
Creates a newTag
with the specifiedid
;causesBreak
andisBlock
are defined by the user.- Parameters:
id
- the id of the new tagcausesBreak
-true
if this tag causes a break to the flow of dataisBlock
-true
if the tag is used to add structure to a document
-
-
Method Detail
-
isBlock
public boolean isBlock()
Returnstrue
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 returnsfalse
-
breaksFlow
public boolean breaksFlow()
Returnstrue
if this tag causes a line break to the flow of data, otherwise returnsfalse
.- Returns:
true
if this tag causes a line break to the flow of data, otherwise returnsfalse
-
isPreformatted
public boolean isPreformatted()
Returnstrue
if this tag is pre-formatted, which is true if the tag is eitherPRE
orTEXTAREA
.- Returns:
true
if this tag is pre-formatted, otherwise returnsfalse
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/text/html/html.tag.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.