Package com.storedobject.chart
Class Rectangle
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Shape
com.storedobject.chart.Rectangle
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasPosition,VisibleProperty
- Direct Known Subclasses:
Square
Rectangular shape class that can be added to
SOChart.- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Shape
Shape.Point, Shape.Style -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.final Number[]Get border radius.final NumberGet height.protected final StringgetType()Get the type of this shape.final NumbergetWidth()Get width.final NumbergetX()Get X value of the top-left corner.final NumbergetY()Get Y value of the top-left corner.voidsetBorderRadius(Number... borderRadius) Set border radius.voidSeth height.voidSet width.voidSet X value of the top-left corner.voidSet Y value of the top-left corner.Methods inherited from class com.storedobject.chart.Shape
encode, encodePoint, encodePoint, encodeShape, getPosition, getStyle, isDraggable, isVisible, setDraggable, setPosition, setPosition, setPosition, setStyle, setVisible, validateMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getName, getSerial, getZ, hashCode, hasId, setSerial, setZMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getName, getRenderingIndex, getSerial, setName, setRenderingIndex, setSerialMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
Rectangle
-
-
Method Details
-
getType
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classShape- Parameters:
sb- Encoded JSON string to be appended to this.
-
getX
-
setX
-
getY
-
setY
-
getWidth
-
setWidth
-
getHeight
-
setHeight
-
getBorderRadius
-
setBorderRadius
Set border radius. This may be provided in one of the following ways:
[] or null => No borders [1] => [1, 1, 1, 1] [1, 2] => [1, 2, 1, 2] [1, 2, 3] => [1, 2, 3, 2] [1, 2, 3, 4] => [1, 2, 3, 4]- Parameters:
borderRadius- Border radius [top-left radius, top-right radius, bottom-right radius, bottom-left radius]
-