Class ViewScalingControl
- java.lang.Object
-
- org.jungrapht.visualization.control.ViewScalingControl
-
- All Implemented Interfaces:
ScalingControl
public class ViewScalingControl extends Object implements ScalingControl
ViewScalingGraphMouse applies a scaling transform to the View of the graph. This causes all elements of the graph to grow larger or smaller. ViewScalingGraphMouse, by default, is activated by the MouseWheel when the control key is pressed. The control key modifier can be overridden in the contstructor.- Author:
- Tom Nelson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ViewScalingControl.Builder
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.control.ScalingControl
ScalingControl.Axis
-
-
Field Summary
Fields Modifier and Type Field Description protected double
maxScale
protected double
minScale
-
Fields inherited from interface org.jungrapht.visualization.control.ScalingControl
CROSSOVER, ENABLE_SINGLE_AXIS_SCALING, MAX_SCALE, MIN_SCALE
-
-
Constructor Summary
Constructors Constructor Description ViewScalingControl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ViewScalingControl.Builder
builder()
void
scale(VisualizationServer<?,?> vv, double horizontalAmount, double verticalAmount, Point2D from)
zoom the display in or out, depending on the direction of the mouse wheel motion.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jungrapht.visualization.control.ScalingControl
scale
-
-
-
-
Method Detail
-
builder
public static ViewScalingControl.Builder builder()
-
scale
public void scale(VisualizationServer<?,?> vv, double horizontalAmount, double verticalAmount, Point2D from)
zoom the display in or out, depending on the direction of the mouse wheel motion.- Specified by:
scale
in interfaceScalingControl
- Parameters:
vv
- the VisualizationViewerhorizontalAmount
- how much to adjust horizontal scale byverticalAmount
- how much to adjust vertical scale byfrom
- where to adjust scale from
-
-