Skip to content
Snippets Groups Projects
Commit b517ad5f authored by Céline  TREBEAU's avatar Céline TREBEAU
Browse files

Feature : batch mode

parent 077e0390
Branches main
No related tags found
2 merge requests!47Feature : Multi-channel and Binning,!41Resolve "Consider rescaling (binning) large images"
......@@ -5,6 +5,7 @@ import fr.pasteur.ida.zellige.ReferenceSurfaceExtraction;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
......@@ -15,8 +16,16 @@ import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
public class BatchModeDialog extends VBox
public class BatchModeDialog extends VBox implements Initializable
{
@FXML
private Button browse;
@FXML
private TextField filePathField; // TextField to display selected file path
@FXML
private Button run;
public BatchModeDialog()
{
......@@ -35,8 +44,7 @@ public class BatchModeDialog extends VBox
}
}
@FXML
private TextField filePathField; // TextField to display selected file path
private File selectedFile; // Store the selected file
......@@ -73,4 +81,20 @@ public class BatchModeDialog extends VBox
}
@Override
public void initialize( URL url, ResourceBundle resourceBundle )
{
browse.setOnAction(e -> handleBrowse());
run.setOnAction( e->
{
try
{
handleRun();
}
catch ( Exception ex )
{
throw new RuntimeException( ex );
}
} );
}
}
......@@ -13,16 +13,12 @@
<HBox prefHeight="26.0" prefWidth="399.0" spacing="10">
<TextField fx:id="filePathField" editable="false" prefWidth="300" />
<Button text="Browse" >
<onAction>#handleBrowse</onAction>
</Button>
<Button fx:id="browse" text="Browse" />
<padding>
<Insets left="10.0" right="10.0" />
</padding>
</HBox>
<Button text="Run" >
<onAction>#handleRun</onAction>
</Button>
<Button fx:id="run" text="Run" />
</fx:root>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment