|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.util.EventObject
java.awt.AWTEvent
java.awt.event.ComponentEvent
public class ComponentEvent
ÄÄÆÛ³ÍÆ®ÀÇ À̵¿, »çÀÌÁîÀÇ º¯°æ, °¡½Ã¼ºÀÇ º¯°æÀ» ³ªÅ¸³»´Â Àú·¹º§ÀÇ À̺¥Æ®ÀÔ´Ï´Ù. ÀÌ Å¬·¡½º´Â ±× ¿ÜÀÇ ÄÄÆÛ³ÍÆ® ·¹º§ À̺¥Æ®ÀÇ ·çÆ® Ŭ·¡½ºÀ̱⵵ ÇÕ´Ï´Ù.
ÄÄÆÛ³ÍÆ® À̺¥Æ®´Â ÅëÁö À§Çؼ¸¸ Á¦°øµÇ°í ÀÖ½À´Ï´Ù. AWT´Â ³»ºÎÀûÀ¸·Î ÄÄÆÛ³ÍÆ®ÀÇ À̵¿ ¹× »çÀÌÁî º¯°æÀ» ÀÚµ¿ÀûÀ¸·Î Ãë±ÞÇϹǷΠÇÁ·Î±×·¥ÀÌ À̺¥Æ®¸¦ ¹ÞÀ»Áö ¾î¶³Áö¿¡ °ü°è¾øÀÌ, GUI ·¹À̾ƿôÀº ¿Ã¹Ù¸£°Ô µ¿ÀÛÇÕ´Ï´Ù.
´Ù¸¥ ÄÄÆÛ³ÍÆ® °ü·ÃÀÇ À̺¥Æ® (InputEvent, FocusEvent, WindowEvent, ContainerEvent)ÀÇ base class·Î¼ÀÇ ¿ªÇÒ ¿Ü¿¡ ÀÌ Å¬·¡½º´Â ÄÄÆÛ³ÍÆ®ÀÇ »çÀÌÁî, À§Ä¡, °¡½Ã¼ºÀÇ º¯°æÀ» ³ªÅ¸³»´Â À̺¥Æ®¸¦ Á¤ÀÇÇÕ´Ï´Ù.
ÀÌ Àú·¹º§ÀÇ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®ÀÇ À§Ä¡, »çÀÌÁî, °¡½Ã¼ºÀÌ º¯°æµÇ¾úÀ» ¶§¿¡
List µîÀÇ ÄÄÆÛ³ÍÆ® °´Ã¼¿¡ ÀÇÇØ »ý¼ºµË´Ï´Ù. ¹ß»ýÇÑ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®ÀÇ addComponentListner
¸Þ¼µå¸¦ »ç¿ëÇØ, ±×·¯ÇÑ À̺¥Æ®¸¦ ¹Þµµ·Ï µî·ÏµÇ¾î ¸ðµç ComponentListener
°´Ã¼ ¶Ç´Â ComponentAdapter
°´Ã¼¿¡°Ô °Ç³×Áý´Ï´Ù (ComponentAdapter
°´Ã¼´Â
ComponentListener
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇϰí ÀÖ´Ù). °¢ ¸®½º³Ê °´Ã¼´Â À̺¥Æ®°¡ ¹ß»ýÇßÀ» ¶§¿¡ ComponentEvent
¸¦ ÃëµæÇÕ´Ï´Ù.
ComponentAdapter
,
ComponentListener
,
Tutorial: Writing a Component Listener,
Reference: The Java Class Libraries (update file),
Á÷·ÄÈ µÈ Çü½Ä ÇÊµå °³¿ä | |
---|---|
static int |
COMPONENT_FIRST
ÄÄÆÛ³ÍÆ® À̺¥Æ® ½Äº°ÀÚ¿¡ »ç¿ëÇÏ´Â Á¤¼öÀÇ ¹üÀ§¿¡ ÀÖ´Â ÃÖÃÊÀÇ ¹øÈ£ÀÔ´Ï´Ù. |
static int |
COMPONENT_HIDDEN
ÀÌ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®°¡ ºÒ°¡½Ã°¡ µÈ °ÍÀ» ³ªÅ¸³À´Ï´Ù. |
static int |
COMPONENT_LAST
ÄÄÆÛ³ÍÆ® À̺¥Æ® ½Äº°ÀÚ¿¡ »ç¿ëÇÏ´Â Á¤¼öÀÇ ¹üÀ§¿¡ ÀÖ´Â ¸¶Áö¸· ¹øÈ£ÀÔ´Ï´Ù. |
static int |
COMPONENT_MOVED
ÀÌ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®ÀÇ À§Ä¡ÀÇ º¯°æÀ» ³ªÅ¸³À´Ï´Ù. |
static int |
COMPONENT_RESIZED
ÀÌ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®ÀÇ »çÀÌÁîÀÇ º¯°æÀ» ³ªÅ¸³À´Ï´Ù. |
static int |
COMPONENT_SHOWN
ÀÌ À̺¥Æ®´Â ÄÄÆÛ³ÍÆ®°¡ °¡½Ã°¡ µÈ °ÍÀ» ³ªÅ¸³À´Ï´Ù. |
Ŭ·¡½º java.util. EventObject ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
source |
»ý¼ºÀÚ °³¿ä | |
---|---|
ComponentEvent (Component source,
int id)
ComponentEvent °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
Component |
getComponent ()
À̺¥Æ®ÀÇ ¹ß»ý¿øÀ» ¸®ÅÏÇÕ´Ï´Ù. |
String |
paramString ()
ÀÌ À̺¥Æ®¸¦ ƯÁ¤ÇÏ´Â ÆÄ¶ó¹ÌÅÍÀÇ Ä³¸¯ÅÍ ¶óÀÎÀ» ¸®ÅÏÇÕ´Ï´Ù. |
Ŭ·¡½º java.awt. AWTEvent ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
consume,
getID,
isConsumed,
setSource,
toString |
Ŭ·¡½º java.util. EventObject ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
getSource |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ÇʵåÀÇ »ó¼¼ |
---|
public static final int COMPONENT_FIRST
public static final int COMPONENT_LAST
public static final int COMPONENT_MOVED
public static final int COMPONENT_RESIZED
public static final int COMPONENT_SHOWN
public static final int COMPONENT_HIDDEN
»ý¼ºÀÚ »ó¼¼ |
---|
public ComponentEvent(Component source, int id)
ComponentEvent
°´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
¹«È¿ÀÎ id
¸¦ °Ç³×ÁÖ¸é, ƯÁ¤ÇÒ ¼ö ¾ø´Â µ¿ÀÛÀÌ ¹ß»ýÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â source
°¡ null
ÀÎ °æ¿ì¿¡ IllegalArgumentException
À»
Throw ÇÕ´Ï´Ù.
source
- À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Component
id
- À̺¥Æ®ÀÇ ÇüŸ¦ ³ªÅ¸³»´Â Á¤¼ö
IllegalArgumentException
- source
°¡ nullÀÎ °æ¿ì¸Þ¼µåÀÇ »ó¼¼ |
---|
public Component getComponent()
Component
°´Ã¼, ¶Ç´Â null
(°´Ã¼°¡ Component
ÀÌ ¾Æ´Ñ °æ¿ì)public String paramString()
AWTEvent
³»ÀÇ paramString
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.