From: Ben Soares Date: Thu, 3 Nov 2022 08:29:30 +0000 (+0000) Subject: JAL-3416 Start to add JInternalFrame icons (to replace default java Duke icon in... X-Git-Tag: Release_2_11_3_0~23^2~4^2~9^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2f8f4850cd8437b7c2a2450df2391426aaa3e1b8;p=jalview.git JAL-3416 Start to add JInternalFrame icons (to replace default java Duke icon in frame decoration) --- diff --git a/resources/images/windowIcons/alignmentIcon.png b/resources/images/windowIcons/alignmentIcon.png new file mode 100644 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 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 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 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 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 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 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 index 0000000..02f04ed Binary files /dev/null and b/resources/images/windowIcons/treeIcon.png differ diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index e24cbea..d54bd14 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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()) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index bb15b55..922cc45 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -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( diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index e596fbf..3b93059 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -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 index 0000000..61599df --- /dev/null +++ b/src/jalview/gui/WindowIcons.java @@ -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")); +}