public class StructuredDrag extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StructuredDrag.DropResult |
static class |
StructuredDrag.Listener |
static interface |
StructuredDrag.TriConsumer<A,B,C> |
static interface |
StructuredDrag.TypedDragHandler<T> |
class |
StructuredDrag.TypeMapper<T> |
Constructor and Description |
---|
StructuredDrag() |
Modifier and Type | Method and Description |
---|---|
<TValue,TTransfer extends Transfer> |
add(TTransfer transfer,
Predicate<TValue> canSetValue,
StructuredDrag.TriConsumer<TTransfer,DragSourceEvent,TValue> valueSetter,
StructuredDrag.TypedDragHandler<TValue> onEvent)
Adds a drag for the given transfer.
|
<TValue> StructuredDrag.TypeMapper<TValue> |
add(TypedTransfer<TValue> transfer,
StructuredDrag.TypedDragHandler<TValue> onEvent)
Adds a drop for the given filetype.
|
StructuredDrag.TypeMapper<ImmutableList<File>> |
addFile(StructuredDrag.TypedDragHandler<ImmutableList<File>> onEvent)
Adds the ability to drop files.
|
StructuredDrag.TypeMapper<String> |
addText(StructuredDrag.TypedDragHandler<String> onEvent)
Adds the ability to drop text.
|
void |
applyTo(Control control,
DndOp op) |
void |
applyTo(Control control,
DndOp opA,
DndOp opB) |
com.diffplug.common.rx.RxGetter<Boolean> |
dragInProgress() |
StructuredDrag.Listener |
getListener() |
boolean |
hasHandlerFor(Transfer transfer)
Returns true if it contains a handler for this transfer type.
|
public com.diffplug.common.rx.RxGetter<Boolean> dragInProgress()
public boolean hasHandlerFor(Transfer transfer)
public <TValue,TTransfer extends Transfer> StructuredDrag.TypeMapper<TValue> add(TTransfer transfer, Predicate<TValue> canSetValue, StructuredDrag.TriConsumer<TTransfer,DragSourceEvent,TValue> valueSetter, StructuredDrag.TypedDragHandler<TValue> onEvent)
public <TValue> StructuredDrag.TypeMapper<TValue> add(TypedTransfer<TValue> transfer, StructuredDrag.TypedDragHandler<TValue> onEvent)
public StructuredDrag.TypeMapper<String> addText(StructuredDrag.TypedDragHandler<String> onEvent)
public StructuredDrag.TypeMapper<ImmutableList<File>> addFile(StructuredDrag.TypedDragHandler<ImmutableList<File>> onEvent)
public StructuredDrag.Listener getListener()