org.norvelle.textcite.gui.action
Class ExportPDFAction
java.lang.Object
org.norvelle.textcite.gui.action.ExportPDFAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, CancelListener
public class ExportPDFAction
- extends java.lang.Object
- implements java.awt.event.ActionListener, CancelListener
ExportPDFAction:
Handles the exporting of citations in PDF format. Produces a dialog box, allowing the
user to indicate preferences, then collects the citations required and uses the iText
framework to produce a PDF document with the name the user chooses.
- Author:
- Erik Norvelle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXPORT_ALL
public static final int EXPORT_ALL
- See Also:
- Constant Field Values
EXPORT_SELECTED
public static final int EXPORT_SELECTED
- See Also:
- Constant Field Values
EXPORT_VIEW
public static final int EXPORT_VIEW
- See Also:
- Constant Field Values
PORTRAIT
public static final int PORTRAIT
- See Also:
- Constant Field Values
LANDSCAPE
public static final int LANDSCAPE
- See Also:
- Constant Field Values
ExportPDFAction
public ExportPDFAction(MainFrame mainFrame)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent arg0)
- Called by the menu or toolbar when the user chooses the action. Pops up
the dialog box. When the user closes the dialog box,
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
doExport
public void doExport(ExportPDFDialog dialog)
- This method is called once the dialog box has collected the necessary
information from the user in order to perform the export. It collects the
chosen citation set, creates an iText object, and inserts the citations
into the iText object, writing the destination file when finished.
cancelPressed
public void cancelPressed()
- Specified by:
cancelPressed
in interface CancelListener
getExportFile
public java.io.File getExportFile()
- Returns:
- Returns the exportFile.
setExportFile
public void setExportFile(java.io.File exportFile)
- Parameters:
exportFile
- The exportFile to set.
getFooter
public java.lang.String getFooter()
- Returns:
- Returns the footer.
setFooter
public void setFooter(java.lang.String footer)
- Parameters:
footer
- The footer to set.
getHeader
public java.lang.String getHeader()
- Returns:
- Returns the header.
setHeader
public void setHeader(java.lang.String header)
- Parameters:
header
- The header to set.
isIncludeCommentaries
public boolean isIncludeCommentaries()
- Returns:
- Returns the includeCommentaries.
setIncludeCommentaries
public void setIncludeCommentaries(boolean includeCommentaries)
- Parameters:
includeCommentaries
- The includeCommentaries to set.
isIncludeCommentaryBorders
public boolean isIncludeCommentaryBorders()
- Returns:
- Returns the includeCommentaryBorders.
setIncludeCommentaryBorders
public void setIncludeCommentaryBorders(boolean includeCommentaryBorders)
- Parameters:
includeCommentaryBorders
- The includeCommentaryBorders to set.
isIncludeCommentaryWhitespace
public boolean isIncludeCommentaryWhitespace()
- Returns:
- Returns the includeCommentaryWhitespace.
setIncludeCommentaryWhitespace
public void setIncludeCommentaryWhitespace(boolean includeCommentaryWhitespace)
- Parameters:
includeCommentaryWhitespace
- The includeCommentaryWhitespace to set.
isIncludeSubheaders
public boolean isIncludeSubheaders()
- Returns:
- Returns the includeSubheaders.
setIncludeSubheaders
public void setIncludeSubheaders(boolean includeSubheaders)
- Parameters:
includeSubheaders
- The includeSubheaders to set.
isNumberPages
public boolean isNumberPages()
- Returns:
- Returns the numberPages.
setNumberPages
public void setNumberPages(boolean numberPages)
- Parameters:
numberPages
- The numberPages to set.
getCommentaryWhitespace
public int getCommentaryWhitespace()
- Returns:
- Returns the commentaryWhitespace.
setCommentaryWhitespace
public void setCommentaryWhitespace(int commentaryWhitespace)
- Parameters:
commentaryWhitespace
- The commentaryWhitespace to set.
getExportSet
public int getExportSet()
- Returns:
- Returns the export set, i.e. whether all, selected or currently visible citations
are to be exported.
setExportSet
public void setExportSet(int exportSet)
- Parameters:
exportSet
- The export set, i.e. whether all, selected or currently visible citations
are to be exported.
getOrientation
public int getOrientation()
- Returns:
- Returns the orientation value (see class constants)
setOrientation
public void setOrientation(int o)
- Parameters:
o
- An integer value for the orientation (see class constants)