JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

org.jpedal.examples.simpleviewer
Class Commands

java.lang.Object
  extended by org.jpedal.examples.simpleviewer.Commands

public class Commands
extends java.lang.Object

This class contains code to execute the actual commands.


Field Summary
static int ADD
           
static int ADDHEADERFOOTER
           
static int ADDVIEW
           
static int AUTOSCROLL
           
static int BACK
           
static int BACKPAGE
           
static int BITMAP
           
static int BUY
           
static int CASCADE
           
static int CONTINUOUS
           
static int CONTINUOUS_FACING
           
static int COPY
           
static int CURRENTPAGE
           
static int DELETE
           
static int DESELECTALL
           
static int DOCINFO
           
static int EXIT
           
 boolean extractingAsImage
           
static int FACING
           
static int FBACKPAGE
           
static int FFORWARDPAGE
           
static int FIND
           
static java.lang.Integer FIRST_DOCUMENT_SEARCH_RESULT_NOW_SHOWN
           
static int FIRSTPAGE
           
static int FORWARD
           
static int FORWARDPAGE
           
static int FULLSCREEN
           
static int GETOUTLINEPANEL
           
static int GETPAGECOUNTER
           
static int GETTHUMBNAILPANEL
           
static int GOTO
           
static int HANDOUTS
           
static int HELP
           
static int HIGHLIGHT
           
static boolean hires
          custom hi-res val for JPedal settings
static int IMAGES
           
static int INFO
           
 java.io.InputStream inputStream
           
static int LASTPAGE
           
static int MOUSEMODE
           
static int NEXTDOCUMENT
           
static int NEXTRESULT
           
static int NUP
           
static int OPENFILE
           
static int OPENURL
           
static int PAGECOUNT
           
static int PAGEFLOW
           
static int PAGEGROUPING
           
 org.jpedal.SingleDisplay pages
          access to page display
static int PANMODE
           
static int PDF
           
static int PREFERENCES
           
static int PREVIOUSDOCUMENT
           
static int PREVIOUSRESULT
           
static int PRINT
           
static int QUALITY
           
static int ROTATE
           
static int ROTATION
           
static int RSS
           
static int SAVE
           
static int SAVEFORM
           
static int SCALING
           
static int SCROLL
           
static java.lang.Integer SEARCH_NOT_FOUND
           
static java.lang.Integer SEARCH_RETURNED_TO_START
           
static int SECURITY
           
static int SELECTALL
           
static int SEPARATECOVER
           
static int SETCROP
           
static int SETPAGECOLOR
           
static int SETUNDRAWNPAGECOLOR
           
static int SIGN
           
static int SINGLE
           
static int SNAPSHOT
           
static int STAMPIMAGE
           
static int STAMPTEXT
           
static int TEXT
           
static int TEXTSELECT
           
static int TILE
           
static int TIP
           
static int UPDATE
           
static int UPDATEGUILAYOUT
           
static int VISITWEBSITE
           
 
Constructor Summary
Commands(Values commonValues, SwingGUI currentGUI, PdfDecoder decode_pdf, GUIThumbnailPanel thumbnails, PropertiesFile properties, GUISearchWindow searchFrame, Printer currentPrinter)
           
 
Method Summary
 void addAView(int page, java.awt.Rectangle location, java.lang.Integer scalingType)
           
 void addImage(java.awt.image.BufferedImage img)
          used to display non-PDF files
 void addToRecentDocuments(java.lang.String selectedFile)
           
 boolean checkForUpdates(boolean showMessages)
           
 void clearRecentDocuments()
           
 java.lang.String copySelectedText()
          routine to link GUI into text extraction functions
 void enableRecentDocuments(boolean enable)
           
 java.lang.Object executeCommand(int ID, java.lang.Object[] args)
          main routine which executes code for current command Values can also be passed in so it can be called from your own code some commands return a status Object otherwise null
 void extractSelectedScreenAsImage()
          extract selected area as a rectangle and show onscreen
 void extractSelectedText()
          routine to link GUI into text extraction functions
 void flush()
          routine to remove all objects from temp store
 MouseMode getMouseMode()
           
 org.jpedal.SingleDisplay getPages()
           
 SearchList getSearchList()
          Returns the searchList of the last search preformed.
 void goBackAView()
           
 void goForwardAView()
           
 void gotoPage(java.lang.String page)
           
 void handleUnsaveForms()
          warns user forms unsaved and offers save option
 boolean isImageExtractionAllowed()
           
 boolean isPDF()
           
static boolean isPDFLinearized(java.lang.String pdfUrl)
          examine first few bytes to see if linearized and return true linearized file
 void openFile(java.lang.String selectedFile)
          checks file can be opened (permission)
 boolean openingTransferedFiles()
           
 void openTransferedFile(java.lang.String file)
           
 void recentDocumentsOption(javax.swing.JMenu file)
           
 void scrollRectToHighlight(java.awt.Rectangle highlight, int page)
           
 void selectFile()
          opens a pdf file and calls the display/decode routines
 void setImageExtractionAllowed(boolean allow)
           
 void setPageProperties(java.lang.Object rotation, java.lang.Object scaling)
           
 void setPdfDecoder(PdfDecoder decode_pdf)
           
 void updateRecentDocuments(java.lang.String[] recentDocs)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hires

