java.lang.Object
org.jhotdraw8.fxbase.control.ListViewUtil
Provides static utility methods for
ListView.- Author:
- Werner Randelshofer
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidaddDragAndDropSupport(javafx.scene.control.ListView<T> listView, @Nullable javafx.util.Callback<javafx.scene.control.ListView<T>, javafx.scene.control.ListCell<T>> cellFactory, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds drag and drop support to the list viewstatic <T> voidaddDragAndDropSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO) Adds drag and drop support to the list viewstatic <T> voidaddDragAndDropSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds drag and drop support to the list viewstatic <T> voidaddReorderingSupport(javafx.scene.control.ListView<T> listView, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.static <T> voidaddReorderingSupport(javafx.scene.control.ListView<T> listView, javafx.util.Callback<javafx.scene.control.ListView<T>, javafx.scene.control.ListCell<T>> cellFactory, @Nullable ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.static <T> voidaddReorderingSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.
-
Method Details
-
addDragAndDropSupport
public static <T> void addDragAndDropSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO) Adds drag and drop support to the list view- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewclipboardIO- a reader/writer for the clipboard.
-
addDragAndDropSupport
public static <T> void addDragAndDropSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds drag and drop support to the list view- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewclipboardIO- a reader/writer for the clipboard.undoableEditEventConsumer- a consumer for undoable edits
-
addDragAndDropSupport
public static <T> void addDragAndDropSupport(javafx.scene.control.ListView<T> listView, @Nullable javafx.util.Callback<javafx.scene.control.ListView<T>, javafx.scene.control.ListCell<T>> cellFactory, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds drag and drop support to the list viewFIXME should also add support for cut, copy and paste keys
- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewcellFactory- the cell factory of the list viewclipboardIO- a reader/writer for the clipboard.undoableEditEventConsumer-
-
addReorderingSupport
public static <T> void addReorderingSupport(javafx.scene.control.ListView<T> listView, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewundoableEditEventConsumer-
-
addReorderingSupport
public static <T> void addReorderingSupport(javafx.scene.control.ListView<T> listView, ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewclipboardIO- the clipboard i/oundoableEditEventConsumer-
-
addReorderingSupport
public static <T> void addReorderingSupport(javafx.scene.control.ListView<T> listView, javafx.util.Callback<javafx.scene.control.ListView<T>, javafx.scene.control.ListCell<T>> cellFactory, @Nullable ClipboardIO<T> clipboardIO, Consumer<UndoableEditEvent> undoableEditEventConsumer) Adds reordering support to the list view.FIXME should also add support for cut, copy and paste keys.
FIXME only supports lists with single item selection (no multiple item selection yet!).
- Type Parameters:
T- the data type of the list view- Parameters:
listView- the list viewcellFactory- the cell factory of the list viewclipboardIO- a reader/writer for the clipboard. You can provide null if you don't want cut/copy/paste functionality.undoableEditEventConsumer-
-