org.jpedal.examples.simpleviewer.gui
Class SwingGUI

java.lang.Object
  extended by org.jpedal.examples.simpleviewer.gui.GUI
      extended by org.jpedal.examples.simpleviewer.gui.SwingGUI
All Implemented Interfaces:
org.jpedal.gui.GUIFactory

public class SwingGUI
extends GUI
implements org.jpedal.gui.GUIFactory


Description: Swing GUI functions in Viewer


Field Summary
 boolean messageShown
           
 GUIButton nextSearch
           
 javax.swing.JTextField pageCounter2
           
 GUIButton previousSearch
           
 
Fields inherited from class org.jpedal.examples.simpleviewer.gui.GUI
back, continuousButton, continuousFacingButton, cropH, cropW, cropX, cropY, end, facingButton, fback, fforward, first, forward, mediaH, mediaW, singleButton
 
Fields inherited from interface org.jpedal.gui.GUIFactory
BUTTONBAR, MULTIPAGE, NAVBAR, PAGES
 
Constructor Summary
SwingGUI(PdfDecoder decode_pdf, Values commonValues, GUIThumbnailPanel thumbnails, PropertiesFile properties)
           
 
Method Summary
 void addButton(int line, java.lang.String toolTip, java.lang.String path, int ID)
           
 void addCombo(java.lang.String title, java.lang.String tooltip, int ID)
           
 void addCursor()
           
 void addFormsListeners()
          this method adds listeners to GUI widgets to track changes
 void addMenuItem(javax.swing.JMenu parentMenu, java.lang.String text, java.lang.String toolTip, int ID)
           
 void addToMainMenu(javax.swing.JMenu fileMenuList)
           
 int AdjustForAlignment(int cx)
          adjusty x co-ordinate shown in display for user to include any page centering
 void alignLayoutMenuOption(int mode)
           
 void alterProperty(java.lang.String value, boolean set)
           
 void clearRecentDocuments()
           
 void closeMultiViewerWindow(java.lang.String selectedFile)
           
 javax.swing.JScrollPane createPane(javax.swing.JTextPane text_pane, java.lang.String content, boolean useXML)
           
 void decodePage(boolean resizePanel)
           
 java.lang.String getBookmark(java.lang.String bookmark)
           
 javax.swing.JToolBar getComboBar()
           
 javax.swing.JComponent getDisplayPane()
           
 java.lang.Object getFormValue(java.awt.Component component)
           
 java.awt.Container getFrame()
           
 void getInfoBox()
           
 javax.swing.JDesktopPane getMultiViewerFrames()
           
 SearchList getResults()
           
 void getRSSBox()
           
 javax.swing.ButtonGroup getSearchLayoutGroup()
           
 int getSelectedComboIndex(int ID)
           
 java.lang.Object getSelectedComboItem(int ID)
           
 javax.swing.JToolBar getTopButtonBar()
           
 void hideRedundentNavButtons()
           
 void init(java.lang.String[] scalingValues, java.lang.Object currentCommands, java.lang.Object currentPrinter)
           
 void initLayoutMenus(javax.swing.JMenu pageLayout, java.lang.String[] descriptions, int[] value)
           
 void initStatus()
           
 void initThumbnails(int itemSelectedCount, Vector_Int pageUsed)
           
 boolean isPDFOutlineVisible()
           
 boolean isSingle()
           
 java.lang.Object printDialog(java.lang.String[] printersList, java.lang.String defaultPrinter)
           
 void reinitialiseTabs(boolean showVisible)
           
 void reinitThumbnails()
           
 void removeSearchWindow(boolean justHide)
           
 void resetComboBoxes(boolean value)
           
 void resetNavBar()
          reset so appears closed
 void resetPageNav()
           
 void resetRotationBox()
           
 void resetStatus()
           
 void resetStatusMessage(java.lang.String message)
           
 void rotate()
           
 void scrollToPage(int page)
           
 void searchInMenu(GUISearchWindow searchFrame)
           
 void searchInTab(GUISearchWindow searchFrame)
           
 void setBackNavigationButtonsEnabled(boolean flag)
           
 void setBookmarks(boolean alwaysGenerate)
           
 void setCoordText(java.lang.String string)
           
 void setDisplayMode(java.lang.Integer mode)
           
 void setForwardNavigationButtonsEnabled(boolean flag)
           
 void setFrame(java.awt.Container frame)
           
 void setPage(int page)
           
 void setPageLayoutButtonsEnabled(boolean flag)
           
 void setPageNumber()
           
 void setPdfDecoder(PdfDecoder decode_pdf)
           
 void setPDFOutlineVisible(boolean visible)
           
 void setQualityBoxVisible(boolean visible)
           
 void setResults(SearchList results)
           
 void setRotation()
           
 void setRotationFromExternal(int rot)
           
 void setScalingFromExternal(java.lang.String scale)
           
 void setSearchFrame(GUISearchWindow searchFrame)
           
 void setSearchLayoutButtonsEnabled()
           
 void setSearchText(javax.swing.JTextField searchText)
           
 void setSelectedComboIndex(int ID, int index)
           
 void setSelectedComboItem(int ID, java.lang.String index)
           
 void setSplitDividerLocation(int size)
           
 void setStatusProgress(int size)
           
 void setViewerTitle(java.lang.String title)
           
 int showConfirmDialog(java.lang.Object message, java.lang.String title, int optionType, int messageType)
           
 int showConfirmDialog(java.lang.String message, java.lang.String message2, int option)
           
 void showDocumentProperties(java.lang.String selectedFile, java.lang.String inputDir, long size, int pageCount, int currentPage)
           
 void showFirstTimePopup()
           
 java.lang.String showInputDialog(java.lang.Object message, java.lang.String title, int type)
           
 java.lang.String showInputDialog(java.lang.String message)
           
 void showItextPopup()
           
 void showMessageDialog(javax.swing.JTextArea info)
           
 void showMessageDialog(java.lang.Object message1)
           
 void showMessageDialog(java.lang.Object message, java.lang.String title, int type)
           
 int showOptionDialog(java.lang.Object displayValue, java.lang.String message, int option, int type, java.lang.Object icon, java.lang.Object[] options, java.lang.Object initial)
           
 int showOverwriteDialog(java.lang.String file, boolean yesToAllPresent)
           
 void showPreferencesDialog()
           
 void stopThumbnails()
           
 void updateStatusMessage(java.lang.String message)
           
 void zoom(boolean Rotated)
           
 
