Class IconStyle
- All Implemented Interfaces:
- Serializable
For more details see: Icon docs
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectMapObservableObject.ObjectChangeEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Anchorprotected IconOriginprotected IconAnchorUnitsprotected IconAnchorUnitsprotected Stringprotected Stringprotected Integerprotected Offsetprotected IconOriginprotected com.vaadin.flow.server.StreamResourceprotected Sizeprotected Stringprotected IntegerFields inherited from class io.jmix.mapsflowui.kit.component.model.style.image.ImageStyledeclutterMode, displacement, opacity, rotateWithView, rotation, scale, scaleSizeFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectchildren, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetColor()com.vaadin.flow.server.StreamResourcegetScale()getSize()getSrc()protected StringgetType()getWidth()voidSets the icon anchor.voidsetAnchorOrigin(IconOrigin anchorOrigin) Sets the origin of the anchor.voidsetAnchorXUnits(IconAnchorUnits anchorXUnits) Sets units in which the anchor X value is specified.voidsetAnchorYUnits(IconAnchorUnits anchorYUnits) Sets units in which the anchor Y value is specified.voidSets the color to tint the icon.voidsetCrossOrigin(String crossOrigin) Sets the cross-origin attribute for loaded images.voidsetDeclutterMode(DeclutterMode declutterMode) Sets declutter mode.voidsetDisplacement(Displacement displacement) Sets the displacement of the icon in pixels.voidSets the height of the icon in pixels.voidSets offset which, together withsetSize(Size)andsetOffsetOrigin(IconOrigin), defines the sub-rectangle to use from the original (sprite) image.voidsetOffsetOrigin(IconOrigin offsetOrigin) Sets the origin of the offset.voidsetOpacity(Double opacity) Sets the opacity.voidsetResource(com.vaadin.flow.server.StreamResource resource) Sets stream resource.voidsetRotateWithView(Boolean rotateWithView) Sets whether the styled image should be rotated with the map view rotation.voidsetRotation(Double rotation) Sets the rotation value.voidSets the scale.voidsetScaleSize(Size scaleSize) Sets the scale size.voidSets the icon size in pixels.voidSets the image source URI.voidSets the width of the icon in pixels.withAnchor(Anchor anchor) SeesetAnchor(Anchor).withAnchorOrigin(IconOrigin anchorOrigin) withAnchorXUnits(IconAnchorUnits anchorXUnits) withAnchorYUnits(IconAnchorUnits anchorYUnits) SeesetColor(String).withCrossOrigin(String crossOrigin) withDeclutterMode(DeclutterMode declutterMode) withDisplacement(Displacement displacement) withHeight(Integer height) SeesetHeight(Integer).withOffset(Offset offset) SeesetOffset(Offset).withOffsetOrigin(IconOrigin offsetOrigin) withOpacity(Double opacity) withResource(com.vaadin.flow.server.StreamResource resource) withRotateWithView(Boolean rotateWithView) withRotation(Double rotation) SeesetRotation(Double).SeesetScale(Double).withScaleSize(Size scaleSize) SeesetScaleSize(Size).SeesetSize(Size).SeesetSrc(String).SeesetWidth(Integer).Methods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObjectaddChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSyncId, hashCode, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMapObjectChangeListener, setMetaProperty, setParent, unmarkDirtyInDepth
- 
Field Details- 
anchor
- 
anchorOrigin
- 
anchorXUnits
- 
anchorYUnits
- 
color
- 
crossOrigin
- 
resourceprotected com.vaadin.flow.server.StreamResource resource
- 
width
- 
height
- 
offset
- 
offsetOrigin
- 
size
- 
src
 
- 
- 
Constructor Details- 
IconStylepublic IconStyle()
 
- 
- 
Method Details- 
getType- Specified by:
- getTypein class- MapObservableObject
 
- 
getAnchor- Returns:
- anchor value or nullif not set
 
- 
setAnchorSets the icon anchor. The default value is the icon center ([0.5, 0,5]).For more details see: setAnchor() docs - Parameters:
- anchor- anchor value
 
