public abstract class AbstractModuleItem<T> extends AbstractBasicDetails implements ModuleItem<T>
ModuleItem implementations.| Constructor and Description |
|---|
AbstractModuleItem(ModuleInfo info) |
| Modifier and Type | Method and Description |
|---|---|
void |
callback(Module module)
Invokes this item's callback function, if any, on the given module.
|
String |
getCallback()
Gets the function that is called whenever this item changes.
|
List<T> |
getChoices()
Gets the list of possible values.
|
int |
getColumnCount()
Gets the preferred width of the input field in characters (if applicable).
|
T |
getDefaultValue()
Gets the default value.
|
protected Class<?> |
getDelegateClass() |
Type |
getGenericType()
Gets the type of the item, including Java generic parameters.
|
ModuleInfo |
getInfo()
Gets the
ModuleInfo to which this item belongs. |
String |
getInitializer()
Gets the function that is called to initialize the item's value.
|
ItemIO |
getIOType()
Gets the input/output type of the item.
|
T |
getMaximumValue()
Gets the maximum allowed value (if applicable).
|
T |
getMinimumValue()
Gets the minimum allowed value (if applicable).
|
String |
getPersistKey()
Gets the key to use for saving the value persistently.
|
T |
getSoftMaximum()
Gets the "soft" maximum value (if applicable).
|
T |
getSoftMinimum()
Gets the "soft" minimum value (if applicable).
|
Number |
getStepSize()
Gets the preferred step size to use when rendering the item in a user
interface (if applicable).
|
String |
getValidater()
Gets the function that is called to validate the item's value.
|
T |
getValue(Module module)
Gets the item's current value with respect to the given module.
|
ItemVisibility |
getVisibility()
Gets the visibility of the item.
|
String |
getWidgetStyle()
Gets the preferred widget style to use when rendering the item in a user
interface.
|
void |
initialize(Module module)
Invokes this item's initializer function, if any, on the given module.
|
boolean |
isAutoFill()
Gets whether the item value is allowed to be auto-filled.
|
boolean |
isInput()
Gets whether the item is a module input.
|
boolean |
isOutput()
Gets whether the item is a module output.
|
boolean |
isPersisted()
Gets whether to remember the most recent value of the parameter.
|
boolean |
isRequired()
Gets whether the item value must be specified (i.e., no default).
|
T |
loadValue()
Deprecated.
|
void |
saveValue(T value)
Deprecated.
|
void |
setValue(Module module,
T value)
Sets the item's current value with respect to the given module.
|
String |
toString() |
void |
validate(Module module)
Invokes this item's validation function, if any, on the given module.
|
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTypeget, getDescription, getLabel, is, set, setDescription, setLabelpublic AbstractModuleItem(ModuleInfo info)
public String toString()
toString in class AbstractBasicDetailspublic ModuleInfo getInfo()
ModuleItemModuleInfo to which this item belongs.getInfo in interface ModuleItem<T>public Type getGenericType()
ModuleItem
For many modules, this may be the same Class object returned by
ModuleItem.getType(), but some module inputs or outputs may be backed by a
generic type such as List<String> or Iterable<Integer>.
getGenericType in interface ModuleItem<T>Field.getGenericType()public ItemIO getIOType()
ModuleItemgetIOType in interface ModuleItem<T>public boolean isInput()
ModuleItemisInput in interface ModuleItem<T>public boolean isOutput()
ModuleItemisOutput in interface ModuleItem<T>public ItemVisibility getVisibility()
ModuleItemgetVisibility in interface ModuleItem<T>public boolean isAutoFill()
ModuleItemisAutoFill in interface ModuleItem<T>public boolean isRequired()
ModuleItemisRequired in interface ModuleItem<T>public boolean isPersisted()
ModuleItemisPersisted in interface ModuleItem<T>public String getPersistKey()
ModuleItemgetPersistKey in interface ModuleItem<T>@Deprecated public T loadValue()
loadValue in interface ModuleItem<T>ModuleService.load(ModuleItem)@Deprecated public void saveValue(T value)
ModuleItemModuleItem.loadValue(), even from a different JVM.saveValue in interface ModuleItem<T>ModuleService.save(ModuleItem, Object)public String getInitializer()
ModuleItemgetInitializer in interface ModuleItem<T>public void initialize(Module module) throws MethodCallException
ModuleIteminitialize in interface ModuleItem<T>MethodCallExceptionModuleItem.getInitializer()public String getValidater()
ModuleItemgetValidater in interface ModuleItem<T>public void validate(Module module) throws MethodCallException
ModuleItemvalidate in interface ModuleItem<T>MethodCallExceptionModuleItem.getValidater()public String getCallback()
ModuleItemThis mechanism enables interdependent items of various types. For example, two int parameters "width" and "height" could update each other when another boolean "Preserve aspect ratio" flag is set.
getCallback in interface ModuleItem<T>public void callback(Module module) throws MethodCallException
ModuleItemcallback in interface ModuleItem<T>MethodCallExceptionModuleItem.getCallback()public String getWidgetStyle()
ModuleItemgetWidgetStyle in interface ModuleItem<T>public T getDefaultValue()
ModuleItemgetDefaultValue in interface ModuleItem<T>public T getMinimumValue()
ModuleItemgetMinimumValue in interface ModuleItem<T>public T getMaximumValue()
ModuleItemgetMaximumValue in interface ModuleItem<T>public T getSoftMinimum()
ModuleItemThe soft minimum is a hint for use in bounded scenarios, such as rendering in a user interface with a slider or scroll bar widget; the parameter value will not actually be clamped to the soft bounds, but they may be used in certain circumstances where appropriate.
getSoftMinimum in interface ModuleItem<T>public T getSoftMaximum()
ModuleItemThe soft maximum is a hint for use in bounded scenarios, such as rendering in a user interface with a slider or scroll bar widget; the parameter value will not actually be clamped to the soft bounds, but they may be used in certain circumstances where appropriate.
getSoftMaximum in interface ModuleItem<T>public Number getStepSize()
ModuleItemgetStepSize in interface ModuleItem<T>public int getColumnCount()
ModuleItemgetColumnCount in interface ModuleItem<T>public List<T> getChoices()
ModuleItemgetChoices in interface ModuleItem<T>public T getValue(Module module)
ModuleItemgetValue in interface ModuleItem<T>public void setValue(Module module, T value)
ModuleItemsetValue in interface ModuleItem<T>protected Class<?> getDelegateClass()
Copyright © 2015–2022 SciJava. All rights reserved.