public class ANA_ extends AbstractPluginQconf implements DialogListener
fileExt, qconfLoader
apiCall, errorSink, logger, options
Constructor and Description |
---|
ANA_()
Default constructor called always.
|
Modifier and Type | Method and Description |
---|---|
String |
about()
Return plugin description.
|
boolean |
dialogItemChanged(GenericDialog gd,
AWTEvent e) |
protected void |
executer()
Executed if
AbstractPluginBase.run(String) got parsable parameter string. |
void |
run(String arg)
Called on plugin run by ImageJ or from API.
|
protected void |
runFromPaqp()
Called if loaded file is paQP.
|
protected void |
runFromQconf()
Called if loaded file is QCONF.
|
void |
showUi(boolean val)
Open plugin UI.
|
protected void |
validate()
Override this method to pass your own validation of QCONF structure.
|
getQconfLoader, loadFile, unload
setPluginName
getOptions, parseArgumentString, publishMacroString
public void run(String arg)
AbstractPluginBase
Overrides PlugIn.run(String)
. If input string is null or empty it sets
AbstractOptionsParser.errorSink
to
QuimpException.MessageSinkTypes.GUI
. Note that AbstractOptionsParser.apiCall
is set by
choosing proper constructor. Then it tries to parse specified parameter string, if it succeeds,
AbstractOptionsParser.options
is set and deserialised and AbstractPluginBase.executer()
method is
executed. If parsing fails, AbstractPluginBase.showUi(boolean)
is called with option true. If there is
parsable string AbstractOptionsParser.errorSink
is set to
QuimpException.MessageSinkTypes.IJERROR
Finally, macro string is published to ImageJ that represents current state of
AbstractOptionsParser.options
.
All exceptions thrown by plugin logic (from AbstractPluginBase.executer()
) are handled here depending
on AbstractOptionsParser.errorSink
value.
run
in interface ij.plugin.PlugIn
run
in class AbstractPluginBase
AbstractOptionsParser.parseArgumentString(String)
protected void executer() throws QuimpException
AbstractPluginBase
AbstractPluginBase.run(String)
got parsable parameter string.executer
in class AbstractPluginQconf
QuimpException
- on any error. Exception is handled depending on
AbstractOptionsParser.errorSink
set by AbstractPluginBase.run(String)
protected void validate() throws QuimpException
AbstractPluginQconf
validate
in class AbstractPluginQconf
QuimpException
- if file can not be validated.public String about()
IQuimpPlugin
about
in interface IQuimpPlugin
protected void runFromQconf() throws QuimpException
AbstractPluginQconf
This method expects that AbstractPluginQconf.qconfLoader
is already set up (AbstractPluginBase.run(String)
. In
macro or IJ mode exceptions will be handled in place and displayed as IJERROR or GUI message.
For API call (only if initialised by
AbstractPluginQconf.AbstractPluginQconf(String, AbstractPluginOptions, String)
)
exceptions are re-thrown.
runFromQconf
in class AbstractPluginQconf
QuimpException
- on errorprotected void runFromPaqp() throws QuimpException
AbstractPluginQconf
This method expects that AbstractPluginQconf.qconfLoader
is already set up (AbstractPluginBase.run(String)
. In
macro or IJ mode exceptions will be handled in place and displayed as IJERROR or GUI message.
For API call (only if initialised by
AbstractPluginQconf.AbstractPluginQconf(String, AbstractPluginOptions, String)
)
exceptions are re-thrown.
runFromPaqp
in class AbstractPluginQconf
QuimpException
- on errorpublic void showUi(boolean val) throws Exception
AbstractPluginBase
Executed if AbstractPluginBase.run(String)
could not parse parameters.
showUi
in class AbstractPluginBase
val
- true to show UIException
- on any error. Handled by AbstractPluginBase.run(String)
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e)
dialogItemChanged
in interface DialogListener
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.