public static boolean hires
custom hi-res val for JPedal settings


extractingAsImage

public boolean extractingAsImage

INFO

public static final int INFO
See Also:
Constant Field Values

BITMAP

public static final int BITMAP
See Also:
Constant Field Values

IMAGES

public static final int IMAGES
See Also:
Constant Field Values

TEXT

public static final int TEXT
See Also:
Constant Field Values

SAVE

public static final int SAVE
See Also:
Constant Field Values

PRINT

public static final int PRINT
See Also:
Constant Field Values

EXIT

public static final int EXIT
See Also:
Constant Field Values

AUTOSCROLL

public static final int AUTOSCROLL
See Also:
Constant Field Values

DOCINFO

public static final int DOCINFO
See Also:
Constant Field Values

OPENFILE

public static final int OPENFILE
See Also:
Constant Field Values

FIND

public static final int FIND
See Also:
Constant Field Values

SNAPSHOT

public static final int SNAPSHOT
See Also:
Constant Field Values

OPENURL

public static final int OPENURL
See Also:
Constant Field Values

VISITWEBSITE

public static final int VISITWEBSITE
See Also:
Constant Field Values

PREVIOUSDOCUMENT

public static final int PREVIOUSDOCUMENT
See Also:
Constant Field Values

NEXTDOCUMENT

public static final int NEXTDOCUMENT
See Also:
Constant Field Values

PREVIOUSRESULT

public static final int PREVIOUSRESULT
See Also:
Constant Field Values

NEXTRESULT

public static final int NEXTRESULT
See Also:
Constant Field Values

TIP

public static final int TIP
See Also:
Constant Field Values

CASCADE

public static final int CASCADE
See Also:
Constant Field Values

TILE

public static final int TILE
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

PREFERENCES

public static final int PREFERENCES
See Also:
Constant Field Values

COPY

public static final int COPY
See Also:
Constant Field Values

SELECTALL

public static final int SELECTALL
See Also:
Constant Field Values

DESELECTALL

public static final int DESELECTALL
See Also:
Constant Field Values

UPDATEGUILAYOUT

public static final int UPDATEGUILAYOUT
See Also:
Constant Field Values

MOUSEMODE

public static final int MOUSEMODE
See Also:
Constant Field Values

PANMODE

public static final int PANMODE
See Also:
Constant Field Values

TEXTSELECT

public static final int TEXTSELECT
See Also:
Constant Field Values

SEPARATECOVER

public static final int SEPARATECOVER
See Also:
Constant Field Values

FIRSTPAGE

public static final int FIRSTPAGE
See Also:
Constant Field Values

FBACKPAGE

public static final int FBACKPAGE
See Also:
Constant Field Values

BACKPAGE

public static final int BACKPAGE
See Also:
Constant Field Values

FORWARDPAGE

public static final int FORWARDPAGE
See Also:
Constant Field Values

FFORWARDPAGE

public static final int FFORWARDPAGE
See Also:
Constant Field Values

LASTPAGE

public static final int LASTPAGE
See Also:
Constant Field Values

GOTO

public static final int GOTO
See Also:
Constant Field Values

SINGLE

public static final int SINGLE
See Also:
Constant Field Values

CONTINUOUS

public static final int CONTINUOUS
See Also:
Constant Field Values

CONTINUOUS_FACING

public static final int CONTINUOUS_FACING
See Also:
Constant Field Values

FACING

public static final int FACING
See Also:
Constant Field Values

PAGEFLOW

public static final int PAGEFLOW
See Also:
Constant Field Values

FULLSCREEN

public static final int FULLSCREEN
See Also:
Constant Field Values

RSS

public static final int RSS
See Also:
Constant Field Values

HELP

public static final int HELP
See Also:
Constant Field Values

BUY

public static final int BUY
See Also:
Constant Field Values

QUALITY

public static final int QUALITY
See Also:
Constant Field Values

ROTATION

public static final int ROTATION
See Also:
Constant Field Values

SCALING

public static final int SCALING
See Also:
Constant Field Values

SAVEFORM

public static final int SAVEFORM
See Also:
Constant Field Values

PDF

public static final int PDF
See Also:
Constant Field Values

ROTATE

public static final int ROTATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

ADD

public static final int ADD
See Also:
Constant Field Values

SECURITY

public static final int SECURITY
See Also:
Constant Field Values

ADDHEADERFOOTER

public static final int ADDHEADERFOOTER
See Also:
Constant Field Values

STAMPTEXT

public static final int STAMPTEXT
See Also:
Constant Field Values

STAMPIMAGE

public static final int STAMPIMAGE
See Also:
Constant Field Values

SETCROP

public static final int SETCROP
See Also:
Constant Field Values

NUP

public static final int NUP
See Also:
Constant Field Values

HANDOUTS

public static final int HANDOUTS
See Also:
Constant Field Values

SIGN

