org.pdfsam.guiclient.business.listeners
Class AbstractRunButtonActionListener
java.lang.Object
org.pdfsam.guiclient.business.listeners.AbstractRunButtonActionListener
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public abstract class AbstractRunButtonActionListener
- extends java.lang.Object
- implements java.awt.event.ActionListener
Abstract class for the run buttons listeners
- Author:
- Andrea Vacondio
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
AbstractRunButtonActionListener
public AbstractRunButtonActionListener()
getSuggestedDestinationDirectory
protected java.lang.String getSuggestedDestinationDirectory(PdfSelectionTableItem item)
- If a default working directory is set it returns it as suggested
destination. If no default is set it returns the absolute path to the
directory where the input item is resides.
- Parameters:
item
-
- Returns:
- the suggested destination directory
getSuggestedOutputFile
protected java.lang.String getSuggestedOutputFile(PdfSelectionTableItem item,
java.lang.String fileName)
- If a default working directory is set it returns an absolute path for the
input fileName in the default working directory. If no default is set it
returns an absolute path placing the input fileName in the same directory
of the given
PdfSelectionTableItem
- Parameters:
item
- fileName
- name of the output file
- Returns:
- the suggested output file abstract path for the given fileName
ensurePdfExtensionOnTextField
public static void ensurePdfExtensionOnTextField(javax.swing.JTextField field)
- Check if there is a text in the TextField and it has a pdf extension, if
not it adds the extension.
- Parameters:
field
-