- 
withAnchorSeesetAnchor(Anchor).- Parameters:
- anchor- anchor value
- Returns:
- current instance
 
- 
getAnchorOrigin
- 
setAnchorOriginSets the origin of the anchor.Note, anchor origin attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- anchorOrigin- origin of the anchor
 
- 
withAnchorOrigin- Parameters:
- anchorOrigin- origin of the anchor
- Returns:
- current instance
 
- 
getAnchorXUnits- Returns:
- units or nullif not set
 
- 
setAnchorXUnitsSets units in which the anchor X value is specified. A value ofIconAnchorUnits.FRACTIONindicates the X value is a fraction of the icon. A value ofIconAnchorUnits.PIXELSindicates the X value in pixels. The default value isIconAnchorUnits.FRACTION.Note, anchor X units attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- anchorXUnits- units to set
 
- 
withAnchorXUnits- Parameters:
- anchorXUnits- units to set
- Returns:
- current instance
 
- 
getAnchorYUnits- Returns:
- units or nullif not set
 
- 
setAnchorYUnitsSets units in which the anchor Y value is specified. A value ofIconAnchorUnits.FRACTIONindicates the Y value is a fraction of the icon. A value ofIconAnchorUnits.PIXELSindicates the Y value in pixels. The default value isIconAnchorUnits.FRACTION.Note, anchor Y units attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- anchorYUnits- units to set
 
- 
withAnchorYUnits- Parameters:
- anchorYUnits- units to set
- Returns:
- current instance
 
- 
getColor- Returns:
- color of the icon or nullif not set
 
- 
setColorSets the color to tint the icon. If not specified, the icon will be left as is.Note, color attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- color- color to set
 
- 
withColorSeesetColor(String).- Parameters:
- color- color to set
- Returns:
- current instance
 
- 
getCrossOrigin- Returns:
- cross-origin value or nullif not set
 
- 
setCrossOriginSets the cross-origin attribute for loaded images.Note, cross-origin attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- crossOrigin- cross-origin value
 
- 
withCrossOrigin- Parameters:
- crossOrigin- cross-origin value
- Returns:
- current instance
 
- 
getResourcepublic com.vaadin.flow.server.StreamResource getResource()- Returns:
- stream resource or nullif not set
 
- 
setResourcepublic void setResource(com.vaadin.flow.server.StreamResource resource) Sets stream resource. It takes precedence over thesetSrc(String).Note, resource attribute is set only at creation time and cannot be changed at runtime. - Parameters:
- resource- stream resource
 
- 
withResource- Parameters:
- resource- stream resource
- Returns:
- current instance
 
- 
getWidth- Returns:
- width value in pixels or nullif not set
 
- 
setWidthSets the width of the icon in pixels. Width can't be used together withsetScale(Double)orsetScaleSize(Size).Note, width attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- width- width of the icon
 
- 
withWidthSeesetWidth(Integer).- Parameters:
- width- width of the icon
- Returns:
- current instance
 
- 
getHeight- Returns:
- height value in pixels or nullif not set
 
- 
setHeightSets the height of the icon in pixels. Height can't be used together withsetScale(Double)orsetScaleSize(Size).Note, height attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- height- height of the icon
 
- 
withHeightSeesetHeight(Integer).- Parameters:
- height- height of the icon
- Returns:
- current instance
 
- 
getOffset- Returns:
- offset value or nullif not set
 
- 
setOffsetSets offset which, together withsetSize(Size)andsetOffsetOrigin(IconOrigin), defines the sub-rectangle to use from the original (sprite) image. The default value is[0, 0].Note, offset attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- offset- offset value
 
- 
withOffsetSeesetOffset(Offset).- Parameters:
- offset- offset value
- Returns:
- current instance
 
- 
getOffsetOrigin- Returns:
- origin of the offset or nullif not set
 
- 
setOffsetOriginSets the origin of the offset. The default value isIconOrigin.TOP_LEFT.Note, offset origin attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- offsetOrigin- origin of the offset
 
