public interface WandoraTool extends WandoraToolLogger, java.io.Serializable
AbstractWandoraTool
. It contains implementation
for most of the interface methods and eases developing tools.AbstractWandoraTool
Modifier and Type | Method and Description |
---|---|
void |
configure(Wandora wandora,
Options options,
java.lang.String prefix)
Open configuration dialog and allow user to configure the tool.
|
void |
execute(Wandora wandora)
Runs the tool.
|
void |
execute(Wandora wandora,
java.awt.event.ActionEvent actionEvent)
Runs the tool.
|
void |
execute(Wandora wandora,
Context context)
Runs the tool.
|
Context |
getContext()
Get tool's execution context.
|
java.lang.String |
getDescription()
Returns description of the tool.
|
javax.swing.Icon |
getIcon()
Return tool's icon.
|
java.lang.String |
getName()
Return tool's name.
|
SimpleMenuItem |
getToolMenuItem(Wandora wandora,
java.lang.String instanceName) |
WandoraToolType |
getType()
Returns tool's type.
|
void |
hlog(java.lang.String message)
Shortcut to access tool's logger.
|
void |
initialize(Wandora wandora,
Options options,
java.lang.String prefix)
Read settings from options and initialize tool.
|
boolean |
isConfigurable()
Return true if tool has something to configure.
|
boolean |
isRunning()
Returns boolean value true if the tool is running and false if the
execution has ended.
|
void |
log(java.lang.Error e)
Shortcut to access tool's logger.
|
void |
log(java.lang.Exception e)
Shortcut to access tool's logger.
|
void |
log(java.lang.String message)
Shortcut to access tool's logger.
|
void |
log(java.lang.String message,
java.lang.Exception e)
Shortcut to access tool's logger.
|
boolean |
requiresRefresh()
Should the Wandora application refresh.
|
void |
setContext(Context context)
Set tool's execution context.
|
void |
setToolLogger(WandoraToolLogger logger)
Sets tools logger.
|
void |
writeOptions(Wandora wandora,
Options options,
java.lang.String prefix)
Save current tool settings to options.
|
forceStop, getHistory, getState, lockLog, setLogTitle, setProgress, setProgressMax, setState
java.lang.String getName()
java.lang.String getDescription()
void execute(Wandora wandora, java.awt.event.ActionEvent actionEvent) throws TopicMapException
wandora
- is the application context.actionEvent
- is the event triggering the event.TopicMapException
void execute(Wandora wandora, Context context) throws TopicMapException
wandora
- context
- TopicMapException
void execute(Wandora wandora) throws TopicMapException
wandora
- TopicMapException
boolean isRunning()
void setContext(Context context)
context
- Tool's new context.Context getContext()
WandoraToolType getType()
void initialize(Wandora wandora, Options options, java.lang.String prefix) throws TopicMapException
wandora
- options
- prefix
- TopicMapException
boolean isConfigurable()
void configure(Wandora wandora, Options options, java.lang.String prefix) throws TopicMapException
wandora
- options
- prefix
- TopicMapException
void writeOptions(Wandora wandora, Options options, java.lang.String prefix)
wandora
- options
- prefix
- boolean requiresRefresh()
SimpleMenuItem getToolMenuItem(Wandora wandora, java.lang.String instanceName)
javax.swing.Icon getIcon()
void setToolLogger(WandoraToolLogger logger)
logger
- is new logger object.void hlog(java.lang.String message)
hlog
in interface TopicMapLogger
hlog
in interface WandoraToolLogger
message
- to be logged.void log(java.lang.String message)
log
in interface TopicMapLogger
log
in interface WandoraToolLogger
message
- to be logged.void log(java.lang.String message, java.lang.Exception e)
log
in interface TopicMapLogger
log
in interface WandoraToolLogger
message
- to be logged.e
- Exception to be logged.void log(java.lang.Exception e)
log
in interface TopicMapLogger
log
in interface WandoraToolLogger
e
- Exception to be logged.void log(java.lang.Error e)
log
in interface WandoraToolLogger
e
- Error to be logged.Copyright 2004-2015 Wandora Team