Package com.storedobject.svg
Class Node.Margin
java.lang.Object
com.storedobject.svg.Node.Margin
- All Implemented Interfaces:
Transformer
- Enclosing class:
Node
Transformer for adding margins.
- Author:
- Syam
-
Constructor Summary
ConstructorsConstructorDescriptionMargin(double topMargin, double rightMargin, double bottomMargin, double leftMargin) Constructor for creating a Margin object with specified margins. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringTransform the node content.doubletransformX2(Node node) Transform the X2 coordinate.doubletransformY2(Node node) Transform the Y2 coordinate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.svg.Transformer
transformX1, transformY1
-
Constructor Details
-
Margin
public Margin(double topMargin, double rightMargin, double bottomMargin, double leftMargin) Constructor for creating a Margin object with specified margins. A margin is set to 0 if the specified value is less than or equal to 0.- Parameters:
topMargin- The margin to be applied at the top.rightMargin- The margin to be applied on the right side.bottomMargin- The margin to be applied at the bottom.leftMargin- The margin to be applied on the left side.
-
-
Method Details
-
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.
-