org.formaria.svg
Class SvgMagnifier

java.lang.Object
  extended by org.formaria.svg.SvgMagnifier
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class SvgMagnifier
extends java.lang.Object
implements java.awt.event.ActionListener

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.2 $


Constructor Summary
SvgMagnifier(javax.swing.JComponent glassPane, SvgImageMap svgImage)
          Class constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Provides an action listener for the JRadioButton objects used to select which magnification mode is currently in use.
 void setGlassScale(float scale)
          Sets the scale factor of the SvgMagnifyingWindow object used within this class.
 void setMagGlassAnimation(int animationMode, float animationSpeed)
          Sets whether a fade-in or fade-out animation is to be run.
 void setWindowScale(float scale)
          Sets the scale factor of the SvgMagnifyingWindow object used within this class.
 void setZoomPoint(java.awt.Point p)
          Used to set which part of the SVG image will be zoomed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvgMagnifier

public SvgMagnifier(javax.swing.JComponent glassPane,
                    SvgImageMap svgImage)
Class constructor.

Parameters:
diagram - provides a means of rendering the document as a Graphics2D object
imageFrame - a JFrame that should point to the frame that contains the SvgImageMap instance.
Method Detail

setZoomPoint

public void setZoomPoint(java.awt.Point p)
Used to set which part of the SVG image will be zoomed.

Parameters:
p - the Point object specifying the area to be zoomed.

setWindowScale

public void setWindowScale(float scale)
Sets the scale factor of the SvgMagnifyingWindow object used within this class.

Parameters:
scale - float specifing the scale factor.

setGlassScale

public void setGlassScale(float scale)
Sets the scale factor of the SvgMagnifyingWindow object used within this class.

Parameters:
scale - float specifing the scale factor.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Provides an action listener for the JRadioButton objects used to select which magnification mode is currently in use.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the ActionEvent generated by the component.

setMagGlassAnimation

public void setMagGlassAnimation(int animationMode,
                                 float animationSpeed)
Sets whether a fade-in or fade-out animation is to be run. animationMode an int specifying the animation type.