X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FMainPanel.java;h=59fda587f01a08555760282e8f57c970decf36ad;hb=aa358a0f40c69940e1b42382205fb7ca1767878e;hp=17335bd7fbd26bc4289dc46cbec643b9e5785bc4;hpb=4299cab0ff5662b2163f087bb91b9bc9a271081d;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/MainPanel.java b/forester/java/src/org/forester/archaeopteryx/MainPanel.java index 17335bd..59fda58 100644 --- a/forester/java/src/org/forester/archaeopteryx/MainPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/MainPanel.java @@ -36,8 +36,10 @@ import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.awt.image.BufferedImage; import java.util.ArrayList; +import java.util.HashMap; import java.util.Hashtable; import java.util.List; +import java.util.Map; import java.util.Set; import javax.swing.JPanel; @@ -66,11 +68,12 @@ public class MainPanel extends JPanel implements ComponentListener { private Phylogeny _cut_or_copied_tree; private Set _copied_and_pasted_nodes; private Hashtable _image_map; + private static Map _lineage_to_rank_map; MainPanel() { } - MainPanel( final Configuration configuration, final MainFrame parent ) { + public MainPanel( final Configuration configuration, final MainFrame parent ) { if ( configuration == null ) { throw new IllegalArgumentException( "configuration is null" ); } @@ -85,10 +88,10 @@ public class MainPanel extends JPanel implements ComponentListener { getControlPanel().showWhole(); } - void addPhylogenyInNewTab( final Phylogeny phy, - final Configuration config, - final String default_name, - final String full_path ) { + public void addPhylogenyInNewTab( final Phylogeny phy, + final Configuration config, + final String default_name, + final String full_path ) { final TreePanel treepanel = new TreePanel( phy, config, this ); getControlPanel().phylogenyAdded( config ); treepanel.setControlPanel( getControlPanel() ); @@ -204,7 +207,7 @@ public class MainPanel extends JPanel implements ComponentListener { return _configuration; } - ControlPanel getControlPanel() { + public ControlPanel getControlPanel() { return _control_panel; } @@ -261,7 +264,7 @@ public class MainPanel extends JPanel implements ComponentListener { } } - TreePanel getCurrentTreePanel() { + public TreePanel getCurrentTreePanel() { final int selected = getTabbedPane().getSelectedIndex(); if ( selected >= 0 ) { return _treepanels.get( selected ); @@ -299,7 +302,7 @@ public class MainPanel extends JPanel implements ComponentListener { return getCurrentScrollPane().getViewport().getExtentSize(); } - JTabbedPane getTabbedPane() { + public JTabbedPane getTabbedPane() { return _tabbed_pane; } @@ -409,4 +412,11 @@ public class MainPanel extends JPanel implements ComponentListener { synchronized Hashtable getImageMap() { return _image_map; } + + public synchronized static Map getLineageToRankMap() { + if ( _lineage_to_rank_map == null ) { + _lineage_to_rank_map = new HashMap(); + } + return _lineage_to_rank_map; + } }