Compare commits

...

3 Commits

Author SHA1 Message Date
Damien Goutte-Gattat 135ad77420 Check the image file exists when reading the CSV file. 2 years ago
Damien Goutte-Gattat d5eab4d582 Put the channel settings in a scrollable pane. 2 years ago
Damien Goutte-Gattat 2fbbd1b3a6 [maven-release-plugin] prepare for next development iteration 2 years ago
  1. 4
      pom.xml
  2. 5
      src/main/java/org/incenp/imagej/BatchReader.java
  3. 16
      src/main/java/org/incenp/imagej/plugins/MergeDialog.java

4
pom.xml

@ -8,7 +8,7 @@
<groupId>org.incenp.imagej</groupId>
<artifactId>incenp-plugins</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
<name>Incenp.org ImageJ Plugins</name>
<description>Some plugins for ImageJ</description>
@ -16,7 +16,7 @@
<connection>scm:git:https://git.incenp.org/damien/imagej-plugins.git</connection>
<developerConnection>scm:git:ssh://git@git.incenp.org/damien/imagej-plugins.git</developerConnection>
<url>https://git.incenp.org/damien/imagej-plugins</url>
<tag>incenp-plugins-0.8.0</tag>
<tag>HEAD</tag>
</scm>
<properties>

5
src/main/java/org/incenp/imagej/BatchReader.java

@ -261,7 +261,10 @@ public class BatchReader {
File imageFile = new File(line[0]);
if ( !imageFile.isAbsolute() )
line[0] = basename + File.separator + imageFile.getPath();
imageFile = new File(basename, line[0]);
if ( !imageFile.exists() )
throw new IOException(String.format("%s does not exist", line[0]));
line[0] = imageFile.getAbsolutePath();
rows.add(line);
}

16
src/main/java/org/incenp/imagej/plugins/MergeDialog.java

@ -19,6 +19,7 @@
package org.incenp.imagej.plugins;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@ -34,6 +35,7 @@ import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
@ -349,12 +351,22 @@ public class MergeDialog extends JDialog implements ActionListener, ChangeListen
btnCancel.addActionListener(this);
btnOk.addActionListener(this);
/*
* Circumvent the fact that some crappy operating systems out there dont allow
* their users to move windows as they need if the window happens to not fit the
* available screen space.
*/
JScrollPane scrChannels = new JScrollPane(pnlChannels);
Dimension defaultSize = scrChannels.getPreferredSize();
defaultSize.height = 400;
scrChannels.setPreferredSize(defaultSize);
gltMain.setHorizontalGroup(gltMain.createParallelGroup().addComponent(pnlGeneralSettings)
.addComponent(pnlFrameSettings).addComponent(pnlChannels).addGroup(GroupLayout.Alignment.TRAILING,
.addComponent(pnlFrameSettings).addComponent(scrChannels).addGroup(GroupLayout.Alignment.TRAILING,
gltMain.createSequentialGroup().addComponent(btnCancel).addComponent(btnOk)));
gltMain.setVerticalGroup(
gltMain.createSequentialGroup().addComponent(pnlGeneralSettings).addComponent(pnlFrameSettings)
.addComponent(pnlChannels).addGroup(gltMain.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(scrChannels).addGroup(gltMain.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(btnCancel).addComponent(btnOk)));
pack();

Loading…
Cancel
Save