Class GoogleMapEdge
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.neotropic.flow.component.googlemap.GoogleMapPolyline
-
- com.neotropic.kuwaiba.modules.commercial.ospman.providers.google.GoogleMapEdge
-
- All Implemented Interfaces:
MapEdge
,com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,Serializable
public class GoogleMapEdge extends com.neotropic.flow.component.googlemap.GoogleMapPolyline implements MapEdge
An edge wrapper to Google Map Polyline- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GoogleMapEdge(BusinessObjectViewEdge viewEdge, MetadataEntityManager mem, TranslationService ts, MapProvider mapProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Adds a click event listener.void
addPathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Adds a path changed event listener.void
addRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Adds a right click event listener.void
computeLength(List<GeoCoordinate> controlPoints, Consumer<Double> consumerLength)
Computes edge length.boolean
getClickableEdge()
Gets if the edge can receives mouse events.String
getEdgeLabel()
Gets the edge label.void
getEdgeLabelPosition(Consumer<GeoCoordinate> consumerEdgeLabelPosition)
Gets the label position.boolean
getEdgeVisible()
If true, the edge is visible.boolean
getEditableEdge()
Gets if the edge can be edited.Double
getLength()
Gets the edge length.boolean
getPlayAnimation()
Gets if animation is played.BusinessObjectViewEdge
getViewEdge()
Gets the view edge.void
removeAllClickEventListeners()
Removes all click event listener.void
removeAllPathChangedEventListeners()
Removes all path changed event listener.void
removeAllRightClickEventListeners()
Removes all right click event listener.void
removeClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Removes a click event listener.void
removePathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Removes a path changed event listener.void
removeRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Removes a right click event listener.void
setClickableEdge(boolean clickable)
Sets if the edge can receives mouse events.void
setControlPoints(List<GeoCoordinate> controlPoints)
Sets the edge control points.void
setEdgeLabel(String label)
Sets the edge label.void
setEdgeVisible(boolean visible)
If true, the edge is visible.void
setEditableEdge(boolean editable)
Sets if the edge can be edited.void
setLength(Double length)
Sets the edge length.void
setPlayAnimation(boolean playAnimation)
Sets true to play animation.-
Methods inherited from class com.neotropic.flow.component.googlemap.GoogleMapPolyline
addPolylineClickListener, addPolylineDblClickListener, addPolylineMouseOutListener, addPolylineMouseOverListener, addPolylinePathChangedListener, addPolylineRightClickListener, addVertexRightClickListener, getClickable, getDraggable, getEditable, getLabel, getLabelAnimation, getLabelClassName, getLabelColor, getLabelFontSize, getLabelIconUrl, getLabelPosition, getPath, getPolylineVisible, getStrokeColor, getStrokeOpacity, getStrokeWeight, getZIndex, setClickable, setDraggable, setEditable, setLabel, setLabelAnimation, setLabelClassName, setLabelColor, setLabelFontSize, setLabelIconUrl, setPath, setPolylineVisible, setStrokeColor, setStrokeOpacity, setStrokeWeight, setZIndex
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
-
-
-
-
Constructor Detail
-
GoogleMapEdge
public GoogleMapEdge(BusinessObjectViewEdge viewEdge, MetadataEntityManager mem, TranslationService ts, MapProvider mapProvider)
-
-
Method Detail
-
getViewEdge
public BusinessObjectViewEdge getViewEdge()
Description copied from interface:MapEdge
Gets the view edge.- Specified by:
getViewEdge
in interfaceMapEdge
- Returns:
- the view edge.
-
getEdgeLabel
public String getEdgeLabel()
Description copied from interface:MapEdge
Gets the edge label.- Specified by:
getEdgeLabel
in interfaceMapEdge
- Returns:
- Edge label.
-
setEdgeLabel
public void setEdgeLabel(String label)
Description copied from interface:MapEdge
Sets the edge label.- Specified by:
setEdgeLabel
in interfaceMapEdge
- Parameters:
label
- Edge label.
-
setControlPoints
public void setControlPoints(List<GeoCoordinate> controlPoints)
Description copied from interface:MapEdge
Sets the edge control points.- Specified by:
setControlPoints
in interfaceMapEdge
- Parameters:
controlPoints
- The edge control points.
-
getClickableEdge
public boolean getClickableEdge()
Description copied from interface:MapEdge
Gets if the edge can receives mouse events.- Specified by:
getClickableEdge
in interfaceMapEdge
- Returns:
- If true, the edge can receives mouse events.
-
setClickableEdge
public void setClickableEdge(boolean clickable)
Description copied from interface:MapEdge
Sets if the edge can receives mouse events.- Specified by:
setClickableEdge
in interfaceMapEdge
- Parameters:
clickable
- True to receives mouse events.
-
getEditableEdge
public boolean getEditableEdge()
Description copied from interface:MapEdge
Gets if the edge can be edited.- Specified by:
getEditableEdge
in interfaceMapEdge
- Returns:
- If true, the edge can be edited.
-
setEditableEdge
public void setEditableEdge(boolean editable)
Description copied from interface:MapEdge
Sets if the edge can be edited.- Specified by:
setEditableEdge
in interfaceMapEdge
- Parameters:
editable
- True to edit the edge.
-
getPlayAnimation
public boolean getPlayAnimation()
Description copied from interface:MapEdge
Gets if animation is played.- Specified by:
getPlayAnimation
in interfaceMapEdge
- Returns:
- If animation is played.
-
setPlayAnimation
public void setPlayAnimation(boolean playAnimation)
Description copied from interface:MapEdge
Sets true to play animation.- Specified by:
setPlayAnimation
in interfaceMapEdge
- Parameters:
playAnimation
- True to play animation.
-
getEdgeLabelPosition
public void getEdgeLabelPosition(Consumer<GeoCoordinate> consumerEdgeLabelPosition)
Description copied from interface:MapEdge
Gets the label position.- Specified by:
getEdgeLabelPosition
in interfaceMapEdge
-
getEdgeVisible
public boolean getEdgeVisible()
Description copied from interface:MapEdge
If true, the edge is visible.- Specified by:
getEdgeVisible
in interfaceMapEdge
- Returns:
- If true, the edge is visible.
-
setEdgeVisible
public void setEdgeVisible(boolean visible)
Description copied from interface:MapEdge
If true, the edge is visible.- Specified by:
setEdgeVisible
in interfaceMapEdge
- Parameters:
visible
- If true, the edge is visible.
-
getLength
public Double getLength()
Description copied from interface:MapEdge
Gets the edge length.
-
setLength
public void setLength(Double length)
Description copied from interface:MapEdge
Sets the edge length.
-
computeLength
public void computeLength(List<GeoCoordinate> controlPoints, Consumer<Double> consumerLength)
Description copied from interface:MapEdge
Computes edge length.- Specified by:
computeLength
in interfaceMapEdge
- Parameters:
controlPoints
- Set of control points.consumerLength
- Accepted on compute length end.
-
addClickEventListener
public void addClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapEdge
Adds a click event listener.- Specified by:
addClickEventListener
in interfaceMapEdge
- Parameters:
clickEventListener
- Callback executed on edge click.
-
removeClickEventListener
public void removeClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapEdge
Removes a click event listener.- Specified by:
removeClickEventListener
in interfaceMapEdge
- Parameters:
clickEventListener
- Callback executed on edge click.
-
removeAllClickEventListeners
public void removeAllClickEventListeners()
Description copied from interface:MapEdge
Removes all click event listener.- Specified by:
removeAllClickEventListeners
in interfaceMapEdge
-
addRightClickEventListener
public void addRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapEdge
Adds a right click event listener.- Specified by:
addRightClickEventListener
in interfaceMapEdge
- Parameters:
rightClickEventListener
- Callback executed on edge right click.
-
removeRightClickEventListener
public void removeRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapEdge
Removes a right click event listener.- Specified by:
removeRightClickEventListener
in interfaceMapEdge
- Parameters:
rightClickEventListener
- Callback executed on edge right click.
-
removeAllRightClickEventListeners
public void removeAllRightClickEventListeners()
Description copied from interface:MapEdge
Removes all right click event listener.- Specified by:
removeAllRightClickEventListeners
in interfaceMapEdge
-
addPathChangedEventListener
public void addPathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Description copied from interface:MapEdge
Adds a path changed event listener.- Specified by:
addPathChangedEventListener
in interfaceMapEdge
- Parameters:
pathChangedEventListener
- Callback executed on edge path changed.
-
removePathChangedEventListener
public void removePathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Description copied from interface:MapEdge
Removes a path changed event listener.- Specified by:
removePathChangedEventListener
in interfaceMapEdge
- Parameters:
pathChangedEventListener
- Callback executed on edge path changed.
-
removeAllPathChangedEventListeners
public void removeAllPathChangedEventListeners()
Description copied from interface:MapEdge
Removes all path changed event listener.- Specified by:
removeAllPathChangedEventListeners
in interfaceMapEdge
-
-