Class RegularShape
- All Implemented Interfaces:
Serializable
For more details see: RegularShape docs
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
MapObservableObject.ObjectChangeEvent
-
Field Summary
Fields inherited from class io.jmix.mapsflowui.kit.component.model.style.image.AbstractRegularShape
angle, fill, firstRadius, points, radius, secondRadius, stroke
Fields inherited from class io.jmix.mapsflowui.kit.component.model.style.image.ImageStyle
declutterMode, displacement, opacity, rotateWithView, rotation, scale, scaleSize
Fields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAngle()
getFill()
getScale()
protected String
getType()
void
Sets the shape's angle in radians.void
setDeclutterMode
(DeclutterMode declutterMode) Sets declutter mode.void
setDisplacement
(Displacement displacement) Sets the displacement of the shape in pixels.void
Sets fill object that describes which color should be used for filling shape.void
setFirstRadius
(Integer firstRadius) Sets first radius of a star.void
Sets the number of points for stars and regular polygons.void
Sets the radius of a regular polygon.void
setRotateWithView
(Boolean rotateWithView) Sets whether to rotate the shape with the map view.void
setRotation
(Double rotation) Sets the rotation in radians (positive rotation clockwise).void
Sets the scale.void
setScaleSize
(Size scaleSize) Sets the scale size.void
setSecondRadius
(Integer secondRadius) Sets the second radius of a star.void
Sets stroke style for regular shape.SeesetAngle(Double)
.withDeclutterMode
(DeclutterMode declutterMode) withDisplacement
(Displacement displacement) SeesetFill(Fill)
.withFirstRadius
(Integer firstRadius) withPoints
(Integer points) SeesetPoints(Integer)
.withRadius
(Integer radius) SeesetRadius(Integer)
.withRotateWithView
(Boolean rotateWithView) withRotation
(Double rotation) SeesetRotation(Double)
.SeesetScale(Double)
.withScaleSize
(Size scaleSize) SeesetScaleSize(Size)
.withSecondRadius
(Integer secondRadius) withStroke
(Stroke stroke) SeesetStroke(Stroke)
.Methods inherited from class io.jmix.mapsflowui.kit.component.model.style.image.ImageStyle
getOpacity, setOpacity
Methods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
addChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSyncId, hashCode, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMapObjectChangeListener, setMetaProperty, setParent, unmarkDirtyInDepth
-
Constructor Details
-
RegularShape
public RegularShape()
-
-
Method Details
-
getType
- Specified by:
getType
in classMapObservableObject
-
getFill
- Overrides:
getFill
in classAbstractRegularShape
- Returns:
- fill style or
null
if not set
-
setFill
Sets fill object that describes which color should be used for filling shape.For more details see: setFill() docs
- Overrides:
setFill
in classAbstractRegularShape
- Parameters:
fill
- fill to set
-
withFill
SeesetFill(Fill)
.- Parameters:
fill
- fill to set- Returns:
- current instance
-
getPoints
- Overrides:
getPoints
in classAbstractRegularShape
- Returns:
- the number of point or
null
if not set
-
setPoints
Sets the number of points for stars and regular polygons. In case of a polygon, the number of points is the number of sidesNote, points attribute is set only at creation time and cannot be changed at runtime.
For more details see: RegularShape docs
- Overrides:
setPoints
in classAbstractRegularShape
- Parameters:
points
- number of points
-
withPoints
SeesetPoints(Integer)
.- Parameters:
points
- number of points- Returns:
- current instance
-
getRadius
- Overrides:
getRadius
in classAbstractRegularShape
- Returns:
- radius of a regular polygon or
null
if not set
-
setRadius
Sets the radius of a regular polygon.Note, radius attribute is set only at creation time and cannot be changed at runtime.
For more details see: RegularShape docs
- Overrides:
setRadius
in classAbstractRegularShape
- Parameters:
radius
- radius value
-
withRadius
SeesetRadius(Integer)
.- Parameters:
radius
- radius value- Returns:
- current instance
-
getFirstRadius
- Overrides:
getFirstRadius
in classAbstractRegularShape
- Returns:
- first radius of a star or
null
if not set
-
setFirstRadius
Sets first radius of a star. Ignored ifsetRadius(Integer)
is set.Note, first radius attribute is set only at creation time and cannot be changed at runtime.
For more details see: RegularShape docs
- Overrides:
setFirstRadius
in classAbstractRegularShape
- Parameters:
firstRadius
- first radius value
-
withFirstRadius
- Parameters:
firstRadius
- first radius value- Returns:
- current instance
-
getSecondRadius
- Overrides:
getSecondRadius
in classAbstractRegularShape
- Returns:
- second radius of a star or
null
if not set
-
setSecondRadius
Sets the second radius of a star.Note, second radius attribute is set only at creation time and cannot be changed at runtime.
For more details see: RegularShape docs
- Overrides:
setSecondRadius
in classAbstractRegularShape
- Parameters:
secondRadius
- second radius value
-
withSecondRadius
- Parameters:
secondRadius
- second radius value- Returns:
- current instance
-
getAngle
- Overrides:
getAngle
in classAbstractRegularShape
- Returns:
- shape's angle in radians or
null
if not set
-
setAngle
Sets the shape's angle in radians. A value of0
will have one of the shape's points facing up.Note, angle attribute is set only at creation time and cannot be changed at runtime.
For more details see: RegularShape docs
- Overrides:
setAngle
in classAbstractRegularShape
- Parameters:
angle
- angle value in radians
-
withAngle
SeesetAngle(Double)
.- Parameters:
angle
- angle value in radians- Returns:
- current instance
-
getStroke
- Overrides:
getStroke
in classAbstractRegularShape
- Returns:
- stroke style or
null
if not set
-
setStroke
Sets stroke style for regular shape. It describes line styling: width, color, dash, etc.For more details see: setStroke() docs
- Overrides:
setStroke
in classAbstractRegularShape
- Parameters:
stroke
- stroke style
-
withStroke
SeesetStroke(Stroke)
.- Parameters:
stroke
- stroke style- Returns:
- current instance
-
getRotateWithView
- Overrides:
getRotateWithView
in classImageStyle
- Returns:
- whether the image should get rotated with the map view or
null
if not set
-
setRotateWithView
Sets whether to rotate the shape with the map view. Default value isfalse
.For more details see: setRotateWithView() docs
- Overrides:
setRotateWithView
in classImageStyle
- Parameters:
rotateWithView
- whether the styled image should be rotated
-
withRotateWithView
- Parameters:
rotateWithView
- whether the shape should be rotated- Returns:
- current instance
-
getRotation
- Overrides:
getRotation
in classImageStyle
- Returns:
- rotation value or
null
if not set
-
setRotation
Sets the rotation in radians (positive rotation clockwise). The default value is0
.For more details see: setRotation() docs
- Overrides:
setRotation
in classImageStyle
- Parameters:
rotation
- rotation value
-
withRotation
SeesetRotation(Double)
.- Parameters:
rotation
- rotation value- Returns:
- current instance
-
getScale
- Overrides:
getScale
in classImageStyle
- Returns:
- scale value or
null
if not set
-
setScale
Sets the scale. Unless two dimensional scaling is required a better result may be obtained with appropriate settings forsetRadius(Integer)
,setFirstRadius(Integer)
andsetSecondRadius(Integer)
. The default value is0
.For more details see: setScale() docs
- Overrides:
setScale
in classImageStyle
- Parameters:
scale
- scale value
-
withScale
SeesetScale(Double)
.- Parameters:
scale
- scale value- Returns:
- current instance
-
getScaleSize
- Overrides:
getScaleSize
in classImageStyle
- Returns:
- scale size or
null
if not set
-
setScaleSize
Sets the scale size. Note, it takes precedence over theImageStyle.setScale(Double)
.For more details see: setScale() docs
- Overrides:
setScaleSize
in classImageStyle
- Parameters:
scaleSize
- scale size
-
withScaleSize
SeesetScaleSize(Size)
.- Parameters:
scaleSize
- scale size- Returns:
- current instance
-
getDisplacement
- Overrides:
getDisplacement
in classImageStyle
- Returns:
- displacement value or
null
if not set
-
setDisplacement
Sets the displacement of the shape in pixels. Positive values will shift the icon right and up. The default value is[0, 0]
.For more details see: setDisplacement() docs
- Overrides:
setDisplacement
in classImageStyle
- Parameters:
displacement
- displacement value
-
withDisplacement
- Parameters:
displacement
- displacement value- Returns:
- current instance
-
getDeclutterMode
- Overrides:
getDeclutterMode
in classImageStyle
- Returns:
- declutter mode or
null
if not set
-
setDeclutterMode
Sets declutter mode.Note, declutter mode attribute is set only at creation time and cannot be changed at runtime.
For more details see: ImageStyle docs
- Overrides:
setDeclutterMode
in classImageStyle
- Parameters:
declutterMode
- declutter mode value
-
withDeclutterMode
- Parameters:
declutterMode
- declutter mode value- Returns:
- current instance
-