From: kjvdheide Date: Mon, 18 Dec 2017 18:21:35 +0000 (+0000) Subject: JAL-1953 -External from all interfaces names X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1ed59c45c2e0b89d51de637a381247db23c7a027;p=jalview.git JAL-1953 -External from all interfaces names --- diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index 058cc72..9f9b774 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -29,8 +29,8 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.datamodel.SequenceNode; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; import jalview.util.QuickSort; import java.util.ArrayList; @@ -72,7 +72,7 @@ public class AlignmentSorter static TreeModel lastTree = null; - static ExternalTreeI lastExternalTree = null; + static TreeI lastExternalTree = null; static boolean sortTreeAscending = true; @@ -468,16 +468,16 @@ public class AlignmentSorter - private static List getOrderByTree(ExternalTreeI aptxTree, - Map nodesWithBoundSeqs) + private static List getOrderByTree(TreeI aptxTree, + Map nodesWithBoundSeqs) { List seqsByTreeOrder = new ArrayList<>(); if (!aptxTree.isEmpty()) { - for (final Iterator iter = aptxTree + for (final Iterator iter = aptxTree .iterateInPreOrder(); iter.hasNext();) { - ExternalTreeNodeI treeNode = iter.next(); + TreeNodeI treeNode = iter.next(); seqsByTreeOrder.add(nodesWithBoundSeqs.get(treeNode)); } @@ -530,17 +530,17 @@ public class AlignmentSorter * tree which has */ public static void sortByTree(AlignmentI align, - Map nodesBoundToSequences, - ExternalTreeI externalTreeI) throws IllegalArgumentException + Map nodesBoundToSequences, + TreeI treeI) throws IllegalArgumentException { - List tmp = getOrderByTree(externalTreeI, nodesBoundToSequences); + List tmp = getOrderByTree(treeI, nodesBoundToSequences); if (!tmp.isEmpty()) { - if (lastExternalTree != externalTreeI) + if (lastExternalTree != treeI) { sortTreeAscending = true; - lastExternalTree = externalTreeI; + lastExternalTree = treeI; } else { diff --git a/src/jalview/ext/archaeopteryx/AptxControlPanel.java b/src/jalview/ext/archaeopteryx/AptxControlPanel.java index facbe01..2744908 100644 --- a/src/jalview/ext/archaeopteryx/AptxControlPanel.java +++ b/src/jalview/ext/archaeopteryx/AptxControlPanel.java @@ -1,10 +1,10 @@ package jalview.ext.archaeopteryx; -import jalview.ext.treeviewer.ExternalTreeControlsI; +import jalview.ext.treeviewer.TreeControlsI; import org.forester.archaeopteryx.ControlPanel; -public class AptxControlPanel implements ExternalTreeControlsI +public class AptxControlPanel implements TreeControlsI { ControlPanel aptxCp; diff --git a/src/jalview/ext/archaeopteryx/AptxFrame.java b/src/jalview/ext/archaeopteryx/AptxFrame.java index 9a47836..e050425 100644 --- a/src/jalview/ext/archaeopteryx/AptxFrame.java +++ b/src/jalview/ext/archaeopteryx/AptxFrame.java @@ -1,10 +1,10 @@ package jalview.ext.archaeopteryx; import jalview.bin.Cache; -import jalview.ext.treeviewer.ExternalTreeControlsI; -import jalview.ext.treeviewer.ExternalTreeFrame; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreePanel; +import jalview.ext.treeviewer.TreeControlsI; +import jalview.ext.treeviewer.TreeFrameI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreePanelI; import jalview.gui.Desktop; import jalview.gui.EPSOptions; import jalview.io.JalviewFileChooser; @@ -38,13 +38,13 @@ import org.forester.archaeopteryx.MainFrame; import org.forester.phylogeny.Phylogeny; import org.jibble.epsgraphics.EpsGraphics2D; -public class AptxFrame implements ExternalTreeFrame +public class AptxFrame implements TreeFrameI { private final MainFrame aptxFrame; - private ExternalTreePanel aptxPanel; + private TreePanelI aptxPanel; - private ExternalTreeControlsI aptxControls; + private TreeControlsI aptxControls; public AptxFrame(Phylogeny tree, Configuration aptxConfig, @@ -228,13 +228,13 @@ public class AptxFrame implements ExternalTreeFrame } } @Override - public ExternalTreePanel getTreePanel() + public TreePanelI getTreePanel() { return aptxPanel; } @Override - public ExternalTreeI getTree() + public TreeI getTree() { return aptxPanel.getTree(); } @@ -253,7 +253,7 @@ public class AptxFrame implements ExternalTreeFrame } @Override - public ExternalTreeControlsI getTreeControls() + public TreeControlsI getTreeControls() { return aptxControls; } diff --git a/src/jalview/ext/archaeopteryx/AptxInit.java b/src/jalview/ext/archaeopteryx/AptxInit.java index 49c3162..5752e51 100644 --- a/src/jalview/ext/archaeopteryx/AptxInit.java +++ b/src/jalview/ext/archaeopteryx/AptxInit.java @@ -3,12 +3,12 @@ package jalview.ext.archaeopteryx; import jalview.analysis.TreeBuilder; import jalview.datamodel.SequenceI; import jalview.ext.forester.UtilityMethods; -import jalview.ext.treeviewer.ExternalLoadedTreeAssociationI; -import jalview.ext.treeviewer.ExternalTreeBuilderI; -import jalview.ext.treeviewer.ExternalTreeFrame; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; -import jalview.ext.treeviewer.ExternalTreeViewerBindingI; +import jalview.ext.treeviewer.LoadedTreeAssociationI; +import jalview.ext.treeviewer.TreeBuilderI; +import jalview.ext.treeviewer.TreeFrameI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; +import jalview.ext.treeviewer.TreeViewerBindingI; import jalview.ext.treeviewer.LoadedTreeSequenceAssociation; import jalview.gui.Desktop; import jalview.gui.JvOptionPane; @@ -74,20 +74,20 @@ public final class AptxInit private final static NHXParser.TAXONOMY_EXTRACTION TAXONOMY_EXTRACTION = APTX_CONFIG .getTaxonomyExtraction(); - private static Map activeAptx = new HashMap<>(); + private static Map activeAptx = new HashMap<>(); - public static ExternalTreeFrame createInstanceFromCalculation( + public static TreeFrameI createInstanceFromCalculation( final TreeBuilder calculatedTree) { - ExternalTreeBuilderI aptxTreeBuilder = new AptxTreeBuilder( + TreeBuilderI aptxTreeBuilder = new AptxTreeBuilder( calculatedTree); - ExternalTreeI aptxTree = aptxTreeBuilder.buildTree(); + TreeI aptxTree = aptxTreeBuilder.buildTree(); - ExternalTreeFrame aptxApp = createAptxFrame(aptxTree, + TreeFrameI aptxApp = createAptxFrame(aptxTree, calculatedTree.getAvport(), null); return aptxApp; @@ -103,13 +103,13 @@ public final class AptxInit * @throws IOException * @throws FileNotFoundException */ - public static ExternalTreeFrame[] createInstancesFromFile( + public static TreeFrameI[] createInstancesFromFile( String filePath, AlignmentViewport viewport) throws FileNotFoundException, IOException { File treeFile = new File(filePath); - ExternalTreeFrame[] aptxFrames = null; + TreeFrameI[] aptxFrames = null; if (UtilityMethods.canForesterReadFile(treeFile)) { @@ -148,7 +148,7 @@ public final class AptxInit } Phylogeny[] trees = PhylogenyMethods.readPhylogenies(parser, treeFile); - aptxFrames = new ExternalTreeFrame[trees.length]; + aptxFrames = new TreeFrameI[trees.length]; for (int i = 0; i < trees.length; i++) @@ -174,7 +174,7 @@ public final class AptxInit } - public static ExternalTreeFrame[] createInstancesFromUrl(URL treeUrl, + public static TreeFrameI[] createInstancesFromUrl(URL treeUrl, AlignmentViewport viewport) throws FileNotFoundException, IOException, RuntimeException { @@ -189,7 +189,7 @@ public final class AptxInit REPLACE_NHX_UNDERSCORES, INTERNAL_NUMBERS_AS_CONFIDENCE, TAXONOMY_EXTRACTION, MIDPOINT_REROOT); - ExternalTreeFrame[] aptxFrames = new ExternalTreeFrame[trees.length]; + TreeFrameI[] aptxFrames = new TreeFrameI[trees.length]; for (int i = 0; i < trees.length; i++) { Phylogeny aptxTree = trees[i]; @@ -212,14 +212,14 @@ public final class AptxInit * @param viewport * @return */ - public static ExternalTreeFrame[] createInstancesFromDb( + public static TreeFrameI[] createInstancesFromDb( PhylogeniesWebserviceClient treeDbClient, String identifier, AlignmentViewport viewport) { URL url = null; Phylogeny[] trees = null; - ExternalTreeFrame[] aptxFrames = null; + TreeFrameI[] aptxFrames = null; if ((identifier != null) && (identifier.trim().length() > 0)) { @@ -245,7 +245,7 @@ public final class AptxInit { identifier }), MessageManager.getString("label.invalid_url"), JvOptionPane.ERROR_MESSAGE); - return new ExternalTreeFrame[0]; + return new TreeFrameI[0]; } identifier = id + ""; } @@ -323,7 +323,7 @@ public final class AptxInit // _main_frame.getMainPanel().setWaitCursor(); // } trees = ForesterUtil.readPhylogeniesFromUrl(url, parser); - aptxFrames = new ExternalTreeFrame[trees.length]; + aptxFrames = new TreeFrameI[trees.length]; } catch (final MalformedURLException e) { exception = true; @@ -411,7 +411,7 @@ public final class AptxInit // new File(url.getFile()).getName(), url.toString()); - ExternalTreeFrame aptxApp = createAptxFrame(aptxTree, + TreeFrameI aptxApp = createAptxFrame(aptxTree, viewport, url.getFile()); String my_name_for_file = ""; @@ -483,14 +483,14 @@ public final class AptxInit - public static ExternalTreeFrame createAptxFrame(ExternalTreeI aptxTree, + public static TreeFrameI createAptxFrame(TreeI aptxTree, AlignmentViewport jalviewAlignport, String treeTitle) { validateConfig(APTX_CONFIG); - ExternalTreeFrame aptxApp = aptxTree + TreeFrameI aptxApp = aptxTree .createTreeViewerFromTree(treeTitle); - ExternalTreeI jalviewTree = aptxApp.getTree(); - ExternalLoadedTreeAssociationI bindAptxNodes = new LoadedTreeSequenceAssociation( + TreeI jalviewTree = aptxApp.getTree(); + LoadedTreeAssociationI bindAptxNodes = new LoadedTreeSequenceAssociation( jalviewAlignport.getAlignment().getSequencesArray(), jalviewTree); bindAptxNodes.associateLeavesToSequences(); @@ -505,15 +505,15 @@ public final class AptxInit } - protected static ExternalTreeFrame createAptxFrame( + protected static TreeFrameI createAptxFrame( final Phylogeny aptxTree, final AlignmentViewport jalviewAlignport, String treeTitle) { validateConfig(APTX_CONFIG); - ExternalTreeFrame aptxApp = new AptxFrame(aptxTree, APTX_CONFIG, + TreeFrameI aptxApp = new AptxFrame(aptxTree, APTX_CONFIG, treeTitle); - ExternalTreeI jalviewTree = aptxApp.getTree(); - ExternalLoadedTreeAssociationI bindAptxNodes = new LoadedTreeSequenceAssociation( + TreeI jalviewTree = aptxApp.getTree(); + LoadedTreeAssociationI bindAptxNodes = new LoadedTreeSequenceAssociation( jalviewAlignport.getAlignment().getSequencesArray(), jalviewTree); bindAptxNodes.associateLeavesToSequences(); @@ -528,13 +528,13 @@ public final class AptxInit } - protected static ExternalTreeViewerBindingI bindNodesToJalviewSequences( - final ExternalTreeFrame aptxApp, + protected static TreeViewerBindingI bindNodesToJalviewSequences( + final TreeFrameI aptxApp, final AlignmentViewport jalviewAlignViewport, - final Map alignMappedToNodes, - final Map nodesMappedToAlign) + final Map alignMappedToNodes, + final Map nodesMappedToAlign) { - ExternalTreeViewerBindingI treeBinding = new JalviewBinding(aptxApp, + TreeViewerBindingI treeBinding = new JalviewBinding(aptxApp, jalviewAlignViewport, alignMappedToNodes, nodesMappedToAlign); activeAptx.put(aptxApp, treeBinding); @@ -542,8 +542,8 @@ public final class AptxInit } - protected static ExternalTreeFrame bindTreeViewFrameToJalview( - final ExternalTreeFrame aptxApp) + protected static TreeFrameI bindTreeViewFrameToJalview( + final TreeFrameI aptxApp) { int width = 400; int height = 550; @@ -588,7 +588,7 @@ public final class AptxInit - public static Map getAllAptxFrames() + public static Map getAllAptxFrames() { return activeAptx; } diff --git a/src/jalview/ext/archaeopteryx/AptxTreeBuilder.java b/src/jalview/ext/archaeopteryx/AptxTreeBuilder.java index c6f7898..9dff141 100644 --- a/src/jalview/ext/archaeopteryx/AptxTreeBuilder.java +++ b/src/jalview/ext/archaeopteryx/AptxTreeBuilder.java @@ -3,9 +3,9 @@ package jalview.ext.archaeopteryx; import jalview.analysis.TreeBuilder; import jalview.datamodel.SequenceI; import jalview.ext.forester.ForesterMatrix; -import jalview.ext.treeviewer.ExternalTreeBuilderI; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; +import jalview.ext.treeviewer.TreeBuilderI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; import jalview.util.MappingUtils; import jalview.util.MessageManager; @@ -27,7 +27,7 @@ import org.forester.phylogeny.PhylogenyNode; * */ public class AptxTreeBuilder - implements ExternalTreeBuilderI + implements TreeBuilderI { protected final SequenceI[] sequences; @@ -37,13 +37,13 @@ public class AptxTreeBuilder public String treeTitle; - private final ExternalTreeI aptxTree; + private final TreeI aptxTree; - private ExternalTreeNodeI rootNode; + private TreeNodeI rootNode; - private final Map alignmentWithNodes; + private final Map alignmentWithNodes; - private final Map nodesWithAlignment; + private final Map nodesWithAlignment; public AptxTreeBuilder(final TreeBuilder calculatedTree) { @@ -63,7 +63,7 @@ public class AptxTreeBuilder } @Override - public ExternalTreeI buildTree(final ExternalTreeNodeI treeRoot) + public TreeI buildTree(final TreeNodeI treeRoot) { if (treeRoot != null) @@ -79,13 +79,13 @@ public class AptxTreeBuilder @Override - public ExternalTreeI buildTree() + public TreeI buildTree() { for (SequenceI sequence : sequences) { - ExternalTreeNodeI sequenceNode = TreeNode + TreeNodeI sequenceNode = TreeNode .getUniqueWrapper( new PhylogenyNode(sequence.getName())); @@ -109,13 +109,13 @@ public class AptxTreeBuilder } @Override - public Map getAlignmentBoundNodes() + public Map getAlignmentBoundNodes() { return alignmentWithNodes; } @Override - public Map getNodesBoundAlignment() + public Map getNodesBoundAlignment() { return nodesWithAlignment; } diff --git a/src/jalview/ext/archaeopteryx/AptxTreePanel.java b/src/jalview/ext/archaeopteryx/AptxTreePanel.java index 5693b0f..70fc9e1 100644 --- a/src/jalview/ext/archaeopteryx/AptxTreePanel.java +++ b/src/jalview/ext/archaeopteryx/AptxTreePanel.java @@ -1,8 +1,8 @@ package jalview.ext.archaeopteryx; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; -import jalview.ext.treeviewer.ExternalTreePanel; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; +import jalview.ext.treeviewer.TreePanelI; import jalview.gui.PaintRefresher; import java.awt.Event; @@ -16,11 +16,11 @@ import java.util.Set; import javax.accessibility.AccessibleContext; -public class AptxTreePanel implements ExternalTreePanel +public class AptxTreePanel implements TreePanelI { private final org.forester.archaeopteryx.TreePanel treeView; - private final ExternalTreeI tree; + private final TreeI tree; private String sequenceSetId; @@ -33,7 +33,7 @@ public class AptxTreePanel implements ExternalTreePanel protected AptxTreePanel( org.forester.archaeopteryx.TreePanel aptxTreePanel, - ExternalTreeI aptxTree) + TreeI aptxTree) { treeView = aptxTreePanel; tree = aptxTree; @@ -47,7 +47,7 @@ public class AptxTreePanel implements ExternalTreePanel } @Override - public ExternalTreeI getTree() + public TreeI getTree() { return tree; } @@ -59,7 +59,7 @@ public class AptxTreePanel implements ExternalTreePanel } @Override - public ExternalTreeNodeI findNode(int x, int y) + public TreeNodeI findNode(int x, int y) { return TreeNode.getUniqueWrapper(treeView.findNode(x, y)); } diff --git a/src/jalview/ext/archaeopteryx/JalviewBinding.java b/src/jalview/ext/archaeopteryx/JalviewBinding.java index 772a7d8..6ad0b60 100644 --- a/src/jalview/ext/archaeopteryx/JalviewBinding.java +++ b/src/jalview/ext/archaeopteryx/JalviewBinding.java @@ -9,11 +9,11 @@ import jalview.datamodel.ColumnSelection; import jalview.datamodel.HiddenColumns; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; -import jalview.ext.treeviewer.ExternalTreeFrame; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; -import jalview.ext.treeviewer.ExternalTreePanel; -import jalview.ext.treeviewer.ExternalTreeViewerBindingI; +import jalview.ext.treeviewer.TreeFrameI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; +import jalview.ext.treeviewer.TreePanelI; +import jalview.ext.treeviewer.TreeViewerBindingI; import jalview.ext.treeviewer.LoadedTreeSequenceAssociation; import jalview.gui.AlignViewport; import jalview.gui.AlignmentPanel; @@ -53,11 +53,11 @@ import javax.swing.event.InternalFrameEvent; * */ public final class JalviewBinding - implements ExternalTreeViewerBindingI + implements TreeViewerBindingI { - private final ExternalTreeFrame aptxFrame; + private final TreeFrameI aptxFrame; - private ExternalTreePanel treeView; + private TreePanelI treeView; private AlignmentViewport parentAvport; @@ -65,9 +65,9 @@ public final class JalviewBinding private AlignmentPanel[] associatedPanels; - private Map sequencesBoundToNodes; + private Map sequencesBoundToNodes; - private Map nodesBoundToSequences; + private Map nodesBoundToSequences; private float rootX; @@ -92,10 +92,10 @@ public final class JalviewBinding * map with tree nodes and matching sequences used to calculate the * tree as key, value pair respectively. */ - public JalviewBinding(final ExternalTreeFrame archaeopteryx, + public JalviewBinding(final TreeFrameI archaeopteryx, final AlignmentViewport jalviewAlignmentViewport, - final Map alignMappedToNodes, - final Map nodesMappedToAlign) + final Map alignMappedToNodes, + final Map nodesMappedToAlign) { if (archaeopteryx.getNumberOfTrees() > 1) @@ -200,7 +200,7 @@ public final class JalviewBinding Rectangle visibleView = treeView.getVisibleArea(); - for (ExternalTreeNodeI node : treeView.getTree().getRoot() + for (TreeNodeI node : treeView.getTree().getRoot() .getAllDescendants()) { if (!(node.getXcoord() > visibleView.getMinX() @@ -231,7 +231,7 @@ public final class JalviewBinding */ public void run() { - final ExternalTreeNodeI node = treeView.findNode(e.getX(), + final TreeNodeI node = treeView.findNode(e.getX(), e.getY()); if (node != null) { @@ -296,7 +296,7 @@ public final class JalviewBinding for (SequenceI selectedSequence : seqsel.getSequences()) { - ExternalTreeNodeI matchingNode = sequencesBoundToNodes + TreeNodeI matchingNode = sequencesBoundToNodes .get(selectedSequence); if (matchingNode != null) { @@ -327,13 +327,13 @@ public final class JalviewBinding */ public void partitionTree(final int x) { - ExternalTreeI tree = treeView.getTree(); + TreeI tree = treeView.getTree(); if (!tree.isEmpty()) { // should be calculated on each partition as the tree can theoretically // change in the meantime - ExternalTreeNodeI furthestNode = tree.getFurthestNode(); + TreeNodeI furthestNode = tree.getFurthestNode(); furthestNodeX = furthestNode.getXcoord(); rootX = tree.getRoot().getXcoord(); @@ -341,7 +341,7 @@ public final class JalviewBinding if (furthestNodeX != rootX && !(x > furthestNodeX)) { float threshold = (x - rootX) / (furthestNodeX - rootX); - List foundNodes = getNodesAboveThreshold( + List foundNodes = getNodesAboveThreshold( threshold, tree.getRoot()); @@ -351,11 +351,11 @@ public final class JalviewBinding } - public List getNodesAboveThreshold(double threshold, - ExternalTreeNodeI node) + public List getNodesAboveThreshold(double threshold, + TreeNodeI node) { - List nodesAboveThreshold = new ArrayList<>(); + List nodesAboveThreshold = new ArrayList<>(); parentAvport.setSelectionGroup(null); parentAvport.getAlignment().deleteAllGroups(); @@ -383,12 +383,12 @@ public final class JalviewBinding * @param node * @return */ - private List colourNodesAboveThreshold( - List nodeList, double threshold, - ExternalTreeNodeI node) + private List colourNodesAboveThreshold( + List nodeList, double threshold, + TreeNodeI node) { - for (ExternalTreeNodeI childNode : node.getDirectChildren()) + for (TreeNodeI childNode : node.getDirectChildren()) { childNode.setBranchColor(Color.black); float nodeCutoff = (childNode.getXcoord() - rootX) @@ -410,10 +410,10 @@ public final class JalviewBinding parentAvport.setSequenceColour(seq, randomColour); } - List descendantNodes = childNode + List descendantNodes = childNode .getAllDescendants(); // .forEach instead? - for (ExternalTreeNodeI descNode : descendantNodes) + for (TreeNodeI descNode : descendantNodes) { seq = nodesBoundToSequences.get(descNode); if (seq != null) @@ -532,7 +532,7 @@ public final class JalviewBinding * does) */ @Override - public void showNodeSelectionOnAlign(final ExternalTreeNodeI node) + public void showNodeSelectionOnAlign(final TreeNodeI node) { if (node.isInternal()) @@ -553,7 +553,7 @@ public final class JalviewBinding @Override - public void showMatchingSequence(final ExternalTreeNodeI nodeToMatch) + public void showMatchingSequence(final TreeNodeI nodeToMatch) { SequenceI matchingSequence = nodesBoundToSequences.get(nodeToMatch); if (matchingSequence != null) @@ -567,14 +567,14 @@ public final class JalviewBinding } @Override - public void showMatchingChildSequences(final ExternalTreeNodeI parentNode) + public void showMatchingChildSequences(final TreeNodeI parentNode) { // redundancy here, Forester already iterates through tree to get all // descendants - List childNodes = parentNode.getAllDescendants(); + List childNodes = parentNode.getAllDescendants(); - for (ExternalTreeNodeI childNode : childNodes) + for (TreeNodeI childNode : childNodes) { // childNode.getBranchData().setBranchColor(new BranchColor(Color.BLUE)); diff --git a/src/jalview/ext/archaeopteryx/Tree.java b/src/jalview/ext/archaeopteryx/Tree.java index 93091b7..12dd8c7 100644 --- a/src/jalview/ext/archaeopteryx/Tree.java +++ b/src/jalview/ext/archaeopteryx/Tree.java @@ -1,8 +1,8 @@ package jalview.ext.archaeopteryx; -import jalview.ext.treeviewer.ExternalTreeFrame; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeNodeI; +import jalview.ext.treeviewer.TreeFrameI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeNodeI; import java.util.Iterator; @@ -11,7 +11,7 @@ import org.forester.phylogeny.Phylogeny; import org.forester.phylogeny.PhylogenyMethods; import org.forester.phylogeny.PhylogenyNode; -public class Tree implements ExternalTreeI +public class Tree implements TreeI { private final Phylogeny tree; @@ -32,16 +32,16 @@ public class Tree implements ExternalTreeI .iteratorPostorder(); iterator.hasNext();) { PhylogenyNode foresterNode = iterator.next(); - ExternalTreeNodeI treeNode = TreeNode + TreeNodeI treeNode = TreeNode .getUniqueWrapper(foresterNode); } } @Override - public ExternalTreeNodeI getRoot() + public TreeNodeI getRoot() { - ExternalTreeNodeI root = TreeNode.getUniqueWrapper(tree.getRoot()); + TreeNodeI root = TreeNode.getUniqueWrapper(tree.getRoot()); return root; } @@ -53,7 +53,7 @@ public class Tree implements ExternalTreeI } @Override - public ExternalTreeNodeI getNodeWithName(String name) + public TreeNodeI getNodeWithName(String name) { return TreeNode.getUniqueWrapper(tree.getNode(name)); @@ -92,7 +92,7 @@ public class Tree implements ExternalTreeI } @Override - public void setRoot(ExternalTreeNodeI rootNode) + public void setRoot(TreeNodeI rootNode) { PhylogenyNode treeRoot = TreeNode.unwrapNode(rootNode); tree.setRoot(treeRoot); @@ -107,31 +107,31 @@ public class Tree implements ExternalTreeI } @Override - public Iterator iterateInPreOrder() + public Iterator iterateInPreOrder() { - Iterator iter = new TreeIterator( + Iterator iter = new TreeIterator( tree.iteratorPreorder()); return iter; } @Override - public Iterator iterateInLevelOrder() + public Iterator iterateInLevelOrder() { - Iterator iter = new TreeIterator( + Iterator iter = new TreeIterator( tree.iteratorLevelOrder()); return iter; } @Override - public Iterator iterateInPostOrder() + public Iterator iterateInPostOrder() { - Iterator iter = new TreeIterator( + Iterator iter = new TreeIterator( tree.iteratorPostorder()); return iter; } @Override - public ExternalTreeNodeI getFurthestNode() + public TreeNodeI getFurthestNode() { PhylogenyNode furthestNode = PhylogenyMethods .calculateNodeWithMaxDistanceToRoot(tree); @@ -139,7 +139,7 @@ public class Tree implements ExternalTreeI } @Override - public ExternalTreeFrame createTreeViewerFromTree(String instanceTitle) + public TreeFrameI createTreeViewerFromTree(String instanceTitle) { return new AptxFrame(Archaeopteryx.createApplication(tree, AptxInit.APTX_CONFIG, diff --git a/src/jalview/ext/archaeopteryx/TreeIterator.java b/src/jalview/ext/archaeopteryx/TreeIterator.java index 2d82db2..20c8fc8 100644 --- a/src/jalview/ext/archaeopteryx/TreeIterator.java +++ b/src/jalview/ext/archaeopteryx/TreeIterator.java @@ -1,12 +1,12 @@ package jalview.ext.archaeopteryx; -import jalview.ext.treeviewer.ExternalTreeNodeI; +import jalview.ext.treeviewer.TreeNodeI; import java.util.Iterator; import org.forester.phylogeny.iterators.PhylogenyNodeIterator; -public class TreeIterator implements Iterator +public class TreeIterator implements Iterator { private final PhylogenyNodeIterator iter; @@ -22,9 +22,9 @@ public class TreeIterator implements Iterator } @Override - public ExternalTreeNodeI next() + public TreeNodeI next() { - ExternalTreeNodeI node = TreeNode.getUniqueWrapper(iter.next()); + TreeNodeI node = TreeNode.getUniqueWrapper(iter.next()); return node; } diff --git a/src/jalview/ext/archaeopteryx/TreeNode.java b/src/jalview/ext/archaeopteryx/TreeNode.java index e37f89d..07c8d95 100644 --- a/src/jalview/ext/archaeopteryx/TreeNode.java +++ b/src/jalview/ext/archaeopteryx/TreeNode.java @@ -1,7 +1,7 @@ package jalview.ext.archaeopteryx; import jalview.datamodel.SequenceI; -import jalview.ext.treeviewer.ExternalTreeNodeI; +import jalview.ext.treeviewer.TreeNodeI; import java.awt.Color; import java.util.ArrayList; @@ -13,16 +13,16 @@ import org.forester.phylogeny.PhylogenyMethods; import org.forester.phylogeny.PhylogenyNode; import org.forester.phylogeny.data.BranchColor; -public class TreeNode implements ExternalTreeNodeI +public class TreeNode implements TreeNodeI { private final PhylogenyNode node; private SequenceI nodeSeq; - private static Map originalNodes = new HashMap<>( + private static Map originalNodes = new HashMap<>( 500); // prolly make this size dynamic - private static Map wrappedNodes = new HashMap<>( + private static Map wrappedNodes = new HashMap<>( 500); private TreeNode(PhylogenyNode aptxNode) @@ -42,7 +42,7 @@ public class TreeNode implements ExternalTreeNodeI @Override - public List getAllDescendants() + public List getAllDescendants() { List descNodes = PhylogenyMethods @@ -53,7 +53,7 @@ public class TreeNode implements ExternalTreeNodeI } @Override - public List getExternalDescendants() + public List getExternalDescendants() { List extDescNodes = node.getAllExternalDescendants(); return getUniqueWrappers(extDescNodes); @@ -61,7 +61,7 @@ public class TreeNode implements ExternalTreeNodeI @Override - public List getDirectChildren() + public List getDirectChildren() { List childNodes = node.getDescendants(); return getUniqueWrappers(childNodes); @@ -89,7 +89,7 @@ public class TreeNode implements ExternalTreeNodeI } @Override - public void addAsChild(ExternalTreeNodeI childNode) + public void addAsChild(TreeNodeI childNode) { PhylogenyNode aptxNode = unwrapNode(childNode); @@ -122,10 +122,10 @@ public class TreeNode implements ExternalTreeNodeI return node.isInternal(); } - public static List getUniqueWrappers( + public static List getUniqueWrappers( List aptxNodes) { - List wrappedNodes = new ArrayList<>( + List wrappedNodes = new ArrayList<>( aptxNodes.size()); for (PhylogenyNode aptxNode : aptxNodes) @@ -143,14 +143,14 @@ public class TreeNode implements ExternalTreeNodeI * @param aptxNode * @return */ - public static ExternalTreeNodeI getUniqueWrapper( + public static TreeNodeI getUniqueWrapper( PhylogenyNode aptxNode) { if (aptxNode == null) { return null; } - ExternalTreeNodeI wrappedNode = originalNodes.get(aptxNode); + TreeNodeI wrappedNode = originalNodes.get(aptxNode); if (wrappedNode == null) { wrappedNode = new TreeNode(aptxNode); @@ -168,7 +168,7 @@ public class TreeNode implements ExternalTreeNodeI * @param wrappedNode * @return */ - protected static PhylogenyNode unwrapNode(ExternalTreeNodeI wrappedNode) + protected static PhylogenyNode unwrapNode(TreeNodeI wrappedNode) { if (wrappedNode == null) { diff --git a/src/jalview/ext/archaeopteryx/TreeParser.java b/src/jalview/ext/archaeopteryx/TreeParser.java index 79853ed..c16ea12 100644 --- a/src/jalview/ext/archaeopteryx/TreeParser.java +++ b/src/jalview/ext/archaeopteryx/TreeParser.java @@ -1,14 +1,14 @@ package jalview.ext.archaeopteryx; -import jalview.ext.treeviewer.ExternalTreeI; -import jalview.ext.treeviewer.ExternalTreeParserI; +import jalview.ext.treeviewer.TreeI; +import jalview.ext.treeviewer.TreeParserI; import java.io.IOException; import org.forester.io.parsers.PhylogenyParser; import org.forester.phylogeny.Phylogeny; -public class TreeParser implements ExternalTreeParserI +public class TreeParser implements TreeParserI { private final PhylogenyParser parser; @@ -18,10 +18,10 @@ public class TreeParser implements ExternalTreeParserI } @Override - public ExternalTreeI[] parse() throws IOException + public TreeI[] parse() throws IOException { Phylogeny[] foresterTrees = parser.parse(); - ExternalTreeI[] jalviewTrees = new ExternalTreeI[foresterTrees.length]; + TreeI[] jalviewTrees = new TreeI[foresterTrees.length]; for (int i = 0; i < foresterTrees.length; i++) { diff --git a/src/jalview/ext/treeviewer/ExternalTreeBuilderI.java b/src/jalview/ext/treeviewer/ExternalTreeBuilderI.java deleted file mode 100644 index 44ca06e..0000000 --- a/src/jalview/ext/treeviewer/ExternalTreeBuilderI.java +++ /dev/null @@ -1,23 +0,0 @@ -package jalview.ext.treeviewer; - -import jalview.datamodel.SequenceI; - -import java.util.Map; - -/** - * @author kjvanderheide - * - */ -public interface ExternalTreeBuilderI -{ - public ExternalTreeI buildTree(ExternalTreeNodeI treeRoot); - - public ExternalTreeI buildTree(); - - public Map getAlignmentBoundNodes(); - - public Map getNodesBoundAlignment(); - - public String generateTreeName(); - -} diff --git a/src/jalview/ext/treeviewer/ExternalTreeI.java b/src/jalview/ext/treeviewer/ExternalTreeI.java deleted file mode 100644 index 820995f..0000000 --- a/src/jalview/ext/treeviewer/ExternalTreeI.java +++ /dev/null @@ -1,37 +0,0 @@ -package jalview.ext.treeviewer; - -import java.util.Iterator; - -public interface ExternalTreeI -{ - public ExternalTreeNodeI getRoot(); - - public ExternalTreeNodeI getNodeWithName(String name); - - public ExternalTreeNodeI getFurthestNode(); - - public String[] getAllLeafNames(); - - public void setTreeName(String treeTitle); - - public void setRerootable(boolean b); - - public void setRooted(boolean b); - - public boolean isEmpty(); - - public String getTreeName(); - - public void setRoot(ExternalTreeNodeI rootNode); - - public double getHeight(boolean adjustForCollapsedSubtrees); - - public Iterator iterateInPreOrder(); - - public Iterator iterateInLevelOrder(); - - public Iterator iterateInPostOrder(); - - ExternalTreeFrame createTreeViewerFromTree(String instanceTitle); - -} diff --git a/src/jalview/ext/treeviewer/ExternalTreeViewerConfigI.java b/src/jalview/ext/treeviewer/ExternalTreeViewerConfigI.java deleted file mode 100644 index 7617c97..0000000 --- a/src/jalview/ext/treeviewer/ExternalTreeViewerConfigI.java +++ /dev/null @@ -1,6 +0,0 @@ -package jalview.ext.treeviewer; - -public interface ExternalTreeViewerConfigI -{ - -} diff --git a/src/jalview/ext/treeviewer/ExternalLoadedTreeAssociationI.java b/src/jalview/ext/treeviewer/LoadedTreeAssociationI.java similarity index 62% rename from src/jalview/ext/treeviewer/ExternalLoadedTreeAssociationI.java rename to src/jalview/ext/treeviewer/LoadedTreeAssociationI.java index 8d35fd7..19cf834 100644 --- a/src/jalview/ext/treeviewer/ExternalLoadedTreeAssociationI.java +++ b/src/jalview/ext/treeviewer/LoadedTreeAssociationI.java @@ -12,11 +12,11 @@ import java.util.Map; * * */ -public interface ExternalLoadedTreeAssociationI +public interface LoadedTreeAssociationI { public void associateLeavesToSequences(); - public Map getAlignmentWithNodes(); + public Map getAlignmentWithNodes(); - public Map getNodesWithAlignment(); + public Map getNodesWithAlignment(); } diff --git a/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java b/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java index 05d13e9..4229b50 100644 --- a/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java +++ b/src/jalview/ext/treeviewer/LoadedTreeSequenceAssociation.java @@ -9,18 +9,18 @@ import java.util.Iterator; import java.util.Map; public class LoadedTreeSequenceAssociation - implements ExternalLoadedTreeAssociationI + implements LoadedTreeAssociationI { SequenceI[] alignSequences; - ExternalTreeI tree; + TreeI tree; - Map alignmentWithNodes; + Map alignmentWithNodes; - Map nodesWithAlignment; + Map nodesWithAlignment; public LoadedTreeSequenceAssociation(SequenceI[] alignmentSequences, - ExternalTreeI extTree) + TreeI extTree) { alignSequences = alignmentSequences; tree = extTree; @@ -49,11 +49,11 @@ public class LoadedTreeSequenceAssociation if (!tree.isEmpty()) { - for (final Iterator iter = tree + for (final Iterator iter = tree .iterateInPreOrder(); iter .hasNext();) { - ExternalTreeNodeI treeNode = iter.next(); + TreeNodeI treeNode = iter.next(); nodeSequenceName = treeNode.getNodeName(); nodeSequence = algnIds.findIdMatch(nodeSequenceName); @@ -78,13 +78,13 @@ public class LoadedTreeSequenceAssociation @Override - public Map getAlignmentWithNodes() + public Map getAlignmentWithNodes() { return alignmentWithNodes; } @Override - public Map getNodesWithAlignment() + public Map getNodesWithAlignment() { return nodesWithAlignment; } diff --git a/src/jalview/ext/treeviewer/TreeBuilderI.java b/src/jalview/ext/treeviewer/TreeBuilderI.java new file mode 100644 index 0000000..37bad36 --- /dev/null +++ b/src/jalview/ext/treeviewer/TreeBuilderI.java @@ -0,0 +1,23 @@ +package jalview.ext.treeviewer; + +import jalview.datamodel.SequenceI; + +import java.util.Map; + +/** + * @author kjvanderheide + * + */ +public interface TreeBuilderI +{ + public TreeI buildTree(TreeNodeI treeRoot); + + public TreeI buildTree(); + + public Map getAlignmentBoundNodes(); + + public Map getNodesBoundAlignment(); + + public String generateTreeName(); + +} diff --git a/src/jalview/ext/treeviewer/ExternalTreeControlsI.java b/src/jalview/ext/treeviewer/TreeControlsI.java similarity index 73% rename from src/jalview/ext/treeviewer/ExternalTreeControlsI.java rename to src/jalview/ext/treeviewer/TreeControlsI.java index e278879..9a209e7 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeControlsI.java +++ b/src/jalview/ext/treeviewer/TreeControlsI.java @@ -1,6 +1,6 @@ package jalview.ext.treeviewer; -public interface ExternalTreeControlsI +public interface TreeControlsI { public void defaultSettings(); diff --git a/src/jalview/ext/treeviewer/ExternalTreeFrame.java b/src/jalview/ext/treeviewer/TreeFrameI.java similarity index 84% rename from src/jalview/ext/treeviewer/ExternalTreeFrame.java rename to src/jalview/ext/treeviewer/TreeFrameI.java index 48b150e..922c304 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeFrame.java +++ b/src/jalview/ext/treeviewer/TreeFrameI.java @@ -10,19 +10,19 @@ import javax.swing.RootPaneContainer; import javax.swing.WindowConstants; import javax.swing.event.InternalFrameListener; -public interface ExternalTreeFrame +public interface TreeFrameI extends Accessible, WindowConstants, RootPaneContainer, ImageObserver, MenuContainer { - public abstract ExternalTreePanel getTreePanel(); + public abstract TreePanelI getTreePanel(); - public abstract ExternalTreeI getTree(); + public abstract TreeI getTree(); public abstract void checkMultipleTrees(); public abstract int getNumberOfTrees(); - public ExternalTreeControlsI getTreeControls(); + public TreeControlsI getTreeControls(); public void addFrameListener(InternalFrameListener listener); diff --git a/src/jalview/ext/treeviewer/TreeI.java b/src/jalview/ext/treeviewer/TreeI.java new file mode 100644 index 0000000..0ebf991 --- /dev/null +++ b/src/jalview/ext/treeviewer/TreeI.java @@ -0,0 +1,37 @@ +package jalview.ext.treeviewer; + +import java.util.Iterator; + +public interface TreeI +{ + public TreeNodeI getRoot(); + + public TreeNodeI getNodeWithName(String name); + + public TreeNodeI getFurthestNode(); + + public String[] getAllLeafNames(); + + public void setTreeName(String treeTitle); + + public void setRerootable(boolean b); + + public void setRooted(boolean b); + + public boolean isEmpty(); + + public String getTreeName(); + + public void setRoot(TreeNodeI rootNode); + + public double getHeight(boolean adjustForCollapsedSubtrees); + + public Iterator iterateInPreOrder(); + + public Iterator iterateInLevelOrder(); + + public Iterator iterateInPostOrder(); + + TreeFrameI createTreeViewerFromTree(String instanceTitle); + +} diff --git a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java b/src/jalview/ext/treeviewer/TreeNodeI.java similarity index 60% rename from src/jalview/ext/treeviewer/ExternalTreeNodeI.java rename to src/jalview/ext/treeviewer/TreeNodeI.java index 85be915..89de82f 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeNodeI.java +++ b/src/jalview/ext/treeviewer/TreeNodeI.java @@ -5,22 +5,22 @@ import jalview.datamodel.SequenceI; import java.awt.Color; import java.util.List; -public interface ExternalTreeNodeI +public interface TreeNodeI { public String getNodeName(); - public List getAllDescendants(); + public List getAllDescendants(); - public List getExternalDescendants(); + public List getExternalDescendants(); - public List getDirectChildren(); + public List getDirectChildren(); public void setSequence(SequenceI seq); public SequenceI getSequence(); - public void addAsChild(ExternalTreeNodeI childNode); + public void addAsChild(TreeNodeI childNode); public long getId(); diff --git a/src/jalview/ext/treeviewer/ExternalTreePanel.java b/src/jalview/ext/treeviewer/TreePanelI.java similarity index 87% rename from src/jalview/ext/treeviewer/ExternalTreePanel.java rename to src/jalview/ext/treeviewer/TreePanelI.java index 85ad800..657ef57 100644 --- a/src/jalview/ext/treeviewer/ExternalTreePanel.java +++ b/src/jalview/ext/treeviewer/TreePanelI.java @@ -9,7 +9,7 @@ import java.util.Set; import javax.accessibility.Accessible; -public interface ExternalTreePanel extends Accessible, MenuContainer +public interface TreePanelI extends Accessible, MenuContainer { @@ -17,9 +17,9 @@ public interface ExternalTreePanel extends Accessible, MenuContainer public abstract File getTreeFile(); - public abstract ExternalTreeI getTree(); + public abstract TreeI getTree(); - public abstract ExternalTreeNodeI findNode(int x, int y); + public abstract TreeNodeI findNode(int x, int y); public abstract void setMatchingNodes(Set matchingNodes); diff --git a/src/jalview/ext/treeviewer/ExternalTreeParserI.java b/src/jalview/ext/treeviewer/TreeParserI.java similarity index 63% rename from src/jalview/ext/treeviewer/ExternalTreeParserI.java rename to src/jalview/ext/treeviewer/TreeParserI.java index 65ff63c..00c8334 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeParserI.java +++ b/src/jalview/ext/treeviewer/TreeParserI.java @@ -2,9 +2,9 @@ package jalview.ext.treeviewer; import java.io.IOException; -public interface ExternalTreeParserI +public interface TreeParserI { - public ExternalTreeI[] parse() throws IOException; + public TreeI[] parse() throws IOException; public void setSource(Object source) throws IOException; diff --git a/src/jalview/ext/treeviewer/ExternalTreeViewerBindingI.java b/src/jalview/ext/treeviewer/TreeViewerBindingI.java similarity index 88% rename from src/jalview/ext/treeviewer/ExternalTreeViewerBindingI.java rename to src/jalview/ext/treeviewer/TreeViewerBindingI.java index de76b82..da999c6 100644 --- a/src/jalview/ext/treeviewer/ExternalTreeViewerBindingI.java +++ b/src/jalview/ext/treeviewer/TreeViewerBindingI.java @@ -38,7 +38,7 @@ import java.awt.event.MouseListener; * * */ -public interface ExternalTreeViewerBindingI +public interface TreeViewerBindingI extends ActionListener, MouseListener, SelectionListener, SelectionSource { @@ -47,13 +47,13 @@ public interface ExternalTreeViewerBindingI * corresponding sequence in the Jalview alignment view. If an internal node * is selected all child sequences get highlighted as well. */ - public void showNodeSelectionOnAlign(ExternalTreeNodeI node); + public void showNodeSelectionOnAlign(TreeNodeI node); public void treeSelectionChanged(SequenceI sequence); - public void showMatchingSequence(ExternalTreeNodeI nodeToMatch); + public void showMatchingSequence(TreeNodeI nodeToMatch); - public void showMatchingChildSequences(ExternalTreeNodeI parentNode); + public void showMatchingChildSequences(TreeNodeI parentNode); public void sortByTree_actionPerformed(); diff --git a/src/jalview/ext/treeviewer/TreeViewerConfigI.java b/src/jalview/ext/treeviewer/TreeViewerConfigI.java new file mode 100644 index 0000000..29e4895 --- /dev/null +++ b/src/jalview/ext/treeviewer/TreeViewerConfigI.java @@ -0,0 +1,6 @@ +package jalview.ext.treeviewer; + +public interface TreeViewerConfigI +{ + +} diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 184ffeb..579ed09 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -64,8 +64,8 @@ import jalview.datamodel.SequenceI; import jalview.ext.archaeopteryx.AptxInit; import jalview.ext.forester.io.SupportedTreeFileFilter; import jalview.ext.forester.io.TreeParser; -import jalview.ext.treeviewer.ExternalTreeFrame; -import jalview.ext.treeviewer.ExternalTreeViewerBindingI; +import jalview.ext.treeviewer.TreeFrameI; +import jalview.ext.treeviewer.TreeViewerBindingI; import jalview.gui.ColourMenuHelper.ColourChangeListener; import jalview.gui.ViewSelectionMenu.ViewSetProvider; import jalview.io.AlignmentProperties; @@ -3765,7 +3765,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, .get(viewport.getSequenceSetId()); List treePanels = new ArrayList<>(); - Map aptxFrames = AptxInit + Map aptxFrames = AptxInit .getAllAptxFrames(); for (Component comp : comps) @@ -3786,11 +3786,11 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, sortByTreeMenu.setVisible(true); - for (Entry aptxFrameWithBinding : aptxFrames + for (Entry aptxFrameWithBinding : aptxFrames .entrySet()) { - ExternalTreeFrame aptxFrame = aptxFrameWithBinding.getKey(); - ExternalTreeViewerBindingI binding = aptxFrameWithBinding.getValue(); + TreeFrameI aptxFrame = aptxFrameWithBinding.getKey(); + TreeViewerBindingI binding = aptxFrameWithBinding.getValue(); // future support for multiple tabs // for (org.forester.archaeopteryx.TreePanel aptxTree : aptxFrame diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 3ff0b75..d79cdce 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -43,7 +43,7 @@ import jalview.datamodel.Sequence; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; -import jalview.ext.treeviewer.ExternalTreeI; +import jalview.ext.treeviewer.TreeI; import jalview.renderer.ResidueShader; import jalview.renderer.ResidueShaderI; import jalview.schemes.ColourSchemeI; @@ -2881,7 +2881,7 @@ public abstract class AlignmentViewport protected TreeModel currentTree = null; - protected ExternalTreeI currentExtTree = null; + protected TreeI currentExtTree = null; @Override public boolean hasSearchResults() @@ -2954,12 +2954,12 @@ public abstract class AlignmentViewport return currentTree; } - public ExternalTreeI getCurrentExtTree() + public TreeI getCurrentExtTree() { return currentExtTree; } - public void setCurrentExtTree(ExternalTreeI externalTree) + public void setCurrentExtTree(TreeI externalTree) { currentExtTree = externalTree; } diff --git a/test/jalview/ext/archaeopteryx/TreeViewTest.java b/test/jalview/ext/archaeopteryx/TreeViewTest.java index f0595f2..87c32e4 100644 --- a/test/jalview/ext/archaeopteryx/TreeViewTest.java +++ b/test/jalview/ext/archaeopteryx/TreeViewTest.java @@ -3,7 +3,7 @@ package jalview.ext.archaeopteryx; import static org.testng.Assert.assertTrue; import jalview.bin.Jalview; -import jalview.ext.treeviewer.ExternalTreeFrame; +import jalview.ext.treeviewer.TreeFrameI; import jalview.gui.Desktop; import jalview.gui.JvOptionPane; @@ -14,7 +14,7 @@ public abstract class TreeViewTest { Jalview jalview; - ExternalTreeFrame treeView; + TreeFrameI treeView; @BeforeClass(alwaysRun = true) public void setUpJvOptionPane()