Skip to content

Commit

Permalink
Smaller naming changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim Danmayr committed Dec 4, 2022
1 parent 224fdd3 commit cb7e2fe
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
Binary file modified bin/EVAnalyzer.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions src/org/danmayr/imagej/algorithm/FileProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public class FileProcessor extends Thread {
Dialog mDialog;
boolean mStopping = false;
AnalyseSettings mAnalyseSettings;
boolean mDemo = false;
boolean mtestRun = false;

public FileProcessor(final Dialog dialog, final AnalyseSettings analyseSettings, boolean demo) {
public FileProcessor(final Dialog dialog, final AnalyseSettings analyseSettings, boolean testRun) {
mDialog = dialog;
mAnalyseSettings = analyseSettings;
mDemo = demo;
mtestRun = testRun;
}

/**
Expand Down Expand Up @@ -79,7 +79,7 @@ public void run() {
//
// Now we let to select which files should be analyzed
//
if (true == mDemo) {
if (true == mtestRun) {
DialogSelectImages d = new DialogSelectImages(this.mDialog);
mFoundFiles = d.show(mFoundFiles);
mDialog.setProgressBarMaxSize(mFoundFiles.size(), "analyzing ...");
Expand Down
26 changes: 13 additions & 13 deletions src/org/danmayr/imagej/gui/Dialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class Dialog extends JFrame {
private JButton mbInputFolder;
private JButton mbOutputFolder;
private JButton mbStart;
private JButton mbStartDemo;
private JButton mStartTestRun;
private JButton mCancle;

private JButton mClose;
Expand Down Expand Up @@ -1563,16 +1563,16 @@ public void actionPerformed(java.awt.event.ActionEvent e) {
mMenu.add(mbStart);

////////////////////////////////////////////////////
mbStartDemo = new JButton();
mbStartDemo = new JButton(new ImageIcon(getClass().getResource("icons8-eye-16.png")));
mbStartDemo.addActionListener(new java.awt.event.ActionListener() {
mStartTestRun = new JButton();
mStartTestRun = new JButton(new ImageIcon(getClass().getResource("icons8-eye-16.png")));
mStartTestRun.addActionListener(new java.awt.event.ActionListener() {
// Beim Drücken des Menüpunktes wird actionPerformed aufgerufen
public void actionPerformed(java.awt.event.ActionEvent e) {
startAnalyse(getAnalyzeSettings(true, true), true);
}
});
mbStartDemo.setText("Run Preview (Alpha)");
mMenu.add(mbStartDemo);
mStartTestRun.setText("Test Run (Alpha)");
mMenu.add(mStartTestRun);

////////////////////////////////////////////////////
mOpenResult = new JButton();
Expand Down Expand Up @@ -1696,7 +1696,7 @@ synchronized public void incrementProgressBarValue(String lable) {
// \param[in] forAnalysis set to true if you want to get the settings prepared
// for analysis
//
AnalyseSettings getAnalyzeSettings(boolean forAnalysis, boolean demoMode) {
AnalyseSettings getAnalyzeSettings(boolean forAnalysis, boolean testMode) {
String error = "";
AnalyseSettings sett = new AnalyseSettings();

Expand All @@ -1713,8 +1713,8 @@ AnalyseSettings getAnalyzeSettings(boolean forAnalysis, boolean demoMode) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH.mm.ss");
LocalDateTime now = LocalDateTime.now();
String outputFolder = dtf.format(now);
if (true == demoMode) {
outputFolder = "preview";
if (true == testMode) {
outputFolder = "test_runs";
}

sett.mOutputFolder = mOutputFolder.getText() + java.io.File.separator + outputFolder;
Expand Down Expand Up @@ -1780,7 +1780,7 @@ void loadAnalyzeSettings(AnalyseSettings sett) {
///
/// Start analyzing
///
public void startAnalyse(AnalyseSettings sett, boolean demo) {
public void startAnalyse(AnalyseSettings sett, boolean testRun) {
if (null != sett) {
// Creeate folder if not exists
final File parentFile = new File(sett.getOutputFolder());
Expand All @@ -1792,11 +1792,11 @@ public void startAnalyse(AnalyseSettings sett, boolean demo) {
sett.saveSettings(sett.getOutputFolder() + java.io.File.separator + "settings.json",
"auto-save", "-");
mbStart.setEnabled(false);
mbStartDemo.setEnabled(false);
mStartTestRun.setEnabled(false);
mCancle.setEnabled(true);
mOpenResult.setEnabled(false);
tabbedPane.setSelectedIndex(2);
mActAnalyzer = new FileProcessor(this, sett, demo);
mActAnalyzer = new FileProcessor(this, sett, testRun);
mActAnalyzer.start();
} else {
IJ.log("Cannnot create directory: " + parentFile);
Expand All @@ -1822,7 +1822,7 @@ public void finishedAnalyse(String nameOfGeneratedReportFile) {
mProgressbar.setValue(mProgressbar.getMaximum());

mbStart.setEnabled(true);
mbStartDemo.setEnabled(true);
mStartTestRun.setEnabled(true);
mCancle.setEnabled(false);

if (nameOfGeneratedReportFile.length() > 0) {
Expand Down
1 change: 1 addition & 0 deletions src/org/danmayr/imagej/gui/DialogSelectImages.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public DialogSelectImages(JFrame root) {
this.setSize(400, 300);
this.setModal(true);
this.setLocationRelativeTo(root);
this.setTitle("Test Run");

GridBagLayout layout = new GridBagLayout();
this.setLayout(layout);
Expand Down

0 comments on commit cb7e2fe

Please sign in to comment.