Class FeatureNode
- java.lang.Object
-
- com.neotropic.flow.component.olmap.Feature
-
- com.neotropic.kuwaiba.modules.commercial.ospman.providers.ol.FeatureNode
-
- All Implemented Interfaces:
com.neotropic.flow.component.olmap.OlMapType<elemental.json.JsonObject>
,ClickEventDispatcher
,EventDispatcher
,ModifyEndEventDispatcher
,RightClickEventDispatcher
,MapNode
public class FeatureNode extends com.neotropic.flow.component.olmap.Feature implements MapNode, ClickEventDispatcher, RightClickEventDispatcher, ModifyEndEventDispatcher
A node wrapper to features with geometry of type point. 1/7- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description FeatureNode(BusinessObjectViewNode viewNode, com.neotropic.flow.component.olmap.VectorSource vectorSource, ResourceFactory resourceFactory, String styleTextBackgroundFillColor, String styleTextFillColor, String selectedStyleTextBackgroundFillColor, String styleTextFontSize, double styleTextMinZoom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Adds a click event listener.void
addPositionChangedEventListener(PositionChangedEvent.PositionChangedEventListener positionChangedEventListener)
Adds position changed event listener.void
addRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Adds a right click event listener.void
fireClickEvent()
Dispatches the click event.void
fireModifyEndEvent(elemental.json.JsonObject feature)
Dispatches the modify end event.void
fireRightClickEvent()
Dispatches the right click event.boolean
getClickableNode()
Gets if the node can receives mouse events.boolean
getDraggableNode()
Gets if the node can be dragged.String
getNodeLabel()
Gets the node label.String
getNodeTitle()
Gets the node title.boolean
getNodeVisible()
If true, the node is visible.boolean
getPlayAnimation()
Gets if animation is played.BusinessObjectViewNode
getViewNode()
Gets the view node.void
removeAllClickEventListeners()
Removes all click event listener.void
removeAllPositionChangedEventListeners()
Removes all position changed event listeners.void
removeAllRightClickEventListeners()
Removes all right click event listener.void
removeClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Removes a click event listener.void
removePositionChangedEventListener(PositionChangedEvent.PositionChangedEventListener positionChangedEventListener)
Removes position changed event listener.void
removeRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Removes a right click event listener.void
setClickableNode(boolean clickable)
Sets if the node can receives mouse events.void
setDraggableNode(boolean draggable)
Sets if the node can be dragged.void
setNodeLabel(String label)
Sets the node label.void
setNodeTitle(String title)
Sets the node title.void
setNodeVisible(boolean visible)
If true, the node is visible.void
setPlayAnimation(boolean playAnimation)
Sets true to play animation.void
setPosition(GeoCoordinate position)
Sets the node position.
-
-
-
Constructor Detail
-
FeatureNode
public FeatureNode(BusinessObjectViewNode viewNode, com.neotropic.flow.component.olmap.VectorSource vectorSource, ResourceFactory resourceFactory, String styleTextBackgroundFillColor, String styleTextFillColor, String selectedStyleTextBackgroundFillColor, String styleTextFontSize, double styleTextMinZoom)
-
-
Method Detail
-
getViewNode
public BusinessObjectViewNode getViewNode()
Description copied from interface:MapNode
Gets the view node.- Specified by:
getViewNode
in interfaceMapNode
- Returns:
- the view node.
-
setPosition
public void setPosition(GeoCoordinate position)
Description copied from interface:MapNode
Sets the node position.- Specified by:
setPosition
in interfaceMapNode
- Parameters:
position
- Node position.
-
getNodeLabel
public String getNodeLabel()
Description copied from interface:MapNode
Gets the node label.- Specified by:
getNodeLabel
in interfaceMapNode
- Returns:
- Node label.
-
setNodeLabel
public void setNodeLabel(String label)
Description copied from interface:MapNode
Sets the node label.- Specified by:
setNodeLabel
in interfaceMapNode
- Parameters:
label
- Node label.
-
getNodeTitle
public String getNodeTitle()
Description copied from interface:MapNode
Gets the node title.- Specified by:
getNodeTitle
in interfaceMapNode
- Returns:
- Node title.
-
setNodeTitle
public void setNodeTitle(String title)
Description copied from interface:MapNode
Sets the node title.- Specified by:
setNodeTitle
in interfaceMapNode
- Parameters:
title
- Node title.
-
getClickableNode
public boolean getClickableNode()
Description copied from interface:MapNode
Gets if the node can receives mouse events.- Specified by:
getClickableNode
in interfaceMapNode
- Returns:
- If true, the node can receives mouse events.
-
setClickableNode
public void setClickableNode(boolean clickable)
Description copied from interface:MapNode
Sets if the node can receives mouse events.- Specified by:
setClickableNode
in interfaceMapNode
- Parameters:
clickable
- True to receives mouse events.
-
getDraggableNode
public boolean getDraggableNode()
Description copied from interface:MapNode
Gets if the node can be dragged.- Specified by:
getDraggableNode
in interfaceMapNode
- Returns:
- If true, the node can be dragged.
-
setDraggableNode
public void setDraggableNode(boolean draggable)
Description copied from interface:MapNode
Sets if the node can be dragged.- Specified by:
setDraggableNode
in interfaceMapNode
- Parameters:
draggable
- True to drag the node.
-
getPlayAnimation
public boolean getPlayAnimation()
Description copied from interface:MapNode
Gets if animation is played.- Specified by:
getPlayAnimation
in interfaceMapNode
- Returns:
- If animation is played.
-
setPlayAnimation
public void setPlayAnimation(boolean playAnimation)
Description copied from interface:MapNode
Sets true to play animation.- Specified by:
setPlayAnimation
in interfaceMapNode
- Parameters:
playAnimation
- True to play animation.
-
getNodeVisible
public boolean getNodeVisible()
Description copied from interface:MapNode
If true, the node is visible.- Specified by:
getNodeVisible
in interfaceMapNode
- Returns:
- If true, the node is visible.
-
setNodeVisible
public void setNodeVisible(boolean visible)
Description copied from interface:MapNode
If true, the node is visible.- Specified by:
setNodeVisible
in interfaceMapNode
- Parameters:
visible
- If true, the node is visible.
-
addClickEventListener
public void addClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapNode
Adds a click event listener.- Specified by:
addClickEventListener
in interfaceMapNode
- Parameters:
clickEventListener
- Callback executed on node click.
-
removeClickEventListener
public void removeClickEventListener(ClickEvent.ClickEventListener clickEventListener)
Description copied from interface:MapNode
Removes a click event listener.- Specified by:
removeClickEventListener
in interfaceMapNode
- Parameters:
clickEventListener
- Callback executed on node click.
-
removeAllClickEventListeners
public void removeAllClickEventListeners()
Description copied from interface:MapNode
Removes all click event listener.- Specified by:
removeAllClickEventListeners
in interfaceMapNode
-
addRightClickEventListener
public void addRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapNode
Adds a right click event listener.- Specified by:
addRightClickEventListener
in interfaceMapNode
- Parameters:
rightClickEventListener
- Callback executed on node right click.
-
removeRightClickEventListener
public void removeRightClickEventListener(RightClickEvent.RightClickEventListener rightClickEventListener)
Description copied from interface:MapNode
Removes a right click event listener.- Specified by:
removeRightClickEventListener
in interfaceMapNode
- Parameters:
rightClickEventListener
- Callback executed on node right click.
-
removeAllRightClickEventListeners
public void removeAllRightClickEventListeners()
Description copied from interface:MapNode
Removes all right click event listener.- Specified by:
removeAllRightClickEventListeners
in interfaceMapNode
-
addPositionChangedEventListener
public void addPositionChangedEventListener(PositionChangedEvent.PositionChangedEventListener positionChangedEventListener)
Description copied from interface:MapNode
Adds position changed event listener.- Specified by:
addPositionChangedEventListener
in interfaceMapNode
- Parameters:
positionChangedEventListener
- Callback executed on node position changed.
-
removePositionChangedEventListener
public void removePositionChangedEventListener(PositionChangedEvent.PositionChangedEventListener positionChangedEventListener)
Description copied from interface:MapNode
Removes position changed event listener.- Specified by:
removePositionChangedEventListener
in interfaceMapNode
- Parameters:
positionChangedEventListener
- Callback executed on node position changed.
-
removeAllPositionChangedEventListeners
public void removeAllPositionChangedEventListeners()
Description copied from interface:MapNode
Removes all position changed event listeners.- Specified by:
removeAllPositionChangedEventListeners
in interfaceMapNode
-
fireClickEvent
public void fireClickEvent()
Description copied from interface:ClickEventDispatcher
Dispatches the click event.- Specified by:
fireClickEvent
in interfaceClickEventDispatcher
-
fireRightClickEvent
public void fireRightClickEvent()
Description copied from interface:RightClickEventDispatcher
Dispatches the right click event.- Specified by:
fireRightClickEvent
in interfaceRightClickEventDispatcher
-
fireModifyEndEvent
public void fireModifyEndEvent(elemental.json.JsonObject feature)
Description copied from interface:ModifyEndEventDispatcher
Dispatches the modify end event.- Specified by:
fireModifyEndEvent
in interfaceModifyEndEventDispatcher
-
-