Methods inherited from class org.jpedal.examples.simpleviewer.gui.GUI
allowScrolling, createUniqueAnnotationIcons, getAnnotTypes, getPDFDisplayInset, getProperties, getPropertiesFileLocation, getRectangle, getRotation, getScaling, isUseDownloadWindow, setAutoScrolling, setDpi, setHiResPrinting, setNoPagesDecoded, setPreferences, setProperties, setPropertiesFileLocation, setRectangle, setScaling, setUseDownloadWindow, toogleAutoScrolling, useHiResPrinting
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpedal.gui.GUIFactory
allowScrolling, getAnnotTypes, getPDFDisplayInset, getRectangle, getRotation, getScaling, setAutoScrolling, setNoPagesDecoded, setRectangle, toogleAutoScrolling
 

Field Detail

messageShown

public boolean messageShown

pageCounter2

public javax.swing.JTextField pageCounter2

nextSearch

public GUIButton nextSearch

previousSearch

public GUIButton previousSearch
Constructor Detail

SwingGUI

public SwingGUI(PdfDecoder decode_pdf,
                Values commonValues,
                GUIThumbnailPanel thumbnails,
                PropertiesFile properties)
Method Detail

getDisplayPane

public javax.swing.JComponent getDisplayPane()

getMultiViewerFrames

public javax.swing.JDesktopPane getMultiViewerFrames()

setPdfDecoder

public void setPdfDecoder(PdfDecoder decode_pdf)

closeMultiViewerWindow

public void closeMultiViewerWindow(java.lang.String selectedFile)

AdjustForAlignment

public int AdjustForAlignment(int cx)
adjusty x co-ordinate shown in display for user to include any page centering


getBookmark

public java.lang.String getBookmark(java.lang.String bookmark)

reinitialiseTabs

public void reinitialiseTabs(boolean showVisible)

stopThumbnails

public void stopThumbnails()

reinitThumbnails

public void reinitThumbnails()

resetNavBar

public void resetNavBar()
reset so appears closed

Specified by:
resetNavBar in interface org.jpedal.gui.GUIFactory

setBackNavigationButtonsEnabled

public void setBackNavigationButtonsEnabled(boolean flag)

setForwardNavigationButtonsEnabled

public void setForwardNavigationButtonsEnabled(boolean flag)

setPageLayoutButtonsEnabled

public void setPageLayoutButtonsEnabled(boolean flag)

setSearchLayoutButtonsEnabled

public void setSearchLayoutButtonsEnabled()

alignLayoutMenuOption

public void alignLayoutMenuOption(int mode)

setDisplayMode

public void setDisplayMode(java.lang.Integer mode)

isSingle

public boolean isSingle()

initLayoutMenus

public void initLayoutMenus(javax.swing.JMenu pageLayout,
                            java.lang.String[] descriptions,
                            int[] value)
