JavaTM Platform
Standard Ed. 6

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)
          모든 빈 상태(empty) 요소 (대응하는 종료 태그가 없는 태그 모든 것)를 써냅니다.
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)
          이 메소드는, 문자 엔티티를 매핑 하기 위해서 오버라이드(override) 됩니다 (< 와 &lt; 등).
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 ()
          행 단락 문자를 써냅니다.
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 
모든 빈 상태(empty) 요소 (대응하는 종료 태그가 없는 태그 모든 것)를 써냅니다.

파라미터:
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
도입된 버젼:
1.3

output

protected void output(char[] chars,
                      int start,
                      int length)
               throws IOException 
이 메소드는, 문자 엔티티를 매핑 하기 위해서 오버라이드(override) 됩니다 (< 와 &lt; 등). 컨텐츠를 기입하기 위해서(때문에) super.output 가 불려 갑니다.

오버라이드(override):
클래스 AbstractWriter 내의 output
예외:
IOException
도입된 버젼:
1.3

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.