From 64371c2a452528a2b7751377c7f11c25d00f2287 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 30 Jul 2019 12:15:49 +0100 Subject: [PATCH] JAL-3364 add SVG option to split frame export --- src/jalview/bin/Jalview.java | 2 +- src/jalview/gui/AlignFrame.java | 4 ++-- src/jalview/jbgui/GAlignFrame.java | 16 +++++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 4bf811a..11d780f 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -602,7 +602,7 @@ public class Jalview { File imageFile = new File(file); imageName = imageFile.getName(); - af.createSVG(imageFile); + af.createSVG(imageFile, false); System.out.println("Creating SVG image: " + file); continue; } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 235a5c8..72ed722 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1384,9 +1384,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } @Override - public void createSVG(File f) + public void createSVG(File f, boolean forSplitFrame) { - alignPanel.makeSVG(f, false); + alignPanel.makeSVG(f, forSplitFrame); } @Override diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 296eb25..021eace 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1084,7 +1084,7 @@ public class GAlignFrame extends JInternalFrame } }); JMenuItem createSplitFrameEPS = new JMenuItem("EPS"); - createEPS.addActionListener(new ActionListener() + createSplitFrameEPS.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) @@ -1099,7 +1099,16 @@ public class GAlignFrame extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - createSVG(null); + createSVG(null, false); + } + }); + JMenuItem createSplitFrameSVG = new JMenuItem("SVG"); + createSplitFrameSVG.addActionListener(new ActionListener() + { + @Override + public void actionPerformed(ActionEvent e) + { + createSVG(null, true); } }); @@ -1875,6 +1884,7 @@ public class GAlignFrame extends JInternalFrame exportImageMenu.add(createSVG); exportSplitFrameMenu.add(createSplitFrameEPS); exportSplitFrameMenu.add(createSplitFramePNG); + exportSplitFrameMenu.add(createSplitFrameSVG); addSequenceMenu.add(addFromFile); addSequenceMenu.add(addFromText); addSequenceMenu.add(addFromURL); @@ -2423,7 +2433,7 @@ public class GAlignFrame extends JInternalFrame { } - public void createSVG(File f) + public void createSVG(File f, boolean forSplitFrame) { } -- 1.7.10.2