Package com.storedobject.chart
Class Polyline
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Shape
com.storedobject.chart.Polyline
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasPosition,VisibleProperty
- Direct Known Subclasses:
Polygon
Defines a polyline 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 TypeMethodDescriptionvoidadd(int index, Shape.Point... points) Add points.voidadd(int index, Collection<Shape.Point> points) Add points.voidadd(Shape.Point... points) Add points.voidadd(Collection<Shape.Point> points) Add points.voidEncode the JSON string with the properties of this.protected StringgetType()Get the type of this shape.voidremove(int index) Remove point at a specified index.voidremove(Shape.Point... points) Remove points.voidremove(Collection<Shape.Point> points) Remove points.voiduseBezierSmoothening(double smoothness, boolean clip) Use Bezier interpolation to smoothen the rendering.voidUse Catmull-Rom spline smoothening.voidSwitch off all smoothening.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
-
Polyline
-
-
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.
-
add
-
add
-
add
-
add
-
remove
public void remove(int index) Remove point at a specified index.- Parameters:
index- Index;
-
remove
-
remove
-
useNoSmoothening
public void useNoSmoothening()Switch off all smoothening. This is the default. -
useBezierSmoothening
public void useBezierSmoothening(double smoothness, boolean clip) Use Bezier interpolation to smoothen the rendering.- Parameters:
smoothness- A value between 0 and 1.clip- Whether to clip it if the rendering goes outside the bounding box or not.
-
useCatmullRomSmoothening
public void useCatmullRomSmoothening()Use Catmull-Rom spline smoothening.
-