public static final int SIGN
See Also:
Constant Field Values

HIGHLIGHT

public static final int HIGHLIGHT
See Also:
Constant Field Values

SCROLL

public static final int SCROLL
See Also:
Constant Field Values

ADDVIEW

public static final int ADDVIEW
See Also:
Constant Field Values

FORWARD

public static final int FORWARD
See Also:
Constant Field Values

BACK

public static final int BACK
See Also:
Constant Field Values

PAGECOUNT

public static final int PAGECOUNT
See Also:
Constant Field Values

CURRENTPAGE

public static final int CURRENTPAGE
See Also:
Constant Field Values

GETOUTLINEPANEL

public static final int GETOUTLINEPANEL
See Also:
Constant Field Values

GETTHUMBNAILPANEL

public static final int GETTHUMBNAILPANEL
See Also:
Constant Field Values

GETPAGECOUNTER

public static final int GETPAGECOUNTER
See Also:
Constant Field Values

PAGEGROUPING

public static final int PAGEGROUPING
See Also:
Constant Field Values

SETPAGECOLOR

public static final int SETPAGECOLOR
See Also:
Constant Field Values

SETUNDRAWNPAGECOLOR

public static final int SETUNDRAWNPAGECOLOR
See Also:
Constant Field Values

FIRST_DOCUMENT_SEARCH_RESULT_NOW_SHOWN

public static final java.lang.Integer FIRST_DOCUMENT_SEARCH_RESULT_NOW_SHOWN

SEARCH_RETURNED_TO_START

public static final java.lang.Integer SEARCH_RETURNED_TO_START

SEARCH_NOT_FOUND

public static final java.lang.Integer SEARCH_NOT_FOUND

inputStream

public java.io.InputStream inputStream

pages

public org.jpedal.SingleDisplay pages
access to page display

Constructor Detail

Commands

public Commands(Values commonValues,
                SwingGUI currentGUI,
                PdfDecoder decode_pdf,
                GUIThumbnailPanel thumbnails,
                PropertiesFile properties,
                GUISearchWindow searchFrame,
                Printer currentPrinter)
Method Detail

getPages

public org.jpedal.SingleDisplay getPages()

addToRecentDocuments

public void addToRecentDocuments(java.lang.String selectedFile)

executeCommand

public java.lang.Object executeCommand(int ID,
                                       java.lang.Object[] args)
main routine which executes code for current command Values can also be passed in so it can be called from your own code some commands return a status Object otherwise null


openTransferedFile

public void openTransferedFile(java.lang.String file)
                        throws PdfException
Throws:
PdfException

openingTransferedFiles

public boolean openingTransferedFiles()

handleUnsaveForms

public void handleUnsaveForms()
warns user forms unsaved and offers save option


extractSelectedScreenAsImage

public void extractSelectedScreenAsImage()
extract selected area as a rectangle and show onscreen


copySelectedText

public java.lang.String copySelectedText()
routine to link GUI into text extraction functions


extractSelectedText

public void extractSelectedText()
routine to link GUI into text extraction functions


openFile

public void openFile(java.lang.String selectedFile)
              throws PdfException
checks file can be opened (permission)

Throws:
PdfException

selectFile

public void selectFile()
opens a pdf file and calls the display/decode routines


gotoPage

public void gotoPage(java.lang.String page)

updateRecentDocuments

public void updateRecentDocuments(java.lang.String[] recentDocs)

enableRecentDocuments

public void enableRecentDocuments(boolean enable)

addImage

public void addImage(java.awt.image.BufferedImage img)
used to display non-PDF files


recentDocumentsOption

public void recentDocumentsOption(javax.swing.JMenu file)

flush

public final void flush()
routine to remove all objects from temp store


checkForUpdates

public boolean checkForUpdates(boolean showMessages)

setPdfDecoder

public void setPdfDecoder(PdfDecoder decode_pdf)

setPageProperties

public void setPageProperties(java.lang.Object rotation,
                              java.lang.Object scaling)

clearRecentDocuments

public void clearRecentDocuments()

getSearchList

public SearchList getSearchList()
Returns the searchList of the last search preformed. If currently searching this method will return the results for last completed search

Returns:
SearchList of all results, all data but the actual highlgiht areas

getMouseMode

public MouseMode getMouseMode()

addAView

public void addAView(int page,
                     java.awt.Rectangle location,
                     java.lang.Integer scalingType)

goBackAView

public void goBackAView()

goForwardAView

public void goForwardAView()

isImageExtractionAllowed

public boolean isImageExtractionAllowed()

setImageExtractionAllowed

public void setImageExtractionAllowed(boolean allow)

isPDF

public boolean isPDF()

isPDFLinearized

public static final boolean isPDFLinearized(java.lang.String pdfUrl)
                                     throws PdfException
examine first few bytes to see if linearized and return true linearized file

Parameters:
pdfUrl -
Returns:
Throws:
PdfException

scrollRectToHighlight

public void scrollRectToHighlight(java.awt.Rectangle highlight,
                                  int page)

JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support

JPedal 4.74b27 Click here for Tutorials, code examples, help forums and support