public abstract class InteractiveCommand extends DynamicCommand implements Interactive, Previewable
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.
| 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.
|
protected LogService |
log() |
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, setContext, setInput, setOutputaddInput, addInput, addOutput, addOutput, removeInput, removeOutput, rungetDelegateObject, getInputs, getOutputs, initialize, isResolved, setInputs, setOutputs, setResolvedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDelegateObject, getInputs, getOutputs, initialize, isResolved, setInputs, setOutputs, setResolvedpublic 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()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 LogService log()
protected void onEvent(DisplayActivatedEvent evt)
Copyright © 2009–2016 SciJava. All rights reserved.