Class LensMagnificationGraphMousePlugin
java.lang.Object
edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
edu.uci.ics.jung.visualization.control.LensMagnificationGraphMousePlugin
- All Implemented Interfaces:
GraphMousePlugin
,MouseWheelListener
,EventListener
public class LensMagnificationGraphMousePlugin
extends AbstractGraphMousePlugin
implements MouseWheelListener
HyperbolicMagnificationGraphMousePlugin changes the magnification
within the Hyperbolic projection of the HyperbolicTransformer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final float
protected final float
protected final float
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
cursor, down, modifiers
-
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionprivate void
changeMagnification
(MutableTransformer transformer, float delta) boolean
override to check equality with a maskvoid
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
-
Field Details
-
floor
protected final float floor -
ceiling
protected final float ceiling -
delta
protected final float delta
-
-
Constructor Details
-
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 Details
-
checkModifiers
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
-
mouseWheelMoved
zoom the display in or out, depending on the direction of the mouse wheel motion.- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
-