jfig.gui
Class PresentationViewer

java.lang.Object
  extended byjfig.gui.PresentationViewer
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, FigDrawableEnumerator, java.awt.event.KeyListener, java.awt.event.MouseListener

public class PresentationViewer
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.KeyListener, FigDrawableEnumerator

the jfig presentation viewer.


Field Summary
 java.lang.String TypeFILE
           
 java.lang.String TypeRESOURCE
           
 java.lang.String TypeURL
           
 
Constructor Summary
PresentationViewer()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void buildPopup()
           
static void dbg(java.lang.String s)
           
 void doCancel()
           
 void doIconize()
           
 void doOpenBrowser()
           
 void doOpenGotoDialog()
           
 void doPanDown(java.lang.Object arg)
           
 void doPanHome(java.lang.Object arg)
           
 void doPanLeft(java.lang.Object arg)
           
 void doPanRight(java.lang.Object arg)
           
 void doPanUp(java.lang.Object arg)
           
 void doParseFile(java.lang.String fname)
           
 void doParseFileOrURL(java.lang.String s)
           
 void doParseResource(java.lang.String s)
           
 void doParseURL(java.lang.String s)
           
 void doPrint()
           
 void doQuit()
           
 void doRedraw()
           
 void doResize(int width, int height)
           
 void doResizeToDefaultSize()
           
 void doResizeToFullScreen()
           
 void doSetGridMedium(java.lang.Object arg)
           
 void doSetGridNone(java.lang.Object arg)
           
 void doShowChapter(int chapterIndex)
           
 void doShowFirstSlide()
           
 void doShowHelp()
           
 void doShowLastSlide()
           
 void doShowNextChapter()
           
 void doShowNextSlide()
           
 void doShowPrevChapter()
           
 void doShowPrevSlide()
           
 void doShowSlide(int pageNumber)
           
 void doShowSlide(int chapterIndex, int slideIndex)
           
 void doZoom11()
           
 void doZoomFactor(double factor)
           
 void doZoomFit()
           
 void doZoomFitWidth()
           
 void doZoomIn11()
           
 void doZoomIn14()
           
 void doZoomOut07()
           
 void doZoomOut09()
           
 void doZoomRegion()
           
static java.lang.String extractDirectory(java.lang.String s)
          try to extract a valid directory name from a given pathname s.
 java.io.InputStream findPresentationFileOrURL(java.lang.String filename)
           
 java.util.Enumeration getDrawableObjects()
          return an Enumeration of all drawable objects
 java.awt.Frame getFrame()
           
 boolean getJarMode()
           
 PresentationParser getPresentationParser()
           
 FigDrawable getTmpObject()
          return a reference to the current 'active' (temporary) object
 void handleMousePressedZoomRegion(java.awt.event.MouseEvent e)
           
 void handleParserCallback()
           
 void keyPressed(java.awt.event.KeyEvent evt)
           
 void keyReleased(java.awt.event.KeyEvent evt)
           
 void keyTyped(java.awt.event.KeyEvent evt)
           
static void main(java.lang.String[] args)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
static void msg(java.lang.String s)
           
 void parse(java.io.InputStream IS)
           
static void setDebug(boolean b)
           
 void setHelpURL(java.lang.String s)
           
 void setIconFromResource(java.lang.String resourcename)
           
 void setJarMode(boolean b)
           
 void setRequestFocusOnMouseEnter(boolean b)
           
 void setZoomFactor(double factor)
           
 void setZoomMessage()
           
static void statusMessage(java.lang.String s)
           
 java.lang.String toString()
           
 void updateBrowser()
           
 void updateWindowTitle()
           
static void usage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TypeFILE

public final java.lang.String TypeFILE
See Also:
Constant Field Values

TypeURL

public final java.lang.String TypeURL
See Also:
Constant Field Values

TypeRESOURCE

public final java.lang.String TypeRESOURCE
See Also:
Constant Field Values
Constructor Detail

PresentationViewer

public PresentationViewer()
Method Detail

setIconFromResource

public void setIconFromResource(java.lang.String resourcename)

getFrame

public java.awt.Frame getFrame()

buildPopup

public void buildPopup()

setHelpURL

public void setHelpURL(java.lang.String s)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

setRequestFocusOnMouseEnter

public void setRequestFocusOnMouseEnter(boolean b)

keyReleased

