Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Add credits for copy clipboard code

AuthorDaveJarvis <email>
Date2021-01-02 18:30:23 GMT-0800
Commitcc118716b7ed62b9305a8d2b95dde08ea2746ce4
Parent0f03c6a
Delta9 lines added, 0 lines removed, 9-line increase
src/main/java/com/keenwrite/ui/logging/LogView.java
}
+ /**
+ * 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 );