|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
ÀüÀÇ Å¬·¡½º ´ÙÀ½ÀÇ Å¬·¡½º | ÇÁ·¹ÀÓ ÀÖ¾î ÇÁ·¹ÀÓ ¾øÀ½ | ||||||||||
°³¿ä: »óÀÚ | Çʵå | constructor | ¸Þ¼Òµå | »ó¼¼: Çʵå | constructor | ¸Þ¼Òµå |
java.lang.Object | +--java.util.EventObject | +--java.awt.dnd.DropTargetEvent | +--java.awt.dnd.DropTargetDropEvent
DropTargetDropEvent
´Â DropTargetListener
ÀÇ drop() ¸Þ¼Òµå¸¦ °³ÀÔ½ÃÄÑ º¸³»Áý´Ï´Ù.
DropTargetDropEvent
´Â µå·¯±×£¦µå·Ó Á¶ÀÛÀÇ ÇöÀç »óŸ¦ ¹Ý¿µÇÑ ¡¸¼Ò½º µå·Ó ¾×¼Ç¡¹°ú¡¸À¯Àú µå·Ó ¾×¼Ç¡¹À» ÅëÁöÇÕ´Ï´Ù.
¡¸¼Ò½º µå·Ó ¾×¼Ç¡¹Àº ÀÌ µå·¯±×£¦µå·Ó Á¶ÀÛÀÇ µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÀÏ·ÃÀÇ µå·Ó ¾×¼ÇÀ» ³ªÅ¸³»´Â DnDConstants
ÀÇ ºñÆ® ´ÜÀ§ÀÇ ¸¶½ºÅ©ÀÔ´Ï´Ù.
¡¸À¯Àú µå·Ó ¾×¼Ç¡¹Àº µå·¯±× ¼Ò½º·Î ¼Æ÷Æ®µÇ´Â µå·Ó ¾×¼Ç°ú À¯Àú°¡ ¼±ÅÃÇÑ µå·Ó ¾×¼Ç¿¡ µû¶ó¼ ´Ù¸¨´Ï´Ù. À¯Àú´Â µå·¯±× Á¶ÀÛÁß¿¡ ¼ö½Ä ۸¦ ´©¸£´Â °ÍÀ¸·Î, µå·Ó ¾×¼ÇÀ» ¼±ÅÃÇÒ ¼ö ÀÖ½À´Ï´Ù.
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.awt.dnd. DropTargetEvent ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
context |
Ŭ·¡½º java.util. EventObject ¿¡¼ »ó¼Ó¹ÞÀº Çʵå |
source |
»ý¼ºÀÚÀÇ °³¿ä | |
DropTargetDropEvent (DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions)
ÀÌ Á¶ÀÛÀÇ DropTargetContext ,Component ÀÇ ÁÂÇ¥¿¡ ÀÖ´Â µå·¯±× Cursor ÀÇ ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡, ÇöÀç ¼±Åõǰí ÀÖ´Â À¯Àú µå·Ó ¾×¼Ç, ¹× Àü¼Û¿øÀ¸·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÇöÀçÀÇ ÀÏ·ÃÀÇ ¾×¼ÇÀ» ÁöÁ¤ÇØ,DropTargetDropEvent ¸¦ ±¸ÃàÇÕ´Ï´Ù. |
|
DropTargetDropEvent (DropTargetContext dtc,
Point cursorLocn,
int dropAction,
int srcActions,
boolean isLocal)
ÀÌ Á¶ÀÛÀÇ DropTargetContext ,Component ÀÇ ÁÂÇ¥¿¡ ÀÖ´Â µå·¯±× Cursor ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡, ÇöÀç À¯Àú°¡ ¼±ÅÃÇÑ µå·Ó ¾×¼Ç, Àü¼Û¿øÀ¸·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÇöÀçÀÇ ÀÏ·ÃÀÇ ¾×¼Ç, ±×¸®°í Àü¼Û¿øÀÌ Å¸°Ù°ú °°Àº JVM ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ³ªÅ¸³»´Â boolean ·Î ÁöÁ¤ÇØ,DropTargetEvent À» ±¸ÃàÇÕ´Ï´Ù.
|
¸Þ¼ÒµåÀÇ °³¿ä | |
void |
acceptDrop (int dropAction)
ÁöÁ¤µÈ ¾×¼ÇÀ» »ç¿ëÇØ, µå·ÓÀ» ¹Þ¾ÆµéÀÔ´Ï´Ù. |
void |
dropComplete (boolean success)
ÀÌ ¸Þ¼Òµå´Â µå·Ó Àü¼ÛÀÌ ¿Ï·áÇÑ °ÍÀ» DragSource ¿¡ ÅëÁöÇÕ´Ï´Ù.
|
DataFlavor [] |
getCurrentDataFlavors ()
ÀÌ ¸Þ¼Òµå´Â ÇöÀçÀÇ DataFlavor ¸¦ µ¹·ÁÁÝ´Ï´Ù. |
List |
getCurrentDataFlavorsAsList ()
ÀÌ ¸Þ¼Òµå´Â ÇöÀç À¯È¿ÇÑ DataFlavor ¸¦ java.util.List ·Î¼ µ¹·ÁÁÝ´Ï´Ù.
|
int |
getDropAction ()
ÀÌ ¸Þ¼Òµå´Â À¯Àú µå·Ó ¾×¼ÇÀ» µ¹·ÁÁÝ´Ï´Ù. |
Point |
getLocation ()
ÀÌ ¸Þ¼Òµå´Â Component ÀÇ ÁÂÇ¥·Î Cursor ÀÇ ÇöÀçÀÇ À§Ä¡¸¦ ³ªÅ¸³»´Â Point ¸¦ µ¹·ÁÁÝ´Ï´Ù.
|
int |
getSourceActions ()
ÀÌ ¸Þ¼Òµå´Â ¼Ò½º µå·Ó ¾×¼ÇÀ» µ¹·ÁÁÝ´Ï´Ù. |
Transferable |
getTransferable ()
ÀÌ ¸Þ¼Òµå´Â µå·Ó¿¡ °ü·ÃÇÑ Transferable ¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
|
boolean |
isDataFlavorSupported (DataFlavor df)
ÀÌ ¸Þ¼Òµå´Â ÁöÁ¤ÇÑ DataFlavor °¡ Àü¼Û¿øÀ¸·Î À¯È¿ÇѰ¡ ¾î¶²°¡¸¦ ³ªÅ¸³»´Â boolean ¸¦ µ¹·ÁÁÝ´Ï´Ù.
|
boolean |
isLocalTransfer ()
ÀÌ ¸Þ¼Òµå´Â Àü¼Û¿øÀÌ Å¸°Ù°ú °°Àº JVM ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ³ªÅ¸³»´Â int ¸¦ µ¹·ÁÁÝ´Ï´Ù.
|
void |
rejectDrop ()
µå·ÓÀ» °ÅºÎÇÕ´Ï´Ù. |
Ŭ·¡½º java.awt.dnd. DropTargetEvent ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
getDropTargetContext |
Ŭ·¡½º java.util. EventObject ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
getSource , toString |
Ŭ·¡½º java.lang. Object ¿¡¼ »ó¼Ó¹ÞÀº ¸Þ¼Òµå |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
»ý¼ºÀÚÀÇ »ó¼¼ |
public DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
DropTargetContext
,Component
ÀÇ ÁÂÇ¥¿¡ ÀÖ´Â µå·¯±× Cursor
ÀÇ ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡, ÇöÀç ¼±Åõǰí ÀÖ´Â À¯Àú µå·Ó ¾×¼Ç, ¹× Àü¼Û¿øÀ¸·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÇöÀçÀÇ ÀÏ·ÃÀÇ ¾×¼ÇÀ» ÁöÁ¤ÇØ,DropTargetDropEvent
¸¦ ±¸ÃàÇÕ´Ï´Ù. µðÆúÆ®¿¡¼´Â ÀÌ constructor Àº Ÿ°ÙÀÌ Àü¼Û¿ø°ú °°Àº °¡»ó ¸Ó½Å¿¡´Â ¾ø´Ù°í º¾´Ï´Ù. Áï isLocalTransfer()
°¡ false
¸¦ µ¹·ÁÁÝ´Ï´Ù.
dtc
- ÀÌ Á¶ÀÛÀÇ DropTargetContext
cursorLocn
- Component
ÀÇ ÁÂÇ¥¿¡¼ÀÇ, ¡¸µå·¯±×¡¹Ä¿¼ ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡dropAction
- À¯Àú µå·Ó ¾×¼ÇsrcActions
- ¼Ò½º µå·Ó ¾×¼Ç
NullPointerException
- cursorLocn °¡ null
ÀÇ °æ¿ì
IllegalArgumentException
dropAction
- ÀÌ DnDConstants
ÀÇ ¾î¶² °ÍÀΰ¡ ³ª¿ÀÁö ¾Ê´Â °æ¿ì
IllegalArgumentException
srcActions
- ÀÌ DnDConstants
ÀÇ ºñÆ® ´ÜÀ§ÀÇ ¸¶½ºÅ©°¡ ¾Æ´Ñ °æ¿ì
IllegalArgumentException
dtc
- °¡ null
ÀÇ °æ¿ìpublic DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)
DropTargetContext
,Component
ÀÇ ÁÂÇ¥¿¡ ÀÖ´Â µå·¯±× Cursor
ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡, ÇöÀç À¯Àú°¡ ¼±ÅÃÇÑ µå·Ó ¾×¼Ç, Àü¼Û¿øÀ¸·Î ¼Æ÷Æ®µÇ°í ÀÖ´Â ÇöÀçÀÇ ÀÏ·ÃÀÇ ¾×¼Ç, ±×¸®°í Àü¼Û¿øÀÌ Å¸°Ù°ú °°Àº JVM ¿¡ ÀÖÀ»Áö ¾î¶³Áö¸¦ ³ªÅ¸³»´Â boolean
·Î ÁöÁ¤ÇØ,DropTargetEvent
À» ±¸ÃàÇÕ´Ï´Ù.
dtc
- ÀÌ Á¶ÀÛÀÇ DropTargetContextcursorLocn
- Component ÀÇ ÁÂÇ¥¿¡¼ÀÇ, ¡¸µå·¯±×¡¹Ä¿¼ ÇÖ ½ºÆ÷Æ®ÀÇ À§Ä¡dropAction
- À¯Àú µå·Ó ¾×¼ÇsrcActions
- ¼Ò½º µå·Ó ¾×¼Ç
NullPointerException
cursorLocn
- °¡ null
ÀÇ °æ¿ì
IllegalArgumentException
dropAction
- ÀÌ DnDConstants
ÀÇ ¾î¶² °ÍÀΰ¡ ³ª¿ÀÁö ¾Ê´Â °æ¿ì
IllegalArgumentException
srcActions
- ÀÌ DnDConstants
ÀÇ ºñÆ® ´ÜÀ§ÀÇ ¸¶½ºÅ©°¡ ¾Æ´Ñ °æ¿ì
IllegalArgumentException
dtc
- °¡ null
ÀÇ °æ¿ì¸Þ¼ÒµåÀÇ »ó¼¼ |
public Point getLocation()
Component
ÀÇ ÁÂÇ¥·Î Cursor
ÀÇ ÇöÀçÀÇ À§Ä¡¸¦ ³ªÅ¸³»´Â Point
¸¦ µ¹·ÁÁÝ´Ï´Ù.
Cursor
À§Ä¡public DataFlavor [] getCurrentDataFlavors()
public List getCurrentDataFlavorsAsList()
DataFlavor
¸¦ java.util.List
·Î¼ µ¹·ÁÁÝ´Ï´Ù.
public boolean isDataFlavorSupported(DataFlavor df)
DataFlavor
°¡ Àü¼Û¿øÀ¸·Î À¯È¿ÇѰ¡ ¾î¶²°¡¸¦ ³ªÅ¸³»´Â boolean
¸¦ µ¹·ÁÁÝ´Ï´Ù.
df
- ÆÇÁ¤ ´ë»óÀÇ DataFlavor
public int getSourceActions()
public int getDropAction()
public Transferable getTransferable()
Transferable
¿ÀºêÁ§Æ®¸¦ µ¹·ÁÁÝ´Ï´Ù.
Transferable
public void acceptDrop(int dropAction)
dropAction
- ÁöÁ¤µÈ ¾×¼Çpublic void rejectDrop()
public void dropComplete(boolean success)
DragSource
¿¡ ÅëÁöÇÕ´Ï´Ù.
success
- µå·Ó Àü¼ÛÀÌ ¿Ï·áÇÑ °ÍÀ» ³ªÅ¸³»´Â boolean
public boolean isLocalTransfer()
int
¸¦ µ¹·ÁÁÝ´Ï´Ù.
|
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.