| | } |
| | |
| | + /** |
| | + * Copies the contents of the selected rows into the clipboard. From |
| | + * <a href="https://stackoverflow.com/a/48126059/59087">StackOverflow</a>. |
| | + * |
| | + * @param table The {@link TableView} having selected rows to copy. |
| | + */ |
| | public void copyToClipboard( final TableView<?> table ) { |
| | final var sb = new StringBuilder(); |
 |
| | sb.append( '\n' ); |
| | } |
| | + |
| | firstRow = false; |
| | boolean firstCol = true; |
| | + |
| | for( final var column : table.getColumns() ) { |
| | if( !firstCol ) { |
| | sb.append( '\t' ); |
| | } |
| | + |
| | firstCol = false; |
| | final var data = column.getCellData( row ); |