public abstract class InteractiveCommand extends DynamicCommand implements Interactive, Previewable, Logged
It is Interactive and Previewable, with the previews used for
interactive exploration.
Further, this class provides added convenience for keeping certain input
parameters synced with active Displays. It listens for
DisplayActivatedEvents, updating the inputs specified in the
constructor when such events occur. Individual interactive commands can then
add callback methods to affected inputs, for reacting to a change in the
active display.
moduleService, pluginService| Constructor and Description |
|---|
InteractiveCommand(String... listenerNames)
Creates a new interactive command.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> ModuleItem<T> |
asType(ModuleItem<?> item,
Class<T> type) |
void |
cancel()
Performs necessary cleanup in response to cancellation of the module
execution.
|
LogService |
log()
Gets the
LogService to use when logging activities. |
protected void |
onEvent(DisplayActivatedEvent evt) |
void |
preview()
Computes a preview of the module's execution results, if available.
|
protected <T> void |
update(ModuleItem<T> item,
T newValue) |
protected void |
updateInput(ModuleItem<?> item) |
cancel, context, getCancelReason, getContext, getInfo, getInput, getOutput, isCanceled, saveInputs, setContext, setInput, setOutput, uncancelgetDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, resolveInput, resolveOutput, setInputs, setOutputs, unresolveInput, unresolveOutputclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddInput, addInput, addOutput, addOutput, removeInput, removeOutput, rungetDelegateObject, getInputs, getOutputs, initialize, isInputResolved, isOutputResolved, isResolved, resolveInput, resolveOutput, setInputs, setOutputs, setResolved, unresolveInput, unresolveOutputpublic void preview()
ModuleRunnable.run(). Not all modules support
previews.preview in interface Previewablepreview in interface Modulepreview in class AbstractModuleModuleInfo.canPreview()public void cancel()
ModuleModule.preview() to undo
any changes made as a result of the preview.cancel in interface Previewablecancel in interface Modulecancel in class AbstractModuleModuleInfo.canCancel()public LogService log()
LoggedLogService to use when logging activities.protected void updateInput(ModuleItem<?> item)
protected <T> ModuleItem<T> asType(ModuleItem<?> item, Class<T> type)
protected <T> void update(ModuleItem<T> item, T newValue)
protected void onEvent(DisplayActivatedEvent evt)
Copyright © 2009–2022 SciJava. All rights reserved.