|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLayeredPane
JLayeredPane
´Â JFC/Swing ÄÁÅ×À̳ʿ¡ ±íÀ̸¦ Ãß°¡ÇØ, ÇÊ¿äÇϸé ÄÄÆÛ³ÍÆ® ³¢¸®°¡ ¼·Î ¿À¹ö·¦ ÇÒ ¼ö ÀÖ°Ô ÇÕ´Ï´Ù. Integer
¿ÀºêÁ§Æ®´Â ÄÁÅ×À̳ʳ»¿¡¼ÀÇ °¢ ÄÄÆÛ³ÍÆ®ÀÇ ±íÀ̸¦ ³ªÅ¸³», ¹øÈ£°¡ Å« ¸¸Å ´Ù¸¥ ÄÄÆÛ³ÍÆ® À§¿¡ Ç¥½ÃµË´Ï´Ù. °èÃþÈ ±¸È¹¿¡ °üÇÑ Å½ºÅ© ÁöÇâÀÇ ¹®¼ ¹× »ç¿ë¿¹´Â ¡¸The Java Tutorial¡¹ÀÇ¡¸How to Use a Layered Pane¡¹¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
JLayeredPane
´Â ±íÀÌÀÇ ¹üÀ§¸¦ ¸î°³ÀÇ ·¹À̾ ºÐÇÒÇϰí ÀÖ½À´Ï´Ù. ÄÄÆÛ³ÍÆ®¸¦ ÀÌ·¯ÇÑ ·¹À̾îÀÇ ¾î¶² °ÍÀΰ¡¿¡ ¹èÄ¡ÇÏ´Â °ÍÀ¸·Î, ±íÀ̸¦ ÁöÁ¤ÇÏ´Â ¹øÈ£¸¦ ÁöÁ¤ÇÏ´Â °Í ¾øÀÌ , ÄÄÆÛ³ÍÆ®¸¦ ÀûÀýÈ÷ ¿À¹ö·¦ ½Ãų ¼ö°¡ ÀÖ½À´Ï´Ù.
JLayeredPane
ÀÇ ¸Þ¼ÒµåÀÎ moveToFront(Component)
,moveToBack(Component)
, ¹× setPosition
¸¦ »ç¿ëÇÏ´Â °ÍÀ¸·Î, ·¹À̾¿¡¼ ÄÄÆÛ³ÍÆ®¸¦ Àç¹èÄ¡ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. setLayer
¸Þ¼Òµå¸¦ »ç¿ëÇϸé(ÀÚ), ÄÄÆÛ³ÍÆ®ÀÇ ÇöÀçÀÇ ·¹À̾ º¯°æÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù.
JLayeredPane
´Â Container
¿Í °°ÀÌ ¾ÆÀÌÀÇ ¸®½ºÆ®¸¦ °ü¸®ÇÕ´Ï´Ù¸¸, ³»ºÎ¿¡¼ º¹¼öÀÇ ·¹À̾ Á¤ÀÇÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. °°Àº ·¹À̾ ¼ÓÇÏ´Â ¾ÆÀÌ´Â Åë»óÀÇ Container
¿ÀºêÁ§Æ®¿Í ¿ÏÀüÈ÷ ¶È°°ÀÌ °ü¸®µË´Ï´Ù¸¸, ¾ÆÀÌ ÄÄÆÛ³ÍÆ®³¢¸®°¡ ¿À¹ö·¦ ÇßÀ» °æ¿ì¿¡´Â »óÀ§ÀÇ ·¹À̾îÀÇ ÄÄÆÛ³ÍÆ®°¡ ÇÏÀ§ ·¹À̾îÀÇ ÄÄÆÛ³ÍÆ®º¸´Ù À§¿¡ Ç¥½ÃµË´Ï´Ù.
°¢ ·¹À̾´Â °³º°ÀÇ Á¤¼öÄ¡¸¦ ÇÒ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. Component
ÀÇ ·¹ÀÌ¾î ¼Ó¼ºÀ» ¼³Á¤ÇÏ·Á¸é , add È£Ãâ·Î Integer
¿ÀºêÁ§Æ®¸¦ °Ç³×ÁÝ´Ï´Ù.
·Ê:
layeredPane.add(child, JLayeredPane.DEFAULT_LAYER); ¶Ç´Â layeredPane.add(child, new Integer(10));Component ÀÇ ·¹ÀÌ¾î ¼Ó¼ºÀ» ¼³Á¤ÇÏ·Á¸é , ÄÄÆÛ³ÍÆ®ÀÇ ºÎ¸ðÀÎ
JlayeredPane
»ó¿¡¼
layeredPaneParent.setLayer(child, 10)(À»)¸¦ È£ÃâÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ·¹À̾î´Â ¾ÆÀ̸¦ ºÎ¸ð¿¡°Ô Ãß°¡Çϱâ ÀüÀ¸·Î ¼³Á¤ÇÏÁö ¾ÊÀ¸¸é ¾ÈµË´Ï´Ù.
¹øÈ£°¡ Å« ·¹À̾î(Á¤µµ)¸¸Å À§¿¡ Ç¥½ÃµË´Ï´Ù. µû¶ó¼, ´ÙÀ½°ú °°ÀÌ °¢ ÄÄÆÛ³ÍÆ®¿¡ °³º°ÀÇ ·¹ÀÌ¾î ¹øÈ£¿Í ij¸¯Å͸¦ ÇÒ´çÇÏ´Â °ÍÀ¸·Î,
5a, 5b, 5c, 2a, 2b, 2c, 1a¿ÞÂÊÀÇ ÄÄÆÛ³ÍÆ®(Á¤µµ)¸¸Å À§¿¡ Ç¥½ÃµË´Ï´Ù.
ÄÄÆÛ³ÍÆ®¸¦ ·¹À̾¿¡¼ ¸Ç À§ ¶Ç´Â ¸Ç ¹Ø¿¡ À̵¿½ÃŰ·Á¸é ,moveToFront
¶Ç´Â moveToBack
¸¦ È£ÃâÇÕ´Ï´Ù.
·¹À̾¿¡¼ÀÇ ÄÄÆÛ³ÍÆ®ÀÇ À§Ä¡¸¦ À§Ä¡ ¹øÈ£·Î ÁöÁ¤ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÁöÁ¤ÇÒ ¼ö ÀÖ´Â À§Ä¡ ¹øÈ£´Â 0 ~ ¡¸·¹À̾ÀÇ ÄÄÆÛ³ÍÆ®¼ö - 1¡¹ÀÔ´Ï´Ù. -1 (À»)¸¦ ÁöÁ¤Çϸé(ÀÚ), ÄÄÆÛ³ÍÆ®´Â ¸Ç ¹Ø¿¡ Ç¥½ÃµË´Ï´Ù. 0 À» ÁöÁ¤Çϸé(ÀÚ), ÄÄÆÛ³ÍÆ®´Â ¸Ç À§¿¡ Ç¥½ÃµË´Ï´Ù. ·¹ÀÌ¾î ¹øÈ£¿Í´Â ´Þ¶ó, °ªÀÌ Å« ¸¸Å ¾Æ·¡¿¡ Ç¥½ÃµË´Ï´Ù.
ÁÖ: ÀÌ ¼ø¼ (java.awt.Container ·Î Á¤Àǵǰí ÀÖ´Ù)´Â ·¹ÀÌ¾î ¹øÈ£ÀÇ ¼ø¼ÀÇ ¹Ý´ë·Î µÇ¾î ÀÖ½À´Ï´Ù. Åë»óÀºadd(Component, layer, position) ¸Þ¼ÒµåÀÇ »ç¿ë¿¹¸¦ ³ªÅ¸³À´Ï´Ù. add(5x, 5, -1) È£ÃâÀÇ °á°ú´Â ´ÙÀ½°ú °°½À´Ï´Ù.moveToFront
,moveToBack
, ¹×setLayer
¸¦ »ç¿ëÇÕ´Ï´Ù.
5a, 5b, 5c, 5x, 2a, 2b, 2c, 1aadd(5z, 5, 2) È£ÃâÀÇ °á°ú´Â ´ÙÀ½°ú °°½À´Ï´Ù.
5a, 5b, 5z, 5c, 5x, 2a, 2b, 2c, 1aadd(3a, 3, 7) È£ÃâÀÇ °á°ú´Â ´ÙÀ½°ú °°½À´Ï´Ù.
5a, 5b, 5z, 5c, 5x, 3a, 2a, 2b, 2c, 1aÅë»óÀÇ paint/À̺¥Æ® ¹æ½ÄÀ¸·Î´Â 1a °¡ ¸Ç ¹Ø, 5a °¡ ¸Ç À§¿¡ Ç¥½ÃµË´Ï´Ù.
ÁÖ: ÀÌ·¯ÇÑ ·¹À̾î´Â ´ÜÁö ³í¸®ÀûÀÎ ±¸Á¶À̸ç, LayoutManager ´Â ·¹ÀÌ¾î ¼³Á¤¿¡´Â °ü°è¾øÀÌ, ÀÌ ÄÁÅ×À̳ÊÀÇ ¸ðµç ¾ÆÀÌ ÄÄÆÛ³ÍÆ®¿¡ ¿µÇâÀ» ÁÝ´Ï´Ù.
°æ°í:
ÀÌ Å¬·¡½ºÀÇ Á÷·ÄÈ µÈ ¿ÀºêÁ§Æ®´Â ÇâÈÄÀÇ Swing ¸±¸®½º¿Í ȣȯÀº ¾Æ´Ï°Ô µÉ ¿¹Á¤ÀÔ´Ï´Ù. ÇöÀçÀÇ Á÷·ÄÈÀÇ ¼Æ÷Æ®´Â ´Ü±â°£ÀÇ ¿î¿ëÀ̳ª, °°Àº ¹öÁ¯ÀÇ Swing ¸¦ ½ÇÇàÇÏ´Â ¾îÇø®ÄÉÀ̼ǰ£ÀÇ RMI ¿¡ ÀûÀýÇϰí ÀÖ½À´Ï´Ù. 1.4 ¿¡¼´Â ¸ðµç JavaBeansTM ÀÇ Àå±â°£ÀÇ ¿î¿ë¿¡ ´ëÇÑ ¼Æ÷Æ®°¡ java.beans
ÆÐŰÁö¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù. XMLEncoder
¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
ÁßøµÈ Ŭ·¡½ºÀÇ °³¿ä | |
protected class |
JLayeredPane.AccessibleJLayeredPane
ÀÌ Å¬·¡½º´Â JLayeredPane Ŭ·¡½º¿ëÀÇ À¯Àú º¸Á¶ ±â´ÉÀÇ ¼Æ÷Æ®¸¦ ±¸ÇöÇϰí ÀÖ½À´Ï´Ù. |
Ŭ·¡½º javax.swing. JComponent À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º |
|
Ŭ·¡½º java.awt. Container À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º |
|
Ŭ·¡½º java.awt. Component À» »ó¼Ó¹ÞÀº ÁßøµÈ Ŭ·¡½º |
Component.BltBufferStrategy , Component.FlipBufferStrategy |
ÇʵåÀÇ °³¿ä | |
static Integer |
DEFAULT_LAYER
µðÆúÆ® ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
static Integer |
DRAG_LAYER
µå·¯±× ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
static Integer |
FRAME_CONTENT_LAYER
ÇÁ·¹ÀÓ ³»¿ë ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
static String |
LAYER_PROPERTY
¹Ù¿îµå ÇÁ·ÎÆÛƼÀÔ´Ï´Ù. |
static Integer |
MODAL_LAYER
¸ð´ú ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
static Integer |
PALETTE_LAYER
ÆÈ·¹Æ® ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
static Integer |
POPUP_LAYER
pop-up ·¹À̾ Á¤ÀÇÇÏ´Â °£ÀÌ ¿ÀºêÁ§Æ®ÀÔ´Ï´Ù. |
Ŭ·¡½º javax.swing. JComponent ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
accessibleContext , listenerList , TOOL_TIP_TEXT_KEY , ui , UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW |
Ŭ·¡½º java.awt. Component ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT |
ÀÎÅÍÆäÀ̽º java.awt.image. ImageObserver ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
»ý¼ºÀÚÀÇ °³¿ä | |
JLayeredPane ()
»õ·Î¿î JLayeredPane ¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
protected void |
addImpl (Component comp,
Object constraints,
int index)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦ ÄÁÅ×À̳ÊÀÇ À妽º·Î ÁöÁ¤µÈ À§Ä¡¿¡ Ãß°¡ÇÕ´Ï´Ù. |
AccessibleContext |
getAccessibleContext ()
ÀÌ JLayeredPane ¿¡ °ü·ÃÇÑ AccessibleContext ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getComponentCountInLayer (int layer)
ÁöÁ¤µÈ ·¹À̾îÀÇ ÇöÀçÀÇ ¾ÆÀÌÀÇ ¼ö¸¦ µ¹·ÁÁÝ´Ï´Ù. |
Component [] |
getComponentsInLayer (int layer)
ÁöÁ¤µÈ ·¹À̾îÀÇ ÄÄÆÛ³ÍÆ®ÀÇ ¹è¿À» µ¹·ÁÁÝ´Ï´Ù. |
protected Hashtable |
getComponentToLayer ()
ÄÄÆÛ³ÍÆ®¸¦ ·¹À̾ ¸ÅÇÎ ÇÏ´Â ÇØ½Ã Å×À̺íÀ» µ¹·ÁÁÝ´Ï´Ù. |
int |
getIndexOf (Component c)
ÁöÁ¤µÈ Component ÀÇ À妽º¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getLayer (Component c)
ÁöÁ¤µÈ Component ÀÇ ·¹ÀÌ¾î ¼Ó¼ºÀ» µ¹·ÁÁÝ´Ï´Ù. |
static int |
getLayer (JComponent c)
JComponent ÀÇ ·¹À̾î ÇÁ·ÎÆÛƼ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
static JLayeredPane |
getLayeredPaneAbove (Component c)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®¸¦ Æ÷ÇÔÇÑ ÃÖÃÊÀÇ JLayeredPane ¸¦ µ¹·ÁÁÖ´Â °£ÀÌ ¸Þ¼ÒµåÀÔ´Ï´Ù. |
protected Integer |
getObjectForLayer (int layer)
ÁöÁ¤µÈ ·¹À̾ °ü·ÃÇÑ Integer ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getPosition (Component c)
·¹À̾¿¡¼ÀÇ ÄÄÆÛ³ÍÆ®ÀÇ »ó´ë À§Ä¡¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
highestLayer ()
ÇöÀçÀÇ ¸ðµç ¾ÆÀ̷κÎÅÍ ÃÖ´ë ·¹À̾îÄ¡¸¦ µ¹·ÁÁÝ´Ï´Ù. |
protected int |
insertIndexForLayer (int layer,
int position)
·¹ÀÌ¾î ¹× À§Ä¡ÀÇ ¿ä±¸¿¡ µû¶ó »õ·Î¿î ¾ÆÀ̸¦ »ðÀÔÇÏ´Â ÀûÀýÇÑ À§Ä¡¸¦ °áÁ¤Çϱâ À§ÇÑ ¿ø½ÃÀû ¸Þ¼ÒµåÀÔ´Ï´Ù. |
boolean |
isOptimizedDrawingEnabled ()
±¸È¹³»ÀÇ ÄÄÆÛ³ÍÆ®°¡ ¿À¹ö·¦ °¡´ÉÇÑ °æ¿ì¿¡´Â false ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
lowestLayer ()
ÇöÀçÀÇ ¸ðµç ¾ÆÀ̷κÎÅÍ ÃÖ¼Ò ·¹À̾îÄ¡¸¦ µ¹·ÁÁÝ´Ï´Ù. |
void |
moveToBack (Component c)
ÄÄÆÛ³ÍÆ®¸¦ ÇöÀçÀÇ ·¹À̾î·Î ¸Ç ¹Ø (À§Ä¡ -1)À¸·Î À̵¿ÇÕ´Ï´Ù. |
void |
moveToFront (Component c)
ÄÄÆÛ³ÍÆ®¸¦ ÇöÀçÀÇ ·¹À̾î·Î ¸Ç À§ (À§Ä¡ 0)·Î À̵¿ÇÕ´Ï´Ù. |
void |
paint (Graphics g)
ÁöÁ¤µÈ ±×·¡ÇȽº ¹®¸ÆÀ¸·Î, ÀÌ JLayeredPane ¸¦ Ç¥Çö ÇÕ´Ï´Ù. |
protected String |
paramString ()
ÀÌ JLayeredPane ÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöÀ» µ¹·ÁÁÝ´Ï´Ù. |
static void |
putLayer (JComponent c,
int layer)
JComponent ÀÇ ·¹À̾î ÇÁ·ÎÆÛƼ¸¦ ¼³Á¤ÇÕ´Ï´Ù. |
void |
remove (int index)
ÀÌ ±¸È¹À¸·ÎºÎÅÍ À妽º ÷ºÎÀÇ ÄÄÆÛ³ÍÆ®¸¦ »èÁ¦ÇÕ´Ï´Ù. |
void |
setLayer (Component c,
int layer)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ·¹ÀÌ¾î ¼Ó¼ºÀ» ¼³Á¤ÇØ, ·¹À̾¿¡¼ ¸Ç ¹ØÀÇ ÄÄÆÛ³ÍÆ®·Î ÇÕ´Ï´Ù. |
void |
setLayer (Component c,
int layer,
int position)
ÁöÁ¤µÈ ÄÄÆÛ³ÍÆ®ÀÇ ·¹ÀÌ¾î ¼Ó¼º°ú ·¹À̾¿¡¼ÀÇ ÄÄÆÛ³ÍÆ®ÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÕ´Ï´Ù. |
void |
setPosition (Component c,
int position)
ÄÄÆÛ³ÍÆ®¸¦ ÇöÀçÀÇ ·¹À̾îÀÇ position ·Î À̵¿ÇÕ´Ï´Ù. |
Ŭ·¡½º java.awt. Container ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
add , add , add , add , add , addContainerListener , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , findComponentAt , findComponentAt , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getContainerListeners , getFocusTraversalKeys , getFocusTraversalPolicy , getLayout , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusCycleRoot , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paintComponents , preferredSize , printComponents , processContainerEvent , processEvent , remove , removeAll , removeContainerListener , setFocusCycleRoot , setFocusTraversalKeys , setFocusTraversalPolicy , setLayout , transferFocusBackward , transferFocusDownCycle , validate , validateTree |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
ÇʵåÀÇ »ó¼¼ |
public static final Integer DEFAULT_LAYER
public static final Integer PALETTE_LAYER
public static final Integer MODAL_LAYER
public static final Integer POPUP_LAYER
public static final Integer DRAG_LAYER
public static final Integer FRAME_CONTENT_LAYER
JFrame
public static final String LAYER_PROPERTY
»ý¼ºÀÚÀÇ »ó¼¼ |
public JLayeredPane()
¸Þ¼ÒµåÀÇ »ó¼¼ |
protected void addImpl(Component comp, Object constraints, int index)
Container
ÀÇ ±â¼ú: addLayoutComponent
¸Þ¼Òµå·Î ÄÄÆÛ³ÍÆ®¸¦ Ãß°¡ÇÏ´Â °ÍÀ» ·¹À̾ƿô ¸Å´ÏÀú¿¡ ÅëÁöÇÕ´Ï´Ù. Á¦¾àÀº »ç¿ëµÇ°í ÀÖ´Â ·¹À̾ƿô ¸Å´ÏÀú¸¦ »ç¿ëÇØ Á¤Àǵ˴ϴÙ. ¿¹¸¦ µé¾î BorderLayout
Ŭ·¡½º´Â BorderLayout.NORTH
,BorderLayout.SOUTH
,BorderLayout.EAST
,BorderLayout.WEST
, ¹× BorderLayout.CENTER
ÀÇ 5 °³ÀÇ Á¦ÇÑÀ» Á¤ÀÇÇÕ´Ï´Ù.
ÄÄÆÛ³ÍÆ®°¡ ÀÌ ÄÁÅ×À̳Ê, ¶Ç´Â ±× ¾ÆÀÌ¿¡°Ô µî·ÏÁ¦ÀÇ °æ¿ì, ÀÌ ÄÁÅ×À̳ʿ¡ Ãß°¡Çϱâ Àü¿¡ »èÁ¦µË´Ï´Ù.
À̰ÍÀº ÇÁ·Î±×·¥ÀÌ ÄÁÅ×À̳ʿ¡ÀÇ ¸ðµç Ãß°¡ ¿ä±¸¸¦ ÃßÀûÇÒ Çʿ䰡 ÀÖ´Â °æ¿ì¿¡ ¿À¹ö¶óÀ̵å(override) ÇÏ´Â ¸Þ¼ÒµåÀÔ´Ï´Ù. ´Ù¸¥ ¸ðµç Ãß°¡ ¸Þ¼Òµå¿¡¼´Â ÃßÀûÀ» ½Ç½ÃÇÏÁö ¾Ê½À´Ï´Ù. ¿À¹ö¶óÀ̵å(override) ÇÏ´Â ¸Þ¼Òµå´Â Åë»ó, ¸Þ¼ÒµåÀÇ ½´ÆÛ Ŭ·¡½ºÀÇ ¹öÁ¯ÀÇ È£ÃâÀ» Æ÷ÇÔÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
super.addImpl(comp, constraints, index)
Container
³»ÀÇ addImpl
comp
- Ãß°¡µÇ´Â ÄÄÆÛ³ÍÆ®constraints
- ÀÌ ÄÄÆÛ³ÍÆ®ÀÇ ¹èÄ¡ Á¦¾àÀ» Ç¥ÇöÇÏ´Â ¿ÀºêÁ§Æ®index
- ÄÄÆÛ³ÍÆ®¸¦ »ðÀÔÇÏ´Â ÄÁÅ×À̳ÊÀÇ ¸®½ºÆ®³»¿¡¼ÀÇ À§Ä¡. -1
(Àº)´Â ¸¶Áö¸·¿¡ »ðÀÔÇÏ´Â °ÍÀ» ÀǹÌÇÏ´ÂContainer.add(Component)
,
Container.add(Component, int)
,
Container.add(Component, java.lang.Object)
,
LayoutManager
,
LayoutManager2
public void remove(int index)
Container
³»ÀÇ remove
index
- »èÁ¦ÇÏ´Â ÄÄÆÛ³ÍÆ®¸¦ ÁöÁ¤ÇÑ int Ä¡getIndexOf(java.awt.Component)
public boolean isOptimizedDrawingEnabled()
JComponent
³»ÀÇ isOptimizedDrawingEnabled
JComponent.isOptimizedDrawingEnabled()
public static void putLayer(JComponent c, int layer)
c
- À̵¿ÇÏ´Â JComponentlayer
- À̵¿Ã³ÀÇ ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡setLayer(java.awt.Component, int)
public static int getLayer(JComponent c)
c
- üũ ´ë»óÀÇ JComponent
public static JLayeredPane getLayeredPaneAbove(Component c)
c
- üũ ´ë»óÀÇ Component
JFrame
,
JRootPane
public void setLayer(Component c, int layer)
c
- ·¹À̾ ¼³Á¤ÇÏ´Â Componentlayer
- ¼³Á¤ÇÏ´Â ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡. °ªÀÌ ÀÛÀ» Á¤µµ ÇÏÃþpublic void setLayer(Component c, int layer, int position)
c
- ·¹À̾ ¼³Á¤ÇÏ´Â Componentlayer
- ¼³Á¤ÇÏ´Â ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡. °ªÀÌ ÀÛÀ» Á¤µµ ÇÏÃþposition
- ·¹À̾¿¡¼ÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÏ´Â int Ä¡. 0 ÀÌ ¸Ç À§,-1 °¡ ¸Ç ¹Øpublic int getLayer(Component c)
c
- üũ ´ë»óÀÇ Component
public int getIndexOf(Component c)
c
- üũ ´ë»óÀÇ Component
public void moveToFront(Component c)
c
- À̵¿ÇÏ´Â ComponentsetPosition(Component, int)
public void moveToBack(Component c)
c
- À̵¿ÇÏ´Â ComponentsetPosition(Component, int)
public void setPosition(Component c, int position)
position
·Î À̵¿ÇÕ´Ï´Ù. 0 ÀÌ ¸Ç À§,-1 °¡ ¸Ç ¹ØÀÔ´Ï´Ù.
ÁÖ: À§Ä¡ ¹øÈ£´Â java.awt.Container ¿¡ ÀÇÇØ Á¤Àǵǰí ÀÖ¾î ·¹ÀÌ¾î ¹øÈ£ÀÇ ¼ø¼ÀÇ ¹Ý´ë·Î µÇ¾î ÀÖ½À´Ï´Ù. À§Ä¡ ¹øÈ£°¡ ÀÛÀ» Á¤µµ À§ (0 ÀÌ ¸Ç À§), Å« ¸¸Å ¾Æ·¡°¡ µË´Ï´Ù.
c
- À̵¿ÇÏ´Â Componentposition
- -1 ~ N-1 (N ´Â ÇöÀçÀÇ ·¹À̾îÀÇ ÄÄÆÛ³ÍÆ®¼ö)ÀÇ ¹üÀ§³»ÀÇ int Ä¡public int getPosition(Component c)
c
- üũ ´ë»óÀÇ Component
getComponentCountInLayer(int)
public int highestLayer()
public int lowestLayer()
public int getComponentCountInLayer(int layer)
layer
- üũÇÏ´Â ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡
public Component [] getComponentsInLayer(int layer)
layer
- üũÇÏ´Â ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡
public void paint(Graphics g)
JComponent
³»ÀÇ paint
g
- paintó°¡ µÇ´Â Graphics ¹®¸ÆJComponent.paintComponent(java.awt.Graphics)
,
JComponent.paintBorder(java.awt.Graphics)
,
JComponent.paintChildren(java.awt.Graphics)
,
JComponent.getComponentGraphics(java.awt.Graphics)
,
JComponent.repaint(long, int, int, int, int)
protected Hashtable getComponentToLayer()
protected Integer getObjectForLayer(int layer)
layer
- ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡
protected int insertIndexForLayer(int layer, int position)
layer
- ·¹À̾ ÁöÁ¤ÇÏ´Â int Ä¡position
- ·¹À̾ÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÏ´Â int Ä¡
getIndexOf(java.awt.Component)
protected String paramString()
null
·Î´Â µÇÁö ¾Ê½À´Ï´Ù.
JComponent
³»ÀÇ paramString
public AccessibleContext getAccessibleContext()
Accessible
³»ÀÇ getAccessibleContext
JComponent
³»ÀÇ getAccessibleContext
|
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.