Merge lp:~tapaal-contributor/tapaal/copy-from-messages into lp:tapaal

Proposed by Lena Ernstsen
Status: Merged
Approved by: Jiri Srba
Approved revision: 1139
Merged at revision: 1138
Proposed branch: lp:~tapaal-contributor/tapaal/copy-from-messages
Merge into: lp:tapaal
Diff against target: 56 lines (+15/-6)
1 file modified
src/pipe/gui/MessengerImpl.java (+15/-6)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/copy-from-messages
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Review via email: mp+407724@code.launchpad.net

Commit message

Possible to copy from specific messages, including error verification messages

To post a comment you must log in.
Revision history for this message
Jiri Srba (srba) wrote :

Tested and works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pipe/gui/MessengerImpl.java'
--- src/pipe/gui/MessengerImpl.java 2011-08-29 23:00:27 +0000
+++ src/pipe/gui/MessengerImpl.java 2021-08-26 09:43:37 +0000
@@ -1,8 +1,6 @@
1package pipe.gui;1package pipe.gui;
22
3import java.awt.Color;3import java.awt.*;
4import java.awt.Dimension;
5import java.awt.Insets;
64
7import javax.swing.JOptionPane;5import javax.swing.JOptionPane;
8import javax.swing.JScrollPane;6import javax.swing.JScrollPane;
@@ -17,7 +15,7 @@
17 }15 }
1816
19 public void displayInfoMessage(String message, String title) {17 public void displayInfoMessage(String message, String title) {
20 showMessageBox(message, title, JOptionPane.INFORMATION_MESSAGE);18 showMessageBox(getTextArea(message), title, JOptionPane.INFORMATION_MESSAGE);
21 }19 }
2220
23 public void displayErrorMessage(String message) {21 public void displayErrorMessage(String message) {
@@ -25,7 +23,7 @@
25 }23 }
2624
27 public void displayErrorMessage(String message, String title) {25 public void displayErrorMessage(String message, String title) {
28 showMessageBox(message, title, JOptionPane.ERROR_MESSAGE);26 showMessageBox(getTextArea(message), title, JOptionPane.ERROR_MESSAGE);
29 }27 }
3028
31 private void showMessageBox(Object message, String title, int messageType) {29 private void showMessageBox(Object message, String title, int messageType) {
@@ -36,7 +34,7 @@
36 public void displayWrappedErrorMessage(String message, String title) {34 public void displayWrappedErrorMessage(String message, String title) {
37 JTextArea textArea = new JTextArea(message);35 JTextArea textArea = new JTextArea(message);
38 textArea.setEditable(false);36 textArea.setEditable(false);
39 textArea.setEnabled(false);37 textArea.setEnabled(true);
40 textArea.setDisabledTextColor(Color.BLACK);38 textArea.setDisabledTextColor(Color.BLACK);
41 textArea.setLineWrap(true);39 textArea.setLineWrap(true);
42 textArea.setWrapStyleWord(true);40 textArea.setWrapStyleWord(true);
@@ -47,4 +45,15 @@
4745
48 showMessageBox(scrollPane, title, JOptionPane.ERROR_MESSAGE);46 showMessageBox(scrollPane, title, JOptionPane.ERROR_MESSAGE);
49 }47 }
48
49 private JTextArea getTextArea(String message) {
50 JTextArea textArea = new JTextArea(message);
51 textArea.setEditable(false);
52 textArea.setEnabled(true);
53 textArea.setLineWrap(false);
54 textArea.setDisabledTextColor(Color.BLACK);
55 textArea.setBackground(Color.getColor("FFe0d0"));
56
57 return textArea;
58 }
50}59}

Subscribers

People subscribed via source and target branches