Skip to content

Commit a9b156c

Browse files
committed
SNTUI: Corrections/improvements to accommodate online docs
Also: saveMenuItem was being enabled/disabled across states. That made sense when it was the only entry point for saving, but now that there many other (and those are not being tracked), we no longer use saveMenuItem as a class field
1 parent ac2ad08 commit a9b156c

3 files changed

Lines changed: 8 additions & 13 deletions

File tree

‎src/main/java/sc/fiji/snt/SNTUI.java‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public class SNTUI extends JDialog {
9696
protected JSpinner snapWindowZsizeSpinner;
9797
private JButton showOrHidePathList;
9898
private JButton showOrHideFillList = new JButton(); // must be initialized
99-
private JMenuItem saveMenuItem;
10099
private JMenuItem quitMenuItem;
101100
private JLabel statusText;
102101
private JLabel statusBarText;
@@ -109,7 +108,6 @@ public class SNTUI extends JDialog {
109108
private JSpinner assignDiameterSpinner;
110109
private JCheckBox confirmTemporarySegmentsCheckbox;
111110
private JRadioButtonMenuItem standardTracingRbmi;
112-
private JRadioButtonMenuItem rubberBandTracingRbmi;
113111

114112
// UI controls for auto-tracing
115113
private JComboBox<String> searchAlgoChoice;
@@ -914,7 +912,6 @@ protected void disableImageDependentComponents() {
914912
private void disableEverything() {
915913
assert SwingUtilities.isEventDispatchThread();
916914
disableImageDependentComponents();
917-
saveMenuItem.setEnabled(false);
918915
quitMenuItem.setEnabled(false);
919916
}
920917

@@ -1024,7 +1021,6 @@ public void enter() {
10241021
partsNearbyCSpinner.setEnabled(isStackAvailable());
10251022
setEnableAutoTracingComponents(plugin.isAstarEnabled(), true);
10261023
fmUI.setEnabledWhileNotFilling();
1027-
saveMenuItem.setEnabled(true);
10281024
quitMenuItem.setEnabled(true);
10291025
showPathsSelected.setEnabled(true);
10301026
updateStatusText("Click somewhere to start a new path...");
@@ -1049,7 +1045,6 @@ public void enter() {
10491045
setEnableAutoTracingComponents(false, false);
10501046
plugin.discardFill();
10511047
fmUI.setEnabledWhileNotFilling();
1052-
saveMenuItem.setEnabled(true);
10531048
quitMenuItem.setEnabled(true);
10541049
showPathsSelected.setEnabled(true);
10551050
updateRebuildCanvasButton();
@@ -2914,7 +2909,7 @@ private JMenu fileMenu(final ScriptInstaller installer) {
29142909

29152910
// Save
29162911
fileMenu.addSeparator();
2917-
saveMenuItem = new JMenuItem("Save Tracings", IconFactory.menuIcon(IconFactory.GLYPH.SAVE));
2912+
final JMenuItem saveMenuItem = new JMenuItem("Save Tracings", IconFactory.menuIcon(IconFactory.GLYPH.SAVE));
29182913
saveMenuItem.setToolTipText("Saves tracings to a TRACES (XML) file. "
29192914
+ "This file may be gzip compressed as per options in the Preferences dialog.");
29202915
saveMenuItem.setAccelerator(
@@ -3293,7 +3288,7 @@ private JMenu viewMenu() {
32933288
// Calculate usable area (excluding taskbar, dock, etc.)
32943289
final int usableX = screenBounds.x + insets.left;
32953290
final int usableY = screenBounds.y + insets.top;
3296-
final int usableWidth = screenBounds.width - insets.left - insets.right;
3291+
//final int usableWidth = screenBounds.width - insets.left - insets.right;
32973292
final int usableHeight = screenBounds.height - insets.top - insets.bottom;
32983293

32993294
// Position dialogs on the same screen
@@ -3863,7 +3858,7 @@ public void itemStateChanged(final ItemEvent e) {
38633858
optionsMenu.add(GuiUtils.leftAlignedLabel("Tracing Mode:", false));
38643859
final ButtonGroup tracingModeButtonGroup = new ButtonGroup();
38653860
standardTracingRbmi = new JRadioButtonMenuItem("Standard", !plugin.rubberBandTracing);
3866-
rubberBandTracingRbmi = new JRadioButtonMenuItem("Live Preview", plugin.rubberBandTracing);
3861+
final JRadioButtonMenuItem rubberBandTracingRbmi = new JRadioButtonMenuItem("Live Preview", plugin.rubberBandTracing);
38673862
GuiUtils.addTooltip(rubberBandTracingRbmi, "<html>Continuously previews the path to the cursor position as you move the mouse.<br>"
38683863
+ "Click to confirm each segment. Only recommended for 2D images.");
38693864
tracingModeButtonGroup.add(standardTracingRbmi);
@@ -3898,7 +3893,7 @@ public void itemStateChanged(final ItemEvent e) {
38983893
});
38993894
optionsMenu.addSeparator();
39003895
optionsMenu.add(GuiUtils.MenuItems.openHelpURL("Help on Algorithm Settings",
3901-
"https://imagej.net/plugins/snt/manual#auto-tracing"));
3896+
"https://imagej.net/plugins/snt/manual#algorithm-settings"));
39023897
aStarPanel = new JPanel(new BorderLayout());
39033898
aStarPanel.add(checkboxPanel, BorderLayout.CENTER);
39043899
aStarPanel.add(optionsButton, BorderLayout.EAST);

‎src/main/java/sc/fiji/snt/gui/cmds/PrefsCmd.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public class PrefsCmd extends OptionsPlugin {
7171
@Parameter(required = false)
7272
private SwingLookAndFeelService lafService;
7373

74-
@Parameter(required = false, visibility = ItemVisibility.MESSAGE, label = HEADER_HTML + "I. IO and Performance:")
74+
@Parameter(required = false, visibility = ItemVisibility.MESSAGE, label = HEADER_HTML + "I. I/O and Performance:")
7575
private String HEADER1;
7676

77-
@Parameter(label="No. parallel threads",
77+
@Parameter(label="No. of parallel threads",
7878
description="<HTML><div WIDTH=500>The max. no. of parallel threads to be used by SNT, as specified in IJ's"
7979
+ "Edit>Options>Memory &amp; Threads... Set it to 0 to use the available processors on your computer")
8080
private int nThreads;
@@ -240,7 +240,7 @@ public void reset() {
240240

241241
@SuppressWarnings("unused")
242242
private void lafHelp() {
243-
new GuiUtils().showHTMLDialog("<HTML>"
243+
new GuiUtils().showHTMLDialog("<HTML><div WIDTH=500>"
244244
+ "SNT's <i>Look and Feel</i> (L&F) preference has been integrated into Fiji. "
245245
+ "It is advised to use Fiji's <i>Edit>Look and Feel...</i> prompt instead.<br><br>"
246246
+ "Note that setting a L&F does not affect AWT widgets. Thus, while a dark theme can be applied "

‎src/main/java/sc/fiji/snt/plugin/SpineExtractorCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@Plugin(type = Command.class, label = "Extract Spine/Varicosity Counts from ROI(s)...", initializer = "init")
6464
public class SpineExtractorCmd extends CommonDynamicCmd {
6565

66-
private static final String MSG = "<br>To initiate counts, right-click on image and run \"Count Spine/Varicosities...\"";
66+
private static final String MSG = "<br>Run \"Spine/Varicosity Utilities Help...\" for details on how to annotate locations.";
6767

6868
@Parameter(required = false, label = "Source of Multipoint ROI(s):") // choices set by #init()
6969
private String roiSource;

0 commit comments

Comments
 (0)