Specified by:
initLayoutMenus in interface org.jpedal.gui.GUIFactory

getInfoBox

public void getInfoBox()
Specified by:
getInfoBox in interface org.jpedal.gui.GUIFactory

resetRotationBox

public void resetRotationBox()
Specified by:
resetRotationBox in interface org.jpedal.gui.GUIFactory

showDocumentProperties

public void showDocumentProperties(java.lang.String selectedFile,
                                   java.lang.String inputDir,
                                   long size,
                                   int pageCount,
                                   int currentPage)
Specified by:
showDocumentProperties in interface org.jpedal.gui.GUIFactory

getFormValue

public java.lang.Object getFormValue(java.awt.Component component)

searchInTab

public void searchInTab(GUISearchWindow searchFrame)

searchInMenu

public void searchInMenu(GUISearchWindow searchFrame)

clearRecentDocuments

public void clearRecentDocuments()

init

public void init(java.lang.String[] scalingValues,
                 java.lang.Object currentCommands,
                 java.lang.Object currentPrinter)
Specified by:
init in interface org.jpedal.gui.GUIFactory

addCursor

public void addCursor()
Specified by:
addCursor in interface org.jpedal.gui.GUIFactory

addButton

public void addButton(int line,
                      java.lang.String toolTip,
                      java.lang.String path,
                      int ID)
Specified by:
addButton in interface org.jpedal.gui.GUIFactory

addMenuItem

public void addMenuItem(javax.swing.JMenu parentMenu,
                        java.lang.String text,
                        java.lang.String toolTip,
                        int ID)
Specified by:
addMenuItem in interface org.jpedal.gui.GUIFactory

addCombo

public void addCombo(java.lang.String title,
                     java.lang.String tooltip,
                     int ID)
Specified by:
addCombo in interface org.jpedal.gui.GUIFactory

setViewerTitle

public void setViewerTitle(java.lang.String title)
Specified by:
setViewerTitle in interface org.jpedal.gui.GUIFactory

resetComboBoxes

public void resetComboBoxes(boolean value)
Specified by:
resetComboBoxes in interface org.jpedal.gui.GUIFactory

createPane

public final javax.swing.JScrollPane createPane(javax.swing.JTextPane text_pane,
                                                java.lang.String content,
                                                boolean useXML)
                                         throws javax.swing.text.BadLocationException
Specified by:
createPane in interface org.jpedal.gui.GUIFactory
Throws:
javax.swing.text.BadLocationException

getSelectedComboIndex

public int getSelectedComboIndex(int ID)
Specified by:
getSelectedComboIndex in interface org.jpedal.gui.GUIFactory

setSelectedComboIndex

public void setSelectedComboIndex(int ID,
                                  int index)
Specified by:
setSelectedComboIndex in interface org.jpedal.gui.GUIFactory

setSelectedComboItem

public void setSelectedComboItem(int ID,
                                 java.lang.String index)
Specified by:
setSelectedComboItem in interface org.jpedal.gui.GUIFactory

getSelectedComboItem

public java.lang.Object getSelectedComboItem(int ID)
Specified by:
getSelectedComboItem in interface org.jpedal.gui.GUIFactory

zoom

public void zoom(boolean Rotated)
Specified by:
zoom in interface org.jpedal.gui.GUIFactory

rotate

public void rotate()
Specified by:
rotate in interface org.jpedal.gui.GUIFactory

scrollToPage

public void scrollToPage(int page)

decodePage

public void decodePage(boolean resizePanel)
Specified by:
decodePage in interface org.jpedal.gui.GUIFactory

addFormsListeners

public void addFormsListeners()
this method adds listeners to GUI widgets to track changes


setBookmarks

public void setBookmarks(boolean alwaysGenerate)

initStatus

public void initStatus()
Specified by:
initStatus in interface org.jpedal.gui.GUIFactory

resetStatus

public void resetStatus()
Specified by:
resetStatus in interface org.jpedal.gui.GUIFactory

initThumbnails

public void initThumbnails(int itemSelectedCount,
                           Vector_Int pageUsed)
Specified by:
initThumbnails in interface org.jpedal.gui.GUIFactory

setCoordText

public void setCoordText(java.lang.String string)
Specified by:
setCoordText in interface org.jpedal.gui.GUIFactory

hideRedundentNavButtons

public void hideRedundentNavButtons()

setPageNumber

public void setPageNumber()
Specified by:
setPageNumber in interface org.jpedal.gui.GUIFactory

setPage

public void setPage(int page)
Specified by:
setPage in interface org.jpedal.gui.GUIFactory

resetPageNav

public void resetPageNav()

setRotation

public void setRotation()

setRotationFromExternal

public void setRotationFromExternal(int rot)

