Class MagnifyShapeTransformer
- java.lang.Object
-
- org.jungrapht.visualization.transform.MutableTransformerDecorator
-
- org.jungrapht.visualization.transform.LensTransformer
-
- org.jungrapht.visualization.transform.MagnifyTransformer
-
- org.jungrapht.visualization.transform.shape.MagnifyShapeTransformer
-
- All Implemented Interfaces:
BidirectionalTransformer,MutableTransformer,ShapeFlatnessTransformer,ShapeTransformer,ChangeEventSupport
public class MagnifyShapeTransformer extends MagnifyTransformer implements ShapeFlatnessTransformer
MagnifyShapeTransformer extends MagnifyTransformer and adds implementations for methods in ShapeTransformer. It modifies the shapes (Vertex, Edge, and Arrowheads) so that they are enlarged by the magnify transformation.- Author:
- Tom Nelson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMagnifyShapeTransformer.Builder<T extends MagnifyShapeTransformer,B extends MagnifyShapeTransformer.Builder<T,B>>
-
Field Summary
-
Fields inherited from class org.jungrapht.visualization.transform.LensTransformer
lens
-
Fields inherited from class org.jungrapht.visualization.transform.MutableTransformerDecorator
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMagnifyShapeTransformer(Dimension d)protectedMagnifyShapeTransformer(Dimension d, MutableTransformer delegate)protectedMagnifyShapeTransformer(Lens lens, MutableTransformer delegate)protectedMagnifyShapeTransformer(MagnifyShapeTransformer.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MagnifyShapeTransformer.Builder<?,?>builder(Dimension dimension)static MagnifyShapeTransformer.Builder<?,?>builder(Lens lens)ShapeinverseTransform(Shape shape)Shapemagnify(Shape shape)Magnify the shape, without considering the Lens.Shapemagnify(Shape shape, float flatness)Shapetransform(Shape shape)Transform the supplied shape with the overridden transform method so that the shape is distorted by the magnify transform.Shapetransform(Shape shape, float flatness)map a shape from graph coordinate system to the screen coordinate system-
Methods inherited from class org.jungrapht.visualization.transform.MagnifyTransformer
inverseTransform, magnify, transform
-
Methods inherited from class org.jungrapht.visualization.transform.LensTransformer
getLens, inverseTransform, setToIdentity, transform
-
Methods inherited from class org.jungrapht.visualization.transform.MutableTransformerDecorator
addChangeListener, concatenate, fireStateChanged, getChangeListeners, getDelegate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, removeChangeListener, rotate, rotate, scale, scale, setDelegate, setScale, setTranslate, shear, translate
-
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.transform.BidirectionalTransformer
inverseTransform, inverseTransform, transform, transform
-
Methods inherited from interface org.jungrapht.visualization.util.ChangeEventSupport
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
-
Methods inherited from interface org.jungrapht.visualization.transform.MutableTransformer
concatenate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, rotate, rotate, scale, scale, setScale, setToIdentity, setTranslate, shear, translate
-
-
-
-
Constructor Detail
-
MagnifyShapeTransformer
protected MagnifyShapeTransformer(MagnifyShapeTransformer.Builder builder)
-
MagnifyShapeTransformer
protected MagnifyShapeTransformer(Dimension d)
- Parameters:
d- the size used for the lens
-
MagnifyShapeTransformer
protected MagnifyShapeTransformer(Dimension d, MutableTransformer delegate)
- Parameters:
d- the size used for the lensdelegate- the layoutTransformer to use
-
MagnifyShapeTransformer
protected MagnifyShapeTransformer(Lens lens, MutableTransformer delegate)
-
-
Method Detail
-
builder
public static MagnifyShapeTransformer.Builder<?,?> builder(Lens lens)
-
builder
public static MagnifyShapeTransformer.Builder<?,?> builder(Dimension dimension)
-
transform
public Shape transform(Shape shape)
Transform the supplied shape with the overridden transform method so that the shape is distorted by the magnify transform.- Specified by:
transformin interfaceShapeTransformer- Overrides:
transformin classMutableTransformerDecorator- Parameters:
shape- a shape to transform- Returns:
- a GeneralPath for the transformed shape
-
transform
public Shape transform(Shape shape, float flatness)
Description copied from interface:ShapeFlatnessTransformermap a shape from graph coordinate system to the screen coordinate system- Specified by:
transformin interfaceShapeFlatnessTransformer- Parameters:
shape- the shape to be transformedflatness- used to break the supplied shape into segments- Returns:
- a GeneralPath (Shape) representing the screen points of the shape
-
inverseTransform
public Shape inverseTransform(Shape shape)
- Specified by:
inverseTransformin interfaceShapeTransformer- Overrides:
inverseTransformin classMutableTransformerDecorator
-
magnify
public Shape magnify(Shape shape)
Magnify the shape, without considering the Lens.- Parameters:
shape- the shape to magnify- Returns:
- the transformed shape
-
-