Class LensMagnificationGraphMousePlugin
- java.lang.Object
-
- edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
-
- edu.uci.ics.jung.visualization.control.LensMagnificationGraphMousePlugin
-
- All Implemented Interfaces:
GraphMousePlugin
,java.awt.event.MouseWheelListener
,java.util.EventListener
public class LensMagnificationGraphMousePlugin extends AbstractGraphMousePlugin implements java.awt.event.MouseWheelListener
HyperbolicMagnificationGraphMousePlugin changes the magnification within the Hyperbolic projection of the HyperbolicTransformer.
-
-
Constructor Summary
Constructors Constructor Description LensMagnificationGraphMousePlugin()
Creates an instance with modifier of CTRL_MASK, and default min/max/delta zoom values of 1/4/0.2.LensMagnificationGraphMousePlugin(float floor, float ceiling, float delta)
Creates an instance with modifier of CTRL_MASK, and the specified zoom parameters.LensMagnificationGraphMousePlugin(int modifiers)
Creates an instance with the specified modifiers and the default min/max/delta zoom values of 1/4/0.2.LensMagnificationGraphMousePlugin(int modifiers, float floor, float ceiling, float delta)
Creates an instance with the specified mouse event modifiers and zoom parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
changeMagnification(MutableTransformer transformer, float delta)
boolean
checkModifiers(java.awt.event.MouseEvent e)
override to check equality with a maskvoid
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
zoom the display in or out, depending on the direction of the mouse wheel motion.-
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
getCursor, getModifiers, setCursor, setModifiers
-
-
-
-
Constructor Detail
-
LensMagnificationGraphMousePlugin
public LensMagnificationGraphMousePlugin()
Creates an instance with modifier of CTRL_MASK, and default min/max/delta zoom values of 1/4/0.2.
-
LensMagnificationGraphMousePlugin
public LensMagnificationGraphMousePlugin(float floor, float ceiling, float delta)
Creates an instance with modifier of CTRL_MASK, and the specified zoom parameters.- Parameters:
floor
- the minimum zoom valueceiling
- the maximum zoom valuedelta
- the change in zoom value caused by each mouse event
-
LensMagnificationGraphMousePlugin
public LensMagnificationGraphMousePlugin(int modifiers)
Creates an instance with the specified modifiers and the default min/max/delta zoom values of 1/4/0.2.- Parameters:
modifiers
- the mouse event modifiers to specify
-
LensMagnificationGraphMousePlugin
public LensMagnificationGraphMousePlugin(int modifiers, float floor, float ceiling, float delta)
Creates an instance with the specified mouse event modifiers and zoom parameters.- Parameters:
modifiers
- the mouse event modifiers to specifyfloor
- the minimum zoom valueceiling
- the maximum zoom valuedelta
- the change in zoom value caused by each mouse event
-
-
Method Detail
-
checkModifiers
public boolean checkModifiers(java.awt.event.MouseEvent e)
override to check equality with a mask- Specified by:
checkModifiers
in interfaceGraphMousePlugin
- Overrides:
checkModifiers
in classAbstractGraphMousePlugin
- Parameters:
e
- an event to compare to- Returns:
- whether the member modifiers match the event modifiers
-
changeMagnification
private void changeMagnification(MutableTransformer transformer, float delta)
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
zoom the display in or out, depending on the direction of the mouse wheel motion.- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
-
-