rio, lca, refactoring
[jalview.git] / forester / java / src / org / forester / archaeopteryx / MainPanel.java
index 6044baf..59fda58 100644 (file)
@@ -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<Integer>                     _copied_and_pasted_nodes;
     private Hashtable<String, BufferedImage> _image_map;
+    private static Map<String, String>       _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" );
         }
@@ -204,7 +207,7 @@ public class MainPanel extends JPanel implements ComponentListener {
         return _configuration;
     }
 
-    ControlPanel getControlPanel() {
+    public ControlPanel getControlPanel() {
         return _control_panel;
     }
 
@@ -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<String, BufferedImage> getImageMap() {
         return _image_map;
     }
+
+    public synchronized static Map<String, String> getLineageToRankMap() {
+        if ( _lineage_to_rank_map == null ) {
+            _lineage_to_rank_map = new HashMap<String, String>();
+        }
+        return _lineage_to_rank_map;
+    }
 }