public abstract class AbstractTool extends Object implements ActionListener
| Modifier and Type | Field and Description | 
|---|---|
protected ArrayList<AbstractArgument> | 
arguments
The list of arguments needed by the tool. 
 | 
protected 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 ArrayList<String> | 
versionsarray
An array with the plugin_versions of the tool. 
 | 
| Constructor and Description | 
|---|
AbstractTool()
AbstractTool 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
actionPerformed(ActionEvent evt)  | 
protected static void | 
addVersion(String version)
Add the version of the plugin to the plugin_versions array. 
 | 
protected abstract void | 
createFrame()
Creates the internal frame. 
 | 
abstract void | 
execute()
Executes the tool (in most cases this generates a PDF file). 
 | 
ArrayList<AbstractArgument> | 
getArguments()
Gets the arguments. 
 | 
protected abstract File | 
getDestPathPDF()
Gets the PDF file that should be generated (or null if the output isn't a PDF file). 
 | 
JInternalFrame | 
getInternalFrame()
Returns the internal frame. 
 | 
JMenuBar | 
getMenubar()
Gets the menubar. 
 | 
String | 
getUsage()
Gets the usage of the tool. 
 | 
Object | 
getValue(String name)
Gets the value of a given argument. 
 | 
void | 
setArguments(ArrayList<AbstractArgument> arguments)
Sets the arguments. 
 | 
void | 
setInternalFrame(JInternalFrame internalFrame)
Sets the internal frame. 
 | 
void | 
setMainArguments(String[] args)
Sets the arguments. 
 | 
void | 
setMenubar(JMenuBar menubar)  | 
abstract void | 
valueHasChanged(AbstractArgument arg)
Indicates that the value of an argument has changed. 
 | 
public static ArrayList<String> versionsarray
protected JInternalFrame internalFrame
protected ArrayList<AbstractArgument> 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(ArrayList<AbstractArgument> arguments)
arguments - The arguments to set.public void setMainArguments(String[] args)
args - the arguments as String-array.public ArrayList<AbstractArgument> getArguments()
public Object getValue(String name) throws InstantiationException
name - the name of the argumentInstantiationExceptionpublic void setInternalFrame(JInternalFrame internalFrame)
internalFrame - The internalFrame to set.public void setMenubar(JMenuBar menubar)
public JInternalFrame getInternalFrame()
public JMenuBar getMenubar()
public String getUsage()
public void actionPerformed(ActionEvent evt)
actionPerformed in interface ActionListenerevt - ActionEventActionListener.actionPerformed(java.awt.event.ActionEvent)protected abstract File getDestPathPDF() throws InstantiationException
InstantiationExceptionprotected abstract void createFrame()
public abstract void execute()
public abstract void valueHasChanged(AbstractArgument arg)
arg - the argument that has changedprotected static void addVersion(String version)
version - the version to add.Copyright © 2015. All rights reserved.