S - type of the given TableViewpublic class TableViewCopyAndPaste<S> extends Object
copyColumnFormatters Map, object.toString() is used.
| Modifier and Type | Method and Description |
|---|---|
TableViewCopyAndPaste<S> |
addCopyColumnFormatter(int _colNo,
Function<Object,String> _formatFunc)
Add a formatter for copying cells to clipboard.
|
TableViewCopyAndPaste<S> |
addPasteColumnFormatter(int _colNo,
Function<String,Object> _formatFunc)
Add a formatter for pasting clipboard values to table.
|
static <S> TableViewCopyAndPaste<S> |
create(Class<S> _tblViewGenericClass)
Create a new utility instance.
|
void |
install(javafx.scene.control.TableView<S> _tableView)
Install the created copy and paste listener on the given table.
|
TableViewCopyAndPaste<S> |
setAllowPasteAtTheEnd(boolean _allowPasteAtTheEnd)
Enable/disable pasting results at the end of the table if no selection has been applied.
|
TableViewCopyAndPaste<S> |
setEnablePaste(boolean _enablePaste)
Enable/disable paste support on table.
|
TableViewCopyAndPaste<S> |
setItemFactory(Supplier<S> _itemFactory)
Configure ItemFactory for creating new lines.
|
public static <S> TableViewCopyAndPaste<S> create(Class<S> _tblViewGenericClass)
S - type of table view content_tblViewGenericClass - class used in the TableViewpublic TableViewCopyAndPaste<S> setItemFactory(Supplier<S> _itemFactory)
_itemFactory - itemfactory to usepublic TableViewCopyAndPaste<S> setEnablePaste(boolean _enablePaste)
_enablePaste - true to enable paste feature, false to disablepublic TableViewCopyAndPaste<S> setAllowPasteAtTheEnd(boolean _allowPasteAtTheEnd)
_allowPasteAtTheEnd - true to add pasted content to table ending if no selection. Only used if paste is enabled.public TableViewCopyAndPaste<S> addCopyColumnFormatter(int _colNo, Function<Object,String> _formatFunc)
_colNo - column index (0-based)_formatFunc - formatting lambdapublic TableViewCopyAndPaste<S> addPasteColumnFormatter(int _colNo, Function<String,Object> _formatFunc)
_colNo - column index (0-based)_formatFunc - formatting lambdapublic void install(javafx.scene.control.TableView<S> _tableView)
_tableView - TableView, never nullCopyright © 2020. All rights reserved.