org.scijava.widget
Class AbstractInputHarvester<P,W>

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.widget.AbstractInputHarvester<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:
Contextual, InputHarvester<P,W>
Direct Known Subclasses:
AbstractInputHarvesterPlugin

public abstract class AbstractInputHarvester<P,W>
extends AbstractContextual
implements InputHarvester<P,W>

Abstract superclass for InputHarvesters.

An input harvester obtains a module's unresolved input parameter values from the user. Parameters are collected using an InputPanel dialog box.

Author:
Curtis Rueden

Field Summary
 
Fields inherited from interface org.scijava.widget.InputHarvester
PRIORITY
 
Constructor Summary
AbstractInputHarvester()
           
 
Method Summary
 void buildPanel(InputPanel<P,W> inputPanel, Module module)
          Populates the given InputPanel with widgets corresponding to the given Module instance.
 void harvest(Module module)
          Performs the harvesting process.
 void processResults(InputPanel<P,W> inputPanel, Module module)
          Does any needed processing, after input values have been harvested.
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scijava.widget.InputHarvester
createInputPanel, harvestInputs
 

Constructor Detail

AbstractInputHarvester

public AbstractInputHarvester()
Method Detail

harvest

public void harvest(Module module)
             throws ModuleException
Description copied from interface: InputHarvester
Performs the harvesting process.

Specified by:
harvest in interface InputHarvester<P,W>
Parameters:
module - The module whose inputs should be harvest.
Throws:
ModuleException - If the process goes wrong, or is canceled.

buildPanel

public void buildPanel(InputPanel<P,W> inputPanel,
                       Module module)
                throws ModuleException
Description copied from interface: InputHarvester
Populates the given InputPanel with widgets corresponding to the given Module instance.

Specified by:
buildPanel in interface InputHarvester<P,W>
Parameters:
inputPanel - The panel to populate.
module - The module whose inputs should be translated into widgets.
Throws:
ModuleException - if the panel cannot be populated for some reason. This may occur due to an input of unsupported type.

processResults

public void processResults(InputPanel<P,W> inputPanel,
                           Module module)
                    throws ModuleException
Description copied from interface: InputHarvester
Does any needed processing, after input values have been harvested.

Specified by:
processResults in interface InputHarvester<P,W>
Throws:
ModuleException


Copyright © 2009–2014 SciJava. All rights reserved.