|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Object java.util.EventObject java.awt.AWTEvent java.awt.event.ItemEvent
public class ItemEvent
Ç׸ñÀÌ ¼±Åà ¶Ç´Â ¼±Åà ÇØÁ¦µÈ °ÍÀ» ³ªÅ¸³»´Â ¼¼¸¸Æ½À̺¥Æ®ÀÔ´Ï´Ù. ÀÌ °í·¹º§ À̺¥Æ®´Â »ç¿ëÀÚ¿¡ ÀÇÇØ Ç׸ñÀÌ ¼±Åà ¶Ç´Â ¼±Åà ÇØÁ¦µÇ¾úÀ» ¶§¿¡
ItemSelectable °´Ã¼ (List µî)¿¡ ÀÇÇØ »ý¼ºµË´Ï´Ù. À̺¥Æ®´Â ±× ÄÄÆÛ³ÍÆ®ÀÇ addItemListener
¸Þ¼µå¸¦ »ç¿ëÇØ, ÀÌ·¯ÇÑ À̺¥Æ®¸¦ ¹Þµµ·Ï µî·ÏµÇ¾î ¸ðµç ItemListener
°´Ã¼¿¡°Ô °Ç³×Áý´Ï´Ù.
ItemListener
ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ°í ÀÖ´Â °´Ã¼´Â À̺¥Æ®°¡ ¹ß»ýÇßÀ» ¶§¿¡ ÀÌ ItemEvent
¸¦ ÃëµæÇÕ´Ï´Ù. µû¶ó¼, ¸®½º³Ê´Â ¸¶¿ì½ºÀÇ °³°³ÀÇ ¿òÁ÷ÀÓÀ̳ª ¸¶¿ì½º Ŭ¸¯À» °³º°ÀûÀ¸·Î ó¸®ÇÏ´Â ÀÏ ¾øÀÌ, ¡¸Ç׸ñÀÌ ¼±ÅṶǴ ¡¸¼±Åà ÇØÁ¦µÇ¾ú´Ù¡¹¶ó°í ³ª¹«¿¡ ¹ß»ýÇÏ´Â À̺¥Æ®µîÀÇ ¡¸Àǹ̰¡ ÀÖ´Ù¡¹À̺¥Æ®¸¦ ó¸®ÇÕ´Ï´Ù.
ItemSelectable
,
ItemListener
,
Tutorial: Writing an Item Listener,
Reference: The Java Class Libraries (update file),
Á÷·ÄÈ µÈ Çü½Ä ÇÊµå °³¿ä | |
---|---|
static int |
DESELECTED
ÀÌ »óÅ º¯°æÄ¡´Â Ç׸ñÀÇ ¼±Åà ÇØÁ¦¸¦ ³ªÅ¸³À´Ï´Ù. |
static int |
ITEM_FIRST
Ç׸ñ À̺¥Æ® ½Äº°ÀÚÀÇ ¹üÀ§¸¦ ³ªÅ¸³»´Â ÃÖÃÊÀÇ ¹øÈ£ÀÔ´Ï´Ù. |
static int |
ITEM_LAST
Ç׸ñ À̺¥Æ® ½Äº°ÀÚÀÇ ¹üÀ§¸¦ ³ªÅ¸³»´Â ¸¶Áö¸· ¹øÈ£ÀÔ´Ï´Ù. |
static int |
ITEM_STATE_CHANGED
ÀÌ À̺¥Æ® ½Äº°ÀÚ´Â Ç׸ñ »óÅÂÀÇ º¯°æÀ» ³ªÅ¸³À´Ï´Ù. |
static int |
SELECTED
ÀÌ »óÅ º¯°æÄ¡´Â Ç׸ñÀÇ ¼±ÅÃÀ» ³ªÅ¸³À´Ï´Ù. |
Ŭ·¡½º java.util. EventObject ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
---|
source |
»ý¼ºÀÚ °³¿ä | |
---|---|
ItemEvent (ItemSelectable source,
int id,
Object item,
int stateChange)
ItemEvent °´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
Object |
getItem ()
À̺¥Æ®¿¡ ÀÇÇØ ¿µÇâÀ» ¹ÞÀº Ç׸ñÀ» ¸®ÅÏÇÕ´Ï´Ù. |
ItemSelectable |
getItemSelectable ()
À̺¥Æ®ÀÇ ¹ß»ý¿øÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
getStateChange ()
»óÅ º¯°æÀÇ Å¸ÀÔ (¼±ÅÃ, ¶Ç´Â ¼±Åà ÇØÁ¦)À» ¸®ÅÏÇÕ´Ï´Ù. |
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 ITEM_FIRST
public static final int ITEM_LAST
public static final int ITEM_STATE_CHANGED
public static final int SELECTED
public static final int DESELECTED
»ý¼ºÀÚ »ó¼¼ |
---|
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange)
ItemEvent
°´Ã¼¸¦ ±¸ÃàÇÕ´Ï´Ù.
¹«È¿ÀÎ id
¸¦ °Ç³×ÁÖ¸é, ƯÁ¤ÇÒ ¼ö ¾ø´Â µ¿ÀÛÀÌ ¹ß»ýÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â source
°¡ null
ÀÎ °æ¿ì¿¡ IllegalArgumentException
À»
Throw ÇÕ´Ï´Ù.
source
- À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ ItemSelectable
°´Ã¼id
- À̺¥Æ®ÀÇ ÇüŸ¦ ƯÁ¤ÇÏ´Â Á¤¼öitem
- °´Ã¼, Áï, À̺¥Æ®¿¡ ÀÇÇØ ¿µÇâÀ» ¹ÞÀº Ç׸ñstateChange
- Ç׸ñÀÌ ¼±ÅõǾú´ÂÁö ¼±Åà ÇØÁ¦µÇ¾ú´ÂÁö¸¦ ³ªÅ¸³»´Â Á¤¼ö
IllegalArgumentException
- source
°¡ nullÀÎ °æ¿ì¸Þ¼µåÀÇ »ó¼¼ |
---|
public ItemSelectable getItemSelectable()
public Object getItem()
public int getStateChange()
SELECTED
,
DESELECTED
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 µµ ÂüÁ¶ÇϽʽÿÀ.