info.aduna.linkmap.action
Class ZoomInAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by info.aduna.linkmap.action.LinkMapAction
          extended by info.aduna.linkmap.action.ZoomInAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class ZoomInAction
extends LinkMapAction

A ZoomInAction increases, when invoked, the scale of the LinkGraphRenderer with a constant factor.

See Also:
Serialized Form

Field Summary
static double FACTOR
          The factor with which the scale of the LinkGraphRenderer is multiplied when this Action is invoked.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ZoomInAction(LinkMap map, Component parent)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          Multiplies the scale of the LinkGraphRenderer with FACTOR.
 
Methods inherited from class info.aduna.linkmap.action.LinkMapAction
getMap, getParent
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTOR

public static final double FACTOR
The factor with which the scale of the LinkGraphRenderer is multiplied when this Action is invoked.

See Also:
Constant Field Values
Constructor Detail

ZoomInAction

public ZoomInAction(LinkMap map,
                    Component parent)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Multiplies the scale of the LinkGraphRenderer with FACTOR. This class recalibrates the scale to 1.0 when the difference becomes less than 0.01, thereby preventing the typical rounding problems than often happen with floating point calculations.



Copyright © 1997-2008 Aduna. All Rights Reserved.