Skip to content

Commit

Permalink
Fix Javadoc compilation
Browse files Browse the repository at this point in the history
(several warnings remain to fix)
  • Loading branch information
tferr committed Oct 16, 2024
1 parent 405cb97 commit 0f37c8c
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/main/java/sc/fiji/snt/SNTUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -3770,7 +3770,7 @@ public Viewer3D getReconstructionViewer(final boolean initializeIfNull) {
}

/**
* Gets the active getSciViewSNT (SciView<>SNT bridge) instance.
* Gets the active getSciViewSNT (SciView-SNT bridge) instance.
*
* @param initializeIfNull it true, initializes SciView if it has not yet
* been initialized
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public SNTChart getHistogram(final String measurement) {
* is determined using the Freedman-Diaconis rule.
*
* @param measurement the measurement (e.g.,
* {@link MultiTreeStatistics#AVG_REMOTE_ANGLE)
* {@link MultiTreeStatistics#AVG_REMOTE_ANGLE}
* @return the frame holding the histogram
* @see #getHistogram(String)
* @see #setMinNBins(int)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/fiji/snt/analysis/ProfileProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void setShape(final Shape shape) {

/**
* Specify a fixed radius for each {@link Shape} region around each
* {@link PointInImage}. Set to <= 0 to use the actual {@link PointInImage}
* {@link PointInImage}. Set to {@literal <= 0} to use the actual {@link PointInImage}
* radii.
*
* @param radius
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sc/fiji/snt/analysis/SkeletonConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ public SkeletonConverter(final ImagePlus imagePlus, final int frame) {
* values are considered to be foreground.
* @param lowerThreshold intensities below this value will be set to zero,
* and will not contribute to the skeleton. Ignored
* if < 0
* if &gt; 0
* @param upperThreshold intensities above this value will be set to zero,
* and will not contribute to the skeleton. Ignored
* if < 0
* if &lt; 0
* @param erodeIsolatedPixels If true, any isolated pixels (single point
* skeletons) that may be formed after
* skeletonization are eliminated by erosion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public boolean isSkipSomaticSegments() {
* single-point (soma centroid)), should segments between the soma and neurite
* be ignored. Useful when somas are large relatively to the length of arbor, as
* in microglia cells. See e.g.,
* <a href=" https://forum.image.sc/t//51707/">this forum thread</a>.
* <a href="https://forum.image.sc/t//51707/">this forum thread</a>.
*
* @param skipSomaticSegments the skipFirsNode to set
*/
Expand Down
18 changes: 8 additions & 10 deletions src/main/java/sc/fiji/snt/gui/FileChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@

