public abstract class AbstractTool extends java.lang.Object implements ToolMenuItems, java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList |
arguments
The list of arguments needed by the tool.
|
protected javax.swing.JInternalFrame |
internalFrame
The internal frame of the tool.
|
static int |
MENU_EXECUTE
a menu option
|
static int |
MENU_EXECUTE_PRINT
a menu option
|
static int |
MENU_EXECUTE_PRINT_SILENT
a menu option
|
static int |
MENU_EXECUTE_SHOW
a menu option
|
protected int |
menuoptions
Execute menu options
|
static java.util.ArrayList |
versionsarray
An array with the versions of the tool.
|
ABOUT, ARGUMENTS, CLOSE, EXECUTE, EXECUTEPRINT, EXECUTEPRINTSILENT, EXECUTESHOW, FILE, HELP, TOOL, TOOLS, USAGE, VERSION
Constructor and Description |
---|
AbstractTool() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
protected static void |
addVersion(java.lang.String version)
Add the version of the plugin to the versions array.
|
protected abstract void |
createFrame()
Creates the internal frame.
|
abstract void |
execute()
Executes the tool (in most cases this generates a PDF file).
|
java.lang.String |
getArgs()
Gets the current arguments of the tool.
|
java.util.ArrayList |
getArguments()
Gets the arguments.
|
protected abstract java.io.File |
getDestPathPDF()
Gets the PDF file that should be generated (or null if the output isn't a PDF file).
|
javax.swing.JInternalFrame |
getInternalFrame()
Returns the internal frame.
|
javax.swing.JMenuBar |
getMenubar()
Gets the menubar.
|
java.lang.String |
getUsage()
Gets the usage of the tool.
|
java.lang.Object |
getValue(java.lang.String name)
Gets the value of a given argument.
|
void |
setArguments(java.util.ArrayList arguments)
Sets the arguments.
|
void |
setArguments(java.lang.String[] args)
Sets the arguments.
|
void |
setInternalFrame(javax.swing.JInternalFrame internalFrame)
Sets the internal frame.
|
abstract void |
valueHasChanged(ToolArgument arg)
Indicates that the value of an argument has changed.
|
public static java.util.ArrayList versionsarray
protected javax.swing.JInternalFrame internalFrame
protected java.util.ArrayList arguments
protected int menuoptions
public static final int MENU_EXECUTE
public static final int MENU_EXECUTE_SHOW
public static final int MENU_EXECUTE_PRINT
public static final int MENU_EXECUTE_PRINT_SILENT
public void setArguments(java.util.ArrayList arguments)
arguments
- The arguments to set.public void setArguments(java.lang.String[] args)
args
- the arguments as String-array.public java.util.ArrayList getArguments()
public java.lang.Object getValue(java.lang.String name) throws java.lang.InstantiationException
name
- the name of the argumentjava.lang.InstantiationException
public void setInternalFrame(javax.swing.JInternalFrame internalFrame)
internalFrame
- The internalFrame to set.public javax.swing.JInternalFrame getInternalFrame()
public javax.swing.JMenuBar getMenubar()
public java.lang.String getUsage()
public java.lang.String getArgs()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
ActionListener.actionPerformed(java.awt.event.ActionEvent)
protected abstract java.io.File getDestPathPDF() throws java.lang.InstantiationException
java.lang.InstantiationException
protected abstract void createFrame()
public abstract void execute()
public abstract void valueHasChanged(ToolArgument arg)
arg
- the argument that has changedprotected static void addVersion(java.lang.String version)
version
- the version to add.