Package org.scijava.ui
Class AbstractInputHarvesterPlugin<P,W>
- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.widget.AbstractInputHarvester<P,W>
-
- org.scijava.ui.AbstractInputHarvesterPlugin<P,W>
-
- Type Parameters:
P- The type of UI component housing the input panel itself.W- The type of UI component housing each input widget.
- All Implemented Interfaces:
Cancelable,Contextual,ModulePreprocessor,ModuleProcessor,PreprocessorPlugin,SciJavaPlugin,InputHarvester<P,W>
public abstract class AbstractInputHarvesterPlugin<P,W> extends AbstractInputHarvester<P,W> implements PreprocessorPlugin
AbstractInputHarvesterPlugin is anInputHarvesterthat implements thePreprocessorPlugininterface. It is intended to be extended by UI-specific implementations such asSwingInputHarvester.The input harvester will first check whether the default UI matches that of its implementation; for example, the Swing-based input harvester plugin will only harvest inputs if the Swing UI is currently the default one.
- Author:
- Curtis Rueden, Barry DeZonia
-
-
Field Summary
-
Fields inherited from interface org.scijava.widget.InputHarvester
PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractInputHarvesterPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcancel(String reason)Cancels the operation execution, with the given reason for doing so.StringgetCancelReason()Gets a message describing why the operation was canceled.protected abstract StringgetUI()Gets the name (or class name) of the input harvester's affiliated UI.booleanisCanceled()Gets whether the operation has been canceled.voidprocess(Module module)Performs a processing step on the given module instance.-
Methods inherited from class org.scijava.widget.AbstractInputHarvester
buildPanel
-
Methods inherited from class org.scijava.AbstractContextual
context, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.widget.InputHarvester
createInputPanel, harvest, harvestInputs, processResults
-
-
-
-
Method Detail
-
process
public void process(Module module)
Description copied from interface:ModuleProcessorPerforms a processing step on the given module instance.- Specified by:
processin interfaceModuleProcessor
-
isCanceled
public boolean isCanceled()
Description copied from interface:CancelableGets whether the operation has been canceled.- Specified by:
isCanceledin interfaceCancelable
-
cancel
public void cancel(String reason)
Description copied from interface:CancelableCancels the operation execution, with the given reason for doing so.This method merely sets the operation status to canceled; it cannot necessarily stop the operation itself. That is, it is the responsibility of each individual operation to check
Cancelable.isCanceled()in a timely manner during execution, and stop doing whatever it is doing if the flag has been tripped.- Specified by:
cancelin interfaceCancelable- Parameters:
reason- A message describing why the operation is being canceled.
-
getCancelReason
public String getCancelReason()
Description copied from interface:CancelableGets a message describing why the operation was canceled.- Specified by:
getCancelReasonin interfaceCancelable- Returns:
- The reason for cancelation, which may be null if no reason was given, or if the operation was not in fact canceled.
-
getUI
protected abstract String getUI()
Gets the name (or class name) of the input harvester's affiliated UI.
-
-