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
FieldsModifier and TypeFieldDescriptionprotected Fillprotected ImageStyleprotected Strokeprotected TextStyleprotected IntegerFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, removedChildren, syncId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFill()getImage()getText()protected StringgetType()voidSets fill object that describes which color should be used for filling feature.voidsetImage(ImageStyle image) Sets the image style.voidSets stroke style for feature.voidSets text style for feature.voidSets 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
nullif not set
-
setImage
Sets the image style. The image can contain an icon or can be an instance ofRegularShapeclass.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
nullif 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
nullif 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:
getTypein classMapObservableObject
-