public void keyReleased(java.awt.event.KeyEvent evt)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent evt)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent evt)
Specified by:
keyPressed in interface java.awt.event.KeyListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

doCancel

public void doCancel()

doQuit

public void doQuit()

doPrint

public void doPrint()

doShowHelp

public void doShowHelp()

doOpenBrowser

public void doOpenBrowser()

doOpenGotoDialog

public void doOpenGotoDialog()

doIconize

public void doIconize()

doResize

public void doResize(int width,
                     int height)

doResizeToDefaultSize

public void doResizeToDefaultSize()

doResizeToFullScreen

public void doResizeToFullScreen()

doShowNextSlide

public void doShowNextSlide()

doShowPrevSlide

public void doShowPrevSlide()

doShowFirstSlide

public void doShowFirstSlide()

doShowLastSlide

public void doShowLastSlide()

doShowNextChapter

public void doShowNextChapter()

doShowPrevChapter

public void doShowPrevChapter()

doShowSlide

public void doShowSlide(int chapterIndex,
                        int slideIndex)

doShowSlide

public void doShowSlide(int pageNumber)

doShowChapter

public void doShowChapter(int chapterIndex)

doRedraw

public void doRedraw()

doZoomIn14

public void doZoomIn14()

doZoomIn11

public void doZoomIn11()

doZoomOut09

public void doZoomOut09()

doZoomFactor

public void doZoomFactor(double factor)

doZoomOut07

public void doZoomOut07()

doZoom11

public void doZoom11()

setZoomFactor

public void setZoomFactor(double factor)

doZoomRegion

public void doZoomRegion()

handleMousePressedZoomRegion

public void handleMousePressedZoomRegion(java.awt.event.MouseEvent e)

doZoomFit

public void doZoomFit()

doZoomFitWidth

public void doZoomFitWidth()

setZoomMessage

public void setZoomMessage()

doPanHome

public void doPanHome(java.lang.Object arg)

doPanLeft

public void doPanLeft(java.lang.Object arg)

doPanRight

public void doPanRight(java.lang.Object arg)

doPanUp

public void doPanUp(java.lang.Object arg)

doPanDown

public void doPanDown(java.lang.Object arg)

doSetGridNone

public void doSetGridNone(java.lang.Object arg)

doSetGridMedium

public void doSetGridMedium(java.lang.Object arg)

doParseFileOrURL

public void doParseFileOrURL(java.lang.String s)

doParseFile

public void doParseFile(java.lang.String fname)
                 throws java.io.FileNotFoundException,
                        java.lang.SecurityException
Throws:
java.io.FileNotFoundException
java.lang.SecurityException

doParseResource

public void doParseResource(java.lang.String s)

doParseURL

public void doParseURL(java.lang.String s)

parse

public void parse(java.io.InputStream IS)

handleParserCallback

public void handleParserCallback()

updateWindowTitle

public void updateWindowTitle()

updateBrowser

public void updateBrowser()

findPresentationFileOrURL

public java.io.InputStream findPresentationFileOrURL(java.lang.String filename)

setJarMode

public void setJarMode(boolean b)

getJarMode

public boolean getJarMode()

getDrawableObjects

public java.util.Enumeration getDrawableObjects()
Description copied from interface: FigDrawableEnumerator
return an Enumeration of all drawable objects

Specified by:
getDrawableObjects in interface FigDrawableEnumerator

getTmpObject

public FigDrawable getTmpObject()
Description copied from interface: FigDrawableEnumerator
return a reference to the current 'active' (temporary) object

Specified by:
getTmpObject in interface FigDrawableEnumerator

getPresentationParser

public PresentationParser getPresentationParser()

toString

public java.lang.String toString()

setDebug

public static void setDebug(boolean b)

dbg

public static void dbg(java.lang.String s)

msg

public static void msg(java.lang.String s)

statusMessage

public static void statusMessage(java.lang.String s)

extractDirectory

public static java.lang.String extractDirectory(java.lang.String s)
try to extract a valid directory name from a given pathname s. This method also handles simple file:/ and resource:/ URLs: /etc/passwd -> /etc c:\windows\system\classes\hugo -> c:/windows/system/classes resource:/jfig/doc/viewer -> /jfig/doc file:/etc/passwd -> /etc


usage

public static void usage()

main

public static void main(java.lang.String[] args)