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) Constructor with custom projection and layer 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, getProjectionModifier and TypeMethodDescriptiongetName()Gets the name of this LayerThe projection of this LayerMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
Constructor Details
-
PointsLayer
public PointsLayer()Constructor with default projection Mercator. -
PointsLayer
Constructor with default projection Mercator. -
PointsLayer
Constructor with custom projection and layer name.
-
-
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.
-