diff --git a/src/beast/app/beauti/FossilCalibrationInputEditor.java b/src/beast/app/beauti/FossilCalibrationInputEditor.java index e11d912..f8f1780 100644 --- a/src/beast/app/beauti/FossilCalibrationInputEditor.java +++ b/src/beast/app/beauti/FossilCalibrationInputEditor.java @@ -3,13 +3,14 @@ + import java.awt.Dimension; import beast.app.beauti.BeautiDoc; import beast.app.ca.CAPanel; import beast.app.ca.CAPanelListener; import beast.app.draw.BEASTObjectInputEditor; -import beast.core.BEASTObject; +import beast.core.BEASTInterface; import beast.core.Input; import beast.core.parameter.RealParameter; import beast.math.distributions.FossilCalibration; @@ -33,7 +34,7 @@ public Class type() { FossilCalibration calibration; @Override - public void init(Input input, BEASTObject plugin, int itemNr, ExpandOption bExpandOption, boolean bAddButtons) { + public void init(Input input, BEASTInterface plugin, int itemNr, ExpandOption bExpandOption, boolean bAddButtons) { m_input = input; m_plugin = plugin; calibration = (FossilCalibration) m_input.get(); diff --git a/src/beast/app/beauti/FossilPriorInputEditor.java b/src/beast/app/beauti/FossilPriorInputEditor.java index 4fee198..d789e22 100644 --- a/src/beast/app/beauti/FossilPriorInputEditor.java +++ b/src/beast/app/beauti/FossilPriorInputEditor.java @@ -14,6 +14,7 @@ import beast.app.beauti.MRCAPriorInputEditor; import beast.app.beauti.PriorInputEditor; import beast.app.beauti.TaxonSetDialog; +import beast.core.BEASTInterface; import beast.core.BEASTObject; import beast.core.Input; import beast.evolution.alignment.Taxon; @@ -35,7 +36,7 @@ public Class type() { } @Override - public void init(Input input, BEASTObject plugin, final int listItemNr, ExpandOption bExpandOption, boolean bAddButtons) { + public void init(Input input, BEASTInterface plugin, final int listItemNr, ExpandOption bExpandOption, boolean bAddButtons) { doc.beautiConfig.suppressPlugins.add("beast.math.distributions.FossilPrior.tree"); doc.beautiConfig.suppressPlugins.add("beast.math.distributions.FossilPrior.distr"); doc.beautiConfig.suppressPlugins.add("beast.math.distributions.FossilPrior.monophyletic"); @@ -106,7 +107,7 @@ Set getTaxonCandidates(FossilPrior prior) { Set candidates = new HashSet(); for (String sTaxon : prior.treeInput.get().getTaxaNames()) { Taxon taxon = null; - for (Taxon taxon2 : doc.taxaset) { + for (Taxon taxon2 : doc.taxaset.values()) { if (taxon2.getID().equals(sTaxon)) { taxon = taxon2; break; @@ -115,7 +116,7 @@ Set getTaxonCandidates(FossilPrior prior) { if (taxon == null) { taxon = new Taxon(); taxon.setID(sTaxon); - doc.taxaset.add(taxon); + doc.taxaset.put(sTaxon, taxon); } candidates.add(taxon); } diff --git a/src/beast/app/beauti/FossilPriorListInputEditor.java b/src/beast/app/beauti/FossilPriorListInputEditor.java index 5464660..7808778 100644 --- a/src/beast/app/beauti/FossilPriorListInputEditor.java +++ b/src/beast/app/beauti/FossilPriorListInputEditor.java @@ -15,6 +15,7 @@ import beast.app.ca.CAPanel; import beast.app.ca.CAPanelListener; import beast.app.draw.BEASTObjectPanel; +import beast.core.BEASTInterface; import beast.core.BEASTObject; import beast.core.Input; import beast.core.Logger; @@ -50,7 +51,7 @@ public Class baseType() { FossilCalibration calibration; @Override - public void init(Input input, BEASTObject plugin, int itemNr, ExpandOption bExpandOption, boolean bAddButtons) { + public void init(Input input, BEASTInterface plugin, int itemNr, ExpandOption bExpandOption, boolean bAddButtons) { List list = (List) input.get(); if (list.size() > 0) { calibration = ((FossilPrior) list.get(0)).calibrationDistr.get(); @@ -71,7 +72,7 @@ public void init(Input input, BEASTObject plugin, int itemNr, ExpandOption bE } @Override - public List pluginSelector(Input input, BEASTObject parent, List sTabuList) { + public List pluginSelector(Input input, BEASTInterface parent, List sTabuList) { FossilPrior prior = new FossilPrior(); try { @@ -132,7 +133,7 @@ public List pluginSelector(Input input, BEASTObject parent, List // fossilCallibration.setInputValue("maxSamplingGap", new RealParameter("0.0")); // fossilCallibration.setInputValue("minSamplingGap", new RealParameter("0.0")); - List availablePlugins = doc.getInpuEditorFactory().getAvailableTemplates( + List availablePlugins = doc.getInputEditorFactory().getAvailableTemplates( new Input("fossil","",FossilCalibration.class), doc, null, doc); FossilCalibration fossilCallibration = (FossilCalibration) availablePlugins.get(0).createSubNet(new PartitionContext(), false); fossilCallibration.setID("FossilCallibration.0"); @@ -144,7 +145,7 @@ public List pluginSelector(Input input, BEASTObject parent, List e.printStackTrace(); // TODO: handle exception } - List selectedPlugins = new ArrayList(); + List selectedPlugins = new ArrayList(); selectedPlugins.add(prior); g_collapsedIDs.add(prior.getID()); return selectedPlugins; diff --git a/src/beast/app/ca/CAPanel.java b/src/beast/app/ca/CAPanel.java index b7ca365..27636c2 100644 --- a/src/beast/app/ca/CAPanel.java +++ b/src/beast/app/ca/CAPanel.java @@ -629,7 +629,7 @@ public void actionPerformed(ActionEvent e) { JPanel panel2b = new JPanel(); panel2b.setLayout(new BorderLayout()); - JLabel lblIcon = new MyJLabel(BeautiPanel.getIcon(CA_ICON)); + JLabel lblIcon = new MyJLabel(Utils.getIcon(CA_ICON)); if (mode == MODE_BEAUTI_BOTTOM) { lblIcon.setMinimumSize(new Dimension(84,84)); lblIcon.setPreferredSize(new Dimension(84,84)); @@ -1471,7 +1471,7 @@ static void showHelp(String text) { String title = text.substring(0, text.indexOf(":")); title = title.replaceAll("", ""); //JOptionPane.showMessageDialog(null, pane, title, JOptionPane.PLAIN_MESSAGE); - JOptionPane.showMessageDialog(null, pane, title, JOptionPane.PLAIN_MESSAGE, BeautiPanel.getIcon(CA_ICON2)); + JOptionPane.showMessageDialog(null, pane, title, JOptionPane.PLAIN_MESSAGE, Utils.getIcon(CA_ICON2)); } @@ -1720,7 +1720,7 @@ public DocumentFrame doNew() { frame.setSize(1024, 728); - ImageIcon icon = BeautiPanel.getIcon(CA_ICON); + ImageIcon icon = Utils.getIcon(CA_ICON); if (icon != null) { frame.setIconImage(icon.getImage()); }