Class CrossoverScalingControl
java.lang.Object
edu.uci.ics.jung.visualization.control.CrossoverScalingControl
- All Implemented Interfaces:
ScalingControl
- Direct Known Subclasses:
AbsoluteCrossoverScalingControl
A scaling control that has a crossover point.
When the overall scale of the view and
model is less than the crossover point, the scaling is applied
to the view's transform and the graph nodes, labels, etc grow
smaller. This preserves the overall shape of the graph.
When the scale is larger than the crossover, the scaling is
applied to the graph layout. The graph spreads out, but the
vertices and labels grow no larger than their original size.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
Point where scale crosses over from view to layout. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
void
scale
(VisualizationServer<?, ?> vv, float amount, Point2D at) zoom the display in or outvoid
setCrossover
(double crossover) Sets the crossover point to the specified value.
-
Field Details
-
crossover
protected double crossoverPoint where scale crosses over from view to layout.
-
-
Constructor Details
-
CrossoverScalingControl
public CrossoverScalingControl()
-
-
Method Details
-
setCrossover
public void setCrossover(double crossover) Sets the crossover point to the specified value.- Parameters:
crossover
- the crossover point to use (defaults to 1.0)
-
getCrossover
public double getCrossover()- Returns:
- the current crossover value
-
scale
Description copied from interface:ScalingControl
zoom the display in or out- Specified by:
scale
in interfaceScalingControl
- Parameters:
vv
- the VisualizationVieweramount
- how much to adjust scale byat
- where to adjust scale from
-