|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjava.util.EventObject
java.awt.AWTEvent
java.awt.event.InvocationEvent
public class InvocationEvent
AWT À̺¥Æ®ÀÇ µð½ºÆêÃÄ thread¿¡ ÀÇÇØ µð½ºÆÐÄ¡ µÇ¾úÀ» ¶§¿¡
Runnable »ó¿¡¼ run() ¸Þ¼µå¸¦ ½ÇÇàÇÏ´Â À̺¥Æ®ÀÔ´Ï´Ù. ÀÌ Å¬·¡½º´Â »õ·Î¿î Ŭ·¡½º¸¦ ¼±¾ðÇØ dispatch()¸¦ Á¤ÀÇÇÏ´Â ´ë½Å¿¡
ActiveEvent
ÂüÁ¶ ±¸ÇöÀ¸·Î¼ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
ÀÌ Å¬·¡½ºÀÇ ÀνºÅϽº´Â invokeLater ¹× invokeAndWait
È£Ãâ¿¡ ÀÇÇØ EventQueue¿¡ ³õ¿©Áý´Ï´Ù. À̰Ϳ¡ ÀÇÇØ Ŭ¶óÀ̾ðÆ®ÀÇ Äڵ忡¼´Â Ưº°ÇÑ °æ¿ìÀÇ Äڵ带 ¾²´Â ÀÏ ¾øÀÌ AWTEventListener °´Ã¼³»¿¡
invokeLater ¹× invokeAndWait¿¡ ´ë½ÅÇÏ´Â ÇÔ¼ö¸¦ ±â¼úÇÒ ¼ö ÀÖ½À´Ï´Ù
.
ActiveEvent,
EventQueue.invokeLater(java.lang.Runnable),
EventQueue.invokeAndWait(java.lang.Runnable),
AWTEventListener,
Á÷·ÄÈ µÈ Çü½Ä | ÇÊµå °³¿ä | |
|---|---|
protected boolean |
catchExceptions
true ·Î ¼³Á¤ÇßÀ» °æ¿ì´Â dispatch()°¡ Throwable¸¦ ijġÀÇÇØ ±×°ÍÀ» ¿¹¿ÜÀÇ ÀνºÅϽº º¯¼ö¿¡ Æ÷ÇÔÇÕ´Ï´Ù. |
static int |
INVOCATION_DEFAULT
¸ðµç InvocationEvent¿¡ ´ëÇÑ µðÆúÆ®ÀÇ ½Äº°ÀÚÀÔ´Ï´Ù. |
static int |
INVOCATION_FIRST
È£Ãâ À̺¥Æ® ½Äº°ÀÚ¸¦ ³ªÅ¸³»´Â Á¤¼öÇüÀÇ ¹üÀ§ÀÇ, ÃÖÃÊÀÇ ¹øÈ£ÀÔ´Ï´Ù. |
static int |
INVOCATION_LAST
È£Ãâ À̺¥Æ® ½Äº°ÀÚ¸¦ ³ªÅ¸³»´Â Á¤¼öÇüÀÇ ¹üÀ§ÀÇ, ¸¶Áö¸· ¹øÈ£ÀÔ´Ï´Ù. |
protected Object |
notifier
Runnable.run() ¸Þ¼µåÀÇ º¹±Í ÈÄ Áï½Ã È£ÃâµÇ´Â notifyAll() ¸Þ¼µå¸¦ °¡Áö´Â °´Ã¼ÀÔ´Ï´Ù (nullÀÎ °æ¿ìµµ ÀÖ´Ù). |
protected Runnable |
runnable
È£ÃâµÇ´Â run() ¸Þ¼µå¸¦ °¡Áö´Â Runnable °´Ã¼ÀÔ´Ï´Ù. |
| Ŭ·¡½º java.util. EventObject ·ÎºÎÅÍ »ó¼ÓµÈ Çʵå |
|---|
source |
| »ý¼ºÀÚ °³¿ä | |
|---|---|
protected |
InvocationEvent (Object source,
int id,
Runnable runnable,
Object notifier,
boolean catchThrowables)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
InvocationEvent (Object source,
Runnable runnable)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
InvocationEvent (Object source,
Runnable runnable,
Object notifier,
boolean catchThrowables)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. |
| ¸Þ¼µå °³¿ä | |
|---|---|
void |
dispatch ()
Runnable run() ¸Þ¼µå¸¦ ½ÇÇàÇØ, notifier°¡ ÀÖÀ¸¸é run()°¡ º¹±ÍÇÒ °æ¿ì¿¡ ÅëÁöÇÕ´Ï´Ù. |
Exception |
getException ()
Runnable run() ¸Þ¼µå ½ÇÇà½Ã¿¡ ijġ µÈ ExceptionÀ»
¸®ÅÏÇÕ´Ï´Ù. |
Throwable |
getThrowable ()
Runnable run() ¸Þ¼µå ½ÇÇà½Ã¿¡ ijġ µÈ Throwable¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
long |
getWhen ()
ÀÌ À̺¥Æ®°¡ ¹ß»ýÇÑ ½ÃÁ¡ÀÇ Å¸ÀÓ ½ºÅÆÇÁ¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
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 INVOCATION_FIRST
public static final int INVOCATION_DEFAULT
public static final int INVOCATION_LAST
protected Runnable runnable
protected Object notifier
protected boolean catchExceptions
| »ý¼ºÀÚ »ó¼¼ |
|---|
public InvocationEvent(Object source,
Runnable runnable)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ ¶§, µð½ºÆÐÄ¡ µÇ¾úÀ» ¶§¿¡ runnable
run ¸Þ¼µå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ °´Ã¼¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
À̰ÍÀº °£ÀÌ »ý¼ºÀÚ
ÀÔ´Ï´Ù. InvocationEvent(source, runnable)
Çü½Ä¿¡¼ È£ÃâÇßÀ» °æ¿ì, InvocationEvent (source, runnable, null, false)
È£Ãâ°ú ¿ÏÀüÈ÷ ¶È°°ÀÌ µ¿ÀÛÇÕ´Ï´Ù.
source°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼µå´Â IllegalArgumentExceptionÀ»
Throw ÇÕ´Ï´Ù.
source - À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Objectrunnable - ½ÇÇàµÇ´Â run ¸Þ¼µå¸¦ °¡Áö´Â Runnable °´Ã¼
IllegalArgumentException - source°¡ nullÀÎ °æ¿ìInvocationEvent(Object, Runnable, Object, boolean)
public InvocationEvent(Object source,
Runnable runnable,
Object notifier,
boolean catchThrowables)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ ¶§, µð½ºÆÐÄ¡ µÇ¾úÀ» ¶§¿¡ runnable
run ¸Þ¼µå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ °´Ã¼¸¦ ÁöÁ¤ÇÕ´Ï´Ù. notifier°¡ nullÀÌ ¾Æ´Ñ °æ¿ì´Â run
º¹±Í ÈÄ Áï½Ã ±× °´Ã¼ÀÇ notifyAll()°¡ È£ÃâµË´Ï´Ù.
InvocationEvent(source, runnable, notifier, catchThrowables)
Çü½Ä¿¡¼ È£ÃâÇßÀ» °æ¿ì, InvocationEvent (source, InvocationEvent.INVOCATION_DEFAULT, runnable, notifier, catchThrowables)
È£Ãâ°ú ¿ÏÀüÈ÷ ¶È°°ÀÌ µ¿ÀÛÇÕ´Ï´Ù.
source°¡ nullÀÎ °æ¿ì, ÀÌ ¸Þ¼µå´Â IllegalArgumentExceptionÀ»
Throw ÇÕ´Ï´Ù.
source - À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Objectrunnable - ½ÇÇàµÇ´Â run ¸Þ¼µå¸¦ °¡Áö´Â Runnable °´Ã¼notifier - Runnable.run
º¹±Í ÈÄ¿¡ È£ÃâµÇ´Â notifyAll ¸Þ¼µå¸¦ º¸°ü À¯ÁöÇÏ´Â ObjectcatchThrowables - Runnable
run ¸Þ¼µåÀÇ ½ÇÇà½Ã¿¡
dispatch¿¡ ÀÇÇØ Throwable°¡ ijġ µÇ´ÂÁö, ÀÌ·¯ÇÑ Throwable°¡ EventDispatchThread
µð½ºÆÐÄ¡¸£ÇÁ±îÁö º¸³»Áö´ÂÁö¸¦ ÁöÁ¤ÇÑ´Ù
IllegalArgumentException - source°¡ nullÀÎ °æ¿ìInvocationEvent(Object, int, Runnable, Object, boolean)
protected InvocationEvent(Object source,
int id,
Runnable runnable,
Object notifier,
boolean catchThrowables)
InvocationEvent¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ ¶§, µð½ºÆÐÄ¡ µÇ¾úÀ» ¶§¿¡ runnable
run ¸Þ¼µå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ °´Ã¼¿Í À̺¥Æ®ÀÇ ½Äº°ÀÚ¸¦ ÁöÁ¤ÇÕ´Ï´Ù. notifier°¡ nullÀÌ ¾Æ´Ñ °æ¿ì´Â run
º¹±Í ÈÄ Áï½Ã ±× °´Ã¼ÀÇ notifyAll°¡ È£ÃâµË´Ï´Ù.
¹«È¿ÀÎ id¸¦ °Ç³×ÁÖ¸é, ƯÁ¤ÇÒ ¼ö ¾ø´Â µ¿ÀÛÀÌ ¹ß»ýÇÕ´Ï´Ù. ÀÌ ¸Þ¼µå´Â source°¡ nullÀÎ °æ¿ì¿¡ IllegalArgumentExceptionÀ»
Throw ÇÕ´Ï´Ù.
source - À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Objectid - À̺¥Æ®ÀÇ ½Äº°ÀÚrunnable - ½ÇÇàµÇ´Â run ¸Þ¼µå¸¦ °¡Áö´Â Runnable °´Ã¼notifier - Runnable.run
º¹±Í ÈÄ¿¡ È£ÃâµÇ´Â notifyAll ¸Þ¼µå¸¦ º¸°ü À¯ÁöÇÏ´Â ObjectcatchThrowables - Runnable
run ¸Þ¼µåÀÇ ½ÇÇà½Ã¿¡
dispatch¿¡ ÀÇÇØ Throwable°¡ ijġ µÇ´ÂÁö, ÀÌ·¯ÇÑ Throwable°¡ EventDispatchThread
µð½ºÆÐÄ¡¸£ÇÁ±îÁö º¸³»Áö´ÂÁö¸¦ ÁöÁ¤ÇÑ´Ù
IllegalArgumentException - source°¡ nullÀÎ °æ¿ì| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public void dispatch()
run() ¸Þ¼µå¸¦ ½ÇÇàÇØ, notifier°¡ ÀÖÀ¸¸é run()°¡ º¹±ÍÇÒ °æ¿ì¿¡ ÅëÁöÇÕ´Ï´Ù.
ActiveEvent ³»ÀÇ dispatch public Exception getException()
run() ¸Þ¼µå ½ÇÇà½Ã¿¡ ijġ µÈ ExceptionÀ»
¸®ÅÏÇÕ´Ï´Ù.
public Throwable getThrowable()
run() ¸Þ¼µå ½ÇÇà½Ã¿¡ ijġ µÈ Throwable¸¦ ¸®ÅÏÇÕ´Ï´Ù.
public long getWhen()
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 µµ ÂüÁ¶ÇϽʽÿÀ.