JavaTM 2 Platform
Standard Ed. 5.0

javax.swing.event
ÀÎÅÍÆäÀ̽º AncestorListener

¸ðµç ½´ÆÛ ÀÎÅÍÆäÀ̽º:
EventListener

public interface AncestorListener
extends EventListener

»óÀ§ Ŭ·¡½º ¸®½º³ÊÀÔ´Ï´Ù. JComponent ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³ ·Î º¯°æÀÌ ÀϾÀ» ¶§ÀÇ ÅëÁö¸¦ Áö¿ø Çϱâ À§ÇÑ ÀÎÅÍÆäÀ̽ºÀÔ´Ï´Ù. ÀÌ·¯ÇÑ º¯°æ¿¡´Â À̵¿À̳ª, setVisible() ¸Þ¼­µå¿¡ÀÇÇØ ¶Ç´Â ÄÄÆÛ³ÍÆ® °èÃþ¿¡¼­ Ãß°¡ ¶Ç´Â »èÁ¦µÇ´Â °Í¿¡ÀÇÇØ ÄÄÆÛ³ÍÆ®°¡ °¡½Ã ¶Ç´Â ºÒ°¡½Ã°¡ µÇ¾úÀ» °æ¿ìµîÀÌ ÀÖ½À´Ï´Ù.


¸Þ¼­µå °³¿ä
 void ancestorAdded (AncestorEvent  event)
          setVisible(true)°¡ ºÒ·Á°¡ µç°¡ ȤÀº ÄÄÆÛ³ÍÆ® °èÃþ¿¡ Ãß°¡µÇ´Â °Í¿¡ÀÇÇØ ¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ °¡½Ã·Î µÇ¾úÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù.
 void ancestorMoved (AncestorEvent  event)
          ¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ À̵¿ÇßÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù.
 void ancestorRemoved (AncestorEvent  event)
          setVisible(false)°¡ ºÒ·Á°¡ µç°¡ ȤÀº ÄÄÆÛ³ÍÆ® °èÃþÀ¸·ÎºÎÅÍ »èÁ¦µÇ´Â °Í¿¡ÀÇÇØ ¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ ºÒ°¡½Ã°¡ µÇ¾úÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù.
 

¸Þ¼­µåÀÇ »ó¼¼

ancestorAdded

void ancestorAdded(AncestorEvent  event)
setVisible(true)°¡ ºÒ·Á°¡ µç°¡ ȤÀº ÄÄÆÛ³ÍÆ® °èÃþ¿¡ Ãß°¡µÇ´Â °Í¿¡ÀÇÇØ ¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ °¡½Ã·Î µÇ¾úÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¼Ò½º°¡ ½ÇÁ¦·Î °¡½Ã°¡ µÇ¾î ÀÖ´Â °æ¿ì¿¡¸¸ È£ÃâÇÕ´Ï´Ù. ÀÌ°ÍÀÌ true°¡ µÇ±â À§Çؼ­´Â ¸ðµç ºÎ¸ð°¡ °¡½Ã·Î Window¸¦ ·çÆ®·Î ÇÏ´Â °èÃþ¿¡ ÀÖÀ» ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.


ancestorRemoved

void ancestorRemoved(AncestorEvent  event)
setVisible(false)°¡ ºÒ·Á°¡ µç°¡ ȤÀº ÄÄÆÛ³ÍÆ® °èÃþÀ¸·ÎºÎÅÍ »èÁ¦µÇ´Â °Í¿¡ÀÇÇØ ¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ ºÒ°¡½Ã°¡ µÇ¾úÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ¼Ò½º°¡ ½ÇÁ¦·Î ºÒ°¡½Ã°¡ µÇ¾úÀ» °æ¿ì¿¡¸¸ È£ÃâÇÕ´Ï´Ù. ÀÌ°ÍÀÌ true°¡ µÇ±â À§Çؼ­´Â 1°³ ÀÌ»óÀÇ ºÎ¸ð°¡ ºÒ°¡½ÃÀ̵簡 ȤÀº Window¸¦ ·çÆ®·Î ÇÏ´Â °èÃþ¿¡ ¾ø´Â °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù.


ancestorMoved

void ancestorMoved(AncestorEvent  event)
¼Ò½º ¶Ç´Â °Ô´Ù°¡ À§Å¬·¡½ºÀÇ 1°³°¡ À̵¿ÇßÀ» ¶§¿¡ È£ÃâÇÕ´Ï´Ù.


JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.