Skip to content

Commit

Permalink
udpate to beast 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
higgs.ml committed May 20, 2015
1 parent db9eb17 commit ac2ab0d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/beast/app/beauti/FossilCalibrationInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
7 changes: 4 additions & 3 deletions src/beast/app/beauti/FossilPriorInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down Expand Up @@ -106,7 +107,7 @@ Set<Taxon> getTaxonCandidates(FossilPrior prior) {
Set<Taxon> candidates = new HashSet<Taxon>();
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;
Expand All @@ -115,7 +116,7 @@ Set<Taxon> getTaxonCandidates(FossilPrior prior) {
if (taxon == null) {
taxon = new Taxon();
taxon.setID(sTaxon);
doc.taxaset.add(taxon);
doc.taxaset.put(sTaxon, taxon);
}
candidates.add(taxon);
}
Expand Down
9 changes: 5 additions & 4 deletions src/beast/app/beauti/FossilPriorListInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -71,7 +72,7 @@ public void init(Input<?> input, BEASTObject plugin, int itemNr, ExpandOption bE
}

@Override
public List<BEASTObject> pluginSelector(Input<?> input, BEASTObject parent, List<String> sTabuList) {
public List<BEASTInterface> pluginSelector(Input<?> input, BEASTInterface parent, List<String> sTabuList) {
FossilPrior prior = new FossilPrior();
try {

Expand Down Expand Up @@ -132,7 +133,7 @@ public List<BEASTObject> pluginSelector(Input<?> input, BEASTObject parent, List
// fossilCallibration.setInputValue("maxSamplingGap", new RealParameter("0.0"));
// fossilCallibration.setInputValue("minSamplingGap", new RealParameter("0.0"));

List<BeautiSubTemplate> availablePlugins = doc.getInpuEditorFactory().getAvailableTemplates(
List<BeautiSubTemplate> availablePlugins = doc.getInputEditorFactory().getAvailableTemplates(
new Input<FossilCalibration>("fossil","",FossilCalibration.class), doc, null, doc);
FossilCalibration fossilCallibration = (FossilCalibration) availablePlugins.get(0).createSubNet(new PartitionContext(), false);
fossilCallibration.setID("FossilCallibration.0");
Expand All @@ -144,7 +145,7 @@ public List<BEASTObject> pluginSelector(Input<?> input, BEASTObject parent, List
e.printStackTrace();
// TODO: handle exception
}
List<BEASTObject> selectedPlugins = new ArrayList<BEASTObject>();
List<BEASTInterface> selectedPlugins = new ArrayList<BEASTInterface>();
selectedPlugins.add(prior);
g_collapsedIDs.add(prior.getID());
return selectedPlugins;
Expand Down
6 changes: 3 additions & 3 deletions src/beast/app/ca/CAPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -1471,7 +1471,7 @@ static void showHelp(String text) {
String title = text.substring(0, text.indexOf(":"));
title = title.replaceAll("<html>", "");
//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));

}

Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit ac2ab0d

Please sign in to comment.