|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scijava.AbstractBasicDetails
org.scijava.AbstractUIDetails
org.scijava.module.AbstractModuleInfo
public abstract class AbstractModuleInfo
Abstract superclass of ModuleInfo
implementation.
By default, ModuleItem
s are stored in HashMap
s and
ArrayList
s, internally.
Field Summary |
---|
Fields inherited from interface org.scijava.UIDetails |
---|
APPLICATION_MENU_ROOT |
Constructor Summary | |
---|---|
AbstractModuleInfo()
|
Method Summary | ||
---|---|---|
boolean |
canCancel()
Gets whether the module condones cancellation. |
|
boolean |
canPreview()
Gets whether the module supports previews. |
|
boolean |
canRunHeadless()
Gets whether the module condones headless execution. |
|
protected void |
clearParameters()
Clears input and output parameters. |
|
String |
getIdentifier()
Gets a string intended to function as an identifier for the object. |
|
String |
getInitializer()
Gets the function that is called to initialize the module's values. |
|
ModuleItem<?> |
getInput(String name)
Gets the input item with the given name. |
|
|
getInput(String name,
Class<T> type)
Gets the input item with the given name and type. |
|
ModuleItem<?> |
getOutput(String name)
Gets the output item with the given name. |
|
|
getOutput(String name,
Class<T> type)
Gets the output item with the given name and type. |
|
List<ValidityProblem> |
getProblems()
Gets the list of problems encountered while initializing the object. |
|
String |
getTitle()
Gets an appropriate title for the object, for use in a user interface. |
|
protected List<ModuleItem<?>> |
inputList()
Gets outputMap , initializing if needed. |
|
protected Map<String,ModuleItem<?>> |
inputMap()
Gets inputMap , initializing if needed. |
|
Iterable<ModuleItem<?>> |
inputs()
Gets the list of input items. |
|
boolean |
isInteractive()
Gets whether the module is intended to be run interactively. |
|
boolean |
isValid()
Gets whether the object is completely valid (i.e., no problems during initialization). |
|
protected List<ModuleItem<?>> |
outputList()
Gets outputList , initializing if needed. |
|
protected Map<String,ModuleItem<?>> |
outputMap()
Gets inputList , initializing if needed. |
|
Iterable<ModuleItem<?>> |
outputs()
Gets the list of output items. |
|
protected void |
parseParameters()
Parses input and output parameters. |
|
protected void |
registerInput(ModuleItem<?> input)
Adds an input. |
|
protected void |
registerOutput(ModuleItem<?> output)
Adds an output. |
|
void |
update(EventService eventService)
Notifies interested parties that the module info has been modified. |
Methods inherited from class org.scijava.AbstractUIDetails |
---|
compareTo, getIconPath, getMenuPath, getMenuRoot, getPriority, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setPriority, setSelectable, setSelected, setSelectionGroup, setVisible, toString |
Methods inherited from class org.scijava.AbstractBasicDetails |
---|
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.scijava.module.ModuleInfo |
---|
createModule, getDelegateClassName |
Methods inherited from interface org.scijava.UIDetails |
---|
getIconPath, getMenuPath, getMenuRoot, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setSelectable, setSelected, setSelectionGroup, setVisible |
Methods inherited from interface org.scijava.BasicDetails |
---|
get, getDescription, getLabel, getName, is, set, setDescription, setLabel, setName |
Methods inherited from interface org.scijava.Prioritized |
---|
getPriority, setPriority |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
public AbstractModuleInfo()
Method Detail |
---|
public ModuleItem<?> getInput(String name)
ModuleInfo
getInput
in interface ModuleInfo
public <T> ModuleItem<T> getInput(String name, Class<T> type)
ModuleInfo
getInput
in interface ModuleInfo
public ModuleItem<?> getOutput(String name)
ModuleInfo
getOutput
in interface ModuleInfo
public <T> ModuleItem<T> getOutput(String name, Class<T> type)
ModuleInfo
getOutput
in interface ModuleInfo
public Iterable<ModuleItem<?>> inputs()
ModuleInfo
inputs
in interface ModuleInfo
public Iterable<ModuleItem<?>> outputs()
ModuleInfo
outputs
in interface ModuleInfo
public boolean isInteractive()
ModuleInfo
Runnable.run()
being called whenever any of the values change.
isInteractive
in interface ModuleInfo
public boolean canPreview()
ModuleInfo
Runnable.run()
. If this method returns false, then
calling Module.preview()
will have no effect.
canPreview
in interface ModuleInfo
public boolean canCancel()
ModuleInfo
Module.cancel()
will
have no effect.
canCancel
in interface ModuleInfo
public boolean canRunHeadless()
ModuleInfo
canRunHeadless
in interface ModuleInfo
public String getInitializer()
ModuleInfo
getInitializer
in interface ModuleInfo
public void update(EventService eventService)
ModuleInfo
For classes implementing this interface directly, this method should
publish a ModulesUpdatedEvent
to the event bus (see
update(EventService)
for an example).
update
in interface ModuleInfo
public String getTitle()
UIDetails
getTitle
in interface UIDetails
getTitle
in class AbstractUIDetails
public boolean isValid()
Validated
isValid
in interface Validated
public List<ValidityProblem> getProblems()
Validated
getProblems
in interface Validated
Validated.isValid()
returning true.public String getIdentifier()
Identifiable
getIdentifier
in interface Identifiable
protected void parseParameters()
protected void clearParameters()
protected void registerInput(ModuleItem<?> input)
parseParameters()
methods.
protected void registerOutput(ModuleItem<?> output)
parseParameters()
methods.
protected Map<String,ModuleItem<?>> inputMap()
inputMap
, initializing if needed.
protected Map<String,ModuleItem<?>> outputMap()
inputList
, initializing if needed.
protected List<ModuleItem<?>> inputList()
outputMap
, initializing if needed.
protected List<ModuleItem<?>> outputList()
outputList
, initializing if needed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |