1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-26 08:35:20 +00:00

Format code.

This commit is contained in:
2017-08-04 13:20:57 -07:00
parent b036b6c242
commit 39b36f84e0
14 changed files with 317 additions and 286 deletions

View File

@@ -9,6 +9,7 @@ import java.awt.datatransfer.StringSelection;
/**
* A cell that copies its value to the clipboard
* when double clicked.
*
* @param <S> The type of the table view generic type.
* @param <T> The type of the value contained in the cell.
*/
@@ -17,9 +18,9 @@ public class CopyableCell<S, T> extends TableCell<S, T> {
/**
* Creates a new copyable cell.
*/
public CopyableCell(){
public CopyableCell() {
addEventFilter(MouseEvent.MOUSE_CLICKED, event -> {
if(event.getClickCount() == 2){
if (event.getClickCount() == 2) {
Toolkit.getDefaultToolkit().getSystemClipboard()
.setContents(new StringSelection(getText()), null);
}