Class FeatureEdge
- java.lang.Object
-
- com.neotropic.flow.component.olmap.Feature
-
- com.neotropic.kuwaiba.modules.commercial.ospman.providers.ol.FeatureEdge
-
- All Implemented Interfaces:
com.neotropic.flow.component.olmap.OlMapType<elemental.json.JsonObject>,ClickEventDispatcher,EventDispatcher,ModifyEndEventDispatcher,RightClickEventDispatcher,MapEdge
public class FeatureEdge extends com.neotropic.flow.component.olmap.Feature implements MapEdge, ClickEventDispatcher, RightClickEventDispatcher, ModifyEndEventDispatcher
A edge wrapper to features with geometry of type LineString- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description FeatureEdge(BusinessObjectViewEdge viewEdge, MapProvider mapProvider, com.neotropic.flow.component.olmap.VectorSource vectorSource, MetadataEntityManager mem, TranslationService ts, String textBackgroundFillColor, String styleTextFillColor, String selectedStyleTextBackgroundFillColor, String styleTextFontSize, double styleTextMinZoom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClickEventListener(ClickEvent.ClickEventListener clickEventListener)Adds a click event listener.voidaddPathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)Adds a path changed event listener.voidaddRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)Adds a right click event listener.voidcomputeLength(List<GeoCoordinate> controlPoints, Consumer<Double> consumerLength)Computes edge length.voidfireClickEvent()Dispatches the click event.voidfireModifyEndEvent(elemental.json.JsonObject feature)Dispatches the modify end event.voidfireRightClickEvent()Dispatches the right click event.booleangetClickableEdge()Gets if the edge can receives mouse events.StringgetColor()StringgetEdgeLabel()Gets the edge label.voidgetEdgeLabelPosition(Consumer<GeoCoordinate> consumerEdgeLabelPosition)Gets the label position.booleangetEdgeVisible()If true, the edge is visible.booleangetEditableEdge()Gets if the edge can be edited.DoublegetLength()Gets the edge length.booleangetPlayAnimation()Gets if animation is played.com.neotropic.flow.component.olmap.style.StrokegetStroke()BusinessObjectViewEdgegetViewEdge()Gets the view edge.voidremoveAllClickEventListeners()Removes all click event listener.voidremoveAllPathChangedEventListeners()Removes all path changed event listener.voidremoveAllRightClickEventListeners()Removes all right click event listener.voidremoveClickEventListener(ClickEvent.ClickEventListener clickEventListener)Removes a click event listener.voidremovePathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)Removes a path changed event listener.voidremoveRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)Removes a right click event listener.voidsetClickableEdge(boolean clickable)Sets if the edge can receives mouse events.voidsetControlPoints(List<GeoCoordinate> controlPoints)Sets the edge control points.voidsetEdgeLabel(String label)Sets the edge label.voidsetEdgeVisible(boolean visible)If true, the edge is visible.voidsetEditableEdge(boolean editable)Sets if the edge can be edited.voidsetLength(Double length)Sets the edge length.voidsetPlayAnimation(boolean playAnimation)Sets true to play animation.
-
-
-
Constructor Detail
-
FeatureEdge
public FeatureEdge(BusinessObjectViewEdge viewEdge, MapProvider mapProvider, com.neotropic.flow.component.olmap.VectorSource vectorSource, MetadataEntityManager mem, TranslationService ts, String textBackgroundFillColor, String styleTextFillColor, String selectedStyleTextBackgroundFillColor, String styleTextFontSize, double styleTextMinZoom)
-
-
Method Detail
-
getColor
public String getColor()
-
getStroke
public com.neotropic.flow.component.olmap.style.Stroke getStroke()
-
getViewEdge
public BusinessObjectViewEdge getViewEdge()
Description copied from interface:MapEdgeGets the view edge.- Specified by:
getViewEdgein interfaceMapEdge- Returns:
- the view edge.
-
getEdgeLabel
public String getEdgeLabel()
Description copied from interface:MapEdgeGets the edge label.- Specified by:
getEdgeLabelin interfaceMapEdge- Returns:
- Edge label.
-
setEdgeLabel
public void setEdgeLabel(String label)
Description copied from interface:MapEdgeSets the edge label.- Specified by:
setEdgeLabelin interfaceMapEdge- Parameters:
label- Edge label.
-
setControlPoints
public void setControlPoints(List<GeoCoordinate> controlPoints)
Description copied from interface:MapEdgeSets the edge control points.- Specified by:
setControlPointsin interfaceMapEdge- Parameters:
controlPoints- The edge control points.
-
getClickableEdge
public boolean getClickableEdge()
Description copied from interface:MapEdgeGets if the edge can receives mouse events.- Specified by:
getClickableEdgein interfaceMapEdge- Returns:
- If true, the edge can receives mouse events.
-
setClickableEdge
public void setClickableEdge(boolean clickable)
Description copied from interface:MapEdgeSets if the edge can receives mouse events.- Specified by:
setClickableEdgein interfaceMapEdge- Parameters:
clickable- True to receives mouse events.
-
getEditableEdge
public boolean getEditableEdge()
Description copied from interface:MapEdgeGets if the edge can be edited.- Specified by:
getEditableEdgein interfaceMapEdge- Returns:
- If true, the edge can be edited.
-
setEditableEdge
public void setEditableEdge(boolean editable)
Description copied from interface:MapEdgeSets if the edge can be edited.- Specified by:
setEditableEdgein interfaceMapEdge- Parameters:
editable- True to edit the edge.
-
getPlayAnimation
public boolean getPlayAnimation()
Description copied from interface:MapEdgeGets if animation is played.- Specified by:
getPlayAnimationin interfaceMapEdge- Returns:
- If animation is played.
-
setPlayAnimation
public void setPlayAnimation(boolean playAnimation)
Description copied from interface:MapEdgeSets true to play animation.- Specified by:
setPlayAnimationin interfaceMapEdge- Parameters:
playAnimation- True to play animation.
-
getEdgeLabelPosition
public void getEdgeLabelPosition(Consumer<GeoCoordinate> consumerEdgeLabelPosition)
Description copied from interface:MapEdgeGets the label position.- Specified by:
getEdgeLabelPositionin interfaceMapEdge
-
getEdgeVisible
public boolean getEdgeVisible()
Description copied from interface:MapEdgeIf true, the edge is visible.- Specified by:
getEdgeVisiblein interfaceMapEdge- Returns:
- If true, the edge is visible.
-
setEdgeVisible
public void setEdgeVisible(boolean visible)
Description copied from interface:MapEdgeIf true, the edge is visible.- Specified by:
setEdgeVisiblein interfaceMapEdge- Parameters:
visible- If true, the edge is visible.
-
getLength
public Double getLength()
Description copied from interface:MapEdgeGets the edge length.
-
setLength
public void setLength(Double length)
Description copied from interface:MapEdgeSets the edge length.
-
computeLength
public void computeLength(List<GeoCoordinate> controlPoints, Consumer<Double> consumerLength)
Description copied from interface:MapEdgeComputes edge length.- Specified by:
computeLengthin interfaceMapEdge- Parameters:
controlPoints- Set of control points.consumerLength- Accepted on compute length end.
-
addClickEventListener
public void addClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapEdgeAdds a click event listener.- Specified by:
addClickEventListenerin interfaceMapEdge- Parameters:
clickEventListener- Callback executed on edge click.
-
removeClickEventListener
public void removeClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapEdgeRemoves a click event listener.- Specified by:
removeClickEventListenerin interfaceMapEdge- Parameters:
clickEventListener- Callback executed on edge click.
-
removeAllClickEventListeners
public void removeAllClickEventListeners()
Description copied from interface:MapEdgeRemoves all click event listener.- Specified by:
removeAllClickEventListenersin interfaceMapEdge
-
addRightClickEventListener
public void addRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapEdgeAdds a right click event listener.- Specified by:
addRightClickEventListenerin interfaceMapEdge- Parameters:
rightClickEventListener- Callback executed on edge right click.
-
removeRightClickEventListener
public void removeRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapEdgeRemoves a right click event listener.- Specified by:
removeRightClickEventListenerin interfaceMapEdge- Parameters:
rightClickEventListener- Callback executed on edge right click.
-
removeAllRightClickEventListeners
public void removeAllRightClickEventListeners()
Description copied from interface:MapEdgeRemoves all right click event listener.- Specified by:
removeAllRightClickEventListenersin interfaceMapEdge
-
addPathChangedEventListener
public void addPathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Description copied from interface:MapEdgeAdds a path changed event listener.- Specified by:
addPathChangedEventListenerin interfaceMapEdge- Parameters:
pathChangedEventListener- Callback executed on edge path changed.
-
removePathChangedEventListener
public void removePathChangedEventListener(PathChangedEvent.PathChangedEventListener pathChangedEventListener)
Description copied from interface:MapEdgeRemoves a path changed event listener.- Specified by:
removePathChangedEventListenerin interfaceMapEdge- Parameters:
pathChangedEventListener- Callback executed on edge path changed.
-
removeAllPathChangedEventListeners
public void removeAllPathChangedEventListeners()
Description copied from interface:MapEdgeRemoves all path changed event listener.- Specified by:
removeAllPathChangedEventListenersin interfaceMapEdge
-
fireClickEvent
public void fireClickEvent()
Description copied from interface:ClickEventDispatcherDispatches the click event.- Specified by:
fireClickEventin interfaceClickEventDispatcher
-
fireRightClickEvent
public void fireRightClickEvent()
Description copied from interface:RightClickEventDispatcherDispatches the right click event.- Specified by:
fireRightClickEventin interfaceRightClickEventDispatcher
-
fireModifyEndEvent
public void fireModifyEndEvent(elemental.json.JsonObject feature)
Description copied from interface:ModifyEndEventDispatcherDispatches the modify end event.- Specified by:
fireModifyEndEventin interfaceModifyEndEventDispatcher
-
-