@@ -38,6 +38,7 @@ public abstract class AbstractTextMonitor extends AbstractMonitor {
38
38
protected JTextField textField ;
39
39
protected JButton sendButton ;
40
40
protected JButton clearButton ;
41
+ protected JButton copyButton ;
41
42
protected JCheckBox autoscrollBox ;
42
43
protected JCheckBox addTimeStampBox ;
43
44
protected JComboBox <String > lineEndings ;
@@ -84,6 +85,7 @@ public void windowGainedFocus(WindowEvent e) {
84
85
85
86
sendButton = new JButton (tr ("Send" ));
86
87
clearButton = new JButton (tr ("Clear output" ));
88
+ copyButton = new JButton (tr ("Copy output" ));
87
89
88
90
upperPane .add (textField );
89
91
upperPane .add (Box .createRigidArea (new Dimension (4 , 0 )));
@@ -131,6 +133,8 @@ public void windowGainedFocus(WindowEvent e) {
131
133
pane .add (Box .createRigidArea (new Dimension (8 , 0 )));
132
134
pane .add (serialRates );
133
135
pane .add (Box .createRigidArea (new Dimension (8 , 0 )));
136
+ pane .add (copyButton );
137
+ pane .add (Box .createRigidArea (new Dimension (8 , 0 )));
134
138
pane .add (clearButton );
135
139
136
140
applyPreferences ();
@@ -143,6 +147,7 @@ protected void onEnableWindow(boolean enable)
143
147
{
144
148
textArea .setEnabled (enable );
145
149
clearButton .setEnabled (enable );
150
+ copyButton .setEnabled (enable );
146
151
scrollPane .setEnabled (enable );
147
152
textField .setEnabled (enable );
148
153
sendButton .setEnabled (enable );
@@ -161,6 +166,10 @@ public void onClearCommand(ActionListener listener) {
161
166
clearButton .addActionListener (listener );
162
167
}
163
168
169
+ public void onCopyCommand (ActionListener listener ) {
170
+ copyButton .addActionListener (listener );
171
+ }
172
+
164
173
public void onSerialRateChange (ActionListener listener ) {
165
174
serialRates .addActionListener (listener );
166
175
}
0 commit comments