|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
public abstract class CompositeView
CompositeView
´Â
1°³
ÀÌ»óÀÇÀÚ½Ä
ºä¸¦ °ü¸®ÇÏ´Â Ãß»ó View
±¸ÇöÀÔ´Ï´Ù (CompositeView
¿¡
¼´Â ºñ±³Àû ¼Ò¼öÀÇÀÚ½Ä
ºä¸¦ °ü¸®ÇÑ´Ù). CompositeView
´Â
BoxView
µî,ÀÚ½Ä
ÀÇ View
¸¦ Æ÷ÇÔÇÑ, View
±¸ÇöÀÇ °³½Ã Æ÷ÀÎÆ®·Î¼ »ç¿ëµË´Ï´Ù.ÀÚ½Ä
ÀÇ View
Ä÷º¼ÇÀ» °ü¸®ÇÏ´Â ¼ºê Ŭ·¡½º¿¡¼´Â replace(int, int, javax.swing.text.View[])
¸Þ¼µå°¡ »ç¿ëµË´Ï´Ù. DocumentListener
ÅëÁöÁß¿¡ View
°¡ replace
¸¦ È£ÃâÇϹǷΠº¸Åë
replace
¸¦ Á÷Á¢ È£ÃâÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù.
CompositeView
´Â
ÀÚ½Ä
ÀÇ View
¿¡ ·¹À̾ƿô Á¤Ã¥¸¦ °Á¦ÇÕ´Ï´Ù¸¸, Áö±ÝºÎÅÍ Æ÷ÇÔÇÏ°Ô µÇ´ÂÀÚ½Ä
ÀÇ View
»ðÀÔÀº Çã¿ëÇÕ´Ï´Ù. ÀÎ ¼¼Æ®´Â setInsets(short, short, short, short)
¶Ç´Â setParagraphInsets(javax.swing.text.AttributeSet)
¿¡ ÀÇÇØ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
View
Ãß»ó ¸Þ¼µå¿¡ °¡¼¼ÇØCompositeView
¼ºê Ŭ·¡½ºµµ ¿À¹ö¶óÀ̵å(override) ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
isBefore(int, int, java.awt.Rectangle)
- ÁöÁ¤µÈ View
À§Ä¡°¡CompositeView
½Ã°¢ °ø°£ÀÇ ¾Õ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ Á¶»çÇÑ´ÙisAfter(int, int, java.awt.Rectangle)
- ÁöÁ¤µÈ View
À§Ä¡°¡CompositeView
½Ã°¢ °ø°£ÀÇ µÚ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ Á¶»çÇÑ´ÙgetViewAtPoint(int, int, java.awt.Rectangle)
- ÁöÁ¤µÈ ½Ã°¢ À§Ä¡ÀÇ ºä¸¦ µ¹·ÁÁØ´ÙchildAllocation(int, java.awt.Rectangle)
- ƯÁ¤ÀÇÀÚ½Ä
View
°æ°è¸¦ µ¹·ÁÁØ´Ù. CompositeView
Inset
¿¡ ÀÇÇØ °æ°è¸¦ ¿ÀÇÁ¼Â(offset) ÇÑ ÈÄ¿¡
getChildAllocation
´Â childAllocation
À»
È£ÃâÇÑ´Ù
ÇÊµå °³¿ä |
---|
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
BadBreakWeight,
ExcellentBreakWeight,
ForcedBreakWeight,
GoodBreakWeight,
X_AXIS,
Y_AXIS |
ÀÎÅÍÆäÀ̽º javax.swing. SwingConstants ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
BOTTOM,
CENTER,
EAST,
HORIZONTAL,
LEADING,
LEFT,
NEXT,
NORTH,
NORTH_EAST,
NORTH_WEST,
PREVIOUS,
RIGHT,
SOUTH,
SOUTH_EAST,
SOUTH_WEST,
TOP,
TRAILING,
VERTICAL,
WEST |
»ý¼ºÀÚ °³¿ä | |
---|---|
CompositeView (Element elem)
ÁöÁ¤µÈ ¿ä¼ÒÀÇ CompositeView ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
protected abstract void |
childAllocation (int index,
Rectangle a)
ÁöÁ¤µÈÀڽĿ¡ °Ô·ÎÀÇ ÇÒ´çÀ» ¸®ÅÏÇÕ´Ï´Ù. |
protected boolean |
flipEastAndWestAtEnds (int position,
Position.Bias bias)
´ÙÀ½ÀÇ ºä¸¦ ¾î´À ¹æÇâÀ¸·Î ¹èÄ¡Çұ °áÁ¤ÇÕ´Ï´Ù. |
protected short |
getBottomInset ()
¾Æ·¡ÀÇ ÀÎ ¼¼Æ®¸¦ ÃëµæÇÕ´Ï´Ù. |
Shape |
getChildAllocation (int index,
Shape a)
ÁöÁ¤µÈ, ·»´õ¸µ ÇÏ´ÂÀÚ½Ä ºä¿¡ÀÇ ÇÒ´çÀ» ²¨³À´Ï´Ù. |
protected Rectangle |
getInsideAllocation (Shape a)
ºä·Î ÁöÁ¤µÈ ºÒº¯ÀÇ ÇÒ´çÀ» ³»ºÎ ÇÒ´çÀ» ³ªÅ¸³»´Â °¡º¯ ÇÒ´çÇØ·Î º¯°æÇÕ´Ï´Ù. |
protected short |
getLeftInset ()
¿ÞÂÊÀÇ ÀÎ ¼¼Æ®¸¦ ÃëµæÇÕ´Ï´Ù. |
protected int |
getNextEastWestVisualPositionFrom (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet)
Ä¿¼¸¦ µÑ ¼ö ÀÖ´Â ´ÙÀ½ÀÇ ½Ã°¢ÀûÀÎ À§Ä¡¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getNextNorthSouthVisualPositionFrom (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet)
Ä¿¼¸¦ µÑ ¼ö ÀÖ´Â ´ÙÀ½ÀÇ ½Ã°¢ÀûÀÎ À§Ä¡¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getNextVisualPositionFrom (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet)
caret°¡ ¹èÄ¡µÉ °¡´É¼ºÀÌ ÀÖ´Â ½Ã°¢ÀûÀ¸·Î ³ªÅ¸³»Áø ´ÙÀ½ÀÇ ¸ðµ¨ À§Ä¡¸¦ °áÁ¤ÇÏ´Â ¼ö´ÜÀ» Á¦°øÇÕ´Ï´Ù. |
protected short |
getRightInset ()
¿À¸¥ÂÊÀÇ ÀÎ ¼¼Æ®¸¦ ÃëµæÇÕ´Ï´Ù. |
protected short |
getTopInset ()
À§ÀÇ ÀÎ ¼¼Æ®¸¦ ÃëµæÇÕ´Ï´Ù. |
View |
getView (int n)
ÄÁÅ×À̳ʳ»ÀÇ n ¹øÂ°ÀÇ ºä¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected abstract View |
getViewAtPoint (int x,
int y,
Rectangle alloc)
ÁöÁ¤µÈ ÁÂÇ¥ÀÇÀÚ½Ä ºä¸¦ ²¨³À´Ï´Ù. |
protected View |
getViewAtPosition (int pos,
Rectangle a)
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ À§Ä¡¸¦ ³ªÅ¸³»´ÂÀÚ½Ä ºä¸¦ ²¨³À´Ï´Ù. |
int |
getViewCount ()
ÀÌ ºäÀÇÀÚ½Ä ºäÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getViewIndex (int pos,
Position.Bias b)
¸ðµ¨³»·Î ÁöÁ¤µÈ À§Ä¡¸¦ ³ªÅ¸³»´ÂÀÚ½Ä ºäÀÎÁ§½º¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getViewIndexAtPosition (int pos)
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ À§Ä¡¸¦ ³ªÅ¸³»´Â ÀÚ½Ä ºäÀÇ À妽º¸¦ ²¨³À´Ï´Ù. |
protected abstract boolean |
isAfter (int x,
int y,
Rectangle alloc)
ÀÖ´Â Á¡ÀÌ, ±¸Çü ¹üÀ§ÀÇ µÚ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
protected abstract boolean |
isBefore (int x,
int y,
Rectangle alloc)
ÀÖ´Â Á¡ÀÌ, ±¸Çü ¹üÀ§ÀÇ Àü¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
protected void |
loadChildren (ViewFactory f)
ºä¸¦ ÃʱâÈÇϱâ À§Çؼ ¸ðµç ÀÚ½ÄÀ» ·ÎµåÇÕ´Ï´Ù. |
Shape |
modelToView (int p0,
Position.Bias b0,
int p1,
Position.Bias b1,
Shape a)
¹®¼ ¸ðµ¨ÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ºäÀÇ ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù. |
Shape |
modelToView (int pos,
Shape a,
Position.Bias b)
¹®¼ ¸ðµ¨ÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ºäÀÇ ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù. |
void |
replace (int offset,
int length,
View [] views)
¾ÆÀÌ ºä¸¦ ġȯÇÕ´Ï´Ù. |
protected void |
setInsets (short top,
short left,
short bottom,
short right)
ºäÀÇ ÀÎ ¼¼Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
setParagraphInsets (AttributeSet attr)
ÁöÁ¤µÈ ¼Ó¼ºÀ¸·ÎºÎÅÍ ¼±ÅÃµÈ ´Ü¶ô ¼Ó¼ºÀ¸·ÎºÎÅÍ, ÀÎ ¼¼Æ®¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setParent (View parent)
ºäÀÇ ºÎ¸ð¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
int |
viewToModel (float x,
float y,
Shape a,
Position.Bias [] bias)
ºäÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ¸ðµ¨ÀÇ ³í¸® ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù. |
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
append,
breakView,
changedUpdate,
createFragment,
forwardUpdate,
forwardUpdateToView,
getAlignment,
getAttributes,
getBreakWeight,
getContainer,
getDocument,
getElement,
getEndOffset,
getGraphics,
getMaximumSpan,
getMinimumSpan,
getParent,
getPreferredSpan,
getResizeWeight,
getStartOffset,
getToolTipText,
getViewFactory,
getViewIndex,
insert,
insertUpdate,
isVisible,
modelToView,
paint,
preferenceChanged,
remove,
removeAll,
removeUpdate,
setSize,
updateChildren,
updateLayout,
viewToModel |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public CompositeView(Element elem)
CompositeView
¸¦ ±¸ÃàÇÕ´Ï´Ù.
elem
- ÀÌ ºä°¡ Ãë±ÞÇÏ´Â ¿ä¼Ò¸Þ¼µåÀÇ »ó¼¼ |
---|
protected void loadChildren(ViewFactory f)
setParent(javax.swing.text.View)
¸Þ¼µå¿¡ ÀÇÇØ È£ÃâÇÕ´Ï´Ù. ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼µå¸¦ À籸ÇöÇØ ´Ù¸¥ ¹æ¹ýÀ¸·ÎÀÚ½Ä
ºä¸¦ ÃʱâÈÇÒ ¼ö ÀÖ½À´Ï´Ù. µðÆúÆ®ÀÇ ±¸ÇöÀº ¾ÆÀÌ ¿ä¼Ò ¸¶´ÙÀÚ½Ä
ºä¸¦ ÀÛ¼ºÇÕ´Ï´Ù.
f
- ºäÆÄũƮ¸®setParent(javax.swing.text.View)
public void setParent(View parent)
loadChildren
¸Þ¼µåÀÇ È£Ãâ°ú ÇÔ²² ½´ÆÛ Ŭ·¡½ºÀÇ µ¿ÀÛÀ» Á¦°ø´Ù½Ã Çϱâ À§Çؼ ±¸ÇöÇÕ´Ï´Ù. ÀÚ½ÄÀ» »ý¼ºÀÚ
¾È¿¡ ·ÎµåÇÏÁö ¾Ê°ÔÀÇÇØ ÁÖ¼¼¿ä. À̰ÍÀº ºÎ¸ð¸¦ ¼³Á¤ÇÏ´Â µ¿ÀÛÀÌ ¿øÀÎÀÌ µÇ¾î, ¿¹¸¦ µé¾î ¼ö¿ëÃø Container
¸¦ ÃëµæÇϱâ À§Çؼ
ÀÚ½ÄÀÌ °èÃþÀ» °Å½½·¯ ¿Ã¶ó°¡ °Ë»öÇÏ·Á°í Çϱ⠶§¹®ÀÔ´Ï´Ù. ÀÌ ºä°¡ ÀÚ½ÄÀ» °¡Áö´Â °æ¿ì´Â ºä °èÃþ³»°¡ ÀÖ´Â À§Ä¡·ÎºÎÅÍ ´Ù¸¥ À§Ä¡¿¡ À̵¿Çϰí ÀÖÀ¸¹Ç·ÎloadChildren
¸Þ¼µå´Â ºÒ·Á°¡
Áö ¾Ê½À´Ï´Ù.
View
³»ÀÇ setParent
parent
- ºäÀÇ ºÎ¸ð. ¾ø´Â °æ¿ì´Â null
public int getViewCount()
View
³»ÀÇ getViewCount
getView(int)
public View getView(int n)
View
³»ÀÇ getView
n
- ¸ñÀûÀÇ ºäÀÇ ¹øÈ£ >= 0 && < getViewCount()
n
ºäpublic void replace(int offset, int length, View [] views)
null
·Î
¼³Á¤µÈ ºÎ¸ð¸¦ °¡Á®, »èÁ¦µÇ´Â ºäÀÇ ³»ºÎ ÂüÁ¶¸¦ Çϰí ÀÖÀ¸¹Ç·Î °¡ºñÁö·Î¼ ȸ¼öÇÒ ¼ö ÀÖ½À´Ï´Ù.
View
³»ÀÇ replace
offset
- »õ·Î¿î ºä¸¦ »ðÀÔÇϱâ À§ÇÑ,
ÀÚ½Ä
ºäÀÇ °³½Ã À妽º. 0 ÀÌ»óÀ¸·Î getViewCount ÀÌÇÏlength
- »èÁ¦ÇÏ´Â ÇöÀçÀÇÀÚ½Ä
ºäÀÇ ¼ö. ÀÌ °ªÀº 0 ÀÌ»óÀ¸·Î (getViewCount() - offset) ÀÌÇÏviews
- Ãß°¡ÇÏ´ÂÀÚ½Ä
ºä. Ãß°¡ÇÏ´ÂÀÚ½Ä
(»èÁ¦Çϱ⠽±´Ù)°¡ ¾ø´Â °ÍÀ» ³ªÅ¸³»´Â °æ¿ì´Â null
°¡´É¼ºµµ ÀÖ´Ùpublic Shape getChildAllocation(int index, Shape a)
View
³»ÀÇ getChildAllocation
index
- ÀÚÀÇ À妽º >= 0 && < getViewCount()a
- ÀÌ ºä¿¡ ´ëÇÑ ÇÒ´ç
public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
View
³»ÀÇ modelToView
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªb
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
¹ÙÀ̾ġ
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ °ü·ÃµÈ ¹®¼³»ÀÇ À¯È¿ÇÑ À§Ä¡¸¦ ³ªÅ¸³»Áö ¾Ê´Â °æ¿ìView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException
View
³»ÀÇ modelToView
p0
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b0
- À§°ªÀÌ 2°³ÀÇ ºäÀÇ °æ°èÀÎ °æ¿ì¿¡
p0¿¡ ÀÇÇØ ³ªÅ¸³»Áö±â Á÷ÀüÀÇ ¹®ÀÚ ¶Ç´Â ´ÙÀ½ÀÇ ¹®ÀÚ¿¡ÀÇ ¹ÙÀ̾. Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
p1
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b1
- À§°ªÀÌ 2°³ÀÇ ºäÀÇ °æ°èÀÎ °æ¿ì¿¡
p1¿¡ ÀÇÇØ ³ªÅ¸³»Áö±â Á÷ÀüÀÇ ¹®ÀÚ ¶Ç´Â ´ÙÀ½ÀÇ ¹®ÀÚ¿¡ÀÇ ¹ÙÀ̾a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ª
BadLocationException
- ÁöÁ¤µÈ À§°ªÀÌ °ü·ÃµÈ ¹®¼³»ÀÇ À¯È¿ÇÑ À§Ä¡¸¦ ³ªÅ¸³»Áö ¾Ê´Â °æ¿ì
IllegalArgumentException
- bias Àμö°¡ ¹«È¿ÀÎ °æ¿ìView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public int viewToModel(float x, float y, Shape a, Position.Bias [] bias)
View
³»ÀÇ viewToModel
x
- º¯È¯ÇÏ´Â ºä À§Ä¡ÀÇ x ÁÂÇ¥ >= 0y
- º¯È¯ÇÏ´Â ºä À§Ä¡ÀÇ y ÁÂÇ¥ >= 0a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªbias
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet) throws BadLocationException
getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])
³ª getNextEastWestVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])
°£ÀÌ ¸Þ¼µåÀÔ´Ï´Ù.
View
³»ÀÇ getNextVisualPositionFrom
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
¹ÙÀ̾ġa
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªdirection
- ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå¿¡ º¸Åë
Á¸ÀçÇÏ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾î ´ÙÀ½ÀÇ ¾î¶² °ÍÀΰ¡°¡ µÈ´ÙSwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH
SwingConstants.SOUTH
biasRet
- üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
- @exception IllegalArgumentException direction
°¡ ¹«È¿ÀÎ °æ¿ìpublic int getViewIndex(int pos, Position.Bias b)
getViewIndexByPosition
¸Þ¼µå¸¦ È£ÃâÇϱâ À§Çؼ ÀÌ ¸Þ¼µå¸¦ ±¸ÇöÇϰí ÀÖ½À´Ï´Ù.
View
³»ÀÇ getViewIndex
pos
- À§Ä¡ >= 0
protected abstract boolean isBefore(int x, int y, Rectangle alloc)
x
- X ÁÂÇ¥ >= 0y
- Y ÁÂÇ¥ >= 0alloc
- ±¸Çü
protected abstract boolean isAfter(int x, int y, Rectangle alloc)
x
- X ÁÂÇ¥ >= 0y
- Y ÁÂÇ¥ >= 0alloc
- ±¸Çü
protected abstract View getViewAtPoint(int x, int y, Rectangle alloc)
x
- X ÁÂÇ¥ >= 0y
- Y ÁÂÇ¥ >= 0alloc
- ÀÔ±¸¿¡¼ÀÇ ºÎ¸ðÀÇ ÇÒ´ç. Ãⱸ¿¡¼´Â ÀڽĿ¡ °Ô·ÎÀÇ ÇÒ´çÀ¸·Î º¯°æµÈ´Ù
protected abstract void childAllocation(int index, Rectangle a)
index
- ÀÚÀÇ À妽º >= 0 && < getViewCount()a
- ÀÔ±¸¿¡¼ÀÇ, ¹Ú½ºÀÇ ³»ºÎ¿¡ÀÇ ÇÒ´ç. ¹×, Ãⱸ¿¡¼ÀÇ,ÀÚ½Ä
ºä¿¡ÀÇ ÇÒ´çprotected View getViewAtPosition(int pos, Rectangle a)
pos
- À§Ä¡ >= 0a
- ÀÔ±¸¿¡¼ÀÇ, ¹Ú½ºÀÇ ³»ºÎ¿¡ÀÇ ÇÒ´ç. ¹×, Ãⱸ¿¡¼ÀÇ, ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø À§Ä¡¸¦ Æ÷ÇÔÇÑ ºä¿¡ÀÇ ÇÒ´ç
null
protected int getViewIndexAtPosition(int pos)
pos
- À§Ä¡ >= 0
protected Rectangle getInsideAllocation(Shape a)
childAllocation
¸Þ¼µå¿¡ º¸³»Áý´Ï´Ù.
a
- ºä·Î ÁöÁ¤µÈ ÇÒ´ç
null
À̸é, ¹Ýȯ°ªµµ null
protected void setParagraphInsets(AttributeSet attr)
attr
- ¼Ó¼ºprotected void setInsets(short top, short left, short bottom, short right)
top
- »óÀÇ ÀÎ ¼¼Æ® >= 0left
- ¿ÞÂÊÀÇ ÀÎ ¼¼Æ® >= 0bottom
- ÇÏÀÇ ÀÎ ¼¼Æ® >= 0right
- ¿À¸¥ÂÊÀÇ ÀÎ ¼¼Æ® >= 0protected short getLeftInset()
protected short getRightInset()
protected short getTopInset()
protected short getBottomInset()
protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet) throws BadLocationException
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
¹ÙÀ̾ġa
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªdirection
- ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå¿¡ º¸Åë
Á¸ÀçÇÏ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾î ´ÙÀ½ÀÇ ¾î¶² °ÍÀΰ¡°¡ µÈ´ÙSwingConstants.NORTH
SwingConstants.SOUTH
biasRet
- üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
- @exception IllegalArgumentException direction
°¡ ¹«È¿ÀÎ °æ¿ìgetNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])
protected int getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet) throws BadLocationException
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
¹ÙÀ̾ġa
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªdirection
- ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå¿¡ º¸Åë
Á¸ÀçÇÏ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾î ´ÙÀ½ÀÇ ¾î¶² °ÍÀΰ¡°¡ µÈ´ÙSwingConstants.WEST
SwingConstants.EAST
biasRet
- üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
- @exception IllegalArgumentException direction
°¡ ¹«È¿ÀÎ °æ¿ìgetNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[])
protected boolean flipEastAndWestAtEnds(int position, Position.Bias bias)
View
°¡ °í·ÁµË´Ï´Ù. ÀϹÝÀûÀ¸·Î EAST ¿¡ÀÇ View
°¡ À妽º n + 1, WEST ¿¡ÀÇ View
°¡ À妽º n -1°¡ µÇµµ·Ï, View
´Â ¿ÞÂÊ¿¡¼ ¿À¸¥ÂÊ¿¡ ·¹À̾ƿô µË´Ï´Ù. ½Ö¹æÇâ ÅØ½ºÆ® µî ÀϺÎÀÇ °æ¿ì¿¡¼´Â EAST ¿¡ÀÇ View
¸¦ À妽º n + 1 Àº ¾Æ´Ï°í À妽º n -1 ¿¡
¶Ç´Â WEST ¿¡ÀÇ View
¸¦ À妽º n - 1 Àº ¾Æ´Ï°í À妽º n + 1 À¸·Î ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì ÀÌ ¸Þ¼µå´Â true¸¦ µ¹·ÁÁÖ°í, View
°¡ ³»¸²Â÷¼ø¿¡ ·¹À̾ƿô µÇ°í ÀÖ´Â °ÍÀ» ³ªÅ¸³À´Ï´Ù.
¿©±â¿¡¼´Â ¹«Á¶°Ç false°¡ ¸®Åϵ˴ϴÙ
. View
¸¦ ³»¸²Â÷¼ø¿¡ ¹èÄ¡ÇÒ °¡´É¼ºÀÌ ÀÖ´Â °æ¿ì, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.
position
- ¸ðµ¨¿¡ÀÇ À§Ä¡bias
- Position.Bias.Forward
¶Ç´Â Position.Bias.Backward
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.