java.lang.Objectjavax.swing.text.AbstractWriter
javax.swing.text.html.HTMLWriter
public class HTMLWriter
This is a writer for HTMLDocuments.
| Field Summary |
|---|
| Fields inherited from class javax.swing.text.AbstractWriter |
|---|
NEWLINE |
| Constructor Summary | |
|---|---|
HTMLWriter(Writer w,
HTMLDocument doc)
Creates a new HTMLWriter. |
|
HTMLWriter(Writer w,
HTMLDocument doc,
int pos,
int len)
Creates a new HTMLWriter. |
|
| Method Summary | |
|---|---|
protected void |
closeOutUnwantedEmbeddedTags(AttributeSet attr)
Searches the attribute set and for each tag that is stored in the tag vector. |
protected void |
comment(Element elem)
Writes out comments. |
protected void |
emptyTag(Element elem)
Writes out all empty elements (all tags that have no corresponding end tag). |
protected void |
endTag(Element elem)
Writes out an end tag for the element. |
protected boolean |
isBlockTag(AttributeSet attr)
Determines if the HTML.Tag associated with the element is a block tag. |
protected boolean |
matchNameAttribute(AttributeSet attr,
HTML.Tag tag)
Returns true if the StyleConstants.NameAttribute is equal to the tag that is passed in as a parameter. |
protected void |
output(char[] chars,
int start,
int length)
This method is overriden to map any character entities, such as < to <. |
protected void |
selectContent(AttributeSet attr)
Writes out the content of the SELECT form element. |
protected void |
startTag(Element elem)
Writes out a start tag for the element. |
protected boolean |
synthesizedElement(Element elem)
Returns true if the element is a synthesized element. |
protected void |
text(Element elem)
Writes out text. |
protected void |
textAreaContent(AttributeSet attr)
Writes out text that is contained in a TEXTAREA form element. |
void |
write()
Iterates over the Element tree and controls the writing out of all the tags and its attributes. |
protected void |
writeAttributes(AttributeSet attr)
Writes out the attribute set. |
protected void |
writeEmbeddedTags(AttributeSet attr)
Searches for embedded tags in the AttributeSet and writes them out. |
protected void |
writeLineSeparator()
Writes the line separator. |
protected void |
writeOption(Option option)
Writes out the content of the Option form element. |
| Methods inherited from class javax.swing.text.AbstractWriter |
|---|
decrIndent, getCanWrapLines, getCurrentLineLength, getDocument, getElementIterator, getEndOffset, getIndentLevel, getIndentSpace, getLineLength, getLineSeparator, getStartOffset, getText, getWriter, incrIndent, indent, inRange, isLineEmpty, setCanWrapLines, setCurrentLineLength, setIndentSpace, setLineLength, setLineSeparator, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLWriter(Writer w, HTMLDocument doc)
w - a Writerdoc - an HTMLDocumentpublic HTMLWriter(Writer w, HTMLDocument doc, int pos, int len)
w - a Writerdoc - an HTMLDocumentpos - the document location from which to fetch the contentlen - the amount to write out| Method Detail |
|---|
public void write()
throws IOException,
BadLocationException
write in class AbstractWriterIOException - on any I/O error
BadLocationException - if pos represents an invalid
location within the document.protected void writeAttributes(AttributeSet attr) throws IOException
writeAttributes in class AbstractWriterattr - an AttributeSet
IOException - on any I/O errorprotected void emptyTag(Element elem) throws BadLocationException, IOException
elem - an Element
IOException - on any I/O error
BadLocationException - if pos represents an invalid
location within the document.protected boolean isBlockTag(AttributeSet attr)
attr - an AttributeSet
protected void startTag(Element elem) throws IOException, BadLocationException
elem - an Element
IOException - on any I/O error
BadLocationExceptionprotected void textAreaContent(AttributeSet attr) throws BadLocationException, IOException
attr - an AttributeSet
IOException - on any I/O error
BadLocationException - if pos represents an invalid
location within the document.protected void text(Element elem) throws BadLocationException, IOException
text in class AbstractWriterelem - an Element
IOException - on any I/O error
BadLocationException - if pos represents an invalid
location within the document.protected void selectContent(AttributeSet attr) throws IOException
attr - the AttributeSet associated with the form element
IOException - on any I/O errorprotected void writeOption(Option option) throws IOException
option - an Option
IOException - on any I/O errorprotected void endTag(Element elem) throws IOException
elem - an Element
IOException - on any I/O errorprotected void comment(Element elem) throws BadLocationException, IOException
elem - an Element
IOException - on any I/O error
BadLocationException - if pos represents an invalid
location within the document.protected boolean synthesizedElement(Element elem)
protected boolean matchNameAttribute(AttributeSet attr, HTML.Tag tag)
protected void writeEmbeddedTags(AttributeSet attr) throws IOException
IOException - on any I/O errorprotected void closeOutUnwantedEmbeddedTags(AttributeSet attr) throws IOException
IOException - on any I/O error
protected void writeLineSeparator()
throws IOException
writeLineSeparator in class AbstractWriterIOException
protected void output(char[] chars,
int start,
int length)
throws IOException
super.output will be invoked to
write the content.
output in class AbstractWriterIOExceptionCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)