Package sc.fiji.snt.gui
Class GuiUtils.MenuItems
java.lang.Object
sc.fiji.snt.gui.GuiUtils.MenuItems
- Enclosing class:
GuiUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLabel of the item returned byconnectHelp(Supplier, Runnable, Runnable) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddSeparator(JMenu menu, String header) static voidaddSeparator(JMenu menu, IconFactory.GLYPH glyph, String header) static voidaddSeparator(JPopupMenu menu, String header) static voidaddSeparator(JPopupMenu menu, IconFactory.GLYPH glyph, String header) static voidaddSeparator(JPopupMenu menu, IconFactory.GLYPH glyph, String header, String tooltip) static JMenuItemstatic JCheckBoxMenuItemcheckboxMenuItem(String label, boolean selected, ActionListener lstnr, KeyStroke keystroke) Creates a checkbox menu item with a right-aligned shortcut hint and no global accelerator binding.static JCheckBoxMenuItemcheckboxWithoutAccelerator(String text, boolean selected) static JComponentcolorTagMenu(boolean asPopup, Component parent, Consumer<Color> onColorChosen) static JMenucolorTagMenu(Component parent, Consumer<Color> onColorChosen) static JPopupMenucolorTagPopup(Component parent, Consumer<Color> onColorChosen) static LinkedHashMap<String, Color> static JMenuItemstatic JMenuItemconnectHelp(Supplier<GuiUtils> gui, Runnable onOpen, Runnable onClose) Menu item that opens the "how to connect two paths in Edit Mode" help dialog (shared by the InteractiveTracerCanvas and Bdv/Bvv context menus)static voidcontrastOptions(JComponent menuOrPopupMenu, JComponent component, boolean includeSeparator) static JMenuItemstatic JMenuItemstatic JMenuItemstatic JCheckBoxMenuItemstatic intstatic JMenuItemstatic JMenuItemstatic JMenuItemstatic JMenuItemdistribution(Supplier<SNTTable> tableSupplier) static JMenuItemstatic JMenuItemstatic MenuElement[]getMenuPath(JMenuItem item) static WindowgetParentWindow(JMenuItem menuItem) static JMenuhelpMenu(SNTCommandFinder cmdFinder) static JMenuItemitemWithoutAccelerator(String text) static JMenuItemstatic JMenuItemstatic JMenuItemmenuItem(String label, ActionListener lstnr, KeyStroke keystroke, char symbol, boolean solid, Color color) Creates a menu item with a right-aligned shortcut hint, an optional icon specified by a font symbol, and no global accelerator binding.static JMenuItemmenuItem(String label, ActionListener lstnr, KeyStroke keystroke, IconFactory.GLYPH glyph) Creates a menu item with a right-aligned shortcut hint, an optional icon, and no global accelerator binding.static JMenuItemopenHelpURL(String label, String URL) static JMenuItemstatic JMenuItemstatic JMenuItemstatic booleanrevealMenuItem(JMenuItem jmi) static JMenuItemstatic JMenuItemstatic JMenuItemstatic JMenuItemstatic JMenuItemshowHelpOnCountingSpines(boolean streamMode, Action postDialogAction) static JMenuItemstatic JMenuItem
-
Field Details
-
CONNECT_HELP_LABEL
Label of the item returned byconnectHelp(Supplier, Runnable, Runnable)- See Also:
-
-
Method Details
-
connectHelp
Menu item that opens the "how to connect two paths in Edit Mode" help dialog (shared by the InteractiveTracerCanvas and Bdv/Bvv context menus)- Parameters:
gui- supplies the GuiUtils used to display the dialog (evaluated when the item is activated)onOpen- optional task run right before the dialog is displayed (may be null)onClose- optional task run when the dialog is closed (may be null)- Returns:
- the menu item
-
addSeparator
-
addSeparator
-
addSeparator
-
addSeparator
public static void addSeparator(JPopupMenu menu, IconFactory.GLYPH glyph, String header, String tooltip) -
addSeparator
-
getParentWindow
-
getMenuPath
-
revealMenuItem
Opens and arms theJMenu/JMenuBarchain leading tojmi, so it becomesshowingwithout the user clicking through it (e.g., to anchor a tour callout, or to reveal a command-finder search hit). Does nothing (returnsfalse) ifjmi's chain could not be resolved this way.- Returns:
trueifjmiended up armed/selected
-
distribution
-
summarize
-
save
-
combineCharts
-
persistenceAnalysis
-
brainAreaAnalysis
-
devResourceMain
-
devResourceJavaAPI
-
devResourcePythonAPI
-
convexHull
-
createDendrogram
-
createAnnotationGraph
-
measureOptions
-
measureQuick
-
renderQuick
-
debugMode
-
rootAngleAnalysis
-
saveTablesAndPlots
-
shollAnalysis
-
strahlerAnalysis
-
fromOpenImage
-
fromFileImage
-
defaultHeight
public static int defaultHeight() -
contrastOptions
public static void contrastOptions(JComponent menuOrPopupMenu, JComponent component, boolean includeSeparator) -
itemWithoutAccelerator
-
checkboxWithoutAccelerator
-
checkboxMenuItem
public static JCheckBoxMenuItem checkboxMenuItem(String label, boolean selected, ActionListener lstnr, KeyStroke keystroke) Creates a checkbox menu item with a right-aligned shortcut hint and no global accelerator binding.- Parameters:
label- the menu item textselected- the initial selection statelstnr- the action listenerkeystroke- the shortcut to display (ornullfor none)- Returns:
- the configured checkbox menu item
-
helpMenu
-
openURL
-
openHelpURL
-
showHelpOnCountingSpines
-
colorTagPresets
-
colorTagMenu
-
colorTagPopup
-
colorTagMenu
public static JComponent colorTagMenu(boolean asPopup, Component parent, Consumer<Color> onColorChosen)
-