public class PointsLayer
- Object
- AbstractLayer
- PointsLayer
ImplementsActionSource, Layer
This is a Points Layer
Constructors
public PointsLayer() | Constructor with default projection Mercator. |
public PointsLayer(String name) | Constructor with default projection Mercator. |
public PointsLayer(Projection p, String name) | Constructor with custom projection and layer name. |
Methods
public void setPointIcon(Image icon) | Sets the Points icon |
public void paint(Graphics g, Tile tile) | Paints the Layer on the given Graphics |
public void addPoint(PointLayer point) | Adds a point to the PointsLayer |
public void removePoint(PointLayer point) | Removes a point from the PointsLayer |
public BoundingBox boundingBox() | The bounding box of this Layer |
public void addActionListener(ActionListener l) | Adds a listener to the Points Layer which will cause an event to dispatch on click the ActionEvent will contain the pressed PointLayer unprojected |
public void removeActionListener(ActionListener l) | Removes the given action listener Points Layer |
public void fireActionEvent(BoundingBox box) | Trigger an event for the points that in contained in the BoundingBox |
Inherited fields
From AbstractLayer
Inherited methods
Constructor details
PointsLayer
public PointsLayer()Constructor with default projection Mercator.
PointsLayer
public PointsLayer(String name)Constructor with default projection Mercator.
PointsLayer
public PointsLayer(Projection p, String name)Constructor with custom projection and layer name.
Method details
setPointIcon
public void setPointIcon(Image icon)Sets the Points icon
paint
public void paint(Graphics g, Tile tile)Paints the Layer on the given Graphics
Parameters
gGraphics- a Graphics Object to paint on
tileTile- the screen tile
addPoint
public void addPoint(PointLayer point)Adds a point to the PointsLayer
Parameters
pointPointLayer- a point to add
removePoint
public void removePoint(PointLayer point)Removes a point from the PointsLayer
Parameters
pointPointLayer- to remove from the PointsLayer
boundingBox
public BoundingBox boundingBox()The bounding box of this Layer
Returns
the Layer bounding box
addActionListener
public void addActionListener(ActionListener l)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
lActionListener- implementation of the action listener interface
removeActionListener
public void removeActionListener(ActionListener l)Removes the given action listener Points Layer
Parameters
lActionListener- implementation of the action listener interface
fireActionEvent
public void fireActionEvent(BoundingBox box)Trigger an event for the points that in contained in the BoundingBox
Parameters
boxBoundingBox- the BoundingBox to trigger event.