public class PointsLayer

  1. Object
  2. AbstractLayer
  3. 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

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

g Graphics
a Graphics Object to paint on
tile Tile
the screen tile

addPoint

public void addPoint(PointLayer point)
Adds a point to the PointsLayer

Parameters

point PointLayer
a point to add

removePoint

public void removePoint(PointLayer point)
Removes a point from the PointsLayer

Parameters

point PointLayer
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

l ActionListener
implementation of the action listener interface

removeActionListener

public void removeActionListener(ActionListener l)
Removes the given action listener Points Layer

Parameters

l ActionListener
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

box BoundingBox
the BoundingBox to trigger event.