Package com.storedobject.svg
Class AbstractRectangle<R extends AbstractRectangle<R>>
java.lang.Object
com.storedobject.svg.Node<R>
com.storedobject.svg.Element<R>
com.storedobject.svg.AbstractRectangle<R>
- Type Parameters:
R- Type of the rectangle.
- All Implemented Interfaces:
At<R>,Serializable
public abstract class AbstractRectangle<R extends AbstractRectangle<R>>
extends Element<R>
implements At<R>
Represents an abstract SVG rectangle.
- Author:
- Syam
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringRetrieves a string representation of the node's attributes.doubleGet the height.doublegetWidth()Get the width.doublegetX()Retrieves the X coordinate.doublegetY()Retrieves the Y coordinate.height(double h) Set the height.width(double w) Set the width.x(double x) Set the X coordinate.y(double y) Set the Y coordinate.Methods inherited from class com.storedobject.svg.Node
compute, copy, createDocument, equals, escapeXml, extraContent, flipHorizontally, flipHorizontallyAroundOrigin, flipVertically, flipVerticallyAroundOrigin, getCoordinates, getId, getMargin, getSvg, hashCode, id, ID, IDValue, innerContent, moveTo, moveTo, rotate, rotateAround, rotateAround, rotateAroundCenter, scale, scale, scaleHeightTo, scaleTo, scaleWidthTo, toString, toString, transform, translate, translate
-
Constructor Details
-
AbstractRectangle
public AbstractRectangle(double x, double y, double w, double h) Constructor.- Parameters:
x- Top-left X coordinate.y- Top-left Y coordinate.w- Width.h- Height.
-
-
Method Details
-
getWidth
public double getWidth()Get the width.- Returns:
- Width.
-
getHeight
public double getHeight()Get the height.- Returns:
- Height.
-
getX
-
getY
-
x
-
y
-
width
-
height
-
attributes
Description copied from class:NodeRetrieves a string representation of the node's attributes. This method is typically overridden by subclasses to provide specific attributes corresponding to the node's state or properties. By default, this method returns null if no attributes are defined.- Overrides:
attributesin classNode<R extends AbstractRectangle<R>>- Returns:
- A string representing the attributes of the node, or null if no attributes are defined.
-