org.lyra
Class HelpManager

java.lang.Object
  extended by org.lyra.HelpManager

public class HelpManager
extends java.lang.Object

Class dedicated to the loading and viewing of PDF documents. The interface is similar to that offered by the Adobe Acrobat program, simply embedded within the application and used for the display of help information.

All of the button handling is completed using the ICEpdf SwingController class and methods. Hence there is no instance of an Interact Class which is typically accompanies user interface classes within this Package to separate interface and programming elements.

Version:
1.0.5, %Revision, 174%, %LastChangedDate, 27/10/12 3:33PM%
Author:
Martin Foster

Nested Class Summary
private  class HelpManager.JLockedButton
          Creates an extension of JButton which prevents user interface changes when certain controlling items attempt to do so.
private  class HelpManager.JLockedToggleButton
          Creates an extension of JToggleButton which prevents user interface changes when certain controlling items attempt to do so.
 
Field Summary
private  boolean Base
           
private  HelpManager.JLockedButton buttonFirst
           
private  HelpManager.JLockedButton buttonLast
           
private  HelpManager.JLockedButton buttonNext
           
private  HelpManager.JLockedButton buttonPane
           
private  HelpManager.JLockedButton buttonPrev
           
private  HelpManager.JLockedButton buttonPrint
           
private  HelpManager.JLockedButton buttonSearch
           
private  HelpManager.JLockedButton buttonZoomIn
           
private  HelpManager.JLockedButton buttonZoomOut
           
(package private)  java.lang.String filePath
           
private  java.util.Map<java.lang.String,java.lang.String> Lang
           
private  java.lang.String stateName
           
private  java.lang.String Title
           
private  HelpManager.JLockedToggleButton togglePan
           
private  HelpManager.JLockedToggleButton toggleSelect
           
private  HelpManager.JLockedToggleButton toggleWidth
           
(package private)  org.icepdf.ri.common.SwingController viewerController
           
private  javax.swing.JFrame viewerFrame
           
private  javax.swing.JPanel viewerPanel
           
 
Constructor Summary
HelpManager()
          Standard constructor method.
HelpManager(java.util.Map<java.lang.String,java.lang.String> lang, java.lang.String path)
          Main constructor method which is used specifically to carry forth language independence.
HelpManager(java.util.Map<java.lang.String,java.lang.String> lang, java.lang.String title, java.lang.String path)
          Main constructor method which is used specifically to carry forth language independence.
 
Method Summary
private  javax.swing.JToolBar buildCompleteToolBar()
          This method is used specifically to generate the complete Tool Bar element which is required for easy operation of the PDF viewer.
private  javax.swing.JPanel buildViewerPanel(org.icepdf.ri.common.SwingViewBuilder factory)
          The default buildViewerPanel method used by the PDF libraries tends to offer little to no custom capabilities.
 void closeViewer()
          Since these elements will be stored for a period of time, it may come in handy to be able to dispose of their resources once we plan to get rid of them.
private  javax.swing.JButton getButtonFirst()
          This method initialises buttonFirst
private  javax.swing.JButton getButtonLast()
          This method initialises buttonLast
private  javax.swing.JButton getButtonNext()
          This method initialises buttonNext
private  javax.swing.JButton getButtonPane()
          This method initialises buttonPane
private  javax.swing.JButton getButtonPrev()
          This method initialises buttonPrev.
private  javax.swing.JButton getButtonPrint()
          This method initialises buttonPrint
private  javax.swing.JButton getButtonSearch()
          This method initialises buttonSearch
private  javax.swing.JButton getButtonZoomIn()
          This method initialises buttonZoomIn
private  javax.swing.JButton getButtonZoomOut()
          This method initialises buttonZoomOut
 java.lang.String getName()
          Name allows to keep a certain amount of state information on exactly what this viewer is displaying.
private  javax.swing.JToggleButton getTogglePan()
          This method initialises togglePan.
private  javax.swing.JToggleButton getToggleSelect()
          This method initialises toggleSelect
private  javax.swing.JToggleButton getToggleWidth()
          This method initialises toggleWidth.
 javax.swing.JFrame getViewerFrame()
          The viewer component is what we really want when the viewer is called.
 javax.swing.JPanel getViewerPanel()
          This is an instance of the viewer panel that is to be embedded within an existing element such as a JFrame.
 boolean isDefault()
          We do not necessarily care to do anything overly complex when the visual editor constructor is enacted.
 void setName(java.lang.String name)
          Name allows to keep a certain amount of state information on exactly what this viewer is displaying.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewerController

org.icepdf.ri.common.SwingController viewerController

filePath

java.lang.String filePath

buttonPrint

private HelpManager.JLockedButton buttonPrint

buttonSearch

private HelpManager.JLockedButton buttonSearch

buttonPane

private HelpManager.JLockedButton buttonPane

buttonFirst

private HelpManager.JLockedButton buttonFirst

buttonPrev

private HelpManager.JLockedButton buttonPrev

buttonNext

private HelpManager.JLockedButton buttonNext

buttonLast

