Class PointsLayer
java.lang.Object
com.codename1.maps.layers.AbstractLayer
com.codename1.maps.layers.PointsLayer
- All Implemented Interfaces:
Layer, ActionSource
This is a Points Layer
-
Field Summary
Fields inherited from class AbstractLayer
name, projection -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with default projection Mercator.PointsLayer(Projection p, String name) PointsLayer(String name) Constructor with default projection Mercator. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to the Points Layer which will cause an event to dispatch on click the ActionEvent will contain the pressed PointLayer unprojectedvoidaddPoint(PointLayer point) Adds a point to the PointsLayerThe bounding box of this LayervoidTrigger an event for the points that in contained in the BoundingBoxvoidPaints the Layer on the given GraphicsvoidRemoves the given action listener Points LayervoidremovePoint(PointLayer point) Removes a point from the PointsLayervoidsetPointIcon(Image icon) Sets the Points iconMethods inherited from class AbstractLayer
getName, getProjection
-
Constructor Details
-
PointsLayer
public PointsLayer()Constructor with default projection Mercator. -
PointsLayer
Constructor with default projection Mercator. -
PointsLayer
-
-
Method Details
-
setPointIcon
Sets the Points icon
Parameters
icon
-
paint
-
addPoint
Adds a point to the PointsLayer
Parameters
point: a point to add
-
removePoint
Removes a point from the PointsLayer
Parameters
point: to remove from the PointsLayer
-
boundingBox
The bounding box of this Layer
Returns
the Layer bounding box
- Specified by:
boundingBoxin interfaceLayer- Specified by:
boundingBoxin classAbstractLayer
-
addActionListener
Adds a listener to the Points Layer which will cause an event to dispatch on click the ActionEvent will contain the pressed PointLayer unprojected
Parameters
l: implementation of the action listener interface
- Specified by:
addActionListenerin interfaceActionSource
-
removeActionListener
Removes the given action listener Points Layer
Parameters
l: implementation of the action listener interface
- Specified by:
removeActionListenerin interfaceActionSource
-
fireActionEvent
Trigger an event for the points that in contained in the BoundingBox
Parameters
box: the BoundingBox to trigger event.
-