JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.text.html
Ŭ·¡½º HTMLWriter

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.swing.text.AbstractWriter 
      »óÀ§¸¦ È®Àå javax.swing.text.html.HTMLWriter

public class HTMLWriter
extends AbstractWriter

HTMLDocument ¶óÀÌÅÍÀÔ´Ï´Ù.


ÇÊµå °³¿ä
 
Ŭ·¡½º javax.swing.text. AbstractWriter ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå
NEWLINE
 
»ý¼ºÀÚ °³¿ä
HTMLWriter (Writer  w, HTMLDocument  doc)
          »õ·Î¿î HTMLWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
HTMLWriter (Writer  w, HTMLDocument  doc, int pos, int len)
          »õ·Î¿î HTMLWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
protected  void closeOutUnwantedEmbeddedTags (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ® ¹× ÅÂ±× º¤ÅÍ¿¡ Æ÷ÇÔµÈ °¢ ű׸¦ °Ë»öÇÕ´Ï´Ù.
protected  void comment (Element  elem)
          ÄÚ¸àÆ®¸¦ ½á³À´Ï´Ù.
protected  void emptyTag (Element  elem)
          ¸ðµç ºó ¿ä¼Ò (´ëÀÀÇÏ´Â Á¾·á űװ¡ ¾ø´Â ÅÂ±× ¸ðµç °Í)¸¦ ½á³À´Ï´Ù.
protected  void endTag (Element  elem)
          ¿ä¼ÒÀÇ Á¾·á ű׸¦ ½á³À´Ï´Ù.
protected  boolean isBlockTag (AttributeSet  attr)
          ¿ä¼Ò¿¡ ´ëÀÀÇÏ´Â HTML űװ¡ block ű×Àΰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.
protected  boolean matchNameAttribute (AttributeSet  attr, HTML.Tag  tag)
          StyleConstants.NameAttribute°¡ ÆĶó¹ÌÅͷμ­ °Ç³×¹Þ´Â ű׿¡ µ¿ÀÏÇÑ °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
protected  void output (char[] chars, int start, int length)
          <¸¦ &lt; ¿¡µîÀÇ ¹®ÀÚ ¿£Æ®¸®¸¦ ¸ÅÇÎ Çϱâ À§Çؼ­ ¿À¹ö¶óÀ̵å(override) µË´Ï´Ù.
protected  void selectContent (AttributeSet  attr)
          Æû ¿ä¼ÒÀÇ SELECT ÄÁÅÙÃ÷¸¦ ½á³À´Ï´Ù.
protected  void startTag (Element  elem)
          ¿ä¼ÒÀÇ °³½Ã ű׸¦ ½á³À´Ï´Ù.
protected  boolean synthesizedElement (Element  elem)
          ¿ä¼Ò°¡ ÇÕ¼º ¿ä¼ÒÀÇ °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù.
protected  void text (Element  elem)
          ÅؽºÆ®¸¦ ½á³À´Ï´Ù.
protected  void textAreaContent (AttributeSet  attr)
          Æû ¿ä¼ÒÀÇ TEXTAREA¿¡ Æ÷ÇԵǰí ÀÖ´Â ÅؽºÆ®¸¦ ½á³À´Ï´Ù.
 void write ()
          ¿ä¼Ò Æ®¸®·Î ¹Ýº¹µÇ¾î ¸ðµç ÅÂ±×¿Í ±× ¼Ó¼ºÀÇ write¸¦ Á¦¾îÇÕ´Ï´Ù.
protected  void writeAttributes (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®¸¦ ½á³À´Ï´Ù.
protected  void writeEmbeddedTags (AttributeSet  attr)
          AttributeSet ·Î Â¥³Ö¾î ű׸¦ °Ë»öÇØ ±×°ÍÀ» ½á³À´Ï´Ù.
protected  void writeLineSeparator ()
          Çà ´Ü¶ô ¹®ÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù.
protected  void writeOption (Option  option)
          Æû ¿ä¼ÒÀÇ Option ÄÁÅÙÃ÷¸¦ ½á³À´Ï´Ù.
 
Ŭ·¡½º 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
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

HTMLWriter

public HTMLWriter(Writer  w,
                  HTMLDocument  doc)
»õ·Î¿î HTMLWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
w - Writer
doc - HTMLDocument

HTMLWriter

public HTMLWriter(Writer  w,
                  HTMLDocument  doc,
                  int pos,
                  int len)
»õ·Î¿î HTMLWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
w - Writer
doc - HTMLDocument
pos - ÄÁÅÙÃ÷¸¦ ¾ò´Â ¹®¼­ÀÇ À§Ä¡
len - ½á³»´Â ¾ç
¸Þ¼­µåÀÇ »ó¼¼

write

public void write()
           throws IOException,

                  BadLocationException 
¿ä¼Ò Æ®¸®·Î ¹Ýº¹µÇ¾î ¸ðµç ÅÂ±×¿Í ±× ¼Ó¼ºÀÇ write¸¦ Á¦¾îÇÕ´Ï´Ù.

Á¤ÀÇ:
Ŭ·¡½º AbstractWriter ³»ÀÇ write
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException - pos°¡ ¹®¼­³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ì

writeAttributes

protected void writeAttributes(AttributeSet  attr)
                        throws IOException 
¼Ó¼º ¼¼Æ®¸¦ ½á³À´Ï´Ù. HTML.Tag ÇüÀÇ Å°¸¦ °¡Áö´Â ¼Ó¼º, StyleConstants ÇüÀÇ Å°¸¦ °¡Áö´Â ¼Ó¼º ¹× HTML.Attribute.ENDTAG ÇüÀÇ Å°¸¦ °¡Áö´Â ¼Ó¼ºÀº ¸ðµÎ ¹«½ÃÇÕ´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º AbstractWriter ³»ÀÇ writeAttributes
ÆĶó¹ÌÅÍ:
attr - AttributeSet
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

emptyTag

protected void emptyTag(Element  elem)
                 throws BadLocationException,

                        IOException 
¸ðµç ºó ¿ä¼Ò (´ëÀÀÇÏ´Â Á¾·á űװ¡ ¾ø´Â ÅÂ±× ¸ðµç °Í)¸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
elem - Element
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException - pos°¡ ¹®¼­³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ì

isBlockTag

protected boolean isBlockTag(AttributeSet  attr)
¿ä¼Ò¿¡ ´ëÀÀÇÏ´Â HTML űװ¡ block ű×Àΰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - AttributeSet
¹Ýȯ°ª:
űװ¡ block ű×ÀÇ °æ¿ì´Â true, ±×·¸Áö ¾ÊÀº °æ¿ì´Â false

startTag

protected void startTag(Element  elem)
                 throws IOException,

                        BadLocationException 
¿ä¼ÒÀÇ °³½Ã ű׸¦ ½á³À´Ï´Ù. ¸ðµç ÇÕ¼º ¿ä¼Ò¸¦ ¹«½ÃÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
elem - Element
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException

textAreaContent

protected void textAreaContent(AttributeSet  attr)
                        throws BadLocationException,

                               IOException 
Æû ¿ä¼ÒÀÇ TEXTAREA¿¡ Æ÷ÇԵǰí ÀÖ´Â ÅؽºÆ®¸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - AttributeSet
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException - pos°¡ ¹®¼­³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ì

text

protected void text(Element  elem)
             throws BadLocationException,

                    IOException 
ÅؽºÆ®¸¦ ½á³À´Ï´Ù. »ý¼ºÀÚ È£Ãâ½Ã¿¡ ¹üÀ§°¡ °¡¸®Å°´Â °æ¿ì´Â ´ëÀÀÇÏ´Â ¹üÀ§ÀÇ ÅؽºÆ®¸¸ÀÌ ½á³»Áý´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º AbstractWriter ³»ÀÇ text
ÆĶó¹ÌÅÍ:
elem - Element
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException - pos°¡ ¹®¼­³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ì

selectContent

protected void selectContent(AttributeSet  attr)
                      throws IOException 
Æû ¿ä¼ÒÀÇ SELECT ÄÁÅÙÃ÷¸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
attr - Æû ¿ä¼Ò¿¡ °ü·ÃÇÑ AttributeSet
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

writeOption

protected void writeOption(Option  option)
                    throws IOException 
Æû ¿ä¼ÒÀÇ Option ÄÁÅÙÃ÷¸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
option - Option
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

endTag

protected void endTag(Element  elem)
               throws IOException 
¿ä¼ÒÀÇ Á¾·á ű׸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
elem - Element
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

comment

protected void comment(Element  elem)
                throws BadLocationException,

                       IOException 
ÄÚ¸àÆ®¸¦ ½á³À´Ï´Ù.

ÆĶó¹ÌÅÍ:
elem - Element
¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException - pos°¡ ¹®¼­³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ì

synthesizedElement

protected boolean synthesizedElement(Element  elem)
¿ä¼Ò°¡ ÇÕ¼º ¿ä¼ÒÀÇ °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù. Çö½ÃÁ¡¿¡¼­´Â Á¶»çÇÏ´Â ´ë»óÀº p¸¦ ¾Ï½ÃÇÑ Å±׸¸ÀÔ´Ï´Ù.


matchNameAttribute

protected boolean matchNameAttribute(AttributeSet  attr,
                                     HTML.Tag  tag)
StyleConstants.NameAttribute°¡ ÆĶó¹ÌÅͷμ­ °Ç³×¹Þ´Â ű׿¡ µ¿ÀÏÇÑ °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù.


writeEmbeddedTags

protected void writeEmbeddedTags(AttributeSet  attr)
                          throws IOException 
AttributeSet ·Î Â¥³Ö¾î ű׸¦ °Ë»öÇØ ±×°ÍÀ» ½á³À´Ï´Ù. ¶Ç, ÇÊ¿ä¿¡ µû¶ó¼­ ´ëÀÀÇÏ´Â Á¾·á ű׸¦ ½á³¾ ¼ö ÀÖµµ·Ï, ÀÌ·¯ÇÑ Å±׸¦ º¤ÅÍ¿¡ Æ÷ÇÔÇÕ´Ï´Ù.

¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

closeOutUnwantedEmbeddedTags

protected void closeOutUnwantedEmbeddedTags(AttributeSet  attr)
                                     throws IOException 
¼Ó¼º ¼¼Æ® ¹× ÅÂ±× º¤ÅÍ¿¡ Æ÷ÇÔµÈ °¢ ű׸¦ °Ë»öÇÕ´Ï´Ù. űװ¡ ¹ß°ßµÇÁö ¾ÊÀ¸¸é, º¤ÅÍÀÇ Å±׸¦ »èÁ¦ÇØ ´ëÀÀÇÏ´Â Á¾·á ű׸¦ ½á³À´Ï´Ù.

¿¹¿Ü:
IOException - ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

writeLineSeparator

protected void writeLineSeparator()
                           throws IOException 
Çà ´Ü¶ô ¹®ÀÚ¸¦ Ãâ·ÂÇÕ´Ï´Ù. °³Çà ÄÁÅÙÃ÷°¡ Ç¥ÁØ ascii°¡ ¾Æ´Ñ °æ¿ì¿¡´Â ġȯÇÏÁö ¾Ê°Ô, ¿À¹ö¶óÀ̵å(override) µË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º AbstractWriter ³»ÀÇ writeLineSeparator
¿¹¿Ü:
IOException

output

protected void output(char[] chars,
                      int start,
                      int length)
               throws IOException 
<¸¦ &lt; ¿¡µîÀÇ ¹®ÀÚ ¿£Æ®¸®¸¦ ¸ÅÇÎ Çϱâ À§Çؼ­ ¿À¹ö¶óÀ̵å(override) µË´Ï´Ù. ÄÁÅÙÃ÷¸¦ Ãâ·ÂÇϱâ À§Çؼ­ super.outputÀÌ È£ÃâµË´Ï´Ù.

¿À¹ö¶óÀ̵å(override):
Ŭ·¡½º AbstractWriter ³»ÀÇ output
¿¹¿Ü:
IOException

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.