|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--javax.swing.text.AbstractDocument | +--javax.swing.text.DefaultStyledDocument
RTF (Rich Text Format)¿¡ À¯»çÇÑ ¹æ½ÄÀ» »ç¿ëÇØ, ÀÚü³ª ´Ü¶ô ¼½ÄÀ» ¸¶Å© ¿Ã¶ó°¥ ¼ö ÀÖ´Â ¹®¼ÀÔ´Ï´Ù. ÀÌ ¹®¼ÀÇ ¿ä¼Ò ±¸Á¶´Â ½ºÅ¸ÀÏ ·±ÀÇ ½ºÅ¸ÀÏÀÇ Æí¼ºÀ» ³ªÅ¸³À´Ï´Ù. ÀÌ·¯ÇÑ ½ºÅ¸ÀÏ ·±Àº ´Ü¶ô ¿ä¼ÒÀÇ ±¸Á¶ (´Ù¸¥ ±¸Á¶¿¡ ÀúÀåµÇ°í ÀÖ´Â °æ¿ìµµ ÀÖ¾î)¿¡ ´ëÀÀ ºÙÀÏ ¼ö ÀÖ½À´Ï´Ù. ³í¸® ¼½ÄÀÌ ´Ü¶ô °æ°è·Î ÁöÁ¤µÇ°í ÀÖÀ¸¹Ç·Î, ½ºÅ¸ÀÏ ·±Àº ´Ü¶ô °æ°è¿¡¼ ºÐÇҵ˴ϴÙ.
°æ°í:
ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ µÈ ¿ÀºêÁ§Æ®´Â ÇâÈÄÀÇ Swing ÀÇ ¸±¸®½º¿Í´Â ȣȯ¼ºÀ» °¡ÁöÁö ¾Ê½À´Ï´Ù. ÇöÀçÀÇ Á÷·ÄÈ ¼Æ÷Æ®´Â ´Ü±â°£ÀÇ ¿î¿ëÀ̳ª, °°Àº ¹öÁ¯ÀÇ Swing ¸¦ ½ÇÇàÇÏ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI ¿¡ ÀûÀýÇϰí ÀÖ½À´Ï´Ù. 1.4 ¿¡¼´Â ¸ðµç JavaBeansTM ÀÇ Àå±â ¿î¿ë ¼Æ÷Æ®°¡, java.beans
ÆÐŰÁö¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù. XMLEncoder
¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
Document
,
AbstractDocument
ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä | |
static class |
DefaultStyledDocument.AttributeUndoableEdit
UndoableEdit ´Â Element ÀÇ AttributeSet ¿¡ ´õÇØÁø º¯°æÀ» ±â¾ïÇϱâ À§Çؼ »ç¿ëÇÕ´Ï´Ù. |
class |
DefaultStyledDocument.ElementBuffer
¿ä¼ÒÀÇ °èÃþ¿¡ ´ëÇÑ º¯°æÀ» °ü¸®Çϴ Ŭ·¡½ºÀÔ´Ï´Ù. |
static class |
DefaultStyledDocument.ElementSpec
¿ä¼Ò¸¦ ±¸ÃàÇÏ´Â ±¸ÇöÀÔ´Ï´Ù. |
protected class |
DefaultStyledDocument.SectionElement
¹®¼ÀÇ µðÆúÆ® ·çÆ® ¿ä¼Ò·Î, Æ÷ÇԵǴ ´Ü¶ôÀ̳ª ÇàÀ» ¸ÅÇÎ ÇÕ´Ï´Ù. |
Ŭ·¡½º javax.swing.text. AbstractDocument À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º |
AbstractDocument.AttributeContext , AbstractDocument.Content , AbstractDocument.DefaultDocumentEvent , AbstractDocument.ElementEdit , AbstractDocument.LeafElement |
ÇʵåÀÇ °³¿ä | |
protected DefaultStyledDocument.ElementBuffer |
buffer
|
static int |
BUFFER_SIZE_DEFAULT
Ãʱâ ÄÁÅÙÃ÷ ¹öÆÛÀÇ µðÆúÆ® »çÀÌÁîÀÔ´Ï´Ù. |
Ŭ·¡½º javax.swing.text. AbstractDocument ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
BAD_LOCATION , BidiElementName , ContentElementName , ElementNameAttribute , listenerList , ParagraphElementName , SectionElementName |
ÀÎÅÍÆäÀ̽º javax.swing.text. Document ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
StreamDescriptionProperty , TitleProperty |
»ý¼ºÀÚÀÇ °³¿ä | |
DefaultStyledDocument ()
µðÆúÆ®ÀÇ ¼½Ä ÷ºÎ ¹®¼¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
DefaultStyledDocument (AbstractDocument.Content c,
StyleContext styles)
¼½Ä ÷ºÎ ¹®¼¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
DefaultStyledDocument (StyleContext styles)
µðÆúÆ®ÀÇ ÄÁÅÙÃ÷ ±â¾ï¿ªÀÇ ±¸Çö°ú ¼½ÄÀÇ °øÀ¯ ¼¼Æ®¸¦ »ç¿ëÇØ, ¼½Ä ÷ºÎ ¹®¼¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
void |
addDocumentListener (DocumentListener listener)
¹®¼ ûÃëÀÚ¸¦ Ãß°¡ÇØ, º¯°æÀÌ ÀÖ¾úÀ» ¶§¿¡ ÅëÁöµÇµµ·Ï(µíÀÌ) ÇÕ´Ï´Ù. |
Style |
addStyle (String nm,
Style parent)
³í¸® ¼½Ä °èÃþ¿¡ »õ·Î¿î ¼½ÄÀ» Ãß°¡ÇÕ´Ï´Ù. |
protected void |
create (DefaultStyledDocument.ElementSpec [] data)
¹®¼¸¦ ÃʱâÈÇØ, ÁöÁ¤µÈ ¿ä¼Ò ±¸Á¶ ( getDefaultRootElement ¸Þ¼Òµå¿¡ ÀÇÇØ º¸°íµÇ´Â ±¸Á¶)¸¦ ¹Ý¿µÇÕ´Ï´Ù. |
protected AbstractDocument.AbstractElement |
createDefaultRoot ()
µðÆúÆ®ÀÇ ¹®¼ ±¸Á¶¸¦ ³ªÅ¸³»±â À§Çؼ(¶§¹®¿¡) »ç¿ëÇÏ´Â ·çÆ® ¿ä¼Ò¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
Color |
getBackground (AttributeSet attr)
¼Ó¼º ¼¼Æ®·ÎºÎÅÍ ¹é±×¶ó¿îµå Ä®¶ó¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Element |
getCharacterElement (int pos)
À§Ä¡¿¡ ±Ù°ÅÇØ ij¸¯ÅÍ ¿ä¼Ò¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Element |
getDefaultRootElement ()
µðÆúÆ®ÀÇ ·çÆ® ¿ä¼Ò¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Font |
getFont (AttributeSet attr)
¼Ó¼º ¼¼Æ®·ÎºÎÅÍ ÆùÆ®¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Color |
getForeground (AttributeSet attr)
¼Ó¼º ¼¼Æ®·ÎºÎÅÍ foreground Ä®¶ó¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Style |
getLogicalStyle (int p)
ÁöÁ¤µÈ À§Ä¡¿¡ ÀÇÇØ ³ªÅ¸³»Áø ´Ü¶ô¿¡ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ³í¸® ¼½ÄÀ» ²¨³À´Ï´Ù. |
Element |
getParagraphElement (int pos)
¿ÀÇÁ¼Â(offset) pos ÀÇ ´Ü¶ôÀÇ ¿ä¼Ò¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Style |
getStyle (String nm)
ÀÌÀü¿¡ Ãß°¡µÈ À̸§ ÷ºÎ ¼½ÄÀ» ²¨³À´Ï´Ù. |
Enumeration |
getStyleNames ()
¼½Ä¸íÀÇ ¸®½ºÆ®¸¦ ²¨³À´Ï´Ù. |
protected void |
insert (int offset,
DefaultStyledDocument.ElementSpec [] data)
»õ·Î¿î ¿ä¼Ò¸¦ ÀϰýÇØ »ðÀÔÇÕ´Ï´Ù. |
protected void |
insertUpdate (AbstractDocument.DefaultDocumentEvent chng,
AttributeSet attr)
ÅØ½ºÆ®ÀÇ »ðÀÔ¿¡ ÀÀÇØ ¹®¼¸¦ °»½ÅÇÕ´Ï´Ù. |
void |
removeDocumentListener (DocumentListener listener)
ûÃëÀÚ¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
removeStyle (String nm)
ÀÌÀü¿¡ ¹®¼¿¡ Ãß°¡µÈ À̸§ ÷ºÎ ¼½ÄÀ» »èÁ¦ÇÕ´Ï´Ù. |
protected void |
removeUpdate (AbstractDocument.DefaultDocumentEvent chng)
ÅØ½ºÆ® »èÁ¦ÀÇ °á°ú·Î¼ ¹®¼ ±¸Á¶¸¦ °»½ÅÇÕ´Ï´Ù. |
void |
setCharacterAttributes (int offset,
int length,
AttributeSet s,
boolean replace)
¹®¼ÀÇ ÀϺο¡ ¼Ó¼ºÀ» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setLogicalStyle (int pos,
Style s)
ÁöÁ¤µÈ À§Ä¡ÀÇ ´Ü¶ô¿¡ »ç¿ëÇÏ´Â ³í¸® ¼½ÄÀ» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setParagraphAttributes (int offset,
int length,
AttributeSet s,
boolean replace)
´Ü¶ô¿¡ ¼Ó¼ºÀ» ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
styleChanged (Style style)
ÀÌ ¹®¼ÀÇ ¼½ÄÀÌ º¯°æµÇ¾úÀ» ¶§¿¡ ºÒ·Á °©´Ï´Ù. |
Ŭ·¡½º javax.swing.text. AbstractDocument ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
addUndoableEditListener , createBranchElement , createLeafElement , createPosition , dump , fireChangedUpdate , fireInsertUpdate , fireRemoveUpdate , fireUndoableEditUpdate , getAsynchronousLoadPriority , getAttributeContext , getBidiRootElement , getContent , getCurrentWriter , getDocumentFilter , getDocumentListeners , getDocumentProperties , getEndPosition , getLength , getListeners , getProperty , getRootElements , getStartPosition , getText , getText , getUndoableEditListeners , insertString , postRemoveUpdate , putProperty , readLock , readUnlock , remove , removeUndoableEditListener , render , replace , setAsynchronousLoadPriority , setDocumentFilter , setDocumentProperties , writeLock , writeUnlock |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
ÀÎÅÍÆäÀ̽º javax.swing.text. Document ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
addUndoableEditListener , createPosition , getEndPosition , getLength , getProperty , getRootElements , getStartPosition , getText , getText , insertString , putProperty , remove , removeUndoableEditListener , render |
ÇʵåÀÇ »ó¼¼ |
public static final int BUFFER_SIZE_DEFAULT
protected DefaultStyledDocument.ElementBuffer buffer
»ý¼ºÀÚÀÇ »ó¼¼ |
public DefaultStyledDocument(AbstractDocument.Content c, StyleContext styles)
c
- ÄÁÅÙÃ÷ÀÇ ÄÁÅ×À̳Êstyles
- ¹®¼°£¿¡ °øÀ¯ÇÒ ¼ö ÀÖ´Â ¸®¼Ò½º¿Í ¼½Ä Á¤ÀÇpublic DefaultStyledDocument(StyleContext styles)
styles
- ½ºÅ¸ÀÏpublic DefaultStyledDocument()
¸Þ¼ÒµåÀÇ »ó¼¼ |
public Element getDefaultRootElement()
Document
³»ÀÇ getDefaultRootElement
AbstractDocument
³»ÀÇ getDefaultRootElement
Document.getDefaultRootElement()
protected void create(DefaultStyledDocument.ElementSpec [] data)
getDefaultRootElement
¸Þ¼Òµå¿¡ ÀÇÇØ º¸°íµÇ´Â ±¸Á¶)¸¦ ¹Ý¿µÇÕ´Ï´Ù. ¹®¼°¡ ÇϵîÀÇ µ¥ÀÌÅ͸¦ º¸°ü À¯ÁöÇϰí ÀÖ´Â °æ¿ì, ±×°ÍÀÌ ÃÖÃÊ·Î »èÁ¦µË´Ï´Ù.
protected void insert(int offset, DefaultStyledDocument.ElementSpec [] data) throws BadLocationException
ÀÌ ¸Þ¼Òµå´Â thread ¼¼ÀÌÇÁÀÔ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼Òµå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
offset
- °³½Ã ¿ÀÇÁ¼Â(offset) >= 0data
- ¿ä¼Ò µ¥ÀÌÅÍ
BadLocationException
- °³½Ã ¿ÀÇÁ¼Â(offset)°¡ ¹«È¿ÀÎ °æ¿ìpublic Style addStyle(String nm, Style parent)
StyledDocument
³»ÀÇ addStyle
nm
- ¼½ÄÀÇ À̸§. ÀÌ À̸§Àº À̸§ ÷ºÎ ¼½ÄÀÇ ÄÝ·º¼Ç Áß(¾È)¿¡¼ ÀÏÀǰ¡ ¾Æ´Ï¸é ¾ÈµÈ´Ù. À̸§Àº ¼½Ä¿¡ À̸§ÀÌ ºÙÁö ¾ÊÀº °æ¿ì´Â null µµ °¡´ÉÇÏÁö¸¸, È£ÃâÃøÀº À̸§ÀÌ ¾ø´Â ¼½ÄÀÌ À̸§À¸·Î ÃëµæÇÒ ¼ö ¾ø´Â °æ¿ì¿¡ µ¹·ÁÁÖ¾îÁö´Â ÂüÁ¶¸¦ °ü¸®ÇØ¾ß ÇÑ´Ù. À̸§ÀÌ ¾ø´Â ¼½ÄÀº ½ºÅ¸ÀÏ ·±À¸·Î º¼ ¼ö ÀÖ´Â °Í °°Àº ij¸¯ÅÍ ¼Ó¼ºÀÇ ¿À¹ö¶óÀ̵å(override)µîÀ¸·Î Æí¸®ÇÑ °æ¿ì°¡ ÀÖ´Âparent
- Ä£¼½Ä. ÁöÁ¤µÇ¾î ÀÖÁö ¾ÊÀº ¼Ó¼ºÀÌ ´Ù¸¥ ¼½Ä¿¡¼ ÇØ¼® ó¸®µÉ Çʿ䰡 ¾ø´Â °æ¿ì´Â null µµ °¡´É
public void removeStyle(String nm)
StyledDocument
³»ÀÇ removeStyle
nm
- »èÁ¦µÇ´Â ¼½ÄÀÇ À̸§public Style getStyle(String nm)
StyledDocument
³»ÀÇ getStyle
nm
- ¼½ÄÀÇ À̸§
public Enumeration getStyleNames()
public void setLogicalStyle(int pos, Style s)
ÀÌ ¸Þ¼Òµå´Â thread ¼¼ÀÌÇÁÀÔ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼Òµå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
StyledDocument
³»ÀÇ setLogicalStyle
pos
- ¹®¼ÀÇ ¼±µÎ·ÎºÎÅÍÀÇ ¿ÀÇÁ¼Â(offset) >= 0s
- ´Ü¶ô¿¡ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ³í¸® ¼½Ä. ¾ø´Â °æ¿ì´Â nullpublic Style getLogicalStyle(int p)
StyledDocument
³»ÀÇ getLogicalStyle
p
- ´Ü¶ôÀ¸·Î º¯È¯ÇØ, ÇÒ´çÇÏ´Â ³í¸® ¼½ÄÀ» ÁöÁ¤ÇÏ´Â À§Ä¡ >= 0. À̰ÍÀº ¹®¼ÀÇ ¼±µÎ·ÎºÎÅÍÀÇ ¿ÀÇÁ¼Â(offset)
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
ÀÌ ¸Þ¼Òµå´Â thread ¼¼ÀÌÇÁÀÔ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼Òµå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
StyledDocument
³»ÀÇ setCharacterAttributes
offset
- ¹®¼ÀÇ ¿ÀÇÁ¼Â(offset) >= 0length
- ±æÀÌ >= 0s
- ¼Ó¼ºreplace
- »õ·Î¿î ¼Ó¼ºÀÇ ¼³Á¤Àü¿¡ Á¾·¡ÀÇ ¼Ó¼ºÀ» ġȯÇÒ Çʿ䰡 ÀÖ´Â °æ¿ì´Â truepublic void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
ÀÌ ¸Þ¼Òµå´Â thread ¼¼ÀÌÇÁÀÔ´Ï´Ù¸¸, ´ëºÎºÐÀÇ Swing ¸Þ¼Òµå´Â ´Ù¸¨´Ï´Ù. ÀÚ¼¼ÇÑ °ÍÀº ¡¸Threads and Swing¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
StyledDocument
³»ÀÇ setParagraphAttributes
offset
- ´Ü¶ô¿¡ ´ëÇÑ ¿ÀÇÁ¼Â(offset) >= 0length
- ¿µÇâÀ» ¹Þ´Â ij¸¯Åͼö >= 0s
- ¼Ó¼ºreplace
- ±âÁ¸ÀÇ ¼Ó¼ºÀ» ġȯÇÏ´ÂÁö merge ÇÒ±îpublic Element getParagraphElement(int pos)
pos
ÀÇ ´Ü¶ôÀÇ ¿ä¼Ò¸¦ µ¹·ÁÁÝ´Ï´Ù. 1 °³ÀÇ ´Ü¶ôÀº Àû¾îµµ 1 krÀÇ, Åë»óÀº ÀÙÀÎ ¾ÆÀÌÀÇ Element ·ÎºÎÅÍ ±¸¼ºµÇ¾î ÀÖ½À´Ï´Ù.
StyledDocument
³»ÀÇ getParagraphElement
AbstractDocument
³»ÀÇ getParagraphElement
pos
- °³½Ã ¿ÀÇÁ¼Â(offset) >= 0
public Element getCharacterElement(int pos)
StyledDocument
³»ÀÇ getCharacterElement
pos
- ¹®¼ÀÇ À§Ä¡ >= 0
protected void insertUpdate(AbstractDocument.DefaultDocumentEvent chng, AttributeSet attr)
AbstractDocument
³»ÀÇ insertUpdate
chng
- ¹®¼ º¯°æÀÇ ¼³¸íattr
- ¼Ó¼ºprotected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng)
AbstractDocument
³»ÀÇ removeUpdate
chng
- ¹®¼ º¯°æÀÇ ¼³¸íprotected AbstractDocument.AbstractElement createDefaultRoot()
public Color getForeground(AttributeSet attr)
StyledDocument
³»ÀÇ getForeground
attr
- ¼Ó¼º ¼¼Æ®
public Color getBackground(AttributeSet attr)
StyledDocument
³»ÀÇ getBackground
attr
- ¼Ó¼º ¼¼Æ®
public Font getFont(AttributeSet attr)
StyledDocument
³»ÀÇ getFont
attr
- ¼Ó¼º ¼¼Æ®
protected void styleChanged(Style style)
style
- º¯°æµÈ Stylepublic void addDocumentListener(DocumentListener listener)
Document
³»ÀÇ addDocumentListener
AbstractDocument
³»ÀÇ addDocumentListener
listener
- ûÃëÀÚDocument.addDocumentListener(javax.swing.event.DocumentListener)
public void removeDocumentListener(DocumentListener listener)
Document
³»ÀÇ removeDocumentListener
AbstractDocument
³»ÀÇ removeDocumentListener
listener
- ûÃëÀÚDocument.removeDocumentListener(javax.swing.event.DocumentListener)
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
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.