|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.tools.plugins.AbstractTool
Every iText tool has to implement this interface.
Nested Class Summary | |
---|---|
class |
AbstractTool.Console
A Class that redirects output to System.out and System.err. |
Field Summary | |
---|---|
protected ArrayList |
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 |
Fields inherited from interface com.lowagie.tools.ToolMenuItems |
---|
ARGUMENTS, CLOSE, EXECUTE, EXECUTEPRINT, EXECUTEPRINTSILENT, EXECUTESHOW, FILE, TOOL, TOOLS, USAGE |
Constructor Summary | |
---|---|
AbstractTool()
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent evt)
|
protected abstract void |
createFrame()
Creates the internal frame. |
abstract void |
execute()
Executes the tool (in most cases this generates a PDF file). |
String |
getArgs()
Gets the current arguments of the tool. |
ArrayList |
getArguments()
Gets the arguments. |
JScrollPane |
getConsole(int columns,
int rows)
Gets a console JScrollPanel that listens to the System.err and System.out. |
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 arguments)
Sets the arguments. |
void |
setArguments(String[] args)
Sets the arguments. |
void |
setInternalFrame(JInternalFrame internalFrame)
Sets the internal frame. |
abstract void |
valueHasChanged(ToolArgument arg)
Indicates that the value of an argument has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JInternalFrame internalFrame
protected 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
Constructor Detail |
public AbstractTool()
Method Detail |
public void setArguments(ArrayList arguments)
arguments
- The arguments to set.public void setArguments(String[] args)
args
- the arguments as String-array.public ArrayList getArguments()
public Object getValue(String name) throws InstantiationException
name
- the name of the argument
InstantiationException
public void setInternalFrame(JInternalFrame internalFrame)
internalFrame
- The internalFrame to set.public JInternalFrame getInternalFrame()
public JMenuBar getMenubar()
public JScrollPane getConsole(int columns, int rows)
columns
- a number of columns for the consolerows
- a number of rows for the console
public String getUsage()
public String getArgs()
public void actionPerformed(ActionEvent evt)
actionPerformed
in interface ActionListener
ActionListener.actionPerformed(java.awt.event.ActionEvent)
protected abstract File getDestPathPDF() throws InstantiationException
InstantiationException
protected abstract void createFrame()
public abstract void execute()
public abstract void valueHasChanged(ToolArgument arg)
arg
- the argument that has changed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |