|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectjavax.swing.text.AbstractWriter
javax.swing.text.html.MinimalHTMLWriter
public class MinimalHTMLWriter
MinimalHTMLWriter 는, 에디터 킷으로 작성되지 않는 문서의 HTML 를 써내기 위해서(때문에) HTMLEditorKit 가 사용하는 대체 라이터입니다. 문서의 형식은 다음과 같습니다.
<html> <head> <style> <! -- list of named styles p.normal { font-family:SansSerif; margin-height: 0; font-size: 14 } --> </style> </head> <body> <p style=normal> 실행 파일의 볼드, 이탤릭, 및 밑줄 의 각 속성은, HTML 태그로서 발행됩니다. 그 외의 태그는 <span> 태그의 일부로서 발행됩니다. 구문은 인 라인의 스타일과 같습니다. </p> </body> </html>
필드의 개요 |
---|
클래스 javax.swing.text. AbstractWriter 로부터 상속된 필드 |
---|
NEWLINE |
생성자 의 개요 | |
---|---|
MinimalHTMLWriter (Writer w,
StyledDocument doc)
새로운 MinimalHTMLWriter 를 작성합니다. |
|
MinimalHTMLWriter (Writer w,
StyledDocument doc,
int pos,
int len)
새로운 MinimalHTMLWriter 를 작성합니다. |
메소드의 개요 | |
---|---|
protected void |
endFontTag ()
현재 사용되고 있지 않습니다. |
protected boolean |
inFontTag ()
<font> 태그내라면 true 를 돌려줍니다. |
protected boolean |
isText (Element elem)
요소가 텍스트라면 true 를 돌려줍니다. |
protected void |
startFontTag (String style)
현재 사용되고 있지 않습니다. |
protected void |
text (Element elem)
텍스트를 써냅니다. |
void |
write ()
StyledDocument 로부터 HTML 출력을 생성합니다. |
protected void |
writeAttributes (AttributeSet attr)
StyleConstants.ParagraphConstants, StyleConstants.CharacterConstants, StyleConstants.FontConstants, StyleConstants.ColorConstants 의 각 형의 모든 속성을 써냅니다. |
protected void |
writeBody ()
문서내의 요소로 반복해, 가지의 요소나 잎의 요소인지를 판단해 요소를 처리합니다. |
protected void |
writeComponent (Element elem)
컴퍼넌트 요소의 서두를 실시합니다. |
protected void |
writeContent (Element elem,
boolean needsIndenting)
HTML 에 준거한 방법으로 속성 세트를 써냅니다. |
protected void |
writeEndParagraph ()
<p> 태그의 종료 태그를 발행합니다. |
protected void |
writeEndTag (String endTag)
적절히 인덴트 처리된 종료 태그를 써냅니다. |
protected void |
writeHeader ()
<head> 및 <style> 의 태그를 써내, 다음에 writeStyles()를 기동해 <style> 태그의 컨텐츠로서 모든 이름 첨부의 스타일을 써냅니다. |
protected void |
writeHTMLTags (AttributeSet attr)
속성 설정에 근거해 텍스트의 볼드 <b>, 이탤릭 <i>, 및 <u> 의 태그를 생성합니다. |
protected void |
writeImage (Element elem)
아이콘 요소의 서두를 실시합니다. |
protected void |
writeLeaf (Element elem)
텍스트 이외의 잎의 요소의 서두를 제어합니다. |
protected void |
writeNonHTMLAttributes (AttributeSet attr)
HTML 에 준거한 방법으로 나머지의 문자 레벨의 속성 (볼드, 이탤릭, 밑줄 이외의 속성)을 써냅니다. |
protected void |
writeStartParagraph (Element elem)
단락의 개시 태그를 발행합니다. |
protected void |
writeStartTag (String tag)
적절히 인덴트 처리된 개시 태그를 써냅니다. |
protected void |
writeStyles ()
<style> 태그의 컨텐츠로서 모든 이름 첨부 스타일을 써냅니다. |
클래스 javax.swing.text. AbstractWriter 로부터 상속된 메소드 |
---|
decrIndent , getCanWrapLines , getCurrentLineLength , getDocument , getElementIterator , getEndOffset , getIndentLevel , getIndentSpace , getLineLength , getLineSeparator , getStartOffset , getText , getWriter , incrIndent , indent , inRange , isLineEmpty , output , setCanWrapLines , setCurrentLineLength , setIndentSpace , setLineLength , setLineSeparator , write , write , write , writeLineSeparator |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public MinimalHTMLWriter(Writer w, StyledDocument doc)
w
- 라이터doc
- StyledDocumentpublic MinimalHTMLWriter(Writer w, StyledDocument doc, int pos, int len)
w
- 라이터doc
- StyledDocumentpos
- 컨텐츠를 취득한다
문서내의 위치len
- 써내는 양메소드의 상세 |
---|
public void write() throws IOException , BadLocationException
AbstractWriter
내의 write
IOException
- 입출력 에러가 발생했을 경우
BadLocationException
- pos 가 문서내의
무효인 위치를 나타내는 경우protected void writeAttributes(AttributeSet attr) throws IOException
AbstractWriter
내의 writeAttributes
attr
- AttributeSet
IOException
- 입출력 에러가 발생했을 경우protected void text(Element elem) throws IOException , BadLocationException
AbstractWriter
내의 text
elem
- Element
IOException
- 입출력 에러가 발생했을 경우
BadLocationException
- pos 가 문서내의
무효인 위치를 나타내는 경우protected void writeStartTag(String tag) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeEndTag(String endTag) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeHeader() throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeStyles() throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeBody() throws IOException , BadLocationException
IOException
- 입출력 에러가 발생했을 경우
BadLocationException
protected void writeEndParagraph() throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeStartParagraph(Element elem) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeLeaf(Element elem) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeImage(Element elem) throws IOException
elem
- StyleConstants.IconElementName 형의 요소
IOException
protected void writeComponent(Element elem) throws IOException
IOException
protected boolean isText(Element elem)
protected void writeContent(Element elem, boolean needsIndenting) throws IOException , BadLocationException
IOException
- 입출력 에러가 발생했을 경우
BadLocationException
- pos 가 문서내의
무효인 위치를 나타내는 경우protected void writeHTMLTags(AttributeSet attr) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void writeNonHTMLAttributes(AttributeSet attr) throws IOException
IOException
- 입출력 에러가 발생했을 경우protected boolean inFontTag()
protected void endFontTag() throws IOException
<font> 태그용의 종료 태그를 써냅니다.
IOException
- 입출력 에러가 발생했을 경우protected void startFontTag(String style) throws IOException
<font> 태그용의 개시 태그를 써냅니다. 폰트 태그는 상자로 할 수 없기 때문에, 새로운 개시 태그를 써내기 전에, 폰트 태그의 포위를 클로즈 합니다.
IOException
- 입출력 에러가 발생했을 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.