Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuson committed Mar 20, 2024
1 parent 30c9867 commit 76bf83c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.function.Function;

/**
* greedy compute weakly compatible splits
* greedily compute circular splits
* Daniel Huson, 12/31/16.
*/
public class GreedyCircular {
Expand All @@ -42,7 +42,7 @@ public class GreedyCircular {
* @return compatible splits
*/
public static Pair<ArrayList<ASplit>, ArrayList<Integer>> apply(ProgressListener progress, BitSet taxaSet, final List<ASplit> splits, Function<ASplit, Double> weight) throws CanceledException {
progress.setSubtask("Greedy circular");
progress.setSubtask("Greedy outline");
progress.setMaximum(splits.size());
progress.setProgress(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Group apply(ProgressListener progress, TaxaBlock taxaBlock, NetworkBlock
if (false && graph.getNumberOfEdges() == 0 && label != null) { // todo: allow user to use marks for nodes
nodeShape.setShape(RichTextLabel.getMark(label.getText()));
} else
nodeShape.setShape(new Circle(v.getDegree() == 1 ? 3 : 2));
nodeShape.setShape(new Circle(v.getDegree() == 1 ? 3 : 2), true);

nodesGroup.getChildren().add(nodeShape);

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/splitstree6/layout/tree/LabeledEdgeShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ public void setLabel(RichTextLabel label) {


public void setShape(Shape shape) {
setShape(shape, Icebergs.enabled());
}

public void setShape(Shape shape, boolean useIceberg) {
getChildren().clear();
if (shape != null) {
if (Icebergs.enabled()) {
if (useIceberg) {
getChildren().add(Icebergs.create(shape, false));
}
getChildren().add(shape);
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/splitstree6/layout/tree/LabeledNodeShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ public void setLabel(RichTextLabel label) {
}

public void setShape(Shape shape) {
setShape(shape, Icebergs.enabled());
}

public void setShape(Shape shape, boolean useIceBerg) {
getChildren().clear();
if (shape != null) {
if (false && Icebergs.enabled()) { // node icebergs seem to get in the way...
if (useIceBerg) { // node icebergs seem to get in the way...
getChildren().add(Icebergs.create(shape, false));
}
getChildren().add(shape);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/splitstree6/window/MainWindowPresenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private void setupCommonMenuItems(MainWindow mainWindow, MainWindowController co
controller.getImportTaxonTraitsMenuItem().disableProperty().bind(workflow.runningProperty().or(mainWindow.emptyProperty()));

controller.getImportMultipleTreeFilesMenuItem().setOnAction(e -> ImportMultipleTrees.apply(mainWindow));
controller.getImportMultipleTreeFilesMenuItem().disableProperty().bind(mainWindow.emptyProperty().not());
controller.getImportMultipleTreeFilesMenuItem().disableProperty().bind(workflow.runningProperty());

controller.getImportTreeNamesMenuItem().setOnAction(e -> ImportTreeNames.apply(mainWindow));
controller.getImportTreeNamesMenuItem().disableProperty().bind(workflow.runningProperty().or(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* use Tarjan's algorithm to determine all bi-connected components
* todo: this is untested
* todo: this is broken?
* Daniel Huson, 2.2024
*/
public class BiConnectedComponents {
Expand Down

0 comments on commit 76bf83c

Please sign in to comment.