public class DefaultMutableModuleItem<T> extends AbstractModuleItem<T> implements MutableModuleItem<T>
MutableModuleItem
implementation, for use with custom
MutableModule
implementations.Constructor and Description |
---|
DefaultMutableModuleItem(ModuleInfo info,
ModuleItem<T> item)
Creates a new module item with the same values as the given item.
|
DefaultMutableModuleItem(ModuleInfo info,
String name,
Class<T> type) |
DefaultMutableModuleItem(Module module,
String name,
Class<T> type) |
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getDescription()
Gets a string describing the object.
|
Type |
getGenericType()
Gets the type of the item, including Java generic parameters.
|
String |
getInitializer()
Gets the function that is called to initialize the item's value.
|
ItemIO |
getIOType()
Gets the input/output type of the item.
|
String |
getLabel()
Gets the name to appear in a UI, if applicable.
|
T |
getMaximumValue()
Gets the maximum allowed value (if applicable).
|
T |
getMinimumValue()
Gets the minimum allowed value (if applicable).
|
String |
getName()
Gets the name of the object.
|
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).
|
Class<T> |
getType()
Gets the type of the item.
|
String |
getValidater()
Gets the function that is called to validate the item's value.
|
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.
|
boolean |
isAutoFill()
Gets whether the item value is allowed to be auto-filled.
|
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).
|
void |
setAutoFill(boolean autoFill) |
void |
setCallback(String callback) |
void |
setChoices(List<? extends T> choices) |
void |
setColumnCount(int columnCount) |
void |
setDefaultValue(T defaultValue) |
void |
setDescription(String description)
Sets a string describing the object.
|
void |
setInitializer(String initializer) |
void |
setIOType(ItemIO ioType) |
void |
setLabel(String label)
Sets the name to appear in a UI, if applicable.
|
void |
setMaximumValue(T maximumValue) |
void |
setMinimumValue(T minimumValue) |
void |
setName(String name)
Sets the name of the object.
|
void |
setPersisted(boolean persisted) |
void |
setPersistKey(String persistKey) |
void |
setRequired(boolean required) |
void |
setSoftMaximum(T softMaximum) |
void |
setSoftMinimum(T softMinimum) |
void |
setStepSize(Number stepSize) |
void |
setValidater(String validater) |
void |
setVisibility(ItemVisibility visibility) |
void |
setWidgetStyle(String widgetStyle) |
callback, getDelegateClass, getInfo, getValue, initialize, isInput, isOutput, loadValue, saveValue, setValue, toString, validate
get, is, set
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
callback, getInfo, getValue, initialize, isInput, isOutput, loadValue, saveValue, setValue, validate
get, is, set
public DefaultMutableModuleItem(ModuleInfo info, String name, Class<T> type)
public DefaultMutableModuleItem(ModuleInfo info, ModuleItem<T> item)
public void setIOType(ItemIO ioType)
setIOType
in interface MutableModuleItem<T>
public void setVisibility(ItemVisibility visibility)
setVisibility
in interface MutableModuleItem<T>
public void setAutoFill(boolean autoFill)
setAutoFill
in interface MutableModuleItem<T>
public void setRequired(boolean required)
setRequired
in interface MutableModuleItem<T>
public void setPersisted(boolean persisted)
setPersisted
in interface MutableModuleItem<T>
public void setPersistKey(String persistKey)
setPersistKey
in interface MutableModuleItem<T>
public void setInitializer(String initializer)
setInitializer
in interface MutableModuleItem<T>
public void setValidater(String validater)
setValidater
in interface MutableModuleItem<T>
public void setCallback(String callback)
setCallback
in interface MutableModuleItem<T>
public void setWidgetStyle(String widgetStyle)
setWidgetStyle
in interface MutableModuleItem<T>
public void setDefaultValue(T defaultValue)
setDefaultValue
in interface MutableModuleItem<T>
public void setMinimumValue(T minimumValue)
setMinimumValue
in interface MutableModuleItem<T>
public void setMaximumValue(T maximumValue)
setMaximumValue
in interface MutableModuleItem<T>
public void setSoftMinimum(T softMinimum)
setSoftMinimum
in interface MutableModuleItem<T>
public void setSoftMaximum(T softMaximum)
setSoftMaximum
in interface MutableModuleItem<T>
public void setStepSize(Number stepSize)
setStepSize
in interface MutableModuleItem<T>
public void setColumnCount(int columnCount)
setColumnCount
in interface MutableModuleItem<T>
public void setChoices(List<? extends T> choices)
setChoices
in interface MutableModuleItem<T>
public Class<T> getType()
ModuleItem
getType
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>
getGenericType
in class AbstractModuleItem<T>
Field.getGenericType()
public ItemIO getIOType()
ModuleItem
getIOType
in interface ModuleItem<T>
getIOType
in class AbstractModuleItem<T>
public ItemVisibility getVisibility()
ModuleItem
getVisibility
in interface ModuleItem<T>
getVisibility
in class AbstractModuleItem<T>
public boolean isAutoFill()
ModuleItem
isAutoFill
in interface ModuleItem<T>
isAutoFill
in class AbstractModuleItem<T>
public boolean isRequired()
ModuleItem
isRequired
in interface ModuleItem<T>
isRequired
in class AbstractModuleItem<T>
public boolean isPersisted()
ModuleItem
isPersisted
in interface ModuleItem<T>
isPersisted
in class AbstractModuleItem<T>
public String getPersistKey()
ModuleItem
getPersistKey
in interface ModuleItem<T>
getPersistKey
in class AbstractModuleItem<T>
public String getInitializer()
ModuleItem
getInitializer
in interface ModuleItem<T>
getInitializer
in class AbstractModuleItem<T>
public String getValidater()
ModuleItem
getValidater
in interface ModuleItem<T>
getValidater
in class AbstractModuleItem<T>
public String getCallback()
ModuleItem
This 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>
getCallback
in class AbstractModuleItem<T>
public String getWidgetStyle()
ModuleItem
getWidgetStyle
in interface ModuleItem<T>
getWidgetStyle
in class AbstractModuleItem<T>
public T getDefaultValue()
ModuleItem
getDefaultValue
in interface ModuleItem<T>
getDefaultValue
in class AbstractModuleItem<T>
public T getMinimumValue()
ModuleItem
getMinimumValue
in interface ModuleItem<T>
getMinimumValue
in class AbstractModuleItem<T>
public T getMaximumValue()
ModuleItem
getMaximumValue
in interface ModuleItem<T>
getMaximumValue
in class AbstractModuleItem<T>
public T getSoftMinimum()
ModuleItem
The 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>
getSoftMinimum
in class AbstractModuleItem<T>
public T getSoftMaximum()
ModuleItem
The 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>
getSoftMaximum
in class AbstractModuleItem<T>
public Number getStepSize()
ModuleItem
getStepSize
in interface ModuleItem<T>
getStepSize
in class AbstractModuleItem<T>
public int getColumnCount()
ModuleItem
getColumnCount
in interface ModuleItem<T>
getColumnCount
in class AbstractModuleItem<T>
public List<T> getChoices()
ModuleItem
getChoices
in interface ModuleItem<T>
getChoices
in class AbstractModuleItem<T>
public String getLabel()
BasicDetails
getLabel
in interface BasicDetails
getLabel
in class AbstractBasicDetails
public String getDescription()
BasicDetails
getDescription
in interface BasicDetails
getDescription
in class AbstractBasicDetails
public void setLabel(String label)
BasicDetails
setLabel
in interface BasicDetails
setLabel
in class AbstractBasicDetails
public void setDescription(String description)
BasicDetails
setDescription
in interface BasicDetails
setDescription
in class AbstractBasicDetails
public String getName()
Named
getName
in interface Named
getName
in class AbstractBasicDetails
Copyright © 2015–2022 SciJava. All rights reserved.