From: Ben Soares Date: Tue, 13 Jun 2023 15:59:27 +0000 (+0100) Subject: JAL-3416 Removed a few more JInternalFrame icons with setFrameIcon(null) X-Git-Tag: Release_2_11_3_0~8^2~44^2~5 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=ce014a26884efee8ab5b0cd06863c499fd7855d7 JAL-3416 Removed a few more JInternalFrame icons with setFrameIcon(null) --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ab705c2..5c2f2f6 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -157,7 +157,6 @@ import jalview.viewmodel.AlignmentViewport; import jalview.viewmodel.ViewportRanges; import jalview.ws.DBRefFetcher; import jalview.ws.DBRefFetcher.FetchFinishedListenerI; -import jalview.ws.datamodel.alphafold.PAEContactMatrix; import jalview.ws.jws1.Discoverer; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.jabaws2.Jws2Instance; @@ -1456,9 +1455,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, protected void htmlMenuItem_actionPerformed(ActionEvent e) { HtmlSvgOutput htmlSVG = new HtmlSvgOutput(alignPanel); - try { + try + { htmlSVG.exportHTML(null); - } catch (ImageOutputException x) { + } catch (ImageOutputException x) + { // report problem to console and raise dialog } } @@ -1467,51 +1468,64 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, public void bioJSMenuItem_actionPerformed(ActionEvent e) { BioJsHTMLOutput bjs = new BioJsHTMLOutput(alignPanel); - try { - bjs.exportHTML(null); - } catch (ImageOutputException x) { - // report problem to console and raise dialog - } + try + { + bjs.exportHTML(null); + } catch (ImageOutputException x) + { + // report problem to console and raise dialog + } } public void createImageMap(File file, String image) { - try { - alignPanel.makePNGImageMap(file, image); - } catch (ImageOutputException x) { + try + { + alignPanel.makePNGImageMap(file, image); + } catch (ImageOutputException x) + { // report problem to console and raise dialog } } @Override - public void createPNG_actionPerformed(ActionEvent e) { - try{ + public void createPNG_actionPerformed(ActionEvent e) + { + try + { createPNG(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } } + @Override - public void createEPS_actionPerformed(ActionEvent e) { - try{ + public void createEPS_actionPerformed(ActionEvent e) + { + try + { createEPS(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } - + } + @Override - public void createSVG_actionPerformed(ActionEvent e) { - try{ + public void createSVG_actionPerformed(ActionEvent e) + { + try + { createSVG(null); } catch (ImageOutputException ioex) { // raise dialog, and report via console } - + } + /** * Creates a PNG image of the alignment and writes it to the given file. If * the file is null, the user is prompted to choose a file. @@ -1523,7 +1537,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, createPNG(f, null, BitmapImageSizing.nullBitmapImageSizing()); } - public void createPNG(File f, String renderer, BitmapImageSizing userBis) throws ImageOutputException + public void createPNG(File f, String renderer, BitmapImageSizing userBis) + throws ImageOutputException { alignPanel.makeAlignmentImage(TYPE.PNG, f, renderer, userBis); } @@ -1534,7 +1549,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param f */ - public void createEPS(File f) throws ImageOutputException + public void createEPS(File f) throws ImageOutputException { createEPS(f, null); } @@ -1550,7 +1565,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * * @param f */ - public void createSVG(File f) throws ImageOutputException + public void createSVG(File f) throws ImageOutputException { createSVG(f, null); } @@ -2341,12 +2356,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // annotation was duplicated earlier alignment.addAnnotation(sequences[i].getAnnotation()[a]); // take care of contact matrix too - ContactMatrixI cm=sequences[i].getContactMatrixFor(sequences[i].getAnnotation()[a]); - if (cm!=null) + ContactMatrixI cm = sequences[i] + .getContactMatrixFor(sequences[i].getAnnotation()[a]); + if (cm != null) { - alignment.addContactListFor(sequences[i].getAnnotation()[a], cm); + alignment.addContactListFor(sequences[i].getAnnotation()[a], + cm); } - + alignment.setAnnotationIndex(sequences[i].getAnnotation()[a], a); } @@ -3480,7 +3497,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } JInternalFrame frame = new JInternalFrame(); - + frame.setFrameIcon(null); frame.getContentPane().add(new JScrollPane(pane)); Desktop.addInternalFrame(frame, MessageManager @@ -3508,12 +3525,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return alignPanel.overviewPanel; } JInternalFrame frame = new JInternalFrame(); + frame.setFrameIcon(null); final OverviewPanel overview = new OverviewPanel(alignPanel, frame, showHidden); frame.setContentPane(overview); Desktop.addInternalFrame(frame, "", true, frame.getWidth(), frame.getHeight(), true, true); - frame.setFrameIcon(null); frame.pack(); frame.setLayer(JLayeredPane.PALETTE_LAYER); final AlignmentPanel thePanel = this.alignPanel; @@ -3787,6 +3804,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, else { JInternalFrame frame = new JInternalFrame(); + frame.setFrameIcon(null); frame.setContentPane(new PairwiseAlignPanel(viewport)); Desktop.addInternalFrame(frame, MessageManager.getString("action.pairwise_alignment"), 600, @@ -4239,8 +4257,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return tp; } - public void showContactMapTree(AlignmentAnnotation aa, - ContactMatrixI cm) + public void showContactMapTree(AlignmentAnnotation aa, ContactMatrixI cm) { int x = 4, y = 5; int w = 400, h = 500; diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index be9293f..57a2fa0 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -906,6 +906,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener if (Platform.isJS()) { details = new JInternalFrame(); + details.setFrameIcon(null); JPanel panel = new JPanel(new BorderLayout()); panel.setOpaque(true); panel.setBackground(Color.white); @@ -1835,6 +1836,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener pane.setBackground(Color.WHITE); pane.add(textLabel, BorderLayout.NORTH); frame = new JInternalFrame(); + frame.setFrameIcon(null); frame.getContentPane().add(new JScrollPane(pane)); } else diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 08d6e03..73744b3 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -900,6 +900,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI }); featureSettingsUI = new JInternalFrame(MessageManager.getString( "label.sequence_feature_settings_for_CDS_and_Protein")); + featureSettingsUI.setFrameIcon(null); featureSettingsPanels.setOpaque(true); JPanel dialog = new JPanel(); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index c0cdfee..2d151bc 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -57,7 +57,6 @@ import jalview.bin.Cache; import jalview.gui.JvSwingUtils; import jalview.gui.Preferences; import jalview.io.FileFormats; -import jalview.io.exceptions.ImageOutputException; import jalview.schemes.ResidueColourScheme; import jalview.util.MessageManager; import jalview.util.Platform; @@ -221,6 +220,7 @@ public class GAlignFrame extends JInternalFrame { try { + setFrameIcon(null); // for Web-page embedding using id=align-frame-div setName("jalview-alignment"); @@ -1979,19 +1979,19 @@ public class GAlignFrame extends JInternalFrame protected void createPNG_actionPerformed(ActionEvent object) { // TODO Auto-generated method stub - + } protected void createEPS_actionPerformed(ActionEvent object) { // TODO Auto-generated method stub - + } protected void createSVG_actionPerformed(ActionEvent object) { // TODO Auto-generated method stub - + } protected void copyHighlightedColumns_actionPerformed( @@ -2487,7 +2487,6 @@ public class GAlignFrame extends JInternalFrame { } - protected void font_actionPerformed(ActionEvent e) { } @@ -2501,7 +2500,6 @@ public class GAlignFrame extends JInternalFrame } - protected void loadTreeMenuItem_actionPerformed(ActionEvent e) {