private HelpManager.JLockedButton buttonLast

buttonZoomIn

private HelpManager.JLockedButton buttonZoomIn

buttonZoomOut

private HelpManager.JLockedButton buttonZoomOut

togglePan

private HelpManager.JLockedToggleButton togglePan

toggleSelect

private HelpManager.JLockedToggleButton toggleSelect

toggleWidth

private HelpManager.JLockedToggleButton toggleWidth

viewerPanel

private javax.swing.JPanel viewerPanel

viewerFrame

private javax.swing.JFrame viewerFrame

stateName

private java.lang.String stateName

Lang

private java.util.Map<java.lang.String,java.lang.String> Lang

Title

private java.lang.String Title

Base

private boolean Base
Constructor Detail

HelpManager

public HelpManager()
Standard constructor method.


HelpManager

public HelpManager(java.util.Map<java.lang.String,java.lang.String> lang,
                   java.lang.String path)
Main constructor method which is used specifically to carry forth language independence.

Parameters:
lang - Language element.
path - String element with path to PDF document.

HelpManager

public HelpManager(java.util.Map<java.lang.String,java.lang.String> lang,
                   java.lang.String title,
                   java.lang.String path)
Main constructor method which is used specifically to carry forth language independence.

Parameters:
lang - Language element.
title - String containing window title.
path - String element with path to PDF document.
Method Detail

isDefault

public boolean isDefault()
We do not necessarily care to do anything overly complex when the visual editor constructor is enacted. This will tell us in order to avoid.

Returns:
Boolean indicating base constructor instance.

getViewerPanel

public javax.swing.JPanel getViewerPanel()
This is an instance of the viewer panel that is to be embedded within an existing element such as a JFrame. While not always the preferred method it offers certain advantages over a self-sufficient method also available.

Returns:
JComponent containing the panel.

getViewerFrame

public javax.swing.JFrame getViewerFrame()
The viewer component is what we really want when the viewer is called. This will pass along the generated JPanel elements to the caller.

Returns:
JComponent containing the panel.

buildViewerPanel

private javax.swing.JPanel buildViewerPanel(org.icepdf.ri.common.SwingViewBuilder factory)
The default buildViewerPanel method used by the PDF libraries tends to offer little to no custom capabilities. At least not in terms of unique icons and language elements.

This method will implement many of the features found in the source of buildViewerPanel but will also adapt it to suit out needs. Most specifically the capabilities provided in the tool bar.

Parameters:
factory - SwingViewBuilder factory object.
Returns:
JPanel containing the complete PDF viewer.

buildCompleteToolBar

private javax.swing.JToolBar buildCompleteToolBar()
This method is used specifically to generate the complete Tool Bar element which is required for easy operation of the PDF viewer. Since the built-in factory element does not adequately allow for modification this is essentially a direct application of the necessary elements to suit out needs.

Returns:
JToolBar containing all of the desired buttons matching out theme

getButtonPrint

private javax.swing.JButton getButtonPrint()
This method initialises buttonPrint

Returns:
javax.swing.JButton

getButtonSearch

private javax.swing.JButton getButtonSearch()
This method initialises buttonSearch

Returns:
javax.swing.JButton

getButtonPane

private javax.swing.JButton getButtonPane()
This method initialises buttonPane

Returns:
javax.swing.JButton

getButtonFirst

private javax.swing.JButton getButtonFirst()
This method initialises buttonFirst

Returns:
javax.swing.JButton

getButtonPrev

private javax.swing.JButton getButtonPrev()
This method initialises buttonPrev.

Returns:
javax.swing.JButton

getButtonNext

private javax.swing.JButton getButtonNext()
This method initialises buttonNext

Returns:
javax.swing.JButton

getButtonLast

private javax.swing.JButton getButtonLast()
This method initialises buttonLast

Returns:
javax.swing.JButton

getToggleWidth

private javax.swing.JToggleButton getToggleWidth()
This method initialises toggleWidth.

Returns:
javax.swing.JButton

getButtonZoomIn

private javax.swing.JButton getButtonZoomIn()
This method initialises buttonZoomIn

Returns:
javax.swing.JButton

getButtonZoomOut

private javax.swing.JButton getButtonZoomOut()
This method initialises buttonZoomOut

Returns:
javax.swing.JButton

getTogglePan

private javax.swing.JToggleButton getTogglePan()
This method initialises togglePan.

Returns:
javax.swing.JButton

getToggleSelect

private javax.swing.JToggleButton getToggleSelect()
This method initialises toggleSelect

Returns:
javax.swing.JButton

closeViewer

public void closeViewer()
Since these elements will be stored for a period of time, it may come in handy to be able to dispose of their resources once we plan to get rid of them. Without waiting for the garbage collector to do so.


getName

public java.lang.String getName()
Name allows to keep a certain amount of state information on exactly what this viewer is displaying.

Returns:
String containing name information.

setName

public void setName(java.lang.String name)
Name allows to keep a certain amount of state information on exactly what this viewer is displaying.

Parameters:
name - String containing name information.