|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
| ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
| °³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå | ||||||||||
java.lang.Object
|
+--java.util.EventObject
|
+--java.awt.AWTEvent
|
+--java.awt.event.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()°¡ Exception ¸¦ 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 catchExceptions)
InvocationEvent |
|
InvocationEvent (Object source,
Runnable runnable)
InvocationEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
InvocationEvent (Object source,
Runnable runnable,
Object notifier,
boolean catchExceptions)
InvocationEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
| ¸Þ¼ÒµåÀÇ °³¿ä | |
void |
dispatch ()
Runnable ÀÇ run() ¸Þ¼Òµå¸¦ ½ÇÇàÇØ, notifier °¡ ÀÖÀ¸¸é run() °¡ º¹±ÍÇÒ °æ¿ì¿¡ ÅëÁöÇÕ´Ï´Ù. |
Exception |
getException ()
Runnable ÀÇ run() ¸Þ¼Òµå ½ÇÇà½Ã¿¡ ijġ µÈ Exception ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
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 ¸Þ¼Òµå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ ¿ÀºêÁ§Æ®¸¦ ÁöÁ¤ÇÕ´Ï´Ù. @param source À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Object
runnable - ½ÇÇàµÇ´Â run ¸Þ¼Òµå¸¦ º¸°ü À¯ÁöÇÏ´Â Runnable ¿ÀºêÁ§Æ®
public InvocationEvent(Object source,
Runnable runnable,
Object notifier,
boolean catchExceptions)
InvocationEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ ¶§, µð½ºÆÌÄ¡ µÇ¾úÀ» ¶§¿¡ runnable ÀÇ run ¸Þ¼Òµå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ ¿ÀºêÁ§Æ®¸¦ ÁöÁ¤ÇÕ´Ï´Ù. notifier °¡ null °¡ ¾Æ´Ñ °æ¿ì´Â run ÀÇ º¹±Í ÈÄ Áï½Ã ±× ¿ÀºêÁ§Æ®ÀÇ notifyAll() °¡ ºÒ·Á °©´Ï´Ù.
source - À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Objectrunnable - ½ÇÇàµÇ´Â run ¸Þ¼Òµå¸¦ °¡Áö´Â Runnable ¿ÀºêÁ§Æ®notifier - Runnable.run ÀÇ º¹±Í ÈÄ¿¡ ºÒ·Á °¡´Â notifyAll ¸Þ¼Òµå¸¦ º¸°ü À¯ÁöÇÏ´Â ObjectcatchExceptions - Runnable ÀÇ run ¸Þ¼ÒµåÀÇ ½ÇÇà½Ã¿¡,dispatch ¿¡ ÀÇÇØ Exception °¡ ijġ µÇ´ÂÁö ÀÌ·¯ÇÑ Exception °¡ EventDispatchThread ÀÇ µð½ºÆÌÄ¡¸£ÇÁ±îÁö º¸³»Áö´ÂÁö¸¦ ÁöÁ¤ÇÑ´Ù.
protected InvocationEvent(Object source,
int id,
Runnable runnable,
Object notifier,
boolean catchExceptions)
InvocationEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ ¶§, µð½ºÆÌÄ¡ µÇ¾úÀ» ¶§¿¡ runnable ÀÇ run ¸Þ¼Òµå¸¦ ½ÇÇàÇÏ´Â ¹ß»ý¿øÀÇ ¿ÀºêÁ§Æ®¿Í À̺¥Æ®ÀÇ ½Äº°ÀÚ¸¦ ÁöÁ¤ÇÕ´Ï´Ù. notifier °¡ null °¡ ¾Æ´Ñ °æ¿ì´Â run ÀÇ º¹±Í ÈÄ Áï½Ã ±× ¿ÀºêÁ§Æ®ÀÇ notifyAll °¡ ºÒ·Á °©´Ï´Ù.
¹«È¿ÀÎ id ¸¦ °Ç³×ÁÖ¾î, ƯÁ¤ÇÒ ¼ö ¾ø´Â µ¿ÀÛÀ» ¹ß»ý½ÃŰÁö ¾Ê°Ô ÇØ ÁÖ¼¼¿ä.
- ÆÄ¶ó¹ÌÅÍ:
source - À̺¥Æ®ÀÇ ¹ß»ý¿øÀÇ Objectid - À̺¥Æ®ÀÇ ½Äº°ÀÚrunnable - ½ÇÇàµÇ´Â run ¸Þ¼Òµå¸¦ °¡Áö´Â Runnable ¿ÀºêÁ§Æ®notifier - Runnable.run ÀÇ º¹±Í ÈÄ¿¡ ºÒ·Á °¡´Â notifyAll ¸Þ¼Òµå¸¦ º¸°ü À¯ÁöÇÏ´Â ObjectcatchExceptions - Runnable ÀÇ run ¸Þ¼ÒµåÀÇ ½ÇÇà½Ã¿¡,dispatch ¿¡ ÀÇÇØ Exception °¡ ijġ µÇ´ÂÁö ÀÌ·¯ÇÑ Exception °¡ EventDispatchThread ÀÇ µð½ºÆÌÄ¡¸£ÇÁ±îÁö º¸³»Áö´ÂÁö¸¦ ÁöÁ¤ÇÑ´Ù. | ¸Þ¼ÒµåÀÇ »ó¼¼ |
public void dispatch()
run() ¸Þ¼Òµå¸¦ ½ÇÇàÇØ, notifier °¡ ÀÖÀ¸¸é run() °¡ º¹±ÍÇÒ °æ¿ì¿¡ ÅëÁöÇÕ´Ï´Ù.
ActiveEvent ³»ÀÇ dispatch public Exception getException()
run() ¸Þ¼Òµå ½ÇÇà½Ã¿¡ ijġ µÈ Exception ¸¦ µ¹·ÁÁÝ´Ï´Ù.
public long getWhen()
public String paramString()
AWTEvent ³»ÀÇ paramString
|
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.