- 
withOffsetOrigin- Parameters:
- offsetOrigin- origin of the offset
- Returns:
- current instance
 
- 
getSize- Returns:
- icon size in pixels or nullif not set
 
- 
setSizeSets the icon size in pixels. Used together withsetOffset(Offset)to define the sub-rectangle to use from the original (sprite) image.Note, size attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- size- icon size in pixels
 
- 
withSizeSeesetSize(Size).- Parameters:
- size- icon size in pixels
- Returns:
- current instance
 
- 
getSrc- Returns:
- source URI or nullif not set
 
- 
setSrcSets the image source URI. Note, ifsetResource(StreamResource)is defined, it will take precedence over src attribute.Note, src attribute is set only at creation time and cannot be changed at runtime. For more details see: Icon docs - Parameters:
- src- source URI
 
- 
withSrcSeesetSrc(String).- Parameters:
- src- source URI
- Returns:
- current instance
 
- 
getOpacity- Overrides:
- getOpacityin class- ImageStyle
- Returns:
- opacity or nullif not set
 
- 
setOpacitySets the opacity.For more details see: setOpacity() docs - Overrides:
- setOpacityin class- ImageStyle
- Parameters:
- opacity- opacity to set
 
- 
withOpacity- Parameters:
- opacity- opacity to set
- Returns:
- current instance
 
- 
getRotateWithView- Overrides:
- getRotateWithViewin class- ImageStyle
- Returns:
- whether the image should get rotated with the map view or nullif not set
 
- 
setRotateWithViewSets whether the styled image should be rotated with the map view rotation.For more details see: setRotateWithView() docs Default value is false. For more details see: setRotateWithView() docs- Overrides:
- setRotateWithViewin class- ImageStyle
- Parameters:
- rotateWithView- whether the styled image should be rotated
 
- 
withRotateWithView- Parameters:
- rotateWithView-
- Returns:
- current instance
 
- 
getRotation- Overrides:
- getRotationin class- ImageStyle
- Returns:
- rotation value or nullif not set
 
- 
setRotationSets the rotation value.For more details see: setRotation() docs The default value is 0.For more details see: setRotateWithView() docs - Overrides:
- setRotationin class- ImageStyle
- Parameters:
- rotation- rotation value
 
- 
withRotationSeesetRotation(Double).- Parameters:
- rotation- rotation value
- Returns:
- current instance
 
- 
getScale- Overrides:
- getScalein class- ImageStyle
- Returns:
- scale value or nullif not set
 
- 
setScaleSets the scale. Note, ifsetScaleSize(Size)is set, it will take precedence over the scale. The default value is1.For more details see: setScale() docs - Overrides:
- setScalein class- ImageStyle
- Parameters:
- scale- scale value
 
- 
withScaleSeesetScale(Double).- Parameters:
- scale- scale value
- Returns:
- current instance
 
- 
getScaleSize- Overrides:
- getScaleSizein class- ImageStyle
- Returns:
- scale size or nullif not set
 
- 
setScaleSizeSets the scale size. Note, it takes precedence over theImageStyle.setScale(Double).For more details see: setScale() docs - Overrides:
- setScaleSizein class- ImageStyle
- Parameters:
- scaleSize- scale size
 
- 
withScaleSizeSeesetScaleSize(Size).- Parameters:
- scaleSize- scale size
- Returns:
- current instance
 
- 
getDisplacement- Overrides:
- getDisplacementin class- ImageStyle
- Returns:
- displacement value or nullif not set
 
- 
setDisplacementSets the displacement of the icon 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 class- ImageStyle
- Parameters:
- displacement- displacement value
 
- 
withDisplacement- Parameters:
- displacement- displacement value
- Returns:
- current instance
 
- 
getDeclutterMode- Overrides:
- getDeclutterModein class- ImageStyle
- Returns:
- declutter mode or nullif not set
 
- 
setDeclutterModeSets 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 class- ImageStyle
- Parameters:
- declutterMode- declutter mode value
 
- 
withDeclutterMode- Parameters:
- declutterMode- declutter mode value
- Returns:
- current instance
 
 
-