|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.util.EventObject | +--java.awt.dnd.DragSourceEvent | +--java.awt.dnd.DragSourceDragEvent
DragSourceDragEvent
´Â DragSourceContextPeer
·ÎºÎÅÍ DragSourceContext
¸¦ °³ÀÔ½ÃÄÑ,DragSourceContext
¹× °Å±â¿¡ °ü·ÃÇÏ´Â DragSource
·Î µî·ÏµÈ DragSourceListener
¿¡ º¸³»Áý´Ï´Ù.
DragSourceDragEvent
´Â µå·¯±× Á¶ÀÛÀÇ ÇöÀç »óŸ¦ ¹Ý¿µÇÑ ¡¸Å¸°Ù µå·Ó ¾×¼Ç¡¹°ú¡¸À¯Àú µå·Ó ¾×¼Ç¡¹À» ÅëÁöÇÕ´Ï´Ù.
¡¸Å¸°Ù µå·Ó ¾×¼Ç¡¹Àº ÇöÀçÀÇ µå·Ó Ÿ°ÙÀ¸·Î ¼±ÅÃµÈ µå·Ó ¾×¼ÇÀÌ µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â °æ¿ì, ±× µå·Ó ¾×¼ÇÀ» ³ªÅ¸³»´Â DnDConstants
ÀÇ 1 °³ÀÔ´Ï´Ù. ±× µå·Ó ¾×¼ÇÀÌ µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì´Â DnDConstants.ACTION_NONE
ÀÔ´Ï´Ù.
¡¸À¯Àú µå·Ó ¾×¼Ç¡¹Àº µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ´Â µå·Ó ¾×¼Ç°ú À¯Àú°¡ ¼±ÅÃÇÑ µå·Ó ¾×¼Ç¿¡ µû¶ó¼ ´Ù¸¨´Ï´Ù. À¯Àú´Â µå·¯±× Á¶ÀÛÁß¿¡ ¼ö½Ä ۸¦ ´©¸£´Â °ÍÀ¸·Î, µå·Ó ¾×¼ÇÀ» ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù.
Ctrl + Shift -> ACTION_LINK Ctrl -> ACTION_COPY Shift -> ACTION_MOVEÀ¯Àú°¡ µå·Ó ¾×¼ÇÀ» ¼±ÅÃÇßÀ» °æ¿ì, ¡¸À¯Àú µå·Ó ¾×¼Ç¡¹Àº ¼±ÅÃµÈ µå·Ó ¾×¼ÇÀÌ µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ°í ÀÖÀ¸¸é, ±× µå·Ó ¾×¼ÇÀ» ³ªÅ¸³»´Â
DnDConstants
ÀÇ 1 °³ÀÔ´Ï´Ù. ±× µå·Ó ¾×¼ÇÀÌ µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ¾î ÀÖÁö ¾ÊÀ¸¸é,DnDConstants.ACTION_NONE
ÀÔ´Ï´Ù.
À¯Àú°¡ µå·Ó ¾×¼ÇÀ» ¼±ÅÃÇÏÁö ¾Ê´Â °æ¿ì´Â µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÀÏ·ÃÀÇ µå·Ó ¾×¼ÇÀ» ³ªÅ¸³»´Â DnDConstants
¼¼Æ®·Î DnDConstants.ACTION_MOVE
,DnDConstants.ACTION_COPY
,DnDConstants.ACTION_LINK
°¡ ¼ø¼¿¡ °Ë»öµÇ¾î ¡¸À¯Àú µå·Ó ¾×¼Ç¡¹Àº ÃÖÃÊ·Î ¹ß°ßµÇ´Â Á¤¼ö°¡ µË´Ï´Ù. Á¤¼ö°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì, ¡¸À¯Àú µå·Ó ¾×¼Ç¡¹Àº DnDConstants.ACTION_NONE
°¡ µË´Ï´Ù.
ÇʵåÀÇ °³¿ä |
Ŭ·¡½º java.util. EventObject ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
source |
»ý¼ºÀÚÀÇ °³¿ä | |
DragSourceDragEvent (DragSourceContext dsc,
int dropAction,
int actions,
int modifiers)
DragSourceDragEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
DragSourceDragEvent (DragSourceContext dsc,
int dropAction,
int actions,
int modifiers,
int x,
int y)
DragSourceDragEvent ¸¦ ±¸ÃàÇØ, ÁöÁ¤µÈ DragSourceContext , À¯Àú µå·Ó ¾×¼Ç, Ÿ°Ù µå·Ó ¾×¼Ç, ¼ö½ÄÀÚ, ¹× ÁÂÇ¥¸¦ ÁöÁ¤ÇÕ´Ï´Ù. |
¸Þ¼ÒµåÀÇ °³¿ä | |
int |
getDropAction ()
ÀÌ ¸Þ¼Òµå´Â À¯Àú µå·Ó ¾×¼Ç, Ÿ°Ù µå·Ó ¾×¼Ç, ¹× µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ´Â ÀÏ·ÃÀÇ µå·Ó ¾×¼ÇÀÇ ³í¸®ÀûÀ» µ¹·ÁÁÝ´Ï´Ù. |
int |
getGestureModifiers ()
ÀÌ ¸Þ¼Òµå´Â À¯ÀúÀÇ Á¦½ºÃ߾ °ü·ÃÇÑ ÀÔ·Â µð¹ÙÀ̽º ¼ö½ÄÀÚÀÇ ÇöÀç »óŸ¦ ³ªÅ¸³»´Â int ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getGestureModifiersEx ()
ÀÌ ¸Þ¼Òµå´Â À¯ÀúÀÇ Á¦½ºÃ߾ °ü·ÃÇÑ ÀÔ·Â µð¹ÙÀ̽ºÀÇ È®ÀåµÈ ¼ö½ÄÀÚÀÇ ÇöÀç »óŸ¦ ³ªÅ¸³»´Â int ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
int |
getTargetActions ()
ÀÌ ¸Þ¼Òµå´Â Ÿ°Ù µå·Ó ¾×¼ÇÀ» µ¹·ÁÁÝ´Ï´Ù. |
int |
getUserAction ()
ÀÌ ¸Þ¼Òµå´Â À¯Àú µå·Ó ¾×¼ÇÀ» µ¹·ÁÁÝ´Ï´Ù. |
Ŭ·¡½º java.awt.dnd. DragSourceEvent ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
getDragSourceContext , getLocation , getX , getY |
Ŭ·¡½º java.util. EventObject ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
getSource , toString |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
»ý¼ºÀÚÀÇ »ó¼¼ |
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers)
DragSourceDragEvent
¸¦ ±¸ÃàÇÕ´Ï´Ù. ÀÌ Å¬·¡½º´Â Åë»ó, Ŭ¶óÀ̾ðÆ®ÀÇ ÄÚµå·ÎºÎÅÍ Á÷Á¢Àº ¾Æ´Ï°í,DragSourceContextPeer
¿¡ ÀÇÇØ ÀνºÅϽº°¡ »ý¼ºµË´Ï´Ù. ÀÌ DragSourceDragEvent
ÀÇ ÁÂÇ¥´Â ÁöÁ¤µÇÁö ¾Ê±â ¶§¹®¿¡,getLocation
´Â ÀÌ À̺¥Æ®¿¡ ´ëÇØ¼ null
¸¦ µ¹·ÁÁÝ´Ï´Ù.
dsc
- ÀÌ À̺¥Æ®¿¡ ´ëÇÑ ÅëÁö¸¦ °ü¸®Çϱâ À§ÇÑ DragSourceContext
dropAction
- À¯Àú µå·Ó ¾×¼Çactions
- Ÿ°Ù µå·Ó ¾×¼Çmodifiers
- À̺¥Æ®Áß¿¡ ¹Ð¸° ¼ö½Ä Ű (Shift, Ctrl, Alt, ¸ÞŸ). È®ÀåµÈ _DOWN_MASK ¼ö½ÄÀÚ ¶Ç´Â Á¾·¡ÀÇ _MASK ¼ö½ÄÀÚÀÇ ¾î´À ÂÊÀ» »ç¿ëÇÏÁö¸¸, ¾çÂÊ ¸ðµÎÀÇ ¸ðµ¨À» 1 °³ÀÇ À̺¥Æ®·Î È¥¿ëÇÒ ¼ö ¾ø´Ù. È®ÀåµÈ ¼ö½ÄÀÚÀÇ »ç¿ëÀÌ Ãßõ µÇ´ÂInputEvent
,
DragSourceEvent.getLocation()
public DragSourceDragEvent(DragSourceContext dsc, int dropAction, int actions, int modifiers, int x, int y)
DragSourceDragEvent
¸¦ ±¸ÃàÇØ, ÁöÁ¤µÈ DragSourceContext
, À¯Àú µå·Ó ¾×¼Ç, Ÿ°Ù µå·Ó ¾×¼Ç, ¼ö½ÄÀÚ, ¹× ÁÂÇ¥¸¦ ÁöÁ¤ÇÕ´Ï´Ù.
dsc
- ÀÌ À̺¥Æ®¿¡ °ü·ÃÇÑ DragSourceContext
dropAction
- À¯Àú µå·Ó ¾×¼Çactions
- Ÿ°Ù µå·Ó ¾×¼Çmodifiers
- À̺¥Æ®Áß¿¡ ¹Ð¸° ¼ö½Ä Ű (Shift, Ctrl, Alt, ¸ÞŸ). È®ÀåµÈ _DOWN_MASK ¼ö½ÄÀÚ ¶Ç´Â Á¾·¡ÀÇ _MASK ¼ö½ÄÀÚÀÇ ¾î´À ÂÊÀ» »ç¿ëÇÏÁö¸¸, ¾çÂÊ ¸ðµÎÀÇ ¸ðµ¨À» 1 °³ÀÇ À̺¥Æ®·Î È¥¿ëÇÒ ¼ö ¾ø´Ù. È®ÀåµÈ ¼ö½ÄÀÚÀÇ »ç¿ëÀÌ Ãßõ µÇ´Âx
- Ä¿¼ À§Ä¡ÀÇ ¼öÆò ÁÂÇ¥y
- Ä¿¼ À§Ä¡ÀÇ ¼öÁ÷ ÁÂÇ¥InputEvent
¸Þ¼ÒµåÀÇ »ó¼¼ |
public int getTargetActions()
public int getGestureModifiers()
int
¸¦ µ¹·ÁÁÝ´Ï´Ù. Åë»ó, À̰͵éÀº mouse button ¶Ç´Â Űº¸µå ¼ö½ÄÀÚ°¡ µË´Ï´Ù.
public int getGestureModifiersEx()
int
¸¦ µ¹·ÁÁÝ´Ï´Ù. InputEvent.getModifiersEx()
¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
public int getUserAction()
public int getDropAction()
|
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.