|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.text.StringContent
public final class StringContent
ºñ±³Àû ÀÛÀº ¹®¼ ¹× µð¹ö±×¿¡´Â Æí¸®ÇÑ, °ÇàÀÎ ±¸ÇöÀÎ AbstractDocument.Content ÀÎÅÍÆäÀ̽ºÀÇ ±¸ÇöÀÔ´Ï´Ù. À̰ÍÀº ¹®ÀÚ ÄÁÅÙÃ÷¸¦ ´Ü¼øÇÑ ¹®ÀÚ ¹è¿·Î¼ °ü¸®ÇÕ´Ï´Ù. À̰͵µ È¿À²ÀûÀÌ ¾Æ´Õ´Ï´Ù.
´ë½Å¿¡ °¸ ¹öÆÛ ¶Ç´Â ºÎºÐ Å×À̺íÀÇ ±¸ÇöÀ» »ç¿ëÇÏ´Â °ÍÀ» ÃßõÇÕ´Ï´Ù. ÀÌ ¹öÆÛ´Â »çÀÌÁî°¡ Ä¿ÁöÁö ¾Ê½À´Ï´Ù.
°æ°í: ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ µÈ °´Ã¼´Â ÇâÈÄÀÇ Swing ¸±¸®Áî¿Í
ȣȯµÇÁö ¾ÊÀ» ¿¹Á¤ÀÔ´Ï´Ù. ÇöÀçÀÇ Á÷·ÄÈÀÇ Áö¿øÀº
´Ü±â°£ÀÇ ¿î¿ëÀ̳ª, °°Àº ¹öÀüÀÇ Swing¸¦ ½ÇÇàÇÏ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI¿¡ ÀûÀýÇϰí ÀÖ½À´Ï´Ù. JDK ¹öÀü
1.4 ÀÌÈÄ, ¸ðµç JavaBeans™
Àå±â°£ÀÇ ¿î¿ë Áö¿øÀº
java.beans
ÆÐŰÁö¿¡ Ãß°¡µÇ°í ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº XMLEncoder
¸¦
ÂüÁ¶ÇϽʽÿÀ.
»ý¼ºÀÚ °³¿ä | |
---|---|
StringContent ()
»õ·Î¿î StringContent °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
|
StringContent (int initialLength)
ÁöÁ¤µÈ Ãʱ⠻çÀÌÁî·Î »õ·Î¿î StringContent °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
Position |
createPosition (int offset)
ÄÁÅÙÃ÷°¡ º¯°æµÇ¾úÀ» ¶§¿¡ º¯°æÀ» ÃßÀûÇÏ´Â ÄÁÅÙÃ÷³»ÀÇ À§Ä¡¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
void |
getChars (int where,
int len,
Segment chars)
ÄÁÅÙÃ÷ÀÇ ÀϺθ¦ ²¨³À´Ï´Ù. |
protected Vector |
getPositionsInRange (Vector v,
int offset,
int length)
offset ~ offset + length
¹üÀ§¿¡ ÀÖ´Â À§Ä¡¿¡ ´ëÀÀÇÏ´Â UndoPosRef
ÀνºÅϽº¸¦ Æ÷ÇÔÇÑ º¤Å͸¦ ¸®ÅÏÇÕ´Ï´Ù. |
String |
getString (int where,
int len)
ÄÁÅÙÃ÷ÀÇ ÀϺθ¦ ²¨³À´Ï´Ù. |
UndoableEdit |
insertString (int where,
String str)
ÄÁÅÙÃ÷¿¡ ij¸¯ÅÍ ¶óÀÎÀ» »ðÀÔÇÕ´Ï´Ù. |
int |
length ()
ÄÁÅÙÃ÷ÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù. |
UndoableEdit |
remove (int where,
int nitems)
ÄÁÅÙÃ÷ÀÇ ÀϺθ¦ »èÁ¦ÇÕ´Ï´Ù. |
protected void |
updateUndoPositions (Vector positions)
positions
¸ðµç UndoPosRef ÀνºÅϽºÀÇ À§Ä¡¸¦ ¸®¼Â ÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public StringContent()
public StringContent(int initialLength)
initialLength
- Ãʱ⠻çÀÌÁî¸Þ¼µåÀÇ »ó¼¼ |
---|
public int length()
AbstractDocument.Content
³»ÀÇ length
AbstractDocument.Content.length()
public UndoableEdit insertString(int where, String str) throws BadLocationException
AbstractDocument.Content
³»ÀÇ insertString
where
- °³½Ã À§Ä¡ >= 0 && < length()str
- »ðÀÔÇÏ´Â null ÀÌ¿ÜÀÇ Ä³¸¯ÅÍ ¶óÀÎ
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ ¹«È¿ÀÎ °æ¿ìAbstractDocument.Content.insertString(int, java.lang.String)
public UndoableEdit remove(int where, int nitems) throws BadLocationException
AbstractDocument.Content
³»ÀÇ remove
where
- °³½Ã À§Ä¡ >= 0nitems
- »èÁ¦ ´ë»óÀÇ ¹®ÀÚ¼ö >= 0
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ ¹«È¿ÀÎ °æ¿ìAbstractDocument.Content.remove(int, int)
public String getString(int where, int len) throws BadLocationException
AbstractDocument.Content
³»ÀÇ getString
where
- °³½Ã À§Ä¡ >= 0len
- ²¨³»´Â ±æÀÌ >= 0
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ ¹«È¿ÀÎ °æ¿ìAbstractDocument.Content.getString(int, int)
public void getChars(int where, int len, Segment chars) throws BadLocationException
AbstractDocument.Content
³»ÀÇ getChars
where
- °³½Ã À§Ä¡ >= 0len
- °Ë»ö ´ë»óÀÇ ¹®ÀÚ¼ö >= 0chars
- ¹®ÀÚ¸¦ µ¹·ÁÁÖ´Â ¾ÕÀÇ Segment °´Ã¼BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ ¹«È¿ÀÎ °æ¿ìAbstractDocument.Content.getChars(int, int, javax.swing.text.Segment)
public Position createPosition(int offset) throws BadLocationException
AbstractDocument.Content
³»ÀÇ createPosition
offset
- À§Ä¡¸¦ ÀÛ¼ºÇÏ´Â ¿ÀÇÁ¼Â(offset) >= 0
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ ¹«È¿ÀÎ °æ¿ìprotected Vector getPositionsInRange(Vector v, int offset, int length)
offset
~ offset
+ length
¹üÀ§¿¡ ÀÖ´Â À§Ä¡¿¡ ´ëÀÀÇÏ´Â UndoPosRef
ÀνºÅϽº¸¦ Æ÷ÇÔÇÑ º¤Å͸¦ ¸®ÅÏÇÕ´Ï´Ù. v
°¡ nullÀÌ ¾Æ´Ñ °æ¿ì, ÀÏÄ¡ÇÏ´Â À§°ªÀÌ °Å±â¿¡ ¹èÄ¡µË´Ï´Ù. °á°úÀÇ À§Ä¡¸¦ °¡Áö´Â º¤ÅͰ¡ ¸®Åϵ˴ϴÙ
.
À̰ÍÀº ³»ºÎ¿¡¼ÀÇ »ç¿ëÀ» ¸ñÀûÀ¸·Î Çϰí ÀÖ¾î, ÀϹÝÀûÀ¸·Î´Â ¼ºê Ŭ·¡½º¸¦ ´ë»óÀ¸·Î Çϰí ÀÖÁö ¾Ê½À´Ï´Ù.
v
- »ç¿ëÇÏ´Â º¤ÅÍ. nullÀÎ °æ¿ì´Â »õ·Î¿î º¤ÅͰ¡ ÀÛ¼ºµÇ´Âoffset
- °³½Ã ¿ÀÇÁ¼Â(offset) >= 0length
- ±æÀÌ >= 0
protected void updateUndoPositions(Vector positions)
positions
¸ðµç UndoPosRef ÀνºÅϽºÀÇ À§Ä¡¸¦ ¸®¼Â ÇÕ´Ï´Ù.
À̰ÍÀº ³»ºÎ¿¡¼ÀÇ »ç¿ëÀ» ¸ñÀûÀ¸·Î Çϰí ÀÖ¾î, ÀϹÝÀûÀ¸·Î´Â ¼ºê Ŭ·¡½º¸¦ ´ë»óÀ¸·Î Çϰí ÀÖÁö ¾Ê½À´Ï´Ù.
positions
- ÀνºÅϽºÀÇ À§Ä¡
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.