Skip to content

Commit

Permalink
Removed debug lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmbi-glitch committed Aug 13, 2022
1 parent 89cbaba commit 06189fd
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,21 @@ public void copyText() {
ClipboardContent content = new ClipboardContent();
content.putString(textPane.getSelectedText());
systemClipboard.setContent(content);
System.out.println("copied text = " + systemClipboard.getString());
}

public void cutText() {
ClipboardContent content = new ClipboardContent();
String text = textPane.getSelectedText();
selectFrom = textPane.getCaretPosition() - text.length();
selectTo = textPane.getCaretPosition();
System.out.println("selectFrom b4 = " + selectFrom);
System.out.println("selectTo b4 = " + selectTo);
textPane.deleteText(selectFrom, selectTo);
content.putString(text);
systemClipboard.setContent(content);
System.out.println("cut text = " + systemClipboard.getString());
}

public void pasteText() {
if (!systemClipboard.getString().isBlank()) {
textPane.insertText(textPane.getCaretPosition(), systemClipboard.getString());
System.out.println("pasted text");
}
}
@FXML
Expand Down Expand Up @@ -148,7 +143,6 @@ public void saveTextToFile(File fileToSave) {
if (!textPane.getText().isBlank()) {
try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(fileToSave))) {
fileWriter.write(textPane.getText());

} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 06189fd

Please sign in to comment.