JAL-3416 Start to add JInternalFrame icons (to replace default java Duke icon in...
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 3 Nov 2022 08:29:30 +0000 (08:29 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 3 Nov 2022 08:29:30 +0000 (08:29 +0000)
12 files changed:
resources/images/windowIcons/alignmentIcon.png [new file with mode: 0644]
resources/images/windowIcons/annotationIcon.png [new file with mode: 0644]
resources/images/windowIcons/featuresIcon.png [new file with mode: 0644]
resources/images/windowIcons/fetchIcon.png [new file with mode: 0644]
resources/images/windowIcons/overviewIcon.png [new file with mode: 0644]
resources/images/windowIcons/plainIcon.png [new file with mode: 0644]
resources/images/windowIcons/structureIcon.png [new file with mode: 0644]
resources/images/windowIcons/treeIcon.png [new file with mode: 0644]
src/jalview/gui/AlignFrame.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/SequenceFetcher.java
src/jalview/gui/WindowIcons.java [new file with mode: 0644]

diff --git a/resources/images/windowIcons/alignmentIcon.png b/resources/images/windowIcons/alignmentIcon.png
new file mode 100644 (file)
index 0000000..9f3d779
Binary files /dev/null and b/resources/images/windowIcons/alignmentIcon.png differ
diff --git a/resources/images/windowIcons/annotationIcon.png b/resources/images/windowIcons/annotationIcon.png
new file mode 100644 (file)
index 0000000..a730b7e
Binary files /dev/null and b/resources/images/windowIcons/annotationIcon.png differ
diff --git a/resources/images/windowIcons/featuresIcon.png b/resources/images/windowIcons/featuresIcon.png
new file mode 100644 (file)
index 0000000..84da9f8
Binary files /dev/null and b/resources/images/windowIcons/featuresIcon.png differ
diff --git a/resources/images/windowIcons/fetchIcon.png b/resources/images/windowIcons/fetchIcon.png
new file mode 100644 (file)
index 0000000..570a929
Binary files /dev/null and b/resources/images/windowIcons/fetchIcon.png differ
diff --git a/resources/images/windowIcons/overviewIcon.png b/resources/images/windowIcons/overviewIcon.png
new file mode 100644 (file)
index 0000000..924ac70
Binary files /dev/null and b/resources/images/windowIcons/overviewIcon.png differ
diff --git a/resources/images/windowIcons/plainIcon.png b/resources/images/windowIcons/plainIcon.png
new file mode 100644 (file)
index 0000000..dbbad71
Binary files /dev/null and b/resources/images/windowIcons/plainIcon.png differ
diff --git a/resources/images/windowIcons/structureIcon.png b/resources/images/windowIcons/structureIcon.png
new file mode 100644 (file)
index 0000000..8cda58b
Binary files /dev/null and b/resources/images/windowIcons/structureIcon.png differ
diff --git a/resources/images/windowIcons/treeIcon.png b/resources/images/windowIcons/treeIcon.png
new file mode 100644 (file)
index 0000000..02f04ed
Binary files /dev/null and b/resources/images/windowIcons/treeIcon.png differ
index e24cbea..d54bd14 100644 (file)
@@ -20,8 +20,6 @@
  */
 package jalview.gui;
 
-import java.util.Locale;
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Component;
@@ -59,6 +57,7 @@ import java.util.Deque;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.List;
+import java.util.Locale;
 import java.util.Vector;
 
 import javax.swing.ButtonGroup;
@@ -350,6 +349,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
    */
   void init()
   {
+    setFrameIcon(WindowIcons.alignmentIcon);
+
     // setBackground(Color.white); // BH 2019
 
     if (!Jalview.isHeadlessMode())
index bb15b55..922cc45 100644 (file)
@@ -20,8 +20,6 @@
  */
 package jalview.gui;
 
-import java.util.Locale;
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Component;
@@ -54,6 +52,7 @@ import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -63,7 +62,6 @@ import javax.swing.BorderFactory;
 import javax.swing.Icon;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
-import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JInternalFrame;
 import javax.swing.JLabel;
 import javax.swing.JLayeredPane;
@@ -413,6 +411,7 @@ public class FeatureSettings extends JPanel
     {
       frame = new JInternalFrame();
       frame.setContentPane(this);
+      frame.setFrameIcon(WindowIcons.featuresIcon);
       Rectangle bounds = af.getFeatureSettingsGeometry();
       String title;
       if (af.getAlignPanels().size() > 1 || Desktop.getAlignmentPanels(
index e596fbf..3b93059 100755 (executable)
@@ -186,6 +186,7 @@ public class SequenceFetcher extends JPanel implements Runnable
 
     frame = new JInternalFrame();
     frame.setContentPane(this);
+    frame.setFrameIcon(WindowIcons.fetchIcon);
     Desktop.addInternalFrame(frame, getFrameTitle(), true, 400,
             Platform.isAMacAndNotJS() ? 240 : 180);
   }
diff --git a/src/jalview/gui/WindowIcons.java b/src/jalview/gui/WindowIcons.java
new file mode 100644 (file)
index 0000000..61599df
--- /dev/null
@@ -0,0 +1,43 @@
+package jalview.gui;
+
+import javax.swing.ImageIcon;
+
+import jalview.util.ChannelProperties;
+
+public class WindowIcons
+{
+  protected static final ImageIcon logoIcon = new ImageIcon(
+          ChannelProperties.getImage("logo.32"));
+
+  protected static final ImageIcon plainIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/plainIcon.png"));
+
+  protected static final ImageIcon alignmentIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/alignmentIcon.png"));
+
+  protected static final ImageIcon featuresIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/featuresIcon.png"));
+
+  protected static final ImageIcon fetchIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/fetchIcon.png"));
+
+  protected static final ImageIcon annotationIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/annotationIcon.png"));
+
+  protected static final ImageIcon overviewIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/overviewIcon.png"));
+
+  protected static final ImageIcon treeIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/treeIcon.png"));
+
+  protected static final ImageIcon structureIcon = new ImageIcon(
+          WindowIcons.class
+                  .getResource("/images/windowIcons/structureIcon.png"));
+}