Skip to content

Commit

Permalink
more work on tip sampling editor #20
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Mar 16, 2023
1 parent a56a078 commit 761de0d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/sa/beauti/SAMRCAPriorInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import beastfx.app.inputeditor.BooleanInputEditor;
import beastfx.app.inputeditor.InputEditor;
import beastfx.app.inputeditor.MRCAPriorInputEditor;
import beastfx.app.util.FXUtils;
import javafx.scene.Node;
import javafx.scene.control.CheckBox;
import javafx.scene.layout.HBox;
Expand Down Expand Up @@ -66,6 +67,29 @@ public void init(Input<?> input, BEASTInterface beastObject, int itemNr, ExpandO
return e;
}

public class NoEditor extends InputEditor.Base {
@Override
public Class<?> type() {
// TODO Auto-generated method stub
return null;
}
}

public InputEditor createTreeEditor() {
System.err.println(">>>>>> createTreeEditor");
return new NoEditor();
}

public InputEditor createMonophyleticEditor() {
System.err.println(">>>>>> createMonophyleticEditor");
return new NoEditor();
}

public InputEditor createTaxonsetEditor() {
System.err.println(">>>>>> createTaxonsetEditor");
return new NoEditor();
}

// add TipDatesRandomWalker (if not present) and add to list of operators
private void enableTipSampling() {
// First, create/find the operator
Expand Down
23 changes: 23 additions & 0 deletions src/sa/beauti/SampledNodeDataWalkerInputEditor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package sa.beauti;

import beastfx.app.inputeditor.BEASTObjectInputEditor;
import beastfx.app.inputeditor.InputEditor;
import sa.evolution.operators.SampledNodeDateRandomWalker;

public class SampledNodeDataWalkerInputEditor extends BEASTObjectInputEditor {

@Override
public Class<?> type() {
return SampledNodeDateRandomWalker.class;
}

public InputEditor createTaxonsetEditor() {
return new InputEditor.Base() {
@Override
public Class<?> type() {
return null;
}
};
}

}
3 changes: 2 additions & 1 deletion version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
/>

<service type="beastfx.app.inputeditor.InputEditor">
<provider classname="sa.beauti.SAMRCAPriorInputEditor"/>
<provider classname="sa.beauti.SAMRCAPriorInputEditor"/>
<provider classname="sa.beauti.SampledNodeDataWalkerInputEditor"/>
</service>

<service type="beastfx.app.beauti.PriorProvider">
Expand Down

0 comments on commit 761de0d

Please sign in to comment.