2024-03-30
This commit is contained in:
61
doc/29_drag_and_drop.md
Normal file
61
doc/29_drag_and_drop.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Drag & Drop
|
||||
|
||||
## TransferHandler
|
||||
|
||||
* `component.setDragEnabled(boolean)`
|
||||
* `component.setDropMode(DropMode)`
|
||||
* `component.setTransferHandler(TransferHandler)`
|
||||
|
||||
|
||||
### 보내기
|
||||
|
||||
* `getSourceActions(JComponent)` : 보내는 컴포넌트가 어떤 액션을 지원하는지.
|
||||
* `createTransferable(JComponent)` : 데이터를 묶어서 Transferable 객체로 만든다.
|
||||
* `exportDone(JComponent,Transferable,int)` : 내보내기가 완료된 이후에 호출된다.
|
||||
|
||||
### 받기
|
||||
|
||||
* `canImport(Transferable.TransferSupport)` : 드래깅 동작 중 반복적으로 호출되며, 받는 컴퍼넌트가 드롭 동작을 지원하면 true를 반환한다.
|
||||
* `importData(Transferable.TransferSupport)` : 드롭 동작 후에 호출되며, 데이터 전송이 성공한 경우에는 true를 반환한다.
|
||||
|
||||
|
||||
## TransferSupport
|
||||
|
||||
* `getComponent()`
|
||||
* `getDropAction()` : COPY | MOVE | LINK | COPY_OR_MOVE | NONE
|
||||
* `getUserDropAction()`
|
||||
* `getSourceDropActions()`
|
||||
* `getDataFlavors()`
|
||||
* `isDataFlavorSupported(DataFlavor)`
|
||||
* `getTransferable()`
|
||||
* `getDropLocation()`
|
||||
|
||||
* `setShowDropLocation(boolean)`
|
||||
|
||||
## DataFlavor
|
||||
|
||||
* allHtmlFlavor
|
||||
* fragmentHtmlFlavor
|
||||
* imageFlavor
|
||||
* javFileListFlavor
|
||||
* javaJVMLocaleObjectMimeType
|
||||
* javaRemoteObjectMimeType
|
||||
* javaSerializedObjectMimeType
|
||||
* selectionHtmlFlavor
|
||||
* stringFlavor
|
||||
|
||||
## DropLocation
|
||||
* JList.DropLocation
|
||||
* `isInsert()`
|
||||
* `getIndex()`
|
||||
* JTree.DropLocation
|
||||
* `getChildIndex()`
|
||||
* `getPath()`
|
||||
* JTable.DropLocation
|
||||
* `isInsertRow()`
|
||||
* `isInserColumn()`
|
||||
* `getRow()`
|
||||
* `getColumn()`
|
||||
* JTextComponent.DropLocation
|
||||
* `getIndex()`
|
||||
* `getBias()`
|
||||
Reference in New Issue
Block a user