/**
* Improvements to JFileChooser, namely:
* <ul>
* <li>Confirmation dialog when overriding files</li>
* <li>Accessory panel with FlatLaf buttons to:</li>
* <ul>
* <li>Toggle visibility of hidden files</li>
* <li>Filter file list by custom pattern</li>
* <li>Reveal contents in native file explorer</li>
* </ul>
* </ul>
* <pre>
* - Confirmation dialog when overriding files
* - Accessory panel with FlatLaf buttons to:
* - Toggle visibility of hidden files
* - Filter file list by custom pattern
* - Reveal contents in native file explorer
* </pre>
* Other fixes (current directory always the root folder on linux) and tweaks
* (drag & drop, etc.) are provided by GuiUtils to keep dependencies to a
* (drag and drop, etc.) are provided by GuiUtils to keep dependencies to a
* minimum. TODO: submit this upstream porting to SciJava
*/
public class FileChooser extends JFileChooser {
Expand Down
94 changes: 47 additions & 47 deletions src/main/java/sc/fiji/snt/gui/FileDrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@

/**
* This class makes it easy to drag and drop files from the operating system to
* a Java program. Any <tt>java.awt.Component</tt> can be dropped onto, but only
* <tt>javax.swing.JComponent</tt>s will indicate the drop event with a changed
* a Java program. Any <code>java.awt.Component</code> can be dropped onto, but only
* <code>javax.swing.JComponent</code>s will indicate the drop event with a changed
* border.
* <p>
* To use this class, construct a new <tt>FileDrop</tt> by passing it the target
* component and a <tt>Listener</tt> to receive notification when file(s) have
* To use this class, construct a new <code>FileDrop</code> by passing it the target
* component and a <code>Listener</code> to receive notification when file(s) have
* been dropped. Here is an example:
* </p>
*
Expand All @@ -57,13 +57,13 @@
* </pre>
* <p>
* You can specify the border that will appear when files are being dragged by
* calling the constructor with a <tt>javax.swing.border.Border</tt>. Only
* <tt>JComponent</tt>s will show any indication with a border.
* calling the constructor with a <code>javax.swing.border.Border</code>. Only
* <code>JComponent</code>s will show any indication with a border.
* </p>
* <p>
* You can turn on some debugging features by passing a <tt>PrintStream</tt>
* object (such as <tt>System.out</tt>) into the full constructor. A
* <tt>null</tt> value will result in no extra debugging information being
* You can turn on some debugging features by passing a <code>PrintStream</code>
* object (such as <code>System.out</code>) into the full constructor. A
* <code>null</code> value will result in no extra debugging information being
* output.
* </p>
*
Expand Down Expand Up @@ -109,7 +109,7 @@ public class FileDrop {
* @param c
* Component on which files will be dropped.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
public FileDrop(final java.awt.Component c, final Listener listener) {
Expand All @@ -123,7 +123,7 @@ public FileDrop(final java.awt.Component c, final Listener listener) {

/**
* Constructor with a default border and the option to recursively set drop
* targets. If your component is a <tt>java.awt.Container</tt>, then each of
* targets. If your component is a <code>java.awt.Container</code>, then each of
* its children components will also listen for drops, though only the
* parent will change borders.
*
Expand All @@ -132,7 +132,7 @@ public FileDrop(final java.awt.Component c, final Listener listener) {
* @param recursive
* Recursively set children as drop targets.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.awt.Component c, final boolean recursive,
Expand All @@ -148,16 +148,16 @@ protected FileDrop(final java.awt.Component c, final boolean recursive,
/**
* Constructor with a default border and debugging optionally turned on.
* With Debugging turned on, more status messages will be displayed to
* <tt>out</tt>. A common way to use this constructor is with
* <tt>System.out</tt> or <tt>System.err</tt>. A <tt>null</tt> value for the
* parameter <tt>out</tt> will result in no debugging output.
* <code>out</code>. A common way to use this constructor is with
* <code>System.out</code> or <code>System.err</code>. A <code>null</code> value for the
* parameter <code>out</code> will result in no debugging output.
*
* @param out
* PrintStream to record debugging info or null for no debugging.
* @param c
* Component on which files will be dropped.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
Expand All @@ -172,12 +172,12 @@ protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
/**
* Constructor with a default border, debugging optionally turned on and the
* option to recursively set drop targets. If your component is a
* <tt>java.awt.Container</tt>, then each of its children components will
* <code>java.awt.Container</code>, then each of its children components will
* also listen for drops, though only the parent will change borders. With
* Debugging turned on, more status messages will be displayed to
* <tt>out</tt>. A common way to use this constructor is with
* <tt>System.out</tt> or <tt>System.err</tt>. A <tt>null</tt> value for the
* parameter <tt>out</tt> will result in no debugging output.
* <code>out</code>. A common way to use this constructor is with
* <code>System.out</code> or <code>System.err</code>. A <code>null</code> value for the
* parameter <code>out</code> will result in no debugging output.
*
* @param out
* PrintStream to record debugging info or null for no debugging.
Expand All @@ -186,7 +186,7 @@ protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
* @param recursive
* Recursively set children as drop targets.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
Expand All @@ -205,9 +205,9 @@ protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
* @param c
* Component on which files will be dropped.
* @param dragBorder
* Border to use on <tt>JComponent</tt> when dragging occurs.
* Border to use on <code>JComponent</code> when dragging occurs.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.awt.Component c,
Expand All @@ -221,18 +221,18 @@ protected FileDrop(final java.awt.Component c,

/**
* Constructor with a specified border and the option to recursively set
* drop targets. If your component is a <tt>java.awt.Container</tt>, then
* drop targets. If your component is a <code>java.awt.Container</code>, then
* each of its children components will also listen for drops, though only
* the parent will change borders.
*
* @param c
* Component on which files will be dropped.
* @param dragBorder
* Border to use on <tt>JComponent</tt> when dragging occurs.
* Border to use on <code>JComponent</code> when dragging occurs.
* @param recursive
* Recursively set children as drop targets.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.awt.Component c,
Expand All @@ -244,18 +244,18 @@ protected FileDrop(final java.awt.Component c,
/**
* Constructor with a specified border and debugging optionally turned on.
* With Debugging turned on, more status messages will be displayed to
* <tt>out</tt>. A common way to use this constructor is with
* <tt>System.out</tt> or <tt>System.err</tt>. A <tt>null</tt> value for the
* parameter <tt>out</tt> will result in no debugging output.
* <code>out</code>. A common way to use this constructor is with
* <code>System.out</code> or <code>System.err</code>. A <code>null</code> value for the
* parameter <code>out</code> will result in no debugging output.
*
* @param out
* PrintStream to record debugging info or null for no debugging.
* @param c
* Component on which files will be dropped.
* @param dragBorder
* Border to use on <tt>JComponent</tt> when dragging occurs.
* Border to use on <code>JComponent</code> when dragging occurs.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
Expand All @@ -270,20 +270,20 @@ protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
/**
* Full constructor with a specified border and debugging optionally turned
* on. With Debugging turned on, more status messages will be displayed to
* <tt>out</tt>. A common way to use this constructor is with
* <tt>System.out</tt> or <tt>System.err</tt>. A <tt>null</tt> value for the
* parameter <tt>out</tt> will result in no debugging output.
* <code>out</code>. A common way to use this constructor is with
* <code>System.out</code> or <code>System.err</code>. A <code>null</code> value for the
* parameter <code>out</code> will result in no debugging output.
*
* @param out
* PrintStream to record debugging info or null for no debugging.
* @param c
* Component on which files will be dropped.
* @param dragBorder
* Border to use on <tt>JComponent</tt> when dragging occurs.
* Border to use on <code>JComponent</code> when dragging occurs.
* @param recursive
* Recursively set children as drop targets.
* @param listener
* Listens for <tt>filesDropped</tt>.
* Listens for <code>filesDropped</code>.
* @since 1.0
*/
protected FileDrop(final java.io.PrintStream out, final java.awt.Component c,
Expand Down Expand Up @@ -599,7 +599,7 @@ private boolean isDragOk(final java.io.PrintStream out,
return ok;
} // end isDragOk

/** Outputs <tt>message</tt> to <tt>out</tt> if it's not null. */
/** Outputs <code>message</code> to <code>out</code> if it's not null. */
private static void log(final java.io.PrintStream out, final String message) { // Log
// message
// if
Expand Down Expand Up @@ -684,7 +684,7 @@ public static interface Listener {
* This method is called when files have been successfully dropped.
*
* @param files
* An array of <tt>File</tt>s that were dropped.
* An array of files that were dropped.
* @since 1.0
*/
public abstract void filesDropped(java.io.File[] files);
Expand Down Expand Up @@ -774,8 +774,8 @@ public java.io.File[] getFiles() {
*
* The {@link java.awt.datatransfer.DataFlavor} associated with
* {@link TransferableObject} has the representation class
* <tt>net.iharder.dnd.TransferableObject.class</tt> and MIME type
* <tt>application/x-net.iharder.dnd.TransferableObject</tt>. This data
* <code>net.iharder.dnd.TransferableObject.class</code> and MIME type
* <code>application/x-net.iharder.dnd.TransferableObject</code>. This data
* flavor is accessible via the static {@link #DATA_FLAVOR} property.
*
*
Expand All @@ -791,7 +791,7 @@ static class TransferableObject implements
java.awt.datatransfer.Transferable {
/**
* The MIME type for {@link #DATA_FLAVOR} is
* <tt>application/x-net.iharder.dnd.TransferableObject</tt>.
* <code>application/x-net.iharder.dnd.TransferableObject</code>.
*
* @since 1.1
*/
Expand All @@ -800,8 +800,8 @@ static class TransferableObject implements
/**
* The default {@link java.awt.datatransfer.DataFlavor} for
* {@link TransferableObject} has the representation class
* <tt>net.iharder.dnd.TransferableObject.class</tt> and the MIME type
* <tt>application/x-net.iharder.dnd.TransferableObject</tt>.
* <code>net.iharder.dnd.TransferableObject.class</code> and the MIME type
* <code>application/x-net.iharder.dnd.TransferableObject</code>.
*
* @since 1.1
*/
Expand All @@ -818,7 +818,7 @@ static class TransferableObject implements
* Along with the {@link #DATA_FLAVOR} associated with this class, this
* creates a custom data flavor with a representation class determined
* from <code>data.getClass()</code> and the MIME type
* <tt>application/x-net.iharder.dnd.TransferableObject</tt>.
* <code>application/x-net.iharder.dnd.TransferableObject</code>.
*
* @param data
* The data to transfer
Expand Down Expand Up @@ -850,7 +850,7 @@ public TransferableObject(final Fetcher fetcher) {
* {@link #DATA_FLAVOR} associated with this class, this creates a
* custom data flavor with a representation class <var>dataClass</var>
* and the MIME type
* <tt>application/x-net.iharder.dnd.TransferableObject</tt>.
* <code>application/x-net.iharder.dnd.TransferableObject</code>.
*
* @see Fetcher
* @param dataClass
Expand All @@ -868,7 +868,7 @@ public TransferableObject(final Class<?> dataClass, final Fetcher fetcher) {

/**
* Returns the custom {@link java.awt.datatransfer.DataFlavor}
* associated with the encapsulated object or <tt>null</tt> if the
* associated with the encapsulated object or <code>null</code> if the
* {@link Fetcher} constructor was used without passing a
* {@link java.lang.Class}.
*
Expand Down Expand Up @@ -936,7 +936,7 @@ public Object getTransferData(final java.awt.datatransfer.DataFlavor flavor)
} // end getTransferData

/**
* Returns <tt>true</tt> if <var>flavor</var> is one of the supported
* Returns <code>true</code> if <var>flavor</var> is one of the supported
* flavors. Flavors are supported using the <code>equals(...)</code>
* method.
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sc/fiji/snt/gui/FilePicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public class FilePicker extends JPanel {
*
* @param fileChooserType Either {@link #OPEN_DIALOG} or {@link #SAVE_DIALOG}
* @param initialFile File path to be displayed when panel is shown. Optional.
* {@#code null} allowed.
* {@code null} allowed.
* @param allowedExtensions Allowed file extensions in JFileChooser. Optional.
* {@#code null} allowed.
* {@code null} allowed.
*/
public FilePicker(final int fileChooserType, final File initialFile, final String... allowedExtensions) {
if (fileChooserType != OPEN_DIALOG && fileChooserType != SAVE_DIALOG) {
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/sc/fiji/snt/gui/MeasureUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,24 @@ private JButton optionsButton(final Collection<Tree> trees) {
});
jmi.setToolTipText("Computes Mean, SD, Sum, etc. for existing measurements");
optionsMenu.add(jmi);
// jmi = new JMenuItem("Histogram of Existing Measurements...");
// jmi.addActionListener(e -> {
// if (table == null || table.isEmpty()) {
// guiUtils.error("Measurements table is empty.");
// return;
// }
// final boolean isSummarized = table.isSummarized();
// table.removeSummary();
// final List<String> choices = new GuiUtils(this).getMultipleChoices("Which metrics",
// table.geColumnHeaders().toArray(new String[0]), null);
// if (choices == null) return;
// SNTChart.getHistogram(table, choices.toArray(new String[0])).show();
// if (isSummarized) {
// table.summarize();
// updateTable(false);
// }
// });
// optionsMenu.add(jmi);
GuiUtils.addSeparator(optionsMenu, "Utilities:");
jmi = GuiUtils.MenuItems.renderQuick();
jmi.addActionListener(e -> {
Expand Down
Loading

0 comments on commit 0f37c8c

Please sign in to comment.