public abstract class AbstractPlugin extends Object implements Plugin
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CITATION |
static String |
POSITION_LIST_NONE |
static String |
TAXA_LIST_NONE |
Constructor and Description |
---|
AbstractPlugin()
Creates a new instance of AbstractPlugin
|
AbstractPlugin(Frame parentFrame,
boolean isInteractive)
Creates a new instance of AbstractPlugin
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(PluginListener listener)
Adds listener to this plugin.
|
boolean |
cancel()
Attempt to cancel processing.
|
static <T> T |
convert(String input,
Class<T> outputClass) |
void |
dataSetReturned(PluginEvent event)
Returns data set after complete.
|
String |
getCitation()
Returns Citation for this plugin.
|
List<Plugin> |
getInputs() |
JMenu |
getMenu()
Returns menu that can be added to main menu bar.
|
JPanel |
getPanel()
GUI Panel for this plugin.
|
Object |
getParameter(Enum key)
Returns parameter value for given parameter key.
|
Object |
getParameter(String key)
Returns parameter value for given parameter key.
|
Frame |
getParentFrame()
Parent Frame for this plugin.
|
String |
getUsage()
Gets the Usage Statement for this Plugin.
|
String |
getUsageHTML() |
boolean |
isInteractive()
If interactive = true, the plugin will create dialogs and panels to
interacts with the user
|
DataSet |
performFunction(DataSet input)
Performs function of this plugin.
|
String |
pluginDescription()
Returns description of the plugin.
|
String |
pluginUserManualURL()
Returns URL to User Manual.
|
DataSet |
processData(DataSet input)
For the new Generic Plugin Parameter design, performFunction() will
automatically call this.
|
void |
progress(int percent,
Object meta)
Returns progress of execution.
|
void |
progress(PluginEvent event)
No operation for this abstract class.
|
void |
receiveInput(Plugin input)
Sets up this plugin to receive input from another plugin.
|
void |
reverseTrace(int indent) |
void |
run() |
void |
setConfigParameters() |
Plugin |
setParameter(PluginParameter<?> param,
Object value)
Sets parameter value for a given plugin
|
Plugin |
setParameter(String key,
Object value)
Sets parameter value for given parameter key.
|
Plugin |
setParameter(String key,
String value)
Sets parameter value for given parameter key.
|
void |
setParameters(String[] args)
Allows self-describing Plugins to use args to set parameters specific to
itself.
|
void |
setParametersToDefault()
Sets all parameter values to default.
|
void |
setThreaded(boolean threaded)
Set whether this plugin is threaded.
|
void |
trace(int indent) |
boolean |
wasCancelled() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getButtonName, getIcon, getPluginInstance, getPluginInstance, getToolTipText, isPlugin
public static final String DEFAULT_CITATION
public static final String POSITION_LIST_NONE
public static final String TAXA_LIST_NONE
public AbstractPlugin()
public AbstractPlugin(Frame parentFrame, boolean isInteractive)
public DataSet performFunction(DataSet input)
Plugin
performFunction
in interface Plugin
input
- inputpublic DataSet processData(DataSet input)
Plugin
processData
in interface Plugin
input
- inputpublic void setParameters(String[] args)
Plugin
setParameters
in interface Plugin
args
- argumentspublic void setConfigParameters()
public String getUsage()
Plugin
public Object getParameter(Enum key)
Plugin
getParameter
in interface Plugin
key
- keypublic Object getParameter(String key)
Plugin
getParameter
in interface Plugin
key
- keypublic Plugin setParameter(PluginParameter<?> param, Object value)
Plugin
setParameter
in interface Plugin
param
- parametervalue
- valuepublic Plugin setParameter(String key, Object value)
Plugin
setParameter
in interface Plugin
key
- keyvalue
- valuepublic Plugin setParameter(String key, String value)
Plugin
setParameter
in interface Plugin
key
- keyvalue
- valuepublic void setParametersToDefault()
Plugin
setParametersToDefault
in interface Plugin
public String getUsageHTML()
public JMenu getMenu()
public void receiveInput(Plugin input)
receiveInput
in interface Plugin
input
- inputpublic JPanel getPanel()
public boolean isInteractive()
isInteractive
in interface Plugin
public Frame getParentFrame()
getParentFrame
in interface Plugin
public void addListener(PluginListener listener)
addListener
in interface Plugin
listener
- listener to addpublic String getCitation()
Plugin
getCitation
in interface Plugin
public String pluginDescription()
Plugin
pluginDescription
in interface Plugin
public String pluginUserManualURL()
Plugin
pluginUserManualURL
in interface Plugin
public void dataSetReturned(PluginEvent event)
dataSetReturned
in interface PluginListener
event
- eventpublic void progress(PluginEvent event)
progress
in interface PluginListener
event
- eventpublic void reverseTrace(int indent)
public void trace(int indent)
public void setThreaded(boolean threaded)
Plugin
setThreaded
in interface Plugin
threaded
- whether to be threaded.public boolean cancel()
Plugin
public void progress(int percent, Object meta)
ProgressListener
progress
in interface ProgressListener
percent
- percent completemeta
- meta datapublic boolean wasCancelled()
wasCancelled
in interface Plugin
Copyright © 2018. All rights reserved.