Package com.diffplug.common.swt.dnd
Class StructuredDrag
java.lang.Object
com.diffplug.common.swt.dnd.StructuredDrag
Typed mechanism for implementing drag listeners.
https://eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic interfacestatic interfaceclass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<TValue> StructuredDrag.TypeMapper<TValue>add(TypedTransfer<TValue> transfer, StructuredDrag.TypedDragHandler<TValue> onEvent) Adds a drop for the given filetype.<TValue,TTransfer extends Transfer>
StructuredDrag.TypeMapper<TValue>add(TTransfer transfer, Predicate<TValue> canSetValue, StructuredDrag.TriConsumer<TTransfer, DragSourceEvent, TValue> valueSetter, StructuredDrag.TypedDragHandler<TValue> onEvent) Adds a drag for the given transfer.addFile(StructuredDrag.TypedDragHandler<ImmutableList<File>> onEvent) Adds the ability to drop files.addText(StructuredDrag.TypedDragHandler<String> onEvent) Adds the ability to drop text.voidvoidbooleanhasHandlerFor(Transfer transfer) Returns true if it contains a handler for this transfer type.
-
Constructor Details
-
StructuredDrag
public StructuredDrag()
-
-
Method Details
-
dragInProgress
-
hasHandlerFor
Returns true if it contains a handler for this transfer type. -
add
public <TValue,TTransfer extends Transfer> StructuredDrag.TypeMapper<TValue> add(TTransfer transfer, Predicate<TValue> canSetValue, StructuredDrag.TriConsumer<TTransfer, DragSourceEvent, TValue> valueSetter, StructuredDrag.TypedDragHandler<TValue> onEvent) Adds a drag for the given transfer. -
add
public <TValue> StructuredDrag.TypeMapper<TValue> add(TypedTransfer<TValue> transfer, StructuredDrag.TypedDragHandler<TValue> onEvent) Adds a drop for the given filetype. -
addText
Adds the ability to drop text. -
addFile
public StructuredDrag.TypeMapper<ImmutableList<File>> addFile(StructuredDrag.TypedDragHandler<ImmutableList<File>> onEvent) Adds the ability to drop files. -
getListener
-
applyTo
-
applyTo
-