|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.text.AbstractWriter
public abstract class AbstractWriter
AbstractWriter´Â ¼Ó¼ºÀ» Æ÷ÇÔÇÑ ¿ä¼Ò Æ®¸®¸¦ ½ÇÁ¦·Î ½á³»´Â Ãß»ó Ŭ·¡½ºÀÔ´Ï´Ù. 1 Çà ´ç¿¡ ½á³»´Â ¹®ÀÚ¼öÀÇ µðÆúÆ®´Â 100 ÀÔ´Ï´Ù. ´Ù¸¸, ÀÌ °ªÀº ¼ºê Ŭ·¡½º¿¡¼ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù .
ÇÊµå °³¿ä | |
---|---|
protected static char |
NEWLINE
ÅØ½ºÆ® ÆÐŰÁö ¸ðµ¨ÀÇ °³Çà¹ýÀÔ´Ï´Ù. |
»ý¼ºÀÚ °³¿ä | |
---|---|
protected |
AbstractWriter (Writer w,
Document doc)
»õ·Î¿î AbstractWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected |
AbstractWriter (Writer w,
Document doc,
int pos,
int len)
»õ·Î¿î AbstractWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected |
AbstractWriter (Writer w,
Element root)
»õ·Î¿î AbstractWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected |
AbstractWriter (Writer w,
Element root,
int pos,
int len)
»õ·Î¿î AbstractWriter¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
protected void |
decrIndent ()
Àε§Æ® ·¹º§À» ÁÙÀÔ´Ï´Ù. |
protected boolean |
getCanWrapLines ()
ÇàÀÌ ·¦ °¡´ÉÇѰ¡ ¾î¶²°¡¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getCurrentLineLength ()
ÇöÀçÀÇ ÇàÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected Document |
getDocument ()
¹®¼¸¦ ²¨³À´Ï´Ù. |
protected ElementIterator |
getElementIterator ()
ElementIterator¸¦ ²¨³À´Ï´Ù. |
int |
getEndOffset ()
Ãâ·Â ´ë»óÀÇ ¸¶Áö¸· ¿ÀÇÁ¼Â(offset)¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getIndentLevel ()
ÇöÀçÀÇ Àε§Æ® ·¹º§À» ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getIndentSpace ()
Àε§Æ® ÇÏ´Â ½ºÆäÀ̽ºÀÇ ¾çÀ» ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getLineLength ()
ÇàÀÇ ±æÀÌÀÇ ÃÖ´ë°ªÀ» ¸®ÅÏÇÕ´Ï´Ù. |
String |
getLineSeparator ()
°³ÇàÀ» ³ªÅ¸³¾ ¶§ »ç¿ëÇϴ ij¸¯ÅÍ ¶óÀÎÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
getStartOffset ()
Ãâ·Â ´ë»óÀÇ ÃÖÃÊÀÇ ¿ÀÇÁ¼Â(offset)¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected String |
getText (Element elem)
¿ä¼Ò¿¡ °ü·ÃÇÑ ÅØ½ºÆ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected Writer |
getWriter ()
ÄÁÅÙÃ÷¸¦ Ãâ·ÂÇÒ °æ¿ì¿¡ »ç¿ëÇÑ ¶óÀÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected void |
incrIndent ()
Àε§Æ® ·¹º§À» ÁõºÐ ÇÕ´Ï´Ù. |
protected void |
indent ()
Àε§Æ®¸¦ ½Ç½ÃÇÕ´Ï´Ù. |
protected boolean |
inRange (Element next)
ÀÌ ¸Þ¼µå´Â ÇöÀçÀÇ ¿ä¼Ò°¡ ÁöÁ¤µÈ ¹üÀ§³»¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
protected boolean |
isLineEmpty ()
ÇöÀçÀÇ ÇàÀÇ ±æÀ̰¡ ºñ¾îÀÖ´Â °æ¿ì´Â true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected void |
output (char[] content,
int start,
int length)
ÄÁÅÙÃ÷ Ãâ·Â½ÃÀÇ ¸¶Áö¸· Á¤ÁöÀÔ´Ï´Ù. |
protected void |
setCanWrapLines (boolean newValue)
ÇàÀ» ·¦ ÇÒ ¼ö ÀÖÀ»Áö ¾î¶³Áö¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
setCurrentLineLength (int length)
ÇöÀçÀÇ ÇàÀÇ ±æÀ̸¦ ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
setIndentSpace (int space)
Àε§Æ®¿¡ ¸ÅÇÎ ÇÏ´Â ½ºÆäÀ̽ºÀÇ ¼ö¸¦ ¼ºê Ŭ·¡½º·ÎºÎÅÍ ÁöÁ¤ÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
protected void |
setLineLength (int l)
1 Çà ±Ùó¿¡ Ãâ·ÂÇÒ ¼ö ÀÖ´Â ¹®ÀÚ¼ö¸¦ ¼ºê Ŭ·¡½º·ÎºÎÅÍ ¼³Á¤ÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. |
void |
setLineSeparator (String value)
°³ÇàÀ» ³ªÅ¸³¾ ¶§ »ç¿ëÇÏ´Â String¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
text (Element elem)
ÅØ½ºÆ®¸¦ ½á³À´Ï´Ù. |
protected abstract void |
write ()
ÀÌ Ãß»ó ¸Þ¼µå´Â ¼ºê Ŭ·¡½º¿¡ ÀÇÇØ ±¸ÇöµÉ Çʿ䰡 ÀÖ½À´Ï´Ù. |
protected void |
write (char ch)
¹®ÀÚ¸¦ ½á³À´Ï´Ù. |
protected void |
write (char[] chars,
int startIndex,
int length)
¸ðµç ¼µÎ ¸Þ¼µå´Â À̰ÍÀ» È£ÃâÇÕ´Ï´Ù. |
protected void |
write (String content)
ij¸¯ÅÍ ¶óÀÎÀ» ½á³À´Ï´Ù. |
protected void |
writeAttributes (AttributeSet attr)
¼Ó¼º ¼¼Æ®¸¦ "<À̸§>=<°ª>" Æä¾î·Î¼ ½á³À´Ï´Ù. |
protected void |
writeLineSeparator ()
Çà ´Ü¶ô ¹®ÀÚ¸¦ ½á³À´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
protected static final char NEWLINE
getLineSeparator()
,
Á¤¼ö Çʵ尪 »ý¼ºÀÚ »ó¼¼ |
---|
protected AbstractWriter(Writer w, Document doc)
w
- Writerdoc
- Documentprotected AbstractWriter(Writer w, Document doc, int pos, int len)
w
- Writerdoc
- Elementpos
- ÄÁÅÙÃ÷¸¦ ¾ò´Â ¹®¼³»ÀÇ À§Ä¡len
- ½á³»´Â ¾çprotected AbstractWriter(Writer w, Element root)
w
- Writerroot
- Elementprotected AbstractWriter(Writer w, Element root, int pos, int len)
w
- Writerroot
- Elementpos
- ÄÁÅÙÃ÷¸¦ ¾ò´Â ¹®¼³»ÀÇ À§Ä¡len
- ½á³»´Â ¾ç¸Þ¼µåÀÇ »ó¼¼ |
---|
public int getStartOffset()
public int getEndOffset()
protected ElementIterator getElementIterator()
protected Writer getWriter()
protected Document getDocument()
protected boolean inRange(Element next)
next
- Element
protected abstract void write() throws IOException, BadLocationException
IOException
BadLocationException
protected String getText(Element elem) throws BadLocationException
elem
- Element
String
·Î¼ÀÇ
ÅØ½ºÆ®
BadLocationException
- pos°¡ ¹®¼³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ìprotected void text(Element elem) throws BadLocationException, IOException
elem
- Element
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
BadLocationException
- pos°¡ ¹®¼³»ÀÇ ¹«È¿ÀÎ À§Ä¡¸¦ ³ªÅ¸³»´Â °æ¿ìprotected void setLineLength(int l)
l
- ÇàÀÇ ±æÀÌÀÇ ÃÖ´ë°ª
protected int getLineLength()
protected void setCurrentLineLength(int length)
protected int getCurrentLineLength()
protected boolean isLineEmpty()
getCurrentLineLength
== 0 || indent
ÀÌ ºñ¾îÀÖ´Â Çà»ó¿¡¼ ºÒ·Á °¬À» °æ¿ì¿¡´Â true ÀÔ´Ï´Ù.
protected void setCanWrapLines(boolean newValue)
protected boolean getCanWrapLines()
protected void setIndentSpace(int space)
space
- Àε§Æ®¿¡ ¸ÅÇÎ ÇÏ´Â ½ºÆäÀ̽º¸¦ ³ªÅ¸³»´Â int°ª
protected int getIndentSpace()
public void setLineSeparator(String value)
public String getLineSeparator()
protected void incrIndent()
getLineLength()
º¸´Ù Ä¿Áö´Â °Í °°Àº getIndentSpace()
* getIndentLevel()
°¡ µÇ¸é Àε§Æ® ÇÏÁö ¾Ê½À´Ï´Ù.
protected void decrIndent()
protected int getIndentLevel()
incrIndent
ÀÌ ºÒ·Á °£ ȸ¼ö·ÎºÎÅÍ decrIndent
ÀÌ ºÒ·Á °£ ȸ¼ö¸¦ ´ç±ä ¼öÀÔ´Ï´Ù.
protected void indent() throws IOException
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected void write(char ch) throws IOException
write
¸Þ¼µå¸¦ È£ÃâÇÒ ¶§ ±¸ÇöµË´Ï´Ù.
ch
- char
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected void write(String content) throws IOException
write
¸Þ¼µå¸¦ È£ÃâÇÒ ¶§ ±¸ÇöµË´Ï´Ù.
content
- String
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected void writeLineSeparator() throws IOException
output
¸¦ Á÷Á¢ È£ÃâÇØ, lineLength
¸¦ 0 À¸·Î ¼³Á¤ÇÕ´Ï´Ù.
IOException
protected void write(char[] chars, int startIndex, int length) throws IOException
getCanWrapLines()
°¡ false¸¦ µ¹·ÁÁÖ¸é NEWLINE¸¦ Æ÷ÇÔÇÏÁö ¾Ê´Â chars
°¢ ¼ø¼ ÷ºÎ output
¸¦ È£ÃâÇØ, °è¼ÓµÇ¾î writeLineSeparator
¸¦ È£ÃâÇÕ´Ï´Ù. ÇÑÆí, getCanWrapLines()
°¡ true¸¦ µ¹·ÁÁÖ¸é, Çʿ信 µû¶ó¼ ij¸¯ÅÍ ¶óÀÎÀ» ºÐÇÒÇØ getLineLength
À» ¹Þ½À´Ï´Ù. À¯ÀÏÇÑ ¿¹¿Ü´Â ÇöÀçÀÇ Ä³¸¯ÅÍ ¶óÀο¡ °ø¹éÀÌ Æ÷ÇÔµÇÁö ¾Ê´Â °æ¿ì·Î ÇàÀÇ ±æÀ̰¡ getLineLength
¸¦ ³Ñ±â ¶§¹®¿¡ µé¾î°¡Áö ¾Ê½À´Ï´Ù.
IOException
protected void writeAttributes(AttributeSet attr) throws IOException
attr
- AttributeSet
IOException
- ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected void output(char[] content, int start, int length) throws IOException
write
¸¦ È£ÃâÇÕ´Ï´Ù.
ÀÌ ¸Þ¼µåµµ length
¿¡ ±Ù°ÅÇØ ÇàÀÇ ±æÀ̸¦ °»½ÅÇÕ´Ï´Ù. °³ÇàÀ» Ãâ·ÂÇϱâ À§Çؼ ºÒ·Á°¡
¸é, ÇöÀçÀÇ ÇàÀÇ ±æÀ̸¦ ¸®¼ÂÀÇÇØ ¹«È¿·Î ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ ½ÇÇàÀÌ È£ÃâÇØ Ãø¿¡
ÀÇÁ¸µÈ °æ¿ì´Â writeLineSeparator
¸¦ »ç¿ëÇØ °³ÇàÀ» ½á³», ÇöÀçÀÇ ÇàÀÇ ±æÀÌÀÇ ÇÁ·ÎÆÛƼ¸¦ °»½ÅÇÕ´Ï´Ù.
IOException
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.