From: Ben Soares Date: Wed, 9 Nov 2022 17:45:21 +0000 (+0000) Subject: JAL-3416 Remove all JFrame/JInternalFrame icons (set to null) X-Git-Tag: Release_2_11_3_0~23^2~4^2~9^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c1f5dd54ab8caa7e76ca50f9c3a85f2731b66862;p=jalview.git JAL-3416 Remove all JFrame/JInternalFrame icons (set to null) --- diff --git a/resources/images/windowIcons/alignmentIcon.png b/resources/images/windowIcons/alignmentIcon.png deleted file mode 100644 index 9f3d779..0000000 Binary files a/resources/images/windowIcons/alignmentIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/annotationIcon.png b/resources/images/windowIcons/annotationIcon.png deleted file mode 100644 index a730b7e..0000000 Binary files a/resources/images/windowIcons/annotationIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/featuresIcon.png b/resources/images/windowIcons/featuresIcon.png deleted file mode 100644 index 84da9f8..0000000 Binary files a/resources/images/windowIcons/featuresIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/fetchIcon.png b/resources/images/windowIcons/fetchIcon.png deleted file mode 100644 index 570a929..0000000 Binary files a/resources/images/windowIcons/fetchIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/overviewIcon.png b/resources/images/windowIcons/overviewIcon.png deleted file mode 100644 index 924ac70..0000000 Binary files a/resources/images/windowIcons/overviewIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/plainIcon.png b/resources/images/windowIcons/plainIcon.png deleted file mode 100644 index dbbad71..0000000 Binary files a/resources/images/windowIcons/plainIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/preferencesIcon.png b/resources/images/windowIcons/preferencesIcon.png deleted file mode 100644 index 29ebf39..0000000 Binary files a/resources/images/windowIcons/preferencesIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/splitIcon.png b/resources/images/windowIcons/splitIcon.png deleted file mode 100644 index c6a0520..0000000 Binary files a/resources/images/windowIcons/splitIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/structureIcon.png b/resources/images/windowIcons/structureIcon.png deleted file mode 100644 index 8cda58b..0000000 Binary files a/resources/images/windowIcons/structureIcon.png and /dev/null differ diff --git a/resources/images/windowIcons/treeIcon.png b/resources/images/windowIcons/treeIcon.png deleted file mode 100644 index 02f04ed..0000000 Binary files a/resources/images/windowIcons/treeIcon.png and /dev/null differ diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index abc7437..95b9db7 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -349,7 +349,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ void init() { - setFrameIcon(WindowIcons.alignmentIcon); + setFrameIcon(null); // setBackground(Color.white); // BH 2019 @@ -3445,7 +3445,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, .formatMessage("label.overview_params", new Object[] { this.getTitle() }), true, frame.getWidth(), frame.getHeight(), true, true); - frame.setFrameIcon(WindowIcons.overviewIcon); + frame.setFrameIcon(null); frame.pack(); frame.setLayer(JLayeredPane.PALETTE_LAYER); frame.addInternalFrameListener( diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index ad5e574..d976815 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -602,7 +602,7 @@ public class AnnotationChooser extends JPanel private void showFrame() { frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.annotationIcon); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index 77dc1c5..a0ab709 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -86,7 +86,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter } } frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.annotationIcon); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index 401df42..699a79e 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -97,7 +97,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter { super(av, ap); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.annotationIcon); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Desktop.addInternalFrame(frame, diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java index c22761a..894db79 100644 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -107,7 +107,7 @@ public class AnnotationExporter extends JPanel } frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.annotationIcon); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Dimension preferredSize = frame.getPreferredSize(); diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index dda0a9f..af41e58 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -130,7 +130,7 @@ public class CalculationChooser extends JPanel { setLayout(new BorderLayout()); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.treeIcon); + frame.setFrameIcon(null); frame.setContentPane(this); this.setBackground(Color.white); frame.addFocusListener(new FocusListener() diff --git a/src/jalview/gui/CutAndPasteHtmlTransfer.java b/src/jalview/gui/CutAndPasteHtmlTransfer.java index 5c94d54..4469ceb 100644 --- a/src/jalview/gui/CutAndPasteHtmlTransfer.java +++ b/src/jalview/gui/CutAndPasteHtmlTransfer.java @@ -58,7 +58,7 @@ public class CutAndPasteHtmlTransfer extends GCutAndPasteHtmlTransfer public CutAndPasteHtmlTransfer() { super(); - this.setFrameIcon(WindowIcons.logoIcon); + this.setFrameIcon(null); displaySource.setSelected(false); textarea.addKeyListener(new KeyListener() { diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 922cc45..e8e6f1a 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -411,7 +411,7 @@ public class FeatureSettings extends JPanel { frame = new JInternalFrame(); frame.setContentPane(this); - frame.setFrameIcon(WindowIcons.featuresIcon); + frame.setFrameIcon(null); Rectangle bounds = af.getFeatureSettingsGeometry(); String title; if (af.getAlignPanels().size() > 1 || Desktop.getAlignmentPanels( diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index ee70565..0bf4600 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -108,7 +108,7 @@ public class Finder extends GFinder focusFixed = fixedFocus; finders = new HashMap<>(); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.logoIcon); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); frame.addInternalFrameListener(new InternalFrameAdapter() diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index 2e8e667..f532706 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -112,7 +112,7 @@ public class FontChooser extends GFontChooser void init() { frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.logoIcon); + frame.setFrameIcon(null); frame.setContentPane(this); smoothFont.setSelected(ap.av.antiAlias); diff --git a/src/jalview/gui/JvOptionPane.java b/src/jalview/gui/JvOptionPane.java index 0b684d0..5daf35c 100644 --- a/src/jalview/gui/JvOptionPane.java +++ b/src/jalview/gui/JvOptionPane.java @@ -80,7 +80,7 @@ public class JvOptionPane extends JOptionPane public JvOptionPane(final Component parent) { this.parentComponent = Platform.isJS() ? this : parent; - this.setIcon(WindowIcons.logoIcon); + this.setIcon(null); } public static int showConfirmDialog(Component parentComponent, @@ -925,7 +925,7 @@ public class JvOptionPane extends JOptionPane Platform.isJS() ? initialValue : initialValue_btn); JDialog dialog = joptionpane.createDialog(parentComponent, title); - dialog.setIconImage(WindowIcons.logoIcon.getImage()); + dialog.setIconImage(null); dialog.setModalityType(modal ? ModalityType.APPLICATION_MODAL : ModalityType.MODELESS); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); @@ -954,7 +954,7 @@ public class JvOptionPane extends JOptionPane if (parentComponent != this) { JInternalFrame jif = this.createInternalFrame(parentComponent, title); - jif.setFrameIcon(WindowIcons.logoIcon); + jif.setFrameIcon(null); jif.addInternalFrameListener(new InternalFrameListener() { @Override @@ -1000,7 +1000,7 @@ public class JvOptionPane extends JOptionPane else { JDialog dialog = this.createDialog(parentComponent, title); - dialog.setIconImage(WindowIcons.logoIcon.getImage()); + dialog.setIconImage(null); dialog.setVisible(true); // blocking this.internalDialogHandleResponse(); return; diff --git a/src/jalview/gui/PCAPanel.java b/src/jalview/gui/PCAPanel.java index 63ce5ad..26db8c3 100644 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@ -92,7 +92,7 @@ public class PCAPanel extends GPCAPanel SimilarityParamsI params) { super(); - this.setFrameIcon(WindowIcons.treeIcon); + this.setFrameIcon(null); this.av = alignPanel.av; this.ap = alignPanel; boolean nucleotide = av.getAlignment().isNucleotide(); diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 987051f..2f0257f 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -249,7 +249,7 @@ public class Preferences extends GPreferences { super(); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.preferencesIcon); + frame.setFrameIcon(null); frame.setContentPane(this); if (!Platform.isJS()) /** diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index 7a50758..8d66a44 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -100,7 +100,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable worker.start(); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.logoIcon); + frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, MessageManager diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 3b93059..6b4c74a 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -186,7 +186,7 @@ public class SequenceFetcher extends JPanel implements Runnable frame = new JInternalFrame(); frame.setContentPane(this); - frame.setFrameIcon(WindowIcons.fetchIcon); + frame.setFrameIcon(null); Desktop.addInternalFrame(frame, getFrameTitle(), true, 400, Platform.isAMacAndNotJS() ? 240 : 180); } diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index 6665588..1d59853 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -156,7 +156,7 @@ public class SliderPanel extends GSliderPanel { sliderPanel = new SliderPanel(ap, rs.getConservationInc(), true, rs); conservationSlider = new JInternalFrame(); - conservationSlider.setFrameIcon(WindowIcons.logoIcon); + conservationSlider.setFrameIcon(null); conservationSlider.setContentPane(sliderPanel); conservationSlider.setLayer(JLayeredPane.PALETTE_LAYER); } @@ -270,7 +270,7 @@ public class SliderPanel extends GSliderPanel { sliderPanel = new SliderPanel(ap, threshold, false, rs); PIDSlider = new JInternalFrame(); - PIDSlider.setFrameIcon(WindowIcons.logoIcon); + PIDSlider.setFrameIcon(null); PIDSlider.setContentPane(sliderPanel); PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER); } diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 7398a3f..08d6e03 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -105,7 +105,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ protected void init() { - setFrameIcon(WindowIcons.splitIcon); + setFrameIcon(null); getTopFrame().setSplitFrame(this); getBottomFrame().setSplitFrame(this); getTopFrame().setVisible(true); diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index f4970ae..6c3f6d8 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -135,7 +135,7 @@ public abstract class StructureViewerBase extends GStructureViewer public StructureViewerBase() { super(); - setFrameIcon(WindowIcons.structureIcon); + setFrameIcon(null); } /** diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index 2d446d9..fd85779 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -105,7 +105,7 @@ public class TreePanel extends GTreePanel SimilarityParamsI options) { super(); - this.setFrameIcon(WindowIcons.treeIcon); + this.setFrameIcon(null); this.similarityParams = options; initTreePanel(ap, type, modelName, null, null); diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 1a7ae4a..d252910 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -148,7 +148,7 @@ public class UserDefinedColours extends GUserDefinedColours { colorChooser.getSelectionModel().addChangeListener(this); frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.logoIcon); + frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, MessageManager.getString("label.user_defined_colours"), diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index edcab0c..4aac062 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -323,7 +323,7 @@ public class WebserviceInfo extends GWebserviceInfo boolean makeVisible) { frame = new JInternalFrame(); - frame.setFrameIcon(WindowIcons.logoIcon); + frame.setFrameIcon(null); frame.setContentPane(this); Desktop.addInternalFrame(frame, title, makeVisible, width, height); frame.setClosable(false); @@ -626,8 +626,8 @@ public class WebserviceInfo extends GWebserviceInfo true, false); ((JEditorPane) ((JScrollPane) jobPanes.get(which)).getViewport() .getComponent(0)) - .setText(ensureHtmlTagged( - txt + getHtmlFragment(text, false, true))); + .setText(ensureHtmlTagged( + txt + getHtmlFragment(text, false, true))); } else { diff --git a/src/jalview/gui/WindowIcons.java b/src/jalview/gui/WindowIcons.java deleted file mode 100644 index b735667..0000000 --- a/src/jalview/gui/WindowIcons.java +++ /dev/null @@ -1,51 +0,0 @@ -package jalview.gui; - -import javax.swing.ImageIcon; - -import jalview.util.ChannelProperties; - -public class WindowIcons -{ - public static final ImageIcon logoIcon = new ImageIcon( - ChannelProperties.getImage("logo.16")); - - 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")); - - protected static final ImageIcon splitIcon = new ImageIcon( - WindowIcons.class - .getResource("/images/windowIcons/splitIcon.png")); - - protected static final ImageIcon preferencesIcon = new ImageIcon( - WindowIcons.class - .getResource("/images/windowIcons/preferencesIcon.png")); -} diff --git a/src/jalview/io/JalviewFileChooser.java b/src/jalview/io/JalviewFileChooser.java index 8cd5406..5218255 100755 --- a/src/jalview/io/JalviewFileChooser.java +++ b/src/jalview/io/JalviewFileChooser.java @@ -53,7 +53,6 @@ import javax.swing.plaf.basic.BasicFileChooserUI; import jalview.bin.Cache; import jalview.gui.JvOptionPane; -import jalview.gui.WindowIcons; import jalview.util.MessageManager; import jalview.util.Platform; import jalview.util.dialogrunner.DialogRunnerI; @@ -648,7 +647,7 @@ public class JalviewFileChooser extends JFileChooser protected JDialog createDialog(Component parent) throws HeadlessException { JDialog dialog = super.createDialog(parent); - dialog.setIconImage(WindowIcons.logoIcon.getImage()); + dialog.setIconImage(null); return dialog; }