Class Path
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.LeafletObject
org.vaadin.addons.componentfactory.leaflet.layer.Layer
org.vaadin.addons.componentfactory.leaflet.layer.InteractiveLayer
org.vaadin.addons.componentfactory.leaflet.layer.vectors.Path
- All Implemented Interfaces:
Serializable,Evented,SupportsMouseEvents,HasStyle,Identifiable,LayerPopupFunctions,LayerTooltipFunctions,ExecutableFunctions,PathFunctions
- Direct Known Subclasses:
CircleMarker,Polyline
An abstract class that contains options and constants shared between vector
overlays (Polygon, Polyline, Circle). Do not use it directly. Extends
InteractiveLayer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
Layer.LayerEventType -
Field Summary
Fields inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
DEFAULT_PANE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the custom class name set on the element.getColor()Gets the stroke color.Gets the stroke dash pattern.Gets the distance into the dash pattern to start the dash.Gets the fill color.doubleGets the fill opacity.Gets how the inside of a shape is determined.Gets the shape to be used at the end of the stroke.Gets the shape to be used at the corners of the stroke.doubleGets the stroke opacity.getStyle()Returns the current path style options applied to this layer.doubleGets the stroke width in pixels.booleanisFill()Whether to fill the path with color.booleanisStroke()Whether to draw stroke along the path.voidsetClassName(String className) Custom class name set on an element.voidStroke colorvoidsetDashArray(String dashArray) A string that defines the stroke dash pattern.voidsetDashOffset(String dashOffset) A string that defines the distance into the dash pattern to start the dash.voidsetFill(boolean fill) Whether to fill the path with color.voidsetFillColor(String fillColor) Fill color.voidsetFillOpacity(double fillOpacity) Fill opacity.voidsetFillRule(String fillRule) A string that defines how the inside of a shape is determined.voidsetLineCap(String lineCap) A string that defines shape to be used at the end of the stroke.voidsetLineJoin(String lineJoin) A string that defines shape to be used at the corners of the stroke.voidsetOpacity(double opacity) Stroke opacityvoidsetStroke(boolean stroke) Whether to draw stroke along the path.voidsetStyle(PathOptions pathOptions) Changes the appearance of this layer by applying the given path style options.voidsetWeight(double weight) Stroke width in pixelsMethods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.InteractiveLayer
isBubblingMouseEvents, isInteractive, setBubblingMouseEvents, setInteractiveMethods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
addEventListener, addTo, addTo, bindPopup, bindPopup, bindTooltip, bindTooltip, clearAllEventListeners, fireEvent, getAttribution, getEvents, getPane, getPopup, getTooltip, hasEventListeners, onAdd, onPopupClose, onPopupOpen, onRemove, onTooltipClose, onTooltipOpen, remove, removeEventListener, set, setAttribution, setPane, unbindPopup, unbindTooltipMethods inherited from class org.vaadin.addons.componentfactory.leaflet.LeafletObject
call, configureObjectMapper, executeJs, getConstructorArgumentNames, getJson, getLeafletType, getParent, getUuid, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.Evented
addEventListener, clearAllEventListeners, hasEventListeners, listens, off, off, on, removeEventListenerMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.map.functions.ExecutableFunctions
call, call, executeJs, executeJsMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.Identifiable
getUuidMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerPopupFunctions
closePopup, isPopupOpen, openPopup, openPopup, setPopupContent, setPopupContent, togglePopupMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerTooltipFunctions
closeTooltip, isTooltipOpen, openTooltip, openTooltip, setTooltipContent, setTooltipContent, toggleTooltipMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.vectors.PathFunctions
bringToBack, bringToFront, redrawMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.supports.SupportsMouseEvents
onClick, onContextMenuOpened, onDoubleClick, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp
-
Constructor Details
-
Path
public Path()
-
-
Method Details
-
isStroke
public boolean isStroke()Whether to draw stroke along the path.- Returns:
trueif the stroke is drawn along the path
-
setStroke
public void setStroke(boolean stroke) Whether to draw stroke along the path. Set it to false to disable borders on polygons or circles.- Parameters:
stroke- Set it to false to disable borders on polygons or circles.
-
getColor
Gets the stroke color.- Returns:
- the color of the stroke
-
setColor
Stroke color- Parameters:
color- the color of the stroke
-
getWeight
public double getWeight()Gets the stroke width in pixels.- Returns:
- the weight of the path
-
setWeight
public void setWeight(double weight) Stroke width in pixels- Parameters:
weight- the weight of the path
-
getOpacity
public double getOpacity()Gets the stroke opacity.- Returns:
- the opacity of the path
-
setOpacity
public void setOpacity(double opacity) Stroke opacity- Parameters:
opacity- the opacity of the path
-
getLineCap
Gets the shape to be used at the end of the stroke.- Returns:
- the shape used at the end of the stroke
-
setLineCap
A string that defines shape to be used at the end of the stroke.- Parameters:
lineCap- shape to be used at the end of the stroke
-
getLineJoin
Gets the shape to be used at the corners of the stroke.- Returns:
- the shape used at the corners of the stroke
-
setLineJoin
A string that defines shape to be used at the corners of the stroke.- Parameters:
lineJoin- shape to be used at the corners of the stroke
-
getDashArray
Gets the stroke dash pattern.- Returns:
- the string that defines the stroke dash pattern
-
setDashArray
A string that defines the stroke dash pattern. Doesn't work on Canvas-powered layers in some old browsers.- Parameters:
dashArray- efines the stroke dash pattern
-
getDashOffset
Gets the distance into the dash pattern to start the dash.- Returns:
- the string that defines the distance into the dash pattern to start the dash
-
setDashOffset
A string that defines the distance into the dash pattern to start the dash. Doesn't work on Canvas-powered layers in some old browsers.- Parameters:
dashOffset- defines the distance into the dash pattern to start the dash
-
isFill
public boolean isFill()Whether to fill the path with color.- Returns:
trueif the path is filled with color
-
setFill
public void setFill(boolean fill) Whether to fill the path with color. Set it to false to disable filling on polygons or circles.- Parameters:
fill- Set it to false to disable filling on polygons or circles
-
getFillColor
Gets the fill color.- Returns:
- the fill color of the path
-
setFillColor
Fill color. Defaults to the value of the color option- Parameters:
fillColor- the fill color of the path
-
getFillOpacity
public double getFillOpacity()Gets the fill opacity.- Returns:
- the fill opacity (0 between 1)
-
setFillOpacity
public void setFillOpacity(double fillOpacity) Fill opacity.- Parameters:
fillOpacity- the fill opacity (0 between 1)
-
getFillRule
Gets how the inside of a shape is determined.- Returns:
- the string that defines how the inside of a shape is determined
-
setFillRule
A string that defines how the inside of a shape is determined.- Parameters:
fillRule- the string that defines how the inside of a shape is determined
-
getClassName
Gets the custom class name set on the element.- Returns:
- the class name set on an element
-
setClassName
Custom class name set on an element. Only for SVG renderer.- Parameters:
className- the class name set on an element
-
getStyle
Returns the current path style options applied to this layer. -
setStyle
Changes the appearance of this layer by applying the given path style options.- Specified by:
setStylein interfaceHasStyle- Specified by:
setStylein interfacePathFunctions- Parameters:
pathOptions- the style options to apply
-