A basic FileHandler which provides a way to view the graphical content of Scalable Vector Graphics (SVG) files.
It uses the Apache Batik Toolkit for reading and display, which in turn uses the Mozilla Rhino JavaScript library for dynamic and interactive functionality. These libraries do not cover the full range of possibilities of what is possible, most of the core functionality however works very well.
After the document has successfully been loaded and displayed, there are various ways of interacting with it: either by using the toolbar commands of the FileHandler, by using the mouse or by any means the document offers itself. Using the toolbar commands should be self explanatory.
Mouse interaction works as follows:
Translation: Clicking and dragging the left mouse button while simultaneously pressing the SHIFT key will move the image in the direction of the mouse movement.
Zooming: Click and drag of the right mouse button while holding the SHIFT key will zoom in and out of the image according to the amount of vertical movement of the mouse cursor.
Zoom to window: Click and drag of the left mouse button while holding the CTRL key displays a selection rectangle to which the display will zoom after releasing the mouse button. If the mouse button is release at the exact location of the first click which initiated the drag, no zooming will occur.
Rotation: Click and drag the right mouse button while holding the CTRL key will rotate the image about the current center of the display.
Reset: Clicking the right mouse button while simultaneously pressing both SHIFT and CTRL key will reset the display to the initial unzoomed view which is specified by the document. Note that this might be depending on the size of the display window if the document does not specify any dimensions.