Package io.jmix.mapsui.component
Interface CanvasLayer.Polygon
- All Superinterfaces:
CanvasLayer.Geometry
- Enclosing interface:
- CanvasLayer
A wrapper class encapsulating
Polygon
on the canvas.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An event that is fired after click on the polygon.static class
An event that is fired after modifying the polygon via UI.static class
An event that is fired after right click on the polygon. -
Method Summary
Modifier and TypeMethodDescriptionRegisters a new polygon click listener.Registers a new polygon modified listener.Registers a new polygon right click listener.org.locationtech.jts.geom.Polygon
Returns a JTS polygon.setEditable
(boolean editable) Sets whether the geometry is to be modifiable on a canvas.setPopupContent
(String popupContent) Adds a popup window to be opened as user clicks on the polygon.setPopupOptions
(PopupWindowOptions options) Specifies options for a popup window added bysetPopupContent(String)
.setStyle
(PolygonStyle style) Applies a style to the polygon.setTooltipContent
(String tooltipContent) Adds a tooltip to be opened as user hovers on the polygon.setTooltipOptions
(TooltipOptions options) Specifies options for a tooltip added bysetTooltipContent(String)
.Methods inherited from interface io.jmix.mapsui.component.CanvasLayer.Geometry
closePopup, closeTooltip, isEditable, openPopup, openTooltip
-
Method Details
-
getGeometry
org.locationtech.jts.geom.Polygon getGeometry()Returns a JTS polygon.- Specified by:
getGeometry
in interfaceCanvasLayer.Geometry
-
setStyle
Applies a style to the polygon.- Parameters:
style
- polygon style- Returns:
- current polygon. Useful for a fluent API.
-
setPopupContent
Adds a popup window to be opened as user clicks on the polygon.- Parameters:
popupContent
- content of the popup window- Returns:
- current polygon. Useful for a fluent API.
-
setPopupOptions
Specifies options for a popup window added bysetPopupContent(String)
.- Parameters:
options
- popup window options- Returns:
- current polygon. Useful for a fluent API.
-
setTooltipContent
Adds a tooltip to be opened as user hovers on the polygon.- Parameters:
tooltipContent
- content of the tooltip box- Returns:
- current polygon. Useful for a fluent API.
-
setTooltipOptions
Specifies options for a tooltip added bysetTooltipContent(String)
.- Parameters:
options
- tooltip options- Returns:
- current polygon. Useful for a fluent API.
-
setEditable
Description copied from interface:CanvasLayer.Geometry
Sets whether the geometry is to be modifiable on a canvas.- Specified by:
setEditable
in interfaceCanvasLayer.Geometry
-
addClickListener
Registers a new polygon click listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addRightClickListener
Registers a new polygon right click listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addModifiedListener
Registers a new polygon modified listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-