com.openpcl.viewer.api
Interface IPluginHooksOpenPCL

All Known Implementing Classes:
OpenPCLViewer

public interface IPluginHooksOpenPCL

The methods in this interface are designed to be overridden by a subclass of OpenPCLViewer that is a plugin that adds additional features. Examples of additional features that can be added are:
1. To specify a different name, description, version number for the app that shows in the title bar, status bar, help about, license text.
2. To add icons to the toolbar and to specify the code to execute when the user clicks the new icons.
3. To open and view and print compound documents that have several PCL files in one file.
The binary file format of this compound document is of your own design and is not specified in OpenPCLViewer.
4. To create and show on the screen a many levels deep tree structure of the compound document in #3 above that organizes the several PCL files so the user can select which pages in which PCL file to view and/or print.
5. The Save As button in the toolbar in OpenPCLViewer just calls the method to save the current viewed page only to a PCL file, but subclass plugins can override the actionSaveAs() method to prompt the user for which of many different output formats to Save As, like save all pages to a .ZIP file or other developer designed output format.
Therefore, it is mandatory to not delete or rename these methods or else you'll break the plugin support that adds additional features.

Author:
DocMagic, Document Systems Inc, Howard. 11/20/06

Method Summary
 void actionSaveAs()
          This gets executed when the user clicks the Save As icon on the toolbar.
 void addToolbarButtonsFromSubclass(PosToolBar pPosToolBar)
          Add any additional toolbar buttons
 void applySelectedLookAndFeel()
          Apply the selected LookAndFeel to the screen
 PosView createNewViewPanel(String pShortName)
          Create a new view panel
 int determineFileTypeByFileExtension(String pExtensionOfFileName)
          Determine the file type by the file extension
 boolean forceFrontSideWhenDuplexing(PosTreeNode pPosTreeNode)
          Returns true if this tree node page must print on the front side (not on the back of a page) when duplexing.
 String getAppDescription()
          Get the app description
 String getAppName()
          Get the app name
 String getAppVersion()
          Get the app version
 String getFormNameForTreeNode(PosTreeNode pPosTreeNode)
          Get the Form Name for a tree node page.
 String getHiddenTagBaseString(int pTagIndex)
          Get the hidden tag base String
 Icon getJInternalFrameIcon()
          Allow subclases to set their own icon
 String getJInternalFrameTitleBar(String defaultTitle)
          Allow subclases to set their own title
 String getPackageHelpAboutInfo()
          Get the package path to the help about .html file
 String getPackagePathLicenseInfo()
          Get the package path to the license info .html file
 byte[] getPclBytesForTreeNode(PosTreeNode pPosTreeNode)
          Get the PCL bytes for a tree node page.
 boolean isTreeNodePageLetterSize(PosTreeNode pPosTreeNode)
          See if the selected tree node is a Letter Size PCL page.
 PosFileFilter makeFileFilterForOpenFileDialog()
          Make the file filter for the File Open dialog
 void parseFileBytesIntoTreeNodes(String pFileNameOnly, String pFilePathAndFileName)
          Open the file on disk.
 BufferedImage renderImageForPrintingFromTreeNode(PosTreeNode pPosTreeNode)
          Render the BufferedImage from the tree node
 

Method Detail

getAppName

String getAppName()
Get the app name


getAppDescription

String getAppDescription()
Get the app description


getAppVersion

String getAppVersion()
Get the app version


getPackagePathLicenseInfo

String getPackagePathLicenseInfo()
Get the package path to the license info .html file


getPackageHelpAboutInfo

String getPackageHelpAboutInfo()
Get the package path to the help about .html file


makeFileFilterForOpenFileDialog

PosFileFilter makeFileFilterForOpenFileDialog()
Make the file filter for the File Open dialog


applySelectedLookAndFeel

void applySelectedLookAndFeel()
Apply the selected LookAndFeel to the screen


addToolbarButtonsFromSubclass

void addToolbarButtonsFromSubclass(PosToolBar pPosToolBar)
Add any additional toolbar buttons


createNewViewPanel

PosView createNewViewPanel(String pShortName)
Create a new view panel


determineFileTypeByFileExtension

int determineFileTypeByFileExtension(String pExtensionOfFileName)
Determine the file type by the file extension


parseFileBytesIntoTreeNodes

void parseFileBytesIntoTreeNodes(String pFileNameOnly,
                                 String pFilePathAndFileName)
Open the file on disk. Read and parse all bytes in the file into tree nodes


isTreeNodePageLetterSize

boolean isTreeNodePageLetterSize(PosTreeNode pPosTreeNode)
See if the selected tree node is a Letter Size PCL page. If not, then it's Legal Size.


getPclBytesForTreeNode

byte[] getPclBytesForTreeNode(PosTreeNode pPosTreeNode)
Get the PCL bytes for a tree node page. This is used for "Print PCL Direct" to send the actual PCL bytes to the printer.


getFormNameForTreeNode

String getFormNameForTreeNode(PosTreeNode pPosTreeNode)
Get the Form Name for a tree node page. Used for both print "PCL Direct" and for "Windows Print".


forceFrontSideWhenDuplexing

boolean forceFrontSideWhenDuplexing(PosTreeNode pPosTreeNode)
Returns true if this tree node page must print on the front side (not on the back of a page) when duplexing.


renderImageForPrintingFromTreeNode

BufferedImage renderImageForPrintingFromTreeNode(PosTreeNode pPosTreeNode)
Render the BufferedImage from the tree node


getJInternalFrameIcon

Icon getJInternalFrameIcon()
Allow subclases to set their own icon


getJInternalFrameTitleBar

String getJInternalFrameTitleBar(String defaultTitle)
Allow subclases to set their own title


getHiddenTagBaseString

String getHiddenTagBaseString(int pTagIndex)
Get the hidden tag base String


actionSaveAs

void actionSaveAs()
This gets executed when the user clicks the Save As icon on the toolbar.



OpenPCL http://www.openpcl.com