Skip to content

Commit

Permalink
Merge pull request #73 from tgvaughan/layout_patch
Browse files Browse the repository at this point in the history
Package list table now resizes with window.
  • Loading branch information
rbouckaert committed Oct 10, 2023
2 parents f5aca0f + 642508e commit 7c29e58
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/beastfx/app/beauti/JPackageDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.scene.layout.*;
import javafx.stage.Window;

import static beast.pkgmgmt.PackageManager.*;
Expand Down Expand Up @@ -119,13 +116,13 @@ public String getDescription() {

boolean isRunning;
Thread t;
VBox pane;
BorderPane pane;

public JPackageDialog() {
jLabel = new Label("List of available packages for BEAST v" + beastVersion.getMajorVersion() + ".*");
jLabel.setMinWidth(400);
pane = FXUtils.newVBox();
pane.getChildren().add(jLabel);
pane = new BorderPane();
pane.setTop(jLabel);

dataTable = createTable();
// update packages using a 30 second time out
Expand Down Expand Up @@ -166,15 +163,15 @@ public void run() {
}


pane.getChildren().add(dataTable);
pane.setCenter(dataTable);

buttonBox = createButtonBox();
pane.getChildren().add(buttonBox);
pane.setBottom(buttonBox);

setPrefSize(dataTable.getPrefWidth() + 0, dataTable.getPrefHeight() + buttonBox.getPrefHeight() + 60);

dlgPane = this;
getChildren().add(pane);
setContent(pane);
}


Expand Down

0 comments on commit 7c29e58

Please sign in to comment.