setScalingFromExternal

public void setScalingFromExternal(java.lang.String scale)

addToMainMenu

public void addToMainMenu(javax.swing.JMenu fileMenuList)
Specified by:
addToMainMenu in interface org.jpedal.gui.GUIFactory

getFrame

public java.awt.Container getFrame()
Specified by:
getFrame in interface org.jpedal.gui.GUIFactory

getTopButtonBar

public javax.swing.JToolBar getTopButtonBar()
Specified by:
getTopButtonBar in interface org.jpedal.gui.GUIFactory

showMessageDialog

public void showMessageDialog(java.lang.Object message1)
Specified by:
showMessageDialog in interface org.jpedal.gui.GUIFactory

showMessageDialog

public void showMessageDialog(java.lang.Object message,
                              java.lang.String title,
                              int type)
Specified by:
showMessageDialog in interface org.jpedal.gui.GUIFactory

showInputDialog

public java.lang.String showInputDialog(java.lang.Object message,
                                        java.lang.String title,
                                        int type)
Specified by:
showInputDialog in interface org.jpedal.gui.GUIFactory

showInputDialog

public java.lang.String showInputDialog(java.lang.String message)
Specified by:
showInputDialog in interface org.jpedal.gui.GUIFactory

showOptionDialog

public int showOptionDialog(java.lang.Object displayValue,
                            java.lang.String message,
                            int option,
                            int type,
                            java.lang.Object icon,
                            java.lang.Object[] options,
                            java.lang.Object initial)
Specified by:
showOptionDialog in interface org.jpedal.gui.GUIFactory

showConfirmDialog

public int showConfirmDialog(java.lang.String message,
                             java.lang.String message2,
                             int option)
Specified by:
showConfirmDialog in interface org.jpedal.gui.GUIFactory

showOverwriteDialog

public int showOverwriteDialog(java.lang.String file,
                               boolean yesToAllPresent)
Specified by:
showOverwriteDialog in interface org.jpedal.gui.GUIFactory

showMessageDialog

public void showMessageDialog(javax.swing.JTextArea info)
Specified by:
showMessageDialog in interface org.jpedal.gui.GUIFactory

showItextPopup

public void showItextPopup()
Specified by:
showItextPopup in interface org.jpedal.gui.GUIFactory

showFirstTimePopup

public void showFirstTimePopup()
Specified by:
showFirstTimePopup in interface org.jpedal.gui.GUIFactory

showConfirmDialog

public int showConfirmDialog(java.lang.Object message,
                             java.lang.String title,
                             int optionType,
                             int messageType)
Specified by:
showConfirmDialog in interface org.jpedal.gui.GUIFactory

updateStatusMessage

public void updateStatusMessage(java.lang.String message)
Specified by:
updateStatusMessage in interface org.jpedal.gui.GUIFactory

resetStatusMessage

public void resetStatusMessage(java.lang.String message)
Specified by:
resetStatusMessage in interface org.jpedal.gui.GUIFactory

setStatusProgress

public void setStatusProgress(int size)
Specified by:
setStatusProgress in interface org.jpedal.gui.GUIFactory

isPDFOutlineVisible

public boolean isPDFOutlineVisible()
Specified by:
isPDFOutlineVisible in interface org.jpedal.gui.GUIFactory

setPDFOutlineVisible

public void setPDFOutlineVisible(boolean visible)
Specified by:
setPDFOutlineVisible in interface org.jpedal.gui.GUIFactory

setSplitDividerLocation

public void setSplitDividerLocation(int size)
Specified by:
setSplitDividerLocation in interface org.jpedal.gui.GUIFactory

printDialog

public java.lang.Object printDialog(java.lang.String[] printersList,
                                    java.lang.String defaultPrinter)
Specified by:
printDialog in interface org.jpedal.gui.GUIFactory

setQualityBoxVisible

public void setQualityBoxVisible(boolean visible)
Specified by:
setQualityBoxVisible in interface org.jpedal.gui.GUIFactory

setSearchText

public void setSearchText(javax.swing.JTextField searchText)

setResults

public void setResults(SearchList results)

getResults

public SearchList getResults()

getComboBar

public javax.swing.JToolBar getComboBar()

getSearchLayoutGroup

public javax.swing.ButtonGroup getSearchLayoutGroup()

setSearchFrame

public void setSearchFrame(GUISearchWindow searchFrame)

removeSearchWindow

public void removeSearchWindow(boolean justHide)

showPreferencesDialog

public void showPreferencesDialog()

setFrame

public void setFrame(java.awt.Container frame)

getRSSBox

public void getRSSBox()

alterProperty

public void alterProperty(java.lang.String value,
                          boolean set)