From: Ben Soares Date: Thu, 3 Nov 2022 13:14:43 +0000 (+0000) Subject: JAL-3416 More JInternalFrame icons X-Git-Tag: Release_2_11_3_0~23^2~4^2~9^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=29625ee998523520e87bb88643247b3723e908bd;p=jalview.git JAL-3416 More JInternalFrame icons --- diff --git a/resources/images/windowIcons/splitIcon.png b/resources/images/windowIcons/splitIcon.png new file mode 100644 index 0000000..c6a0520 Binary files /dev/null and b/resources/images/windowIcons/splitIcon.png differ diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index 791421d..ad5e574 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -20,11 +20,6 @@ */ package jalview.gui; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.SequenceGroup; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Checkbox; import java.awt.CheckboxGroup; @@ -45,6 +40,11 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceGroup; +import jalview.util.MessageManager; + /** * A panel that allows the user to select which sequence-associated annotation * rows to show or hide. @@ -602,6 +602,7 @@ public class AnnotationChooser extends JPanel private void showFrame() { frame = new JInternalFrame(); + frame.setFrameIcon(WindowIcons.annotationIcon); 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 4e9a26d..77dc1c5 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -20,15 +20,6 @@ */ package jalview.gui; -import jalview.bin.Cache; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.GraphLine; -import jalview.datamodel.SequenceGroup; -import jalview.gui.JalviewColourChooser.ColourChooserListener; -import jalview.schemes.AnnotationColourGradient; -import jalview.schemes.ColourSchemeI; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -48,6 +39,14 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; +import jalview.bin.Cache; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.GraphLine; +import jalview.datamodel.SequenceGroup; +import jalview.gui.JalviewColourChooser.ColourChooserListener; +import jalview.schemes.AnnotationColourGradient; +import jalview.schemes.ColourSchemeI; +import jalview.util.MessageManager; import net.miginfocom.swing.MigLayout; @SuppressWarnings("serial") @@ -87,6 +86,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter } } frame = new JInternalFrame(); + frame.setFrameIcon(WindowIcons.annotationIcon); 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 c0d4708..401df42 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -21,14 +21,6 @@ package jalview.gui; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.HiddenColumns; -import jalview.io.cache.JvCacheableInputBox; -import jalview.schemes.AnnotationColourGradient; -import jalview.util.MessageManager; -import jalview.util.Platform; -import jalview.viewmodel.annotationfilter.AnnotationFilterParameter; - import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; @@ -50,6 +42,13 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.border.TitledBorder; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.HiddenColumns; +import jalview.io.cache.JvCacheableInputBox; +import jalview.schemes.AnnotationColourGradient; +import jalview.util.MessageManager; +import jalview.util.Platform; +import jalview.viewmodel.annotationfilter.AnnotationFilterParameter; import net.miginfocom.swing.MigLayout; @SuppressWarnings("serial") @@ -98,6 +97,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter { super(av, ap); frame = new JInternalFrame(); + frame.setFrameIcon(WindowIcons.annotationIcon); 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 1efd100..c22761a 100644 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -20,24 +20,13 @@ */ package jalview.gui; -import java.util.Locale; - -import jalview.api.FeatureRenderer; -import jalview.bin.Cache; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.SequenceI; -import jalview.io.AnnotationFile; -import jalview.io.FeaturesFile; -import jalview.io.JalviewFileChooser; -import jalview.io.JalviewFileView; -import jalview.util.MessageManager; - import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileWriter; import java.io.PrintWriter; +import java.util.Locale; import javax.swing.BoxLayout; import javax.swing.ButtonGroup; @@ -50,6 +39,16 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.SwingConstants; +import jalview.api.FeatureRenderer; +import jalview.bin.Cache; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.SequenceI; +import jalview.io.AnnotationFile; +import jalview.io.FeaturesFile; +import jalview.io.JalviewFileChooser; +import jalview.io.JalviewFileView; +import jalview.util.MessageManager; + /** * * GUI dialog for exporting features or alignment annotations depending upon @@ -108,6 +107,7 @@ public class AnnotationExporter extends JPanel } frame = new JInternalFrame(); + frame.setFrameIcon(WindowIcons.annotationIcon); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Dimension preferredSize = frame.getPreferredSize(); diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 3a64716..6fac8fc 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -20,23 +20,6 @@ */ package jalview.gui; -import jalview.analysis.AlignSeq; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.ColumnSelection; -import jalview.datamodel.HiddenColumns; -import jalview.datamodel.RnaViewerModel; -import jalview.datamodel.SequenceGroup; -import jalview.datamodel.SequenceI; -import jalview.ext.varna.RnaModel; -import jalview.structure.SecondaryStructureListener; -import jalview.structure.SelectionListener; -import jalview.structure.SelectionSource; -import jalview.structure.StructureSelectionManager; -import jalview.structure.VamsasSource; -import jalview.util.Comparison; -import jalview.util.MessageManager; -import jalview.util.ShiftList; - import java.awt.BorderLayout; import java.awt.Color; import java.util.Collection; @@ -60,6 +43,22 @@ import fr.orsay.lri.varna.models.FullBackup; import fr.orsay.lri.varna.models.annotations.HighlightRegionAnnotation; import fr.orsay.lri.varna.models.rna.ModeleBase; import fr.orsay.lri.varna.models.rna.RNA; +import jalview.analysis.AlignSeq; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.ColumnSelection; +import jalview.datamodel.HiddenColumns; +import jalview.datamodel.RnaViewerModel; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; +import jalview.ext.varna.RnaModel; +import jalview.structure.SecondaryStructureListener; +import jalview.structure.SelectionListener; +import jalview.structure.SelectionSource; +import jalview.structure.StructureSelectionManager; +import jalview.structure.VamsasSource; +import jalview.util.Comparison; +import jalview.util.MessageManager; +import jalview.util.ShiftList; public class AppVarna extends JInternalFrame implements SelectionListener, SecondaryStructureListener, @@ -216,6 +215,7 @@ public class AppVarna extends JInternalFrame */ protected AppVarna(AlignmentPanel ap) { + this.setFrameIcon(null); this.ap = ap; this.viewId = System.currentTimeMillis() + "." + this.hashCode(); vab = new AppVarnaBinding(); diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index f7e5413..dda0a9f 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -20,15 +20,6 @@ */ package jalview.gui; -import jalview.analysis.TreeBuilder; -import jalview.analysis.scoremodels.ScoreModels; -import jalview.analysis.scoremodels.SimilarityParams; -import jalview.api.analysis.ScoreModelI; -import jalview.api.analysis.SimilarityParamsI; -import jalview.bin.Cache; -import jalview.datamodel.SequenceGroup; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -61,6 +52,15 @@ import javax.swing.JRadioButton; import javax.swing.event.InternalFrameAdapter; import javax.swing.event.InternalFrameEvent; +import jalview.analysis.TreeBuilder; +import jalview.analysis.scoremodels.ScoreModels; +import jalview.analysis.scoremodels.SimilarityParams; +import jalview.api.analysis.ScoreModelI; +import jalview.api.analysis.SimilarityParamsI; +import jalview.bin.Cache; +import jalview.datamodel.SequenceGroup; +import jalview.util.MessageManager; + /** * A dialog where a user can choose and action Tree or PCA calculation options */ @@ -130,6 +130,7 @@ public class CalculationChooser extends JPanel { setLayout(new BorderLayout()); frame = new JInternalFrame(); + frame.setFrameIcon(WindowIcons.treeIcon); frame.setContentPane(this); this.setBackground(Color.white); frame.addFocusListener(new FocusListener() diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 6ebedb7..7398a3f 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -105,6 +105,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ protected void init() { + setFrameIcon(WindowIcons.splitIcon); getTopFrame().setSplitFrame(this); getBottomFrame().setSplitFrame(this); getTopFrame().setVisible(true); diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index ec5579c..f4970ae 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -135,6 +135,7 @@ public abstract class StructureViewerBase extends GStructureViewer public StructureViewerBase() { super(); + setFrameIcon(WindowIcons.structureIcon); } /** diff --git a/src/jalview/gui/WindowIcons.java b/src/jalview/gui/WindowIcons.java index 61599df..0e74785 100644 --- a/src/jalview/gui/WindowIcons.java +++ b/src/jalview/gui/WindowIcons.java @@ -40,4 +40,8 @@ public class WindowIcons 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")); }