Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Auto detect text files and perform LF normalization
* text=auto

# Documents
*.csv text eol=crlf

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.eps binary

# Fonts
*.otf binary
*.ttf binary
*.woff binary
*.woff2 binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.ksh text eol=lf
*.sh text eol=lf
*.zsh text eol=lf

# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Archives
*.7z binary
*.bz binary
*.bz2 binary
*.bzip2 binary
*.gz binary
*.lz binary
*.lzma binary
*.rar binary
*.tar binary
*.taz binary
*.tbz binary
*.tbz2 binary
*.tgz binary
*.tlz binary
*.txz binary
*.xz binary
*.Z binary
*.zip binary
*.zst binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.jar binary
*.so binary
*.war binary
*.jks binary

# Common build-tool wrapper scripts ('.cmd' versions are handled by 'Common.gitattributes')
mvnw text eol=lf
gradlew text eol=lf
164 changes: 82 additions & 82 deletions client/src/com/mirth/connect/client/ui/CustomErrorDialog.java
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/
package com.mirth.connect.client.ui;
import java.awt.Dimension;
import java.awt.Point;
import javax.swing.Icon;
import javax.swing.UIManager;
/** Creates the error dialog. */
public class CustomErrorDialog extends MirthDialog {
private Frame parent;
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):";
public static final String ERROR_VALIDATING_CONNECTOR = "There was an error in the validation of your connector. Please fix the following error(s):";
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:";
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):";
public CustomErrorDialog(java.awt.Frame owner, String errorMessage, String errorQuestion) {
super(owner);
initialize(errorMessage, errorQuestion);
}
public CustomErrorDialog(java.awt.Dialog owner, String errorMessage, String errorQuestion) {
super(owner);
initialize(errorMessage, errorQuestion);
}
private void initialize(String errorMessage, String errorQuestion) {
this.parent = PlatformUI.MIRTH_FRAME;
initComponents();
question.setText(errorQuestion);
question.setBackground(UIManager.getColor("Control"));
errorContent.setBackground(UIManager.getColor("Control"));
image.setIcon((Icon) UIManager.get("OptionPane.errorIcon"));
questionPane.setBorder(null);
errorContent.setText(errorMessage);
errorContent.setCaretPosition(0);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setModal(true);
pack();
Dimension dlgSize = getPreferredSize();
Dimension frmSize = parent.getSize();
Point loc = parent.getLocation();
if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
setLocationRelativeTo(null);
} else {
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
}
cancel.requestFocusInWindow();
setVisible(true);
}
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/

package com.mirth.connect.client.ui;

import java.awt.Dimension;
import java.awt.Point;

import javax.swing.Icon;
import javax.swing.UIManager;

/** Creates the error dialog. */
public class CustomErrorDialog extends MirthDialog {

private Frame parent;
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):";
public static final String ERROR_VALIDATING_CONNECTOR = "There was an error in the validation of your connector. Please fix the following error(s):";
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:";
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):";

public CustomErrorDialog(java.awt.Frame owner, String errorMessage, String errorQuestion) {
super(owner);
initialize(errorMessage, errorQuestion);
}

public CustomErrorDialog(java.awt.Dialog owner, String errorMessage, String errorQuestion) {
super(owner);
initialize(errorMessage, errorQuestion);
}

private void initialize(String errorMessage, String errorQuestion) {
this.parent = PlatformUI.MIRTH_FRAME;
initComponents();

question.setText(errorQuestion);

question.setBackground(UIManager.getColor("Control"));
errorContent.setBackground(UIManager.getColor("Control"));
image.setIcon((Icon) UIManager.get("OptionPane.errorIcon"));
questionPane.setBorder(null);
errorContent.setText(errorMessage);
errorContent.setCaretPosition(0);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setModal(true);
pack();
Dimension dlgSize = getPreferredSize();
Dimension frmSize = parent.getSize();
Point loc = parent.getLocation();

if ((frmSize.width == 0 && frmSize.height == 0) || (loc.x == 0 && loc.y == 0)) {
setLocationRelativeTo(null);
} else {
setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
}

cancel.requestFocusInWindow();
setVisible(true);
}

// @formatter:off
/**
* This method is called from within the constructor to initialize the form.
Expand Down Expand Up @@ -137,20 +137,20 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
);

pack();
}// </editor-fold>//GEN-END:initComponents
// @formatter:on
private void cancelActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_cancelActionPerformed
{// GEN-HEADEREND:event_cancelActionPerformed
this.dispose();
}// GEN-LAST:event_cancelActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton cancel;
private javax.swing.JTextPane errorContent;
private javax.swing.JLabel image;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextPane question;
private javax.swing.JScrollPane questionPane;
// End of variables declaration//GEN-END:variables
}
}// </editor-fold>//GEN-END:initComponents
// @formatter:on

private void cancelActionPerformed(java.awt.event.ActionEvent evt)// GEN-FIRST:event_cancelActionPerformed
{// GEN-HEADEREND:event_cancelActionPerformed
this.dispose();
}// GEN-LAST:event_cancelActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton cancel;
private javax.swing.JTextPane errorContent;
private javax.swing.JLabel image;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextPane question;
private javax.swing.JScrollPane questionPane;
// End of variables declaration//GEN-END:variables
}
80 changes: 40 additions & 40 deletions client/src/com/mirth/connect/client/ui/MirthHeadingPanel.java
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/
package com.mirth.connect.client.ui;
import java.awt.Dimension;
import java.awt.Graphics;
/**
* Creates the heading panel that is used for wizards, login, etc.
*/
public class MirthHeadingPanel extends javax.swing.JPanel {
/** Creates new form MirthHeadingPanel */
public MirthHeadingPanel() {
initComponents();
setOpaque(false);
setPreferredSize(new Dimension(138, 22));
}
protected void paintComponent(Graphics g) {
// Dispaly image at at full size
if (PlatformUI.BACKGROUND_IMAGE != null) {
g.drawImage(PlatformUI.BACKGROUND_IMAGE.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);
}
super.paintComponent(g);
}
/*
* Copyright (c) Mirth Corporation. All rights reserved.
*
* http://www.mirthcorp.com
*
* The software in this package is published under the terms of the MPL license a copy of which has
* been included with this distribution in the LICENSE.txt file.
*/

package com.mirth.connect.client.ui;

import java.awt.Dimension;
import java.awt.Graphics;

/**
* Creates the heading panel that is used for wizards, login, etc.
*/
public class MirthHeadingPanel extends javax.swing.JPanel {

/** Creates new form MirthHeadingPanel */
public MirthHeadingPanel() {
initComponents();
setOpaque(false);
setPreferredSize(new Dimension(138, 22));
}

protected void paintComponent(Graphics g) {
// Dispaly image at at full size
if (PlatformUI.BACKGROUND_IMAGE != null) {
g.drawImage(PlatformUI.BACKGROUND_IMAGE.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);
}
super.paintComponent(g);
}

// @formatter:off
/**
* This method is called from within the constructor to initialize the form.
Expand All @@ -52,9 +52,9 @@ private void initComponents() {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// @formatter:on
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
}// </editor-fold>//GEN-END:initComponents
// @formatter:on

// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
Loading