Package com.storedobject.svg
Class Node.Mover
java.lang.Object
com.storedobject.svg.Node.Mover
- All Implemented Interfaces:
Transformer
- Enclosing class:
Node
Transformer for moving a node.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmove(double x, double y) Move to a specified coordinate.voidMove to a specified point.final StringTransform the node content.doubletransformX1(Node node) Transform the X1 coordinate.doubletransformX2(Node node) Transform the X2 coordinate.doubletransformY1(Node node) Transform the Y1 coordinate.doubletransformY2(Node node) Transform the Y2 coordinate.
-
Constructor Details
-
Mover
public Mover()Constructor. -
Mover
public Mover(double x, double y) Constructor.- Parameters:
x- New x-coordinate.y- New y-coordinate.
-
Mover
-
-
Method Details
-
move
public void move(double x, double y) Move to a specified coordinate.- Parameters:
x- X coordinate.y- Y coordinate.
-
move
-
transformX1
Description copied from interface:TransformerTransform the X1 coordinate.Note: This is the first method invoked while transforming a node. It is used to adjust the starting X coordinate of the node.
- Specified by:
transformX1in interfaceTransformer- Parameters:
node- Node to transform.- Returns:
- Transformed X1 coordinate.
-
transformY1
Description copied from interface:TransformerTransform the Y1 coordinate.Note: This is the second method invoked while transforming a node. It is used to adjust the starting Y coordinate of the node.
- Specified by:
transformY1in interfaceTransformer- Parameters:
node- Node to transform.- Returns:
- Transformed Y1 coordinate.
-
transformX2
Description copied from interface:TransformerTransform the X2 coordinate.Note: This is the 3rd method invoked while transforming a node. It is used to adjust the ending X coordinate of the node.
- Specified by:
transformX2in interfaceTransformer- Parameters:
node- Node to transform.- Returns:
- Transformed X2 coordinate.
-
transformY2
Description copied from interface:TransformerTransform the Y2 coordinate.Note: This is the 4th method invoked while transforming a node. It is used to adjust the ending Y coordinate of the node.
- Specified by:
transformY2in interfaceTransformer- Parameters:
node- Node to transform.- Returns:
- Transformed Y2 coordinate.
-
transform
Description copied from interface:TransformerTransform the node content.Note: This is the last method invoked while transforming a node. It is used to adjust the content of the node.
- Specified by:
transformin interfaceTransformer- Parameters:
node- Node to transform.- Returns:
- Transformed node content.
-