|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjavax.swing.text.View
javax.swing.text.AsyncBoxView
public class AsyncBoxView
ºñµ¿±â¿¡°Ô ·¹À̾ƿôÀ» ½Ç½ÃÇÏ´Â ¹Ú½ºÀÔ´Ï´Ù. GUI À̺¥Æ® thread¿¡ ·¹À̾ƿôÀ» ½Ç½ÃÇÏÁö ¸»°í GUI À̺¥Æ® thread¸¦ À̵¿°è¼Ó ½Ã۴µ¥ µµ¿òÀÌ µË´Ï´Ù. ·¹À̾ƿôÀºÀÚ½Ä ºäÀÇ Á¶ÀÛÀ¸·Î »ó¼¼ÇÏ°Ô ÇàÇØÁý´Ï´Ù. °¢ ÀÚ ºä°¡ ·¹À̾ƿôÀÇ ÀϺο¡ ¾×¼¼½º µÈ µÚ (Á¶ÀÛ¿¡ ½Ã°£ÀÌ °É¸®´Â °æ¿ì°¡ ÀÖ´Ù), ³ª¸ÓÁöÀÇ Å½ºÅ©¸¦ ¹æÆóÇÏ´Â Àϵµ, »õ·Î¿î ¿ì¼±µµÀÇ ³ôÀº ŽºÅ© (Áï µ¿±âÀÇ ¿ä±¸ ¶Ç´Â °¡½Ã ¿µ¿ª¿¡ ¼ºñ½ºÇÏ´Â °Í)¸¦ ½Ç½ÃÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
¾ÆÀÌ ºä¿¡ ¾×¼¼½º Çϰí ÀÖ´Â µ¿¾È¿¡ °ü·ÃµÈ ¹®¼·Î Àб⠶ôÀÌ ÃëµæµÇ¾î ¾×¼¼½ºÁß ¸ðµ¨À» ¾ÈÁ¤½Ãŵ´Ï´Ù.
Áßø(Nested) Ŭ·¡½º °³¿ä | |
---|---|
class |
AsyncBoxView.ChildLocator
±¹ºÎÀÇ ÁÖº¯¿¡¼ º¯°æÀ» Çϰí ÀÖÀ» ¶§, ±¹ºÎ¿¡¼ÀÇÀÚ½Ä ºäÀÇ È¿°úÀûÀÎ À§Ä¡¸¦ °ü¸®Çϴ Ŭ·¡½ºÀÔ´Ï´Ù. |
class |
AsyncBoxView.ChildState
¾ÆÀÌ ºäÀÇ ·¹À̾ƿô »óŸ¦ ³ªÅ¸³»´Â ·¹ÄÚµåÀÔ´Ï´Ù. |
ÇÊµå °³¿ä | |
---|---|
protected AsyncBoxView.ChildLocator |
locator
¾ÆÀÌÀÇ ¿ÀÇÁ¼Â(offset)¸¦ °ü¸®ÇÏ´Â °´Ã¼ÀÔ´Ï´Ù. |
Ŭ·¡½º 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 |
»ý¼ºÀÚ °³¿ä | |
---|---|
AsyncBoxView (Element elem,
int axis)
ºñµ¿±â ·¹À̾ƿôÀ» ½Ç½ÃÇÏ´Â º¹½ººä¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
protected AsyncBoxView.ChildState |
createChildState (View v)
¼ºê Ŭ·¡½º°¡ ChildState ·¹Äڵ带 È®ÀåÇØº¸´Ù ¸¹Àº ÀÏÀ» ½Ç½ÃÇϰųª º¸°ü À¯ÁöÇϰųª ÇÒ ¼ö ÀÖµµ·Ï, »õ·Î¿î ChildState ·¹Äڵ尡 ÀÌ ¸Þ¼µå¿¡ ÀÇÇØ ÀÛ¼ºµË´Ï´Ù. |
protected void |
flushRequirementChanges ()
¼³Á¤ÀÇ º¯°æÀ» ÀÂÊÀÇ Ä£ºä¿¡ ÅëÁöÇÕ´Ï´Ù. |
float |
getBottomInset ()
ºä ÁÖÀ§ÀÇ ÇϺΠ¸¶ÁøÀ» ¸®ÅÏÇÕ´Ï´Ù. |
Shape |
getChildAllocation (int index,
Shape a)
ÁöÁ¤µÈÀÚ½Ä ºäÀÇ ÇÒ´çÀ» ²¨³À´Ï´Ù. |
protected AsyncBoxView.ChildState |
getChildState (int index)
ÁöÁ¤µÈ À妽ºÀÇÀÚ½Ä ÀÇ ·¹À̾ƿô »óŸ¦ ³ªÅ¸³»´Â °´Ã¼¸¦ ²¨³À´Ï´Ù. |
protected boolean |
getEstimatedMajorSpan ()
ÇöÀç, ÁÖµÈ ½ºÆÒÀÌ Æò°¡µÇ°í ÀÖ´ÂÁö¸¦ ³ªÅ¸³À´Ï´Ù. |
protected float |
getInsetSpan (int axis)
ÀÎ ¼¼Æ®·Î ´Ù·ç¾îÁø ÃàÀ¸·Î µû¸¥ ½ºÆÒÀ» ²¨³À´Ï´Ù. |
protected LayoutQueue |
getLayoutQueue ()
·¹À̾ƿô¿¡ »ç¿ëÇϴ ť¸¦ ²¨³À´Ï´Ù. |
float |
getLeftInset ()
ºä ÁÖÀ§ÀÇ ÁºΠ¸¶ÁøÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
getMajorAxis ()
ÁÖÃà (¾ÆÀÌÀÇ Å¸ÀϸµÀÇ ±âÁØÀ¸·Î ÇÏ´Â Ãà)À» ²¨³À´Ï´Ù. |
float |
getMaximumSpan (int axis)
ÀÌ ºäÀÇ ÃÖ´ë ½ºÆÒÀ» ÃàÀ¸·Î µû¶ó ÁöÁ¤ÇÕ´Ï´Ù. |
float |
getMinimumSpan (int axis)
ÀÌ ºäÀÇ ÃÖ¼Ò ½ºÆÒÀ» ÃàÀ¸·Î µû¶ó ÁöÁ¤ÇÕ´Ï´Ù. |
int |
getMinorAxis ()
ºÎÃà (ŸÀϸµ µÈ ÃàÀ¸·Î Á÷°¢ÀÇ Ãà)À» ²¨³À´Ï´Ù. |
int |
getNextVisualPositionFrom (int pos,
Position.Bias b,
Shape a,
int direction,
Position.Bias [] biasRet)
caret°¡ ¹èÄ¡µÉ °¡´É¼ºÀÌ ÀÖ´Â ½Ã°¢ÀûÀ¸·Î ³ªÅ¸³»Áø ´ÙÀ½ÀÇ ¸ðµ¨ À§Ä¡¸¦ °áÁ¤ÇÏ´Â ¼ö´ÜÀ» Á¦°øÇÕ´Ï´Ù. |
float |
getPreferredSpan (int axis)
ÀÌ ºä¿¡ ÀûÀýÇÑ ½ºÆÒÀ» ÃàÀ¸·Î µû¶ó ÁöÁ¤ÇÕ´Ï´Ù. |
float |
getRightInset ()
ºä ÁÖÀ§ÀÇ ¿ìºÎ ¸¶ÁøÀ» ¸®ÅÏÇÕ´Ï´Ù. |
float |
getTopInset ()
ºä ÁÖÀ§ÀÇ »óºÎ ¸¶ÁøÀ» ¸®ÅÏÇÕ´Ï´Ù. |
View |
getView (int n)
n ¹øÂ°ÀÇÀÚ½Ä ºä¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getViewCount ()
ÀÌ ºä³»ÀÇ ºäÀÇ ¼ö¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
int |
getViewIndex (int pos,
Position.Bias b)
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ À§Ä¡¸¦ ³ªÅ¸³»´ÂÀÚ½Ä ºäÀÎÁ§½º¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected int |
getViewIndexAtPosition (int pos,
Position.Bias b)
¸ðµ¨³»ÀÇ ÁöÁ¤µÈ À§Ä¡¸¦ ³ªÅ¸³»´Â ÀÚ½Ä ºäÀÇ À妽º¸¦ ²¨³À´Ï´Ù. |
protected void |
loadChildren (ViewFactory f)
ºä¸¦ ÃʱâÈÇϱâ À§Çؼ ¸ðµç ÀÚ½ÄÀ» ·ÎµåÇÕ´Ï´Ù. |
protected void |
majorRequirementChange (AsyncBoxView.ChildState cs,
float delta)
ÁÖÃà¿¡ µû¶ó º¯°æµÈ ¿ä°ÇÀÔ´Ï´Ù. |
protected void |
minorRequirementChange (AsyncBoxView.ChildState cs)
ºÎÃàÀ¸·Î µû¶ó º¯°æµÈ ¿ä°ÇÀÔ´Ï´Ù. |
Shape |
modelToView (int pos,
Shape a,
Position.Bias b)
¹®¼ ¸ðµ¨ÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ºäÀÇ ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù. |
void |
paint (Graphics g,
Shape alloc)
ÁöÁ¤µÈ ÇÒ´ç ¹× ·»´õ¸µ Ç¥¸éÀ» »ç¿ëÇØ, ºä¸¦ ·»´õ¸µ ÇÕ´Ï´Ù. |
void |
preferenceChanged (View child,
boolean width,
boolean height)
¾ÆÀÌ ºä´Â ºÎ¸ð·Î ÀÌ ¸Þ¼µå¸¦ È£ÃâÇØ, ¼³Á¤ÀÌ º¯°æµÇ¾î ÀçÂ÷ ·¹À̾ƿô º¯°æÀÇ Çʿ䰡 ÀÖ´Â °ÍÀ» ³ªÅ¸³¾ ¼ö°¡ ÀÖ½À´Ï´Ù. |
void |
replace (int offset,
int length,
View [] views)
¾ÆÀÌ ºä¸¦ °»½ÅÇϱâ À§Çؼ ½´ÆÛ Ŭ·¡½º¸¦ È£ÃâÇØ,ÀÚ½Ä ÀÇ ½ºÅ×ÀÌÅͽº ·¹Äڵ带 °»½ÅÇÕ´Ï´Ù. |
void |
setBottomInset (float i)
ºä ÁÖÀ§ÀÇ ÇϺΠ¸¶ÁøÀ» ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
setEstimatedMajorSpan (boolean isEstimated)
ÁÖµÈ ½ºÆÒÀ» Æò°¡ÁßÀ¸·Î¼ ó¸®ÇÒÁö ¾î¶³Áö¸¦ °áÁ¤ÇÏ´Â estimatedMajorSpan ÇÁ·ÎÆÛƼ¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setLeftInset (float i)
ºä ÁÖÀ§ÀÇ ÁºΠ¸¶ÁøÀ» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setParent (View parent)
ºäÀÇ ºÎ¸ð¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setRightInset (float i)
ºä ÁÖÀ§ÀÇ ¿ìºÎ ¸¶ÁøÀ» ¼³Á¤ÇÕ´Ï´Ù. |
void |
setSize (float width,
float height)
ºäÀÇ »çÀÌÁ ¼³Á¤ÇÕ´Ï´Ù. |
void |
setTopInset (float i)
ºä ÁÖÀ§ÀÇ »óºÎ ¸¶ÁøÀ» ¼³Á¤ÇÕ´Ï´Ù. |
protected void |
updateLayout (DocumentEvent.ElementChange ec,
DocumentEvent e,
Shape a)
¸ðµ¨·ÎºÎÅÍ º¯°æÀÇ ÅëÁö¸¦ ¹Þ¾ÒÀ» °æ¿ì¿¡ ·¹À̾ƿôÀ» °»½ÅÇÕ´Ï´Ù. |
int |
viewToModel (float x,
float y,
Shape a,
Position.Bias [] biasReturn)
ºäÀÇ ÁÂÇ¥ °ø°£À¸·ÎºÎÅÍ ¸ðµ¨ÀÇ ³í¸® ÁÂÇ¥ °ø°£¿¡ÀÇ ¸ÅÇÎÀ» Á¦°øÇÕ´Ï´Ù. |
Ŭ·¡½º javax.swing.text. View ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
append,
breakView,
changedUpdate,
createFragment,
forwardUpdate,
forwardUpdateToView,
getAlignment,
getAttributes,
getBreakWeight,
getContainer,
getDocument,
getElement,
getEndOffset,
getGraphics,
getParent,
getResizeWeight,
getStartOffset,
getToolTipText,
getViewFactory,
getViewIndex,
insert,
insertUpdate,
isVisible,
modelToView,
modelToView,
remove,
removeAll,
removeUpdate,
updateChildren,
viewToModel |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
protected AsyncBoxView.ChildLocator locator
»ý¼ºÀÚ »ó¼¼ |
---|
public AsyncBoxView(Element elem, int axis)
elem
- ³ªÅ¸³»´Â ¸ðµ¨ÀÇ ¿ä¼Òaxis
- ŸÀϸµÀÇ ±âÁØÀ¸·Î ÇÏ´Â Ãà. X_AXIS ¶Ç´Â Y_AXIS
¾î´À ÂÊÀÎÁö¸Þ¼µåÀÇ »ó¼¼ |
---|
public int getMajorAxis()
public int getMinorAxis()
public float getTopInset()
public void setTopInset(float i)
i
- ÀÎ ¼¼Æ®ÀÇ °ªpublic float getBottomInset()
public void setBottomInset(float i)
i
- ÀÎ ¼¼Æ®ÀÇ °ªpublic float getLeftInset()
public void setLeftInset(float i)
i
- ÀÎ ¼¼Æ®ÀÇ °ªpublic float getRightInset()
public void setRightInset(float i)
i
- ÀÎ ¼¼Æ®ÀÇ °ªprotected float getInsetSpan(int axis)
axis
- ÇÕ°è ÀÎ ¼¼Æ®¸¦ °áÁ¤ÇÏ´Â Ãà. X_AXIS ¶Ç´Â Y_AXIS
¾î´À ÂÊÀÎÁöprotected void setEstimatedMajorSpan(boolean isEstimated)
protected boolean getEstimatedMajorSpan()
protected AsyncBoxView.ChildState getChildState(int index)
index
- ÀÚÀÇ À妽º. 0 ÀÌ»óÀ¸·Î getViewCount()º¸´Ù ÀÛÀº °ªÀÎ °Íprotected LayoutQueue getLayoutQueue()
protected AsyncBoxView.ChildState createChildState(View v)
protected void majorRequirementChange(AsyncBoxView.ChildState cs, float delta)
ÀÌ ±¸Çö¿¡¼´Â Ä£ºä¿¡ ÅëÁöÇÒ Çʿ䰡 ÀÖ´Â ¿ä°ÇÀ¸·Î ÁÖÃàÀ» °í·ÁÇÒÁö ¾î¶³Áö¸¦ Àå·¡ È®ÀÎÇϱâ À§Çؼ ÁÖÃàÀ» º¯°æÀÌ ³¡³ »óÅ·μ ¸¶Å© ÇÕ´Ï´Ù. ÁÖÃà°ú ÇÔ²² ½ºÆÒÀÌ Æò°¡µÇÁö ¾Ê´Â °æ¿ì, ÁöÁ¤µÈ µ¨Å¸·Î °»½ÅµÇ¾î, ÁõºÐÀÇ º¯°æÀÌ ¹Ý¿µµË´Ï´Ù. ÁÖµÈ ½ºÆÒÀÌ Æò°¡µÇ´Â °æ¿ì, µ¨Å¸´Â ¹«½ÃµË´Ï´Ù.
protected void minorRequirementChange(AsyncBoxView.ChildState cs)
protected void flushRequirementChanges()
public void replace(int offset, int length, View [] views)
View
³»ÀÇ replace
offset
- ÀÚ ºä¿¡ÀÇ °³½Ã ¿ÀÇÁ¼Â(offset) >= 0length
- ¿Å°Ü³õ´Â ±âÁ¸ÀÇ ºäÀÇ ¼ö >= 0views
- »ðÀÔÇÏ´ÂÀÚ½Ä
ºäprotected void loadChildren(ViewFactory f)
º¸Åë Ãâ·Â ¶ôÀº ÀÚ½ÄÀÌ º¯°æµÇ´Â µ¿¾È Document ·Î º¸°ü À¯ÁöµÇ¾î ·»´õ¸µ thread¿Í ·¹À̾ƿô thread¸¦ ¾ÈÀüÇÏ°Ô À¯ÁöÇÕ´Ï´Ù. À̰Ϳ¡ ´ëÇÑ ¿¹¿Ü´Â ±âÁ¸ÀÇ ¿ä¼Ò¸¦ ³ªÅ¸³»µµ·Ï ÀÌ ¸Þ¼µå¿¡ ÀÇÇØ ºä°¡ Ãʱâ鵃 ¶§·Î ÃʱâÈÁßÀº preferenceChanged¸¦ Á¦¿ÜÇϵµ·Ï µ¿±âÈ µË´Ï´Ù.
f
- ºäÆÄũƮ¸®setParent(javax.swing.text.View)
protected int getViewIndexAtPosition(int pos, Position.Bias b)
pos
- À§Ä¡ >= 0
protected void updateLayout(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a)
View
³»ÀÇ updateLayout
ec
- ÀÌ ºä°¡ Ãë±ÞÇÏ´Â ¿ä¼Ò¿¡ÀÇ º¯°æ. º¯°æÀÌ ¾ø´Â °æ¿ì´Â null
°¡´É¼ºÀÌ ÀÖ´Âe
- °ü·ÃµÈ ¹®¼·ÎºÎÅÍÀÇ º¯°æ Á¤º¸a
- ºäÀÇ ÇöÀçÀÇ ÇÒ´çView.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
,
View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
,
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
public void setParent(View parent)
loadChildren
¸Þ¼µåÀÇ È£Ãâ°ú ÇÔ²² ½´ÆÛ Ŭ·¡½ºÀÇ µ¿ÀÛÀ» Á¦°ø´Ù½Ã Çϱâ À§Çؼ ±¸ÇöÇÕ´Ï´Ù. ÀÚ½ÄÀ» »ý¼ºÀÚ
¾È¿¡ ·ÎµåÇÏÁö ¾Ê°ÔÀÇÇØ ÁÖ¼¼¿ä. À̰ÍÀº ºÎ¸ð¸¦ ¼³Á¤ÇÏ´Â µ¿ÀÛÀÌ ¿øÀÎÀÌ µÇ¾î, ¿¹¸¦ µé¾î ¼ö¿ëÃø ÄÁÅ×À̳ʸ¦ ÃëµæÇϱâ À§Çؼ
ÀÚ½ÄÀÌ °èÃþÀ» °Å½½·¯ ¿Ã¶ó°¡ °Ë»öÇÏ·Á°í Çϱ⠶§¹®ÀÔ´Ï´Ù. ÀÌ ºä°¡ ÀÚ½ÄÀ» °¡Áö´Â °æ¿ì´Â ºä °èÃþ³»°¡ ÀÖ´Â À§Ä¡·ÎºÎÅÍ ´Ù¸¥ À§Ä¡¿¡ À̵¿Çϰí ÀÖÀ¸¹Ç·ÎloadChildren
¸Þ¼µå´Â ºÒ·Á°¡
Áö ¾Ê½À´Ï´Ù.
View
³»ÀÇ setParent
parent
- ºäÀÇ ºÎ¸ð. ¾ø´Â °æ¿ì´Â nullpublic void preferenceChanged(View child, boolean width, boolean height)
View
³»ÀÇ preferenceChanged
child
- ÀÚ ºäwidth
- ÆøÀÇ ¼³Á¤ÀÌ º¯°æµÇ°í ÀÖ´Â °æ¿ì´Â trueheight
- ³ôÀÌÀÇ ¼³Á¤ÀÌ º¯°æµÇ°í ÀÖ´Â °æ¿ì´Â trueJComponent.revalidate()
public void setSize(float width, float height)
ÁÖÃàÀº ºñµ¿±â¿¡°Ô °»½ÅµÇ¾î ŸÀϸµ µÈÀÚ½Ä ÀÇ ÇÕ°è°¡ ¾Æ´Ï¸é ¾ÈµÇ±â ¶§¹®¿¡ ÁÖÃà¿¡ ´ëÇÑ È£ÃâÀº ¹«½ÃµË´Ï´Ù. ÁÖÃà¿¡ À¯¿¬¼ºÀÌ Àֱ⠶§¹®¿¡ ¼Ò½ºÆÒÀÌ º¯°æµÇ¸é 󸮰¡ Å¥¿¡ µé¾î°¡ÀÚ½Ä ÀÇ »çÀÌÁî°¡ º¯°æµË´Ï´Ù.
View
³»ÀÇ setSize
width
-³ÐÀÌ >= 0height
- ³ôÀÌ >= 0public void paint(Graphics g, Shape alloc)
·»´õ¸µÀÇ ´ë»ó ¹üÀ§, Áï Ŭ¸³µÇ¾î ÀÖÁö ¾ÊÀº ¿µ¿ªÀÌ ÃÖ½ÅÀÇ °ÍÀΰ¡ ¾î¶²°¡¸¦ ÆÇÁ¤Çϱâ À§Çؼ ±¸ÇöµË´Ï´Ù. ÃÖ½ÅÀÇ °ÍÀ̸é ÀÚ½ÄÀÌ ·»´õ¸µ µË´Ï´Ù. ÃÖ½ÅÀÇ °ÍÀÌ ¾Æ´Ñ °æ¿ì, ´ë»ó ¿µ¿ªÀ» ÀÛ¼ºÇϴ ŽºÅ©°¡ ¿ì¼± ¼øÀ§ÀÇ ³ôÀº ŽºÅ©·Î¼ ·¹À̾ƿôÀÇ Å¥¿¡ ³õ¿©Áý´Ï´Ù. ÀÌ ¸Þ¼µå´Â À̺¥Æ® thread ¸¶´Ù, Áغñ°¡ µÇ¾î ÀÖÀ¸¸é ·»´õ¸µ¿¡ ÀÇÇØ °è¼Ó À̵¿ÇØ Áغñ°¡ µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â ¿¬±âÇÕ´Ï´Ù. ÆäÀÎÆ® ¿ä±¸´Â ½ºÄÉÁÙ º¯°æ °¡´ÉÇÕ´Ï´Ù
View
³»ÀÇ paint
g
- »ç¿ëÇÏ´Â ·»´õ¸µ Ç¥¸éalloc
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªView.paint(java.awt.Graphics, java.awt.Shape)
public float getPreferredSpan(int axis)
View
³»ÀÇ getPreferredSpan
axis
- View.X_AXIS ¶Ç´Â View.Y_AXIS
IllegalArgumentException
- ÃàÀÇ Å¸ÀÔÀÌ ¹«È¿ÀÎ °æ¿ìView.getPreferredSpan(int)
public float getMinimumSpan(int axis)
View
³»ÀÇ getMinimumSpan
axis
- View.X_AXIS ¶Ç´Â View.Y_AXIS
IllegalArgumentException
- ÃàÀÇ Å¸ÀÔÀÌ ¹«È¿ÀÎ °æ¿ìView.getPreferredSpan(int)
public float getMaximumSpan(int axis)
View
³»ÀÇ getMaximumSpan
axis
- View.X_AXIS ¶Ç´Â View.Y_AXIS
IllegalArgumentException
- ÃàÀÇ Å¸ÀÔÀÌ ¹«È¿ÀÎ °æ¿ìView.getPreferredSpan(int)
public int getViewCount()
View
³»ÀÇ getViewCount
View.getViewCount()
public View getView(int n)
View
³»ÀÇ getView
n
- ¾ò´Â ºäÀÇ ¹øÈ£ >= 0 && < getViewCount()
public Shape getChildAllocation(int index, Shape a)
View
³»ÀÇ getChildAllocation
index
- ÀÚÀÇ À妽º >= 0 && < getViewCount()a
- ÀÌ ºä¿¡ ´ëÇÑ ÇÒ´ç
public int getViewIndex(int pos, Position.Bias b)
View
³»ÀÇ getViewIndex
pos
- À§Ä¡ >= 0
public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
View
³»ÀÇ modelToView
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªb
- À§°ªÀÌ 2°³ÀÇ ºäÀÇ °æ°èÀÎ °æ¿ì¸¦ À§ÇÑ, ¿ÀÇÁ¼Â(offset)¿¡ ÀÇÇØ ³ªÅ¸³»Áö±â ÀüÀÇ ¹®ÀÚ ¶Ç´Â ´ÙÀ½ÀÇ ¹®ÀÚ¿¡ÀÇ ¹ÙÀ̾
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 [] biasReturn)
ÀÌ ¸Þ¼µå´Â GUI thread¿¡ ÀÇÇØ ºÒ·Á°¡ °ü·ÃµÈ ¸ðµ¨·Î Àб⠶ôÀ» º¸°ü À¯ÁöÇÕ´Ï´Ù.ÀÚ½Ä ºä¸¦ ¹èÄ¡ÇØ ChildLocator °´Ã¼ÀÇ ¶ôÀ» »ç¿ëÇØ ±×ÀÚ½Ä ºäÀÇ ÇÒ´çÀ» °áÁ¤ÇØ, ·¹À̾ƿô thread¿ÍÀÇ »óÈ£ÀÛ¿ëÀ» ÇÇÇϱâ À§Çؼ ChildState °´Ã¼ÀÇ ¶ôÀ» »ç¿ëÇØÀÚ½Ä ºäÀÇ viewToModel¸¦ È£ÃâÇϱâ À§Çؼ ±¸ÇöµË´Ï´Ù.
View
³»ÀÇ viewToModel
x
- X ÁÂÇ¥ >= 0y
- Y ÁÂÇ¥ >= 0a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ª
public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias [] biasRet) throws BadLocationException
View
³»ÀÇ getNextVisualPositionFrom
pos
- º¯È¯ ´ë»óÀÇ À§Ä¡ >= 0a
- ·»´õ¸µ¸¦ À§Çؼ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø ¿µ¿ªdirection
- ÇöÀç À§Ä¡·ÎºÎÅÍÀÇ ¹æÇâ. À̰ÍÀº Űº¸µå¿¡ º¸Åë
Á¸ÀçÇÏ´Â Ä¿¼ ۶ó°í º¼ ¼ö°¡ ÀÖ¾îSwingConstants.WEST
, SwingConstants.EAST
, SwingConstants.NORTH
, SwingConstants.SOUTH
¾î¶² °ÍÀΰ¡°¡ µÇ´ÂbiasRet
- üũµÈ ¹ÙÀ̾¸¦ Æ÷ÇÔÇÑ ¹è¿
BadLocationException
- @exception IllegalArgumentException direction
°¡ ¹«È¿ÀÎ °æ¿ì
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.