JavaTM 2
Platform
Std.  Ed.  v1. 4.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 ()
          ¿ä¼Ò Æ®¸®·Î ¹Ýº¹µÇ¾î ¸ðµç ÅÂ±×¿Í ±× ¼Ó¼ºÀÇ ±âÀÔÀ» Á¦¾îÇÕ´Ï´Ù.
protected  void writeAttributes (AttributeSet  attr)
          ¼Ó¼º ¼¼Æ®¸¦ ½á³À´Ï´Ù.
protected  void writeEmbeddedTags (AttributeSet  attr)
          AttributeSet ·Î Â¥³Ö¾î ű׸¦ °Ë»öÇØ ±×°ÍÀ» ½á³À´Ï´Ù.
protected  void writeLineSeparator ()
          Çà ´Ü¶ô ij¸¯Å͸¦ ±âÀÔÇÕ´Ï´Ù.
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 
¿ä¼Ò Æ®¸®·Î ¹Ýº¹µÇ¾î ¸ðµç ÅÂ±×¿Í ±× ¼Ó¼ºÀÇ ±âÀÔÀ» Á¦¾îÇÕ´Ï´Ù.

Á¤ÀÇ:
Ŭ·¡½º 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 
ÅØ½ºÆ®¸¦ ½á³À´Ï´Ù. constructor ÀÇ È£Ãâ½Ã¿¡ ¹üÀ§°¡ ÁöÁ¤µÇ°í ÀÖ´Â °æ¿ì´Â ´ëÀÀÇÏ´Â ¹üÀ§ÀÇ ÅØ½ºÆ®¸¸ÀÌ ½á³»Áý´Ï´Ù.

¿À¹ö¶óÀ̵å(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 
Çà ´Ü¶ô ij¸¯Å͸¦ ±âÀÔÇÕ´Ï´Ù. °³Çà ÄÁÅÙÃ÷°¡ Ç¥ÁØ 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
Std.  Ed.  v1. 4.0

¹ö±×ÀÇ º¸°í¿Í ±â´ÉÀÇ ¸®Äù½ºÆ®
ÀÌ¿ÜÀÇ API ·¹ÆÛ·±½º ¹× °³¹ßÀÚ¿ë ¹®¼­¿¡ ´ëÇØ¼­´Â Java 2 SDK SE °³¹ßÀÚ¿ë ¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä. °³¹ßÀÚÀü¿ëÀÇ »ó¼¼ÇÑ ÇØ¼³, °³³äÀÇ °³¿ä, ¿ë¾îÀÇ Á¤ÀÇ, ¹ö±×ÀÇ È¸ÇÇÃ¥, ¹× ÄÚµå ½Ç·Ê°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.

Java, Java 2 D, ¹× JDBC ´Â ¹Ì±¹ ¹× ±× ¿ÜÀÇ ³ª¶ó¿¡ À־ÀÇ ¹Ì±¹ Sun Microsystems, Inc. ÀÇ »óÇ¥ ȤÀº µî·Ï»óÇ¥ÀÔ´Ï´Ù.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.