|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ¾ÕÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | ÄÚ ½ºÆ®¶óũŸ | ¸Þ¼µå | »ó¼¼: Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | |||||||||
java.lang.Objectjavax.swing.text.GapContent
public class GapContent
emacs°¡ »ç¿ëÇÏ´Â °Í °ú À¯»çÇÑ °¸ ÷ºÎ ¹öÆÛ¸¦ »ç¿ëÇØ ±¸ÇöµÈ AbstractDocument.Content ÀÎÅÍÆäÀ̽ºÀÇ ±¸ÇöÀÔ´Ï´Ù. ±â¾ïµÇ´Â ³»¿ëÀº ¾îµð¿£°¡ °¸À» °¡Áö´Â Unicode ij¸¯ÅÍ ¶óÀÎÀÇ ¹è¿ÀÔ´Ï´Ù. °¸Àº º¯°æÀÇ À§Ä¡¿¡ À̵¿µÇ¹Ç·Î ´ëºÎºÐÀÇ º¯°æÀÌ °°Àº À§Ä¡¿¡ ÀÖ´Â Àå¼Ò¿¡¼ °øÅëÀÇ µ¿ÀÛÀ» ÀÌ¿ëÇÒ ¼ö ÀÖ°Ô µË´Ï´Ù. °¸ °æ°è ±×¸®°í »ý±â´Â º¯°æÀº ÀϹÝÀûÀ¸·Î °£´ÜÇÑ °ÍÀ̹ǷΠ¹è¿ÀÇ ³»¿ëÀ» Á÷Á¢ À̵¿ÇØ º¯°æÀ» Àû¿ëÇÏ´Â °Íº¸´Ùµµ °¸À» À̵¿ÇÏ´Â ÆíÀÌ ½Ã°£ÀÌ µéÁö ¾Ê½À´Ï´Ù.
¶Ç, º¯°æÀ» ÃßÀûÇÏ´Â À§Ä¡¸¦ °ü¸®ÇÏ´Â °Íµµ ÀϹÝÀûÀ¸·Î °£´ÜÇÕ´Ï´Ù. À§Ä¡ÀÇ ±¸Çö (¸¶Å©)´Â ¹è¿ À妽º¸¦ Æ÷ÇÔÇØ, ÇöÀçÀÇ °¸ À§Ä¡·ÎºÎÅÍ ¼ø¼´ë·Î À§Ä¡¸¦ °£´ÜÇÏ°Ô °è»êÇÒ ¼ö ÀÖ½À´Ï´Ù. º¯°æ¿¡¼´Â °¸ÀÇ À̵¿½Ã¿¡ ½Å±¸ °¸ °æ°è°£ÀÇ ¸¶Å©¿¡ ´ëÇÑ °»½Å¸¦ ÇÊ¿ä·Î ÇÒ »ÓÀ̹ǷΠ¸¶Å©ÀÇ °»½ÅÀº ÀϹÝÀûÀ¸·Î ¸Å¿ì °£ÆíÇÕ´Ï´Ù. ¸¶Å©´Â ¼ÒÆ®µÈ »óÅ·ΠÆ÷ÇԵǹǷΠ2 µîºÐ Ž»öÀ¸·Î Àçºü¸£°Ô ã¾Æ³¾ ¼ö ÀÖ½À´Ï´Ù. À̰ÍÀº ¸¶Å©¸¦ Ãß°¡ÇÏ´Â ¼ö°í¸¦ Áõ´ë½ÃŰ´Â ÇÑÆíÀ¸·Î ¸¶Å©ÀÇ °»½ÅÀ» À¯ÁöÇÏ´Â ¼ö°í¸¦ ÁÙÀÔ´Ï´Ù.
| »ý¼ºÀÚ °³¿ä | |
|---|---|
GapContent ()
»õ·Ó´Ù GapContent °´Ã¼¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
|
GapContent (int initialLength)
ÁöÁ¤µÈ Ãʱ⠻çÀÌÁî·Î ½Å ÀÇÇØ ÀÖ°í GapContent °´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù. |
|
| ¸Þ¼µå °³¿ä | |
|---|---|
protected Object |
allocateArray (int len)
Ç׸ñÀ» Æ÷ÇÔÇϱâ À§ÇÑ ÀûÀý ÇüÅÂÀÇ ¹è¿À» ÇÒ´çÇÕ´Ï´Ù. |
Position |
createPosition (int offset)
ÄÁÅÙÃ÷°¡ º¯°æµÇ¾ú´Ù°í ³ª¹«·Î º¯°æÀ» ÃßÀûÇÏ´Â ÄÁÅÙÃ÷³»ÀÇ À§Ä¡¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
protected Object |
getArray ()
¹è¿¿¡ ¾×¼¼½º ÇÕ´Ï´Ù. |
protected int |
getArrayLength ()
ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¹è¿ÀÇ ±æÀ̸¦ ¸®ÅÏÇÕ´Ï´Ù. |
void |
getChars (int where,
int len, Segment chars)
ÄÁÅÙÃ÷ÀÇ ÀϺθ¦ Àâ¾Æ Ãâ ÇÕ´Ï´Ù. |
protected int |
getGapEnd ()
°¸ÀÇ ¸¶Áö¸·¿¡ ¾×¼¼½º ÇÕ´Ï´Ù. |
protected int |
getGapStart ()
°¸ÀÇ ÃÖÃÊ·Î ¾×¼¼½º ÇÕ´Ï´Ù. |
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 |
replace (int position,
int rmSize, Object addItems, int addSize)
±â¾ï ¿µ¿ªÀÇ ÀÓÀÇÀÇ ³í¸® À§Ä¡¸¦ ÀÓÀÇÀÇ »õ·Î¿î Ç׸ñÀ¸·Î ġȯÇÕ´Ï´Ù. |
protected void |
resetMarksAtZero ()
¿ÀÇÁ¼Â(offset)°¡ 0 ÀÇ ¸¶Å©¸¦ ¸ðµÎ ¸®¼Â ÇØ, À妽ºµµ 0 ÀÌ µÇµµ·Ï ÇÕ´Ï´Ù. |
protected void |
shiftEnd (int newSize)
°¸À» È®´ëÇØ, À̰Ϳ¡ º¸´Ù, ÇÊ¿äÇÑ µ¥ÀÌÅ͸¦ À̵¿ÇØ ÀûÀýÇÑ ¸¶Å©¸¦ °»½ÅÇÕ´Ï´Ù. |
protected void |
shiftGap (int newGapStart)
°¸ÀÇ °³½Ã À§Ä¡¸¦ ½ÅÇØ ÀÖ°í À§Ä¡·Î À̵¿ÇÕ´Ï´Ù. |
protected void |
shiftGapEndUp (int newGapEnd)
°¸ÀÇ Á¾´ÜÀ» ÀÂÊ¿¡ Á¶ ÀýÁ¦ÇÕ´Ï´Ù. |
protected void |
shiftGapStartDown (int newGapStart)
°¸ÀÇ Á¾´ÜÀ» ÇϺο¡ Á¶ ÀýÁ¦ÇÕ´Ï´Ù. |
protected void |
updateUndoPositions (Vector positions,
int offset, int length)
positions
ÀÇ ¸ðµç UndoPosRef ÀνºÅϽºÀÇ À§Ä¡¸¦ ¸®¼Â ÇÕ´Ï´Ù. |
| Ŭ·¡½º java.lang. Object (À¸)·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
|---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public GapContent()
public GapContent(int initialLength)
initialLength - Ãʱ⠻çÀÌÁî| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
protected Object allocateArray(int len)
protected int getArrayLength()
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 - °³½Ã À§Ä¡ >= 0, where + nitems < length()nitems - »èÁ¦ ´ë»óÀÇ ¹®ÀÚ¼ö >= 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 - °³½Ã À§Ä¡ >= 0. where + len <= length()len - °Ë»ö ´ë»óÀÇ ¹®ÀÚ¼ö >= 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 void shiftEnd(int newSize)
protected void shiftGap(int newGapStart)
protected void resetMarksAtZero()
protected void shiftGapStartDown(int newGapStart)
protected void shiftGapEndUp(int newGapEnd)
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,
int offset,
int length)
positions
¸ðµç UndoPosRef ÀνºÅϽºÀÇ À§Ä¡¸¦ ¸®¼Â ÇÕ´Ï´Ù.
À̰ÍÀº ³»ºÎ¿¡¼ÀÇ »ç¿ëÀ» ¸ñÀûÀ¸·Î Çϰí ÀÖ¾î, ÀϹÝÀûÀ¸·Î´Â ¼ºê Ŭ·¡½º¸¦ ´ë»óÀ¸·Î Çϰí ÀÖÁö ¾Ê½À´Ï´Ù.
positions - ¸®¼Â ´ë»óÀÇ UndoPosRef
ÀνºÅϽºprotected final Object getArray()
protected final int getGapStart()
protected final int getGapEnd()
protected void replace(int position,
int rmSize,
Object addItems,
int addSize)
position - ġȯÀ» ½Ç½ÃÇÏ´Â À§Ä¡. ¿øÀÇ ±â¾ï ¿µ¿ªÀÇ À§°ªÀÌ ¾Æ´Ï°í, ¸ðµ¨È µÈ ÀÎÁ¢ÇÏ´Â ¿µ¿ªÀÇ À§Ä¡rmSize - »èÁ¦µÇ´Â Ç׸ñÀÇ ¼öaddItems - ±â¾ï ¿µ¿ª¿¡ ³õ¿©Áö´Â »õ·Î¿î Ç׸ñ
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ¾ÕÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: »óÀÚ | Çʵå | ÄÚ ½ºÆ®¶óũŸ | ¸Þ¼µå | »ó¼¼: Çʵå | constructor¡¡ ¡¡ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.