Class Style
java.lang.Object
io.jmix.mapsflowui.kit.component.model.MapObservableObject
io.jmix.mapsflowui.kit.component.model.style.Style
- All Implemented Interfaces:
Serializable
Class for styling features.
Default style for point:
new Style() .withImage(new CircleStyle() .withRadius(5) .withFill(new Fill("rgba(255,255,255,0.4")) .withStroke(new Stroke() .withWidth(1.25) .withColor("#3399CC")));Default style for linestring:
new Style() .withStroke(new Stroke() .withWidth(1.25) .withColor("#3399CC"));Default style for polygon:
new Style() .withFill(new Fill("rgba(255,255,255,0.4)")) .withStroke(new Stroke() .withWidth(1.25) .withColor("#3399CC"));
For more details see: Style docs
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
MapObservableObject.ObjectChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected Fill
protected ImageStyle
protected Stroke
protected TextStyle
protected Integer
Fields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, removedChildren, syncId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFill()
getImage()
getText()
protected String
getType()
void
Sets fill object that describes which color should be used for filling feature.void
setImage
(ImageStyle image) Sets the image style.void
Sets stroke style for feature.void
Sets text style for feature.void
Sets Z-index to style.SeesetFill(Fill)
.withImage
(ImageStyle image) withStroke
(Stroke stroke) SeesetStroke(Stroke)
.SeesetText(TextStyle)
.withZIndex
(Integer zIndex) SeesetZIndex(Integer)
.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, unmarkDirtyInDepth
-
Field Details
-
fill
-
image
-
stroke
-
text
-
zIndex
-
-
Constructor Details
-
Style
public Style()
-
-
Method Details
-
getImage
- Returns:
- an image style or
null
if not set
-
setImage
Sets the image style. The image can contain an icon or can be an instance ofRegularShape
class.For more details see: setImage() docs
- Parameters:
image
- image to set
-
withImage
- Parameters:
image
- image to set- Returns:
- current instance
-
getFill
- Returns:
- fill style or
null
if not set
-
setFill
Sets fill object that describes which color should be used for filling feature.For more details see: setFill() docs
- Parameters:
fill
- fill to set
-
withFill
SeesetFill(Fill)
.- Parameters:
fill
- fill to set- Returns:
- current instance
-
getStroke
- Returns:
- stroke style or
null
if not set
-
setStroke
Sets stroke style for feature. It describes line styling: width, color, dash, etc.For more details see: setStroke() docs
- Parameters:
stroke
- stroke style
-
withStroke
SeesetStroke(Stroke)
.- Parameters:
stroke
- stroke style- Returns:
- current instance
-
getText
-
setText
Sets text style for feature. Text style describes how to display text.For more details see: setText() docs
- Parameters:
text
- text style
-
withText
SeesetText(TextStyle)
.- Parameters:
text
- text style- Returns:
- current instance
-
getzIndex
-
setZIndex
Sets Z-index to style. It is used to order styles added to the feature.For more details see: setZIndex() docs
- Parameters:
zIndex
- z-index to set
-
withZIndex
SeesetZIndex(Integer)
.- Parameters:
zIndex
- z-index to set- Returns:
- current instance
-
getType
- Specified by:
getType
in classMapObservableObject
-