Package sc.fiji.snt.gui
Enum Class ContextMenuCommand
- All Implemented Interfaces:
Serializable,Comparable<ContextMenuCommand>,java.lang.constant.Constable
Non-editing commands shared by the contextual menus of the tracing canvas and of the Bdv/Bvv viewers: single
source of truth for their labels and icons, so that both front-ends expose the same entries. Shortcuts and
tooltips are not defined here because they differ between front-ends (e.g., bookmarking is
Shift+B in the canvas and M in the viewers). Node-editing commands are defined in
NodeEditCommand.- Author:
- Tiago Ferreira
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe labels as compile-time constants, for front-ends that dispatch on them (e.g., in aswitch)Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHold-key descriptions used byGuiUtils.showKeyTip(sc.fiji.snt.SNTPrefs, String, String)static final String -
Method Summary
Modifier and TypeMethodDescriptionvoidAssigns the icon of this command to a menu item.label()static ContextMenuCommand<T extends JMenuItem>
Ttag(T item) Flags a menu item as the front-end of this command (seeof(Component))static ContextMenuCommandReturns the enum constant of this class with the specified name.static ContextMenuCommand[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GRAB
-
APPEND
-
DESELECT_LAST
-
SELECT_NONE
-
LASSO
-
HIDE
-
ORIENTATION
-
BOOKMARK
-
SHOLL
-
BRIGHTEST
-
EXTEND
-
FORK
-
UNDO_SEGMENT
-
FINISH
-
PAUSE_TRACING
-
PAUSE_SNT
-
-
Field Details
-
HIDE_KEY_TIP
Hold-key descriptions used byGuiUtils.showKeyTip(sc.fiji.snt.SNTPrefs, String, String)- See Also:
-
ORIENTATION_KEY_TIP
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
tag
Flags a menu item as the front-end of this command (seeof(Component))- Parameters:
item- the menu item- Returns:
- the item, for chaining
-
of
- Parameters:
c- the component, e.g., a menu item- Returns:
- the command the component was
taggedwith, or null
-
label
- Returns:
- the menu label
-
applyIcon
Assigns the icon of this command to a menu item. Colors are resolved on every call, so that the icon matches the current look and feel- Parameters:
item- the menu item
-