Skip to content

Commit 66b4db3

Browse files
committed
#4 Move images to a dedicated location
Signed-off-by: Kaur Palang <kaur.palang@brightcodecompany.com>
1 parent f26c1bf commit 66b4db3

File tree

10 files changed

+80
-11
lines changed

10 files changed

+80
-11
lines changed

client/src/com/mirth/connect/client/ui/BrandingConstants.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.mirth.connect.client.ui;
22

3+
import javax.swing.ImageIcon;
4+
35
public class BrandingConstants {
46

57
public static final String PRODUCT_NAME = "OpenIntegrationEngine";
@@ -33,4 +35,9 @@ public class BrandingConstants {
3335

3436
// The URL that is opened when clicking "Visit + PRODUCT_NAME" button in Administrator
3537
public static final String HOMEPAGE_URL = "https://openintegrationengine.org/";
38+
39+
// Icons
40+
public static final ImageIcon FAVICON = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/branding/NG_MC_Icon_32x32.png"));
41+
public static final ImageIcon LOGO = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/branding/MirthConnect_NLogo_RGB.png"));
42+
public static final ImageIcon LOGO_GRAY = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/branding/rendered/oie_logo_white.png"));
3643
}

client/src/com/mirth/connect/client/ui/CustomBannerPanelDialog.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import javax.swing.AbstractButton;
2020
import javax.swing.BorderFactory;
21-
import javax.swing.ImageIcon;
2221
import javax.swing.JButton;
2322
import javax.swing.JDialog;
2423
import javax.swing.JFrame;
@@ -58,7 +57,7 @@ public CustomBannerPanelDialog(JFrame parent, String title, String text) {
5857
private void initComponents() {
5958
setLayout(new MigLayout("insets 12")); // layout sets 12 pixel border
6059
setTitle(title);
61-
setIconImage(UIConstants.MIRTH_FAVICON.getImage());
60+
setIconImage(BrandingConstants.FAVICON.getImage());
6261
getContentPane().setBackground(UIConstants.BACKGROUND_COLOR); // set dialog box to background color
6362
setBackground(UIConstants.BACKGROUND_COLOR); // get all other backgrounds for each piece
6463

client/src/com/mirth/connect/client/ui/Frame.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public Frame() {
282282

283283
setTitle(titleText.toString());
284284
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
285-
setIconImage(UIConstants.MIRTH_FAVICON.getImage());
285+
setIconImage(BrandingConstants.FAVICON.getImage());
286286
makePaneContainer();
287287

288288
connectionError = false;
@@ -767,7 +767,7 @@ private void buildContentPanel(JXTitledPanel container, JScrollPane component, b
767767
padlockWarning.setForeground(Color.WHITE);
768768

769769
JLabel mirthConnectImage = new JLabel();
770-
ImageIcon imageIcon = UIConstants.MIRTHCONNECT_LOGO_GRAY; // load the image to a imageIcon
770+
ImageIcon imageIcon = BrandingConstants.LOGO_GRAY; // load the image to a imageIcon
771771
Image image = imageIcon.getImage(); // transform it
772772
Image newimg = image.getScaledInstance(218, 29, java.awt.Image.SCALE_SMOOTH); // scale it the smooth way
773773
imageIcon = new ImageIcon(newimg);

client/src/com/mirth/connect/client/ui/LoginPanel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ private LoginPanel() {
5353
jLabel2.setForeground(UIConstants.HEADER_TITLE_TEXT_COLOR);
5454
jLabel5.setForeground(UIConstants.HEADER_TITLE_TEXT_COLOR);
5555
setDefaultCloseOperation(EXIT_ON_CLOSE);
56-
setIconImage(UIConstants.MIRTH_FAVICON.getImage());
57-
ImageIcon imageIcon = UIConstants.MIRTHCORP_LOGO; // load the image to a imageIcon
56+
setIconImage(BrandingConstants.FAVICON.getImage());
57+
ImageIcon imageIcon = BrandingConstants.LOGO; // load the image to a imageIcon
5858
Image image = imageIcon.getImage(); // transform it
5959
Image newimg = image.getScaledInstance(175, 30, java.awt.Image.SCALE_SMOOTH); // scale it the smooth way
6060
imageIcon = new ImageIcon(newimg);
@@ -108,7 +108,7 @@ public void initialize(String mirthServer, String version, String user, String p
108108
PlatformUI.CLIENT_VERSION = version;
109109

110110
setTitle(String.format("%s %s - Login", BrandingConstants.PRODUCT_NAME, version));
111-
setIconImage(UIConstants.MIRTH_FAVICON.getImage());
111+
setIconImage(BrandingConstants.FAVICON.getImage());
112112

113113
serverName.setText(mirthServer);
114114

@@ -172,7 +172,7 @@ private void initComponents() {
172172

173173
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
174174
setTitle(String.format("%s - Login", BrandingConstants.PRODUCT_NAME));
175-
setIconImage(UIConstants.MIRTH_FAVICON.getImage());
175+
setIconImage(BrandingConstants.FAVICON.getImage());
176176

177177
loginMain.setBackground(new java.awt.Color(255, 255, 255));
178178
loginMain.setName(""); // NOI18N

client/src/com/mirth/connect/client/ui/UIConstants.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ public class UIConstants {
2929
public static final int TASK_PANE_WIDTH = 170;
3030
public static final int MIRTH_WIDTH = 950;
3131
public static final int MIRTH_HEIGHT = 650;
32-
public static final ImageIcon MIRTH_FAVICON = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/NG_MC_Icon_32x32.png"));
33-
public static final ImageIcon MIRTHCORP_LOGO = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/MirthConnect_NLogo_RGB.png"));
34-
public static final ImageIcon MIRTHCONNECT_LOGO_GRAY = new ImageIcon(com.mirth.connect.client.ui.Frame.class.getResource("images/MirthConnect_Logo_WM_White.png"));
3532
public static final String EDIT_FILTER = "Edit Filter";
3633
public static final String EDIT_TRANSFORMER = "Edit Transformer";
3734
public static final String EDIT_RESPONSE_TRANSFORMER = "Edit Response";
Binary file not shown.
Lines changed: 66 additions & 0 deletions
Loading

client/src/com/mirth/connect/client/ui/images/MirthConnect_NLogo_RGB.png renamed to client/src/com/mirth/connect/client/ui/images/branding/rendered/MirthConnect_NLogo_RGB.png

File renamed without changes.

client/src/com/mirth/connect/client/ui/images/NG_MC_Icon_32x32.png renamed to client/src/com/mirth/connect/client/ui/images/branding/rendered/NG_MC_Icon_32x32.png

File renamed without changes.
72.1 KB
Loading

0 commit comments

Comments
 (0)