Skip to content

Commit f20c4ed

Browse files
mgaffiganjonbartels
authored andcommitted
Avoid mixed-eol files
Signed-off-by: Mitch Gaffigan <mitch.gaffigan@comcast.net>
1 parent 593ca85 commit f20c4ed

File tree

5 files changed

+233
-233
lines changed

5 files changed

+233
-233
lines changed
Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
/*
2-
* Copyright (c) Mirth Corporation. All rights reserved.
3-
*
4-
* http://www.mirthcorp.com
5-
*
6-
* The software in this package is published under the terms of the MPL license a copy of which has
7-
* been included with this distribution in the LICENSE.txt file.
8-
*/
9-
10-
package com.mirth.connect.client.ui;
11-
12-
import java.awt.Dimension;
13-
import java.awt.Point;
14-
15-
import javax.swing.Icon;
16-
import javax.swing.UIManager;
17-
18-
/** Creates the error dialog. */
19-
public class CustomErrorDialog extends MirthDialog {
20-
21-
private Frame parent;
22-
public static final String ERROR_SAVING_CHANNEL = "There was an error in the validation of your channel. It has been DISABLED and saved. Before you can deploy you must fix the following error(s):";
23-
public static final String ERROR_VALIDATING_CONNECTOR = "There was an error in the validation of your connector. Please fix the following error(s):";
24-
public static final String ERROR_ENABLING_CHANNEL = "The channel was not configured properly. Please fix the following problem(s) in the channel before trying to enable it again:";
25-
public static final String ERROR_VALIDATING_GLOBAL_SCRIPTS = "There was an error in the validation of your global scripts. Please fix the following error(s):";
26-
27-
public CustomErrorDialog(java.awt.Frame owner, String errorMessage, String errorQuestion) {
28-
super(owner);
29-
initialize(errorMessage, errorQuestion);
30-
}
31-
32-
public CustomErrorDialog(java.awt.Dialog owner, String errorMessage, String errorQuestion) {
33-
super(owner);
34-
initialize(errorMessage, errorQuestion);
35-
}
36-
37-
private void initialize(String errorMessage, String errorQuestion) {
38-
this.parent = PlatformUI.MIRTH_FRAME;
39-
initComponents();
40-
41-
question.setText(errorQuestion);
42-
43-
question.setBackground(UIManager.getColor("Control"));
44-
errorContent.setBackground(UIManager.getColor("Control"));
45-
image.setIcon((Icon) UIManager.get("OptionPane.errorIcon"));
46-
questionPane.setBorder(null);
47-
errorContent.setText(errorMessage);
48-
errorContent.setCaretPosition(0);
49-
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
50-
setModal(true);
51-
pack();
52-
Dimension dlgSize = getPreferredSize();
53-
Dimension frmSize = parent.getSize();
54-
Point loc = parent.getLocation();
55-
56-
if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
57-
setLocationRelativeTo(null);
58-
} else {
59-
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
60-
}
61-
62-
cancel.requestFocusInWindow();
63-
setVisible(true);
64-
}
65-
1+
/*
2+
* Copyright (c) Mirth Corporation. All rights reserved.
3+
*
4+
* http://www.mirthcorp.com
5+
*
6+
* The software in this package is published under the terms of the MPL license a copy of which has
7+
* been included with this distribution in the LICENSE.txt file.
8+
*/
9+
10+
package com.mirth.connect.client.ui;
11+
12+
import java.awt.Dimension;
13+
import java.awt.Point;
14+
15+
import javax.swing.Icon;
16+
import javax.swing.UIManager;
17+
18+
/** Creates the error dialog. */
19+
public class CustomErrorDialog extends MirthDialog {
20+
21+
private Frame parent;
22+
public static final String ERROR_SAVING_CHANNEL = "There was an error in the validation of your channel. It has been DISABLED and saved. Before you can deploy you must fix the following error(s):";
23+
public static final String ERROR_VALIDATING_CONNECTOR = "There was an error in the validation of your connector. Please fix the following error(s):";
24+
public static final String ERROR_ENABLING_CHANNEL = "The channel was not configured properly. Please fix the following problem(s) in the channel before trying to enable it again:";
25+
public static final String ERROR_VALIDATING_GLOBAL_SCRIPTS = "There was an error in the validation of your global scripts. Please fix the following error(s):";
26+
27+
public CustomErrorDialog(java.awt.Frame owner, String errorMessage, String errorQuestion) {
28+
super(owner);
29+
initialize(errorMessage, errorQuestion);
30+
}
31+
32+
public CustomErrorDialog(java.awt.Dialog owner, String errorMessage, String errorQuestion) {
33+
super(owner);
34+
initialize(errorMessage, errorQuestion);
35+
}
36+
37+
private void initialize(String errorMessage, String errorQuestion) {
38+
this.parent = PlatformUI.MIRTH_FRAME;
39+
initComponents();
40+
41+
question.setText(errorQuestion);
42+
43+
question.setBackground(UIManager.getColor("Control"));
44+
errorContent.setBackground(UIManager.getColor("Control"));
45+
image.setIcon((Icon) UIManager.get("OptionPane.errorIcon"));
46+
questionPane.setBorder(null);
47+
errorContent.setText(errorMessage);
48+
errorContent.setCaretPosition(0);
49+
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
50+
setModal(true);
51+
pack();
52+
Dimension dlgSize = getPreferredSize();
53+
Dimension frmSize = parent.getSize();
54+
Point loc = parent.getLocation();
55+
56+
if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
57+
setLocationRelativeTo(null);
58+
} else {
59+
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
60+
}
61+
62+
cancel.requestFocusInWindow();
63+
setVisible(true);
64+
}
65+
6666
// @formatter:off
6767
/**
6868
* This method is called from within the constructor to initialize the form.
@@ -137,20 +137,20 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
137137
);
138138

139139
pack();
140-
}// </editor-fold>//GEN-END:initComponents
141-
// @formatter:on
142-
143-
private void cancelActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_cancelActionPerformed
144-
{// GEN-HEADEREND:event_cancelActionPerformed
145-
this.dispose();
146-
}// GEN-LAST:event_cancelActionPerformed
147-
// Variables declaration - do not modify//GEN-BEGIN:variables
148-
149-
private javax.swing.JButton cancel;
150-
private javax.swing.JTextPane errorContent;
151-
private javax.swing.JLabel image;
152-
private javax.swing.JScrollPane jScrollPane1;
153-
private javax.swing.JTextPane question;
154-
private javax.swing.JScrollPane questionPane;
155-
// End of variables declaration//GEN-END:variables
156-
}
140+
}// </editor-fold>//GEN-END:initComponents
141+
// @formatter:on
142+
143+
private void cancelActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_cancelActionPerformed
144+
{// GEN-HEADEREND:event_cancelActionPerformed
145+
this.dispose();
146+
}// GEN-LAST:event_cancelActionPerformed
147+
// Variables declaration - do not modify//GEN-BEGIN:variables
148+
149+
private javax.swing.JButton cancel;
150+
private javax.swing.JTextPane errorContent;
151+
private javax.swing.JLabel image;
152+
private javax.swing.JScrollPane jScrollPane1;
153+
private javax.swing.JTextPane question;
154+
private javax.swing.JScrollPane questionPane;
155+
// End of variables declaration//GEN-END:variables
156+
}
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
/*
2-
* Copyright (c) Mirth Corporation. All rights reserved.
3-
*
4-
* http://www.mirthcorp.com
5-
*
6-
* The software in this package is published under the terms of the MPL license a copy of which has
7-
* been included with this distribution in the LICENSE.txt file.
8-
*/
9-
10-
package com.mirth.connect.client.ui;
11-
12-
import java.awt.Dimension;
13-
import java.awt.Graphics;
14-
15-
/**
16-
* Creates the heading panel that is used for wizards, login, etc.
17-
*/
18-
public class MirthHeadingPanel extends javax.swing.JPanel {
19-
20-
/** Creates new form MirthHeadingPanel */
21-
public MirthHeadingPanel() {
22-
initComponents();
23-
setOpaque(false);
24-
setPreferredSize(new Dimension(138, 22));
25-
}
26-
27-
protected void paintComponent(Graphics g) {
28-
// Dispaly image at at full size
29-
if (PlatformUI.BACKGROUND_IMAGE != null) {
30-
g.drawImage(PlatformUI.BACKGROUND_IMAGE.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);
31-
}
32-
super.paintComponent(g);
33-
}
34-
1+
/*
2+
* Copyright (c) Mirth Corporation. All rights reserved.
3+
*
4+
* http://www.mirthcorp.com
5+
*
6+
* The software in this package is published under the terms of the MPL license a copy of which has
7+
* been included with this distribution in the LICENSE.txt file.
8+
*/
9+
10+
package com.mirth.connect.client.ui;
11+
12+
import java.awt.Dimension;
13+
import java.awt.Graphics;
14+
15+
/**
16+
* Creates the heading panel that is used for wizards, login, etc.
17+
*/
18+
public class MirthHeadingPanel extends javax.swing.JPanel {
19+
20+
/** Creates new form MirthHeadingPanel */
21+
public MirthHeadingPanel() {
22+
initComponents();
23+
setOpaque(false);
24+
setPreferredSize(new Dimension(138, 22));
25+
}
26+
27+
protected void paintComponent(Graphics g) {
28+
// Dispaly image at at full size
29+
if (PlatformUI.BACKGROUND_IMAGE != null) {
30+
g.drawImage(PlatformUI.BACKGROUND_IMAGE.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);
31+
}
32+
super.paintComponent(g);
33+
}
34+
3535
// @formatter:off
3636
/**
3737
* This method is called from within the constructor to initialize the form.
@@ -52,9 +52,9 @@ private void initComponents() {
5252
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
5353
.addGap(0, 300, Short.MAX_VALUE)
5454
);
55-
}// </editor-fold>//GEN-END:initComponents
56-
// @formatter:on
57-
58-
// Variables declaration - do not modify//GEN-BEGIN:variables
59-
// End of variables declaration//GEN-END:variables
60-
}
55+
}// </editor-fold>//GEN-END:initComponents
56+
// @formatter:on
57+
58+
// Variables declaration - do not modify//GEN-BEGIN:variables
59+
// End of variables declaration//GEN-END:variables
60+
}
Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
/*
2-
* Copyright (c) Mirth Corporation. All rights reserved.
3-
*
4-
* http://www.mirthcorp.com
5-
*
6-
* The software in this package is published under the terms of the MPL license a copy of which has
7-
* been included with this distribution in the LICENSE.txt file.
8-
*/
9-
10-
package com.mirth.connect.client.ui;
11-
12-
import java.awt.Color;
13-
import java.awt.Dimension;
14-
import java.awt.Point;
15-
16-
public class ViewContentDialog extends MirthDialog {
17-
18-
private Frame parent;
19-
20-
public ViewContentDialog(String text) {
21-
super(PlatformUI.MIRTH_FRAME);
22-
this.parent = PlatformUI.MIRTH_FRAME;
23-
initComponents();
24-
messageContent.setText(text.replaceAll("\\t", "\n"));
25-
messageContent.setCaretPosition(0);
26-
messageContent.setLineWrap(true);
27-
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
28-
setModal(true);
29-
pack();
30-
Dimension dlgSize = getPreferredSize();
31-
Dimension frmSize = parent.getSize();
32-
Point loc = parent.getLocation();
33-
34-
if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
35-
setLocationRelativeTo(null);
36-
} else {
37-
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
38-
}
39-
setVisible(true);
40-
}
41-
1+
/*
2+
* Copyright (c) Mirth Corporation. All rights reserved.
3+
*
4+
* http://www.mirthcorp.com
5+
*
6+
* The software in this package is published under the terms of the MPL license a copy of which has
7+
* been included with this distribution in the LICENSE.txt file.
8+
*/
9+
10+
package com.mirth.connect.client.ui;
11+
12+
import java.awt.Color;
13+
import java.awt.Dimension;
14+
import java.awt.Point;
15+
16+
public class ViewContentDialog extends MirthDialog {
17+
18+
private Frame parent;
19+
20+
public ViewContentDialog(String text) {
21+
super(PlatformUI.MIRTH_FRAME);
22+
this.parent = PlatformUI.MIRTH_FRAME;
23+
initComponents();
24+
messageContent.setText(text.replaceAll("\\t", "\n"));
25+
messageContent.setCaretPosition(0);
26+
messageContent.setLineWrap(true);
27+
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
28+
setModal(true);
29+
pack();
30+
Dimension dlgSize = getPreferredSize();
31+
Dimension frmSize = parent.getSize();
32+
Point loc = parent.getLocation();
33+
34+
if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
35+
setLocationRelativeTo(null);
36+
} else {
37+
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
38+
}
39+
setVisible(true);
40+
}
41+
4242
// @formatter:off
4343
/**
4444
* This method is called from within the constructor to initialize the form.
@@ -51,7 +51,7 @@ public ViewContentDialog(String text) {
5151
private void initComponents() {
5252

5353
jPanel1 = new javax.swing.JPanel();
54-
jScrollPane1 = new javax.swing.JScrollPane();
54+
jScrollPane1 = new javax.swing.JScrollPane();
5555
messageContent = new javax.swing.JTextArea();
5656
jButton1 = new javax.swing.JButton();
5757

@@ -60,7 +60,7 @@ private void initComponents() {
6060

6161
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
6262

63-
messageContent.setEditable(false);
63+
messageContent.setEditable(false);
6464
messageContent.setBackground(UIConstants.BACKGROUND_COLOR);
6565
jScrollPane1.setViewportView(messageContent);
6666

@@ -104,18 +104,18 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
104104
);
105105

106106
pack();
107-
}// </editor-fold>//GEN-END:initComponents
108-
// @formatter:on
109-
110-
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_jButton1ActionPerformed
111-
{// GEN-HEADEREND:event_jButton1ActionPerformed
112-
this.dispose();
113-
}// GEN-LAST:event_jButton1ActionPerformed
114-
// Variables declaration - do not modify//GEN-BEGIN:variables
115-
116-
private javax.swing.JButton jButton1;
117-
private javax.swing.JPanel jPanel1;
118-
private javax.swing.JScrollPane jScrollPane1;
119-
private javax.swing.JTextArea messageContent;
120-
// End of variables declaration//GEN-END:variables
121-
}
107+
}// </editor-fold>//GEN-END:initComponents
108+
// @formatter:on
109+
110+
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_jButton1ActionPerformed
111+
{// GEN-HEADEREND:event_jButton1ActionPerformed
112+
this.dispose();
113+
}// GEN-LAST:event_jButton1ActionPerformed
114+
// Variables declaration - do not modify//GEN-BEGIN:variables
115+
116+
private javax.swing.JButton jButton1;
117+
private javax.swing.JPanel jPanel1;
118+
private javax.swing.JScrollPane jScrollPane1;
119+
private javax.swing.JTextArea messageContent;
120+
// End of variables declaration//GEN-END:variables
121+
}

0 commit comments

Comments
 (0)