From: kjvdheide Date: Tue, 16 Jan 2018 21:36:31 +0000 (+0000) Subject: JAL-2798 rough saving/loading a single Aptx view functionality present X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e6fb25d56a3faefc00a614b3a60e05db23f3b981;p=jalview.git JAL-2798 rough saving/loading a single Aptx view functionality present --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index b4ded67..93a7bcc 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1115,8 +1115,8 @@ public class Jalview2XML try { tree.writeToXml(new File("word")); - copyFileToJar(jout, "word", tree.getTreeName()); - jms.addExtTreeViewer(treeView); + copyFileToJar(jout, "word", "aptx-test"); + } catch (IOException e) { @@ -3574,10 +3574,14 @@ public class Jalview2XML private void loadExternalTrees(jarInputStreamProvider jprovider, JalviewModelSequence jms, AlignViewport av) { - for (TreeFrameI externalTreeViewer: jms.getExtTreeViewer()) { - // String treeFile = copyJarEntry(jprovider, errorMessage, "aptx", null); - TreeViewerUtils.addTreeViewFrameToJalview(externalTreeViewer); - + String treeFile = copyJarEntry(jprovider, "aptx-test", "aptx", null); + try + { + AptxInit.createInstancesFromFile(treeFile, av); + } catch (IOException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); } } diff --git a/src/jalview/schemabinding/version2/JalviewModelSequence.java b/src/jalview/schemabinding/version2/JalviewModelSequence.java index 5ff56dd..2585df0 100644 --- a/src/jalview/schemabinding/version2/JalviewModelSequence.java +++ b/src/jalview/schemabinding/version2/JalviewModelSequence.java @@ -164,11 +164,22 @@ public class JalviewModelSequence implements java.io.Serializable this._treeList.add(index, vTree); } + /** + * Unused. + * + * @param treeViewer + */ public void addExtTreeViewer(jalview.ext.treeviewer.TreeFrameI treeViewer) { this._extTreeList.add(treeViewer); } + /** + * Unused. + * + * @param index + * @param treeViewer + */ public void addExtTreeViewer(final int index, jalview.ext.treeviewer.TreeFrameI treeViewer) { @@ -442,6 +453,13 @@ public class JalviewModelSequence implements java.io.Serializable return this._treeList.size(); } + /** + * Unused. + * + * @param index + * @return + * @throws java.lang.IndexOutOfBoundsException + */ public jalview.ext.treeviewer.TreeFrameI getExtTreeViewer(final int index) throws java.lang.IndexOutOfBoundsException { @@ -456,12 +474,22 @@ public class JalviewModelSequence implements java.io.Serializable return _extTreeList.get(index); } + /** + * Unused. + * + * @return + */ public jalview.ext.treeviewer.TreeFrameI[] getExtTreeViewer() { jalview.ext.treeviewer.TreeFrameI[] array = new jalview.ext.treeviewer.TreeFrameI[0]; return this._extTreeList.toArray(array); } + /** + * Unused. + * + * @return + */ public int getExtTreeViewerCount() { return this._extTreeList.size();