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, strokeFields inherited from class io.jmix.mapsflowui.kit.component.model.style.image.ImageStyle
declutterMode, displacement, opacity, rotateWithView, rotation, scale, scaleSizeFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, metaProperties, parent, removedChildren, syncId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAngle()getFill()getScale()protected StringgetType()voidSets the shape's angle in radians.voidsetDeclutterMode(DeclutterMode declutterMode) Sets declutter mode.voidsetDisplacement(Displacement displacement) Sets the displacement of the shape in pixels.voidSets fill object that describes which color should be used for filling shape.voidsetFirstRadius(Integer firstRadius) Sets first radius of a star.voidSets the number of points for stars and regular polygons.voidSets the radius of a regular polygon.voidsetRotateWithView(Boolean rotateWithView) Sets whether to rotate the shape with the map view.voidsetRotation(Double rotation) Sets the rotation in radians (positive rotation clockwise).voidSets the scale.voidsetScaleSize(Size scaleSize) Sets the scale size.voidsetSecondRadius(Integer secondRadius) Sets the second radius of a star.voidSets 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, setOpacityMethods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
addChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSuperParent, getSyncId, hashCode, isAttachedToMap, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMetaProperty, setParent, unmarkDirtyInDepth
-
Constructor Details
-
RegularShape
public RegularShape()
-
-
Method Details
-
getType
- Specified by:
getTypein classMapObservableObject
-
getFill
- Overrides:
getFillin classAbstractRegularShape- Returns:
- fill style or
nullif not set
-
setFill
Sets fill object that describes which color should be used for filling shape.For more details see: setFill() docs
- Overrides:
setFillin classAbstractRegularShape- Parameters:
fill- fill to set
-
withFill
SeesetFill(Fill).- Parameters:
fill- fill to set- Returns:
- current instance
-
getPoints
- Overrides:
getPointsin classAbstractRegularShape- Returns:
- the number of point or
nullif 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:
setPointsin classAbstractRegularShape- Parameters:
points- number of points
-
withPoints
SeesetPoints(Integer).- Parameters:
points- number of points- Returns:
- current instance
-
getRadius
- Overrides:
getRadiusin classAbstractRegularShape- Returns:
- radius of a regular polygon or
nullif 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:
setRadiusin classAbstractRegularShape- Parameters:
radius- radius value
-
withRadius
SeesetRadius(Integer).- Parameters:
radius- radius value- Returns:
- current instance
-
getFirstRadius
- Overrides:
getFirstRadiusin classAbstractRegularShape- Returns:
- first radius of a star or
nullif 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:
setFirstRadiusin classAbstractRegularShape- Parameters:
firstRadius- first radius value
-
withFirstRadius
- Parameters:
firstRadius- first radius value- Returns:
- current instance
-
getSecondRadius
- Overrides:
getSecondRadiusin classAbstractRegularShape- Returns:
- second radius of a star or
nullif 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:
setSecondRadiusin classAbstractRegularShape- Parameters:
secondRadius- second radius value
-
withSecondRadius
- Parameters:
secondRadius- second radius value- Returns:
- current instance
-
getAngle
- Overrides:
getAnglein classAbstractRegularShape- Returns:
- shape's angle in radians or
nullif not set
-
setAngle
Sets the shape's angle in radians. A value of0will 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:
setAnglein classAbstractRegularShape- Parameters:
angle- angle value in radians
-
withAngle
SeesetAngle(Double).- Parameters:
angle- angle value in radians- Returns:
- current instance
-
getStroke
- Overrides:
getStrokein classAbstractRegularShape- Returns:
- stroke style or
nullif not set
-
setStroke
Sets stroke style for regular shape. It describes line styling: width, color, dash, etc.For more details see: setStroke() docs
- Overrides:
setStrokein classAbstractRegularShape- Parameters:
stroke- stroke style
-
withStroke
SeesetStroke(Stroke).- Parameters:
stroke- stroke style- Returns:
- current instance
-
getRotateWithView
- Overrides:
getRotateWithViewin classImageStyle- Returns:
- whether the image should get rotated with the map view or
nullif not set
-
setRotateWithView
Sets whether to rotate the shape with the map view. Default value isfalse.For more details see: setRotateWithView() docs
- Overrides:
setRotateWithViewin classImageStyle- Parameters:
rotateWithView- whether the styled image should be rotated
-
withRotateWithView
- Parameters:
rotateWithView- whether the shape should be rotated- Returns:
- current instance
-
getRotation
- Overrides:
getRotationin classImageStyle- Returns:
- rotation value or
nullif not set
-
setRotation
Sets the rotation in radians (positive rotation clockwise). The default value is0.For more details see: setRotation() docs
- Overrides:
setRotationin classImageStyle- Parameters:
rotation- rotation value
-
withRotation
SeesetRotation(Double).- Parameters:
rotation- rotation value- Returns:
- current instance
-
getScale
- Overrides:
getScalein classImageStyle- Returns:
- scale value or
nullif 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:
setScalein classImageStyle- Parameters:
scale- scale value
-
withScale
SeesetScale(Double).- Parameters:
scale- scale value- Returns:
- current instance
-
getScaleSize
- Overrides:
getScaleSizein classImageStyle- Returns:
- scale size or
nullif not set
-
setScaleSize
Sets the scale size. Note, it takes precedence over theImageStyle.setScale(Double).For more details see: setScale() docs
- Overrides:
setScaleSizein classImageStyle- Parameters:
scaleSize- scale size
-
withScaleSize
SeesetScaleSize(Size).- Parameters:
scaleSize- scale size- Returns:
- current instance
-
getDisplacement
- Overrides:
getDisplacementin classImageStyle- Returns:
- displacement value or
nullif 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:
setDisplacementin classImageStyle- Parameters:
displacement- displacement value
-
withDisplacement
- Parameters:
displacement- displacement value- Returns:
- current instance
-
getDeclutterMode
- Overrides:
getDeclutterModein classImageStyle- Returns:
- declutter mode or
nullif 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:
setDeclutterModein classImageStyle- Parameters:
declutterMode- declutter mode value
-
withDeclutterMode
- Parameters:
declutterMode- declutter mode value- Returns:
- current instance
-