Package org.scijava.plugin
Annotation Type Parameter
-
@Retention(RUNTIME) @Target(FIELD) public @interface Parameter
An annotation for indicating a field is an input or output parameter. This annotation is a useful way for plugins to declare their inputs and outputs simply.- Author:
- Johannes Schindelin, Grant Harris, Curtis Rueden
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Attr[]attrsA list of additional attributes which can be used to extend this annotation beyond its built-in capabilities.booleanautoFillDefines whether the parameter value should be filled programmatically, if possible.StringcallbackDefines a function that is called whenever this parameter changes.String[]choicesDefines the list of possible values (multiple choice text fields only).intcolumnsDeprecated.Replaced bystyle().StringdescriptionDefines a description for the parameter.StringinitializerDefines a function that is called to initialize the parameter.StringlabelDefines a label for the parameter.StringmaxDefines the maximum allowed value (numeric parameters only).StringminDefines the minimum allowed value (numeric parameters only).booleanpersistDefines whether to remember the most recent value of the parameter.StringpersistKeyDefines a key to use for saving the value persistently.booleanrequiredDefines whether the parameter value must be non-null.StringstepSizeDefines the step size to use (numeric parameters only).StringstyleDefines the preferred widget style.ItemIOtypeDefines the input/output type of the parameter.StringvalidaterDefines a function that is called to validate the parameter value after it is marked as resolved.ItemVisibilityvisibilityDefines the "visibility" of the parameter.
-
-
-
Element Detail
-
label
String label
Defines a label for the parameter.- Default:
- ""
-
-
-
description
String description
Defines a description for the parameter.- Default:
- ""
-
-
-
type
ItemIO type
Defines the input/output type of the parameter.Choices are:
- INPUT: parameter is an input for the plugin.
- OUTPUT: parameter is an output for the plugin.
- BOTH: parameter is both and input and an output for the plugin. This type is used to indicate an object that is mutated somehow during execution.
- Default:
- org.scijava.ItemIO.INPUT
-
-
-
visibility
ItemVisibility visibility
Defines the "visibility" of the parameter.Choices are:
- NORMAL: parameter is included in the history for purposes of data provenance, and included as a parameter when recording scripts.
- TRANSIENT: parameter is excluded from the history for the purposes of data provenance, but still included as a parameter when recording scripts.
- INVISIBLE: parameter is excluded from the history for the purposes of data provenance, and also excluded as a parameter when recording scripts. This option should only be used for parameters with no effect on the final output, such as a "verbose" flag.
- MESSAGE: parameter value is intended as a message only, not editable by the user nor included as an input or output parameter.
- Default:
- org.scijava.ItemVisibility.NORMAL
-
-
-
persistKey
String persistKey
Defines a key to use for saving the value persistently.- Default:
- ""
-
-
-
initializer
String initializer
Defines a function that is called to initialize the parameter.- Default:
- ""
-
-
-
validater
String validater
Defines a function that is called to validate the parameter value after it is marked as resolved.- See Also:
Module.resolveInput(String)
- Default:
- ""
-
-
-
callback
String callback
Defines a function that is called whenever this parameter changes.This mechanism enables interdependent parameters of various types. For example, two
intparameters "width" and "height" could update each other when anotherboolean"Preserve aspect ratio" flag is set.- Default:
- ""
-
-
-
style
String style
Defines the preferred widget style.We do not use an
enumbecause the styles need to be extensible. And we cannot use an interface-driven extensible enum pattern, because interfaces cannot be used as attributes within a Java annotation interface. So we fall back to strings!- Default:
- ""
-
-
-
min
String min
Defines the minimum allowed value (numeric parameters only).- Default:
- ""
-
-
-
max
String max
Defines the maximum allowed value (numeric parameters only).- Default:
- ""
-
-
-
stepSize
String stepSize
Defines the step size to use (numeric parameters only).- Default:
- ""
-
-
-
choices
String[] choices
Defines the list of possible values (multiple choice text fields only).- Default:
- {}
-
-
-
attrs
Attr[] attrs
A list of additional attributes which can be used to extend this annotation beyond its built-in capabilities.- Default:
- {}
-
-
-
columns
@Deprecated int columns
Deprecated.Replaced bystyle().- Default:
- 6
-
-