Skip to content
Permalink
Browse files

Add clear display button to System Console

  • Loading branch information...
icklesteve committed Aug 16, 2018
1 parent d4c6156 commit 42cb471aab974a0d0efbee2ecdd3698c88cafac6
Showing with 12 additions and 1 deletion.
  1. +2 −0 java/src/apps/AppsBundle.properties
  2. +10 −1 java/src/apps/SystemConsole.java
@@ -46,6 +46,8 @@ ButtonStackTrace = Print Stack Traces
CheckBoxAutoScroll = Auto-scroll
CheckBoxOnTop = Always on top
ToolTipOnTop = If checked, this window will always be displayed in front of any other window
ButtonClear = Clear Display
ButtonClearTip = Clears console screen, does not affect log files

PrintTable = Print Table
PreviewTable = Print Preview Table
@@ -213,8 +213,17 @@ private void createFrame() {
JScrollPane scroll = new JScrollPane(console);
frame.add(scroll, BorderLayout.CENTER);

// Add button to allow copy to clipboard
JPanel p = new JPanel();

// Add button to clear display
JButton clear = new JButton(Bundle.getMessage("ButtonClear"));
clear.addActionListener((ActionEvent event) -> {
console.setText("");
});
clear.setToolTipText(Bundle.getMessage("ButtonClearTip"));
p.add(clear);

// Add button to allow copy to clipboard
JButton copy = new JButton(Bundle.getMessage("ButtonCopyClip"));
copy.addActionListener((ActionEvent event) -> {
StringSelection text = new StringSelection(console.getText());

0 comments on commit 42cb471

Please sign in to comment.
You can’t perform that action at this time.