|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
| ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå | ||||||||||
java.lang.Object
|
+--javax.swing.text.View
|
+--javax.swing.text.CompositeView
CompositeView ´Â 1 kr ÀÌ»óÀÇ ¾ÆÀÌ ºä¸¦ °ü¸®ÇÏ´Â Ãß»ó 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 ÀÇ °æ°è¸¦ µ¹·ÁÁØ´Ù. CompositView ÀÇ 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 ¸Þ¼ÒµåÀÇ È£Ãâ°ú ÇÔ²² ½´ÆÛ Ŭ·¡½ºÀÇ µ¿ÀÛÀ» Á¦°ø´Ù½Ã Çϱâ À§Çؼ ±¸ÇöÇÕ´Ï´Ù. ¾ÆÀ̸¦ constructor ¾È¿¡ ·ÎµåÇÏÁö ¾Ê°Ô ÇØ ÁÖ¼¼¿ä. À̰ÍÀº ºÎ¸ð¸¦ ¼³Á¤ÇÏ´Â µ¿ÀÛÀÌ ¿øÀÎÀÌ µÇ¾î, ¿¹¸¦ µé¾î ¼ö¿ëÃø Container ¸¦ ÃëµæÇϱâ À§Çؼ, ¾ÆÀ̰¡ °èÃþÀ» °Å½½·¯ ¿Ã¶ó°¡ °Ë»öÇÏ·Á°í Çϱ⠶§¹®ÀÔ´Ï´Ù. ÀÌ ºä°¡ ¾ÆÀ̸¦ °¡Áö´Â °æ¿ì´Â ºä °èÃþ³»°¡ ÀÖ´Â À§Ä¡·ÎºÎÅÍ ´Ù¸¥ À§Ä¡¿¡ À̵¿Çϰí ÀÖÀ¸¹Ç·Î,loadChildren ¸Þ¼Òµå´Â ºÒ·Á °¡Áö ¾Ê½À´Ï´Ù.
View ³»ÀÇ setParent parent - ºäÀÇ ºÎ¸ð. ¾ø´Â °æ¿ì´Â nullpublic 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 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 - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø areab - 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.Backwardp1 - º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0b1 - À§Ä¡°¡ 2 °³ÀÇ ºäÀÇ °æ°èÀÎ °æ¿ì¿¡, p1 ¿¡ ÀÇÇØ ³ªÅ¸³»Áö±â Á÷ÀüÀÇ Ä³¸¯ÅÍ ¶Ç´Â ´ÙÀ½ÀÇ Ä³¸¯ÅÍ¿¡ÀÇ ¹ÙÀ̾a - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø area
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 - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø areabias - 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 - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø areadirection - ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå»ó¿¡ Åë»ó Á¸ÀçÇÏ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾îSwingConstants.WEST,SwingConstants.EAST,SwingConstants.NORTH,SwingConstants.SOUTHbiasRet - üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
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 - ÀÔ±¸¿¡¼ÀÇ, ¹Ú½ºÀÇ ³»ºÎ¿¡ÀÇ ÇÒ´ç. ¹×, Ãⱸ¿¡¼ÀÇ, ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø À§Ä¡¸¦ Æ÷ÇÔÇÑ ºä¿¡ÀÇ ÇÒ´ç
nullprotected int getViewIndexAtPosition(int pos)
pos - À§Ä¡ >= 0
protected Rectangle getInsideAllocation(Shape a)
childAllocation ¸Þ¼Òµå¿¡ º¸³»Áý´Ï´Ù.
a - ºä·Î ÁöÁ¤µÈ ÇÒ´ç
null À̸é, ¹Ýȯ°ªµµ nullprotected 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 - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø areadirection - ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå»ó¿¡ Åë»ó ÀÖ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾îSwingConstants.NORTH SwingConstants.SOUTH biasRet - üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
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 - Ç¥Çö¸¦ À§Çؼ(¶§¹®¿¡) ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø areadirection - ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå»ó¿¡ Åë»ó ÀÖ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾îSwingConstants.WEST SwingConstants.EAST biasRet - üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
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 ¿¡, ¶Ç´Â View ¸¦ À妽º n - 1 Àº ¾Æ´Ï°í À妽º n + 1 À¸·Î ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì, ÀÌ ¸Þ¼Òµå´Â true ¸¦ µ¹·ÁÁÖ¾î,View °¡ ³»¸²Â÷¼ø¿¡ ·¹À̾ƿô µÇ°í ÀÖ´Â °ÍÀ» ³ªÅ¸³À´Ï´Ù.
¿©±â¿¡¼´Â ¹«Á¶°Ç false °¡ µ¹·ÁÁÖ¾îÁý´Ï´Ù. View ¸¦ ³»¸²Â÷¼ø¿¡ ¹èÄ¡ÇÒ °¡´É¼ºÀÌ ÀÖ´Â °æ¿ì, ¼ºê Ŭ·¡½º´Â ÀÌ ¸Þ¼Òµå¸¦ ¿À¹ö¶óÀ̵å(override) ÇÕ´Ï´Ù.
position - ¸ðµ¨³»¿¡ÀÇ À§Ä¡bias - Position.Bias.Forward ¶Ç´Â Position.Bias.Backward
|
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.