public class GeoLayer
extends java.lang.Object
Constructor and Description |
---|
GeoLayer(java.lang.String layerName)
Create a new geographic layer.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(GeoShape shape)
Add a shape to this geographic layer
|
boolean |
addAll(java.util.Collection<GeoShape> shapeColl)
Add all of a collection of Geographic shapes to this layer
|
void |
clear()
Clear all shapes from this layer
|
void |
drawLayer(java.awt.Graphics2D g2)
Draw this layer into the graphics context
|
java.awt.Color |
getDrawColor()
Get the drawing color for this layer
|
java.awt.Color |
getFillColor()
Get the fill color for this layer
|
GeoBounds |
getGeoBounds()
Get the geographic bounds for this layer.
|
java.lang.String |
getName()
Get the name of this layer
|
int |
getPickRadius()
Get the radius used for picking shapes in this layer
|
RenderStyle |
getRenderStyle()
Get the rendering style for this GeoShape.
|
java.util.List<GeoShape> |
getShapes()
Get the list of shapes for this layer
|
boolean |
isEmpty()
Return whether this GeoLayer has geographic content.
|
boolean |
isPickable()
Return whether this layer is pickable.
|
GeoShape |
pickGeo(java.awt.geom.Point2D point)
Pick the shape at the specified geographic point.
|
void |
project(Projection proj)
Projects the geographic coordinates into the given projection
|
void |
setColors(java.awt.Color drawColor,
java.awt.Color fillColor)
Set the draw and fill colors for this layer
|
void |
setDrawColor(java.awt.Color color)
Set the draw color for this layer
|
void |
setFillColor(java.awt.Color color)
Set the fill color for this layer
|
void |
setMarkerShape(java.awt.Shape marker)
Set the marker shape for this layer
|
void |
setName(java.lang.String newName)
Set the name of this layer
|
void |
setPickable(boolean isPickable)
Set whether this layer is pickable
|
void |
setPickRadius(int radius)
Set the radius used for picking shapes in this layer.
|
void |
setRenderStyle(RenderStyle style)
Set the rendering style for this GeoShape.
|
java.lang.String |
toString()
Return a string representation of this geographic layer
|
public GeoLayer(java.lang.String layerName)
layerName
- the name of the geographic layerpublic boolean add(GeoShape shape)
shape
- the shape to addpublic boolean addAll(java.util.Collection<GeoShape> shapeColl)
shapeColl
- the collection of shapespublic void clear()
public void drawLayer(java.awt.Graphics2D g2)
g2
- the graphics context to draw intopublic java.awt.Color getDrawColor()
public java.awt.Color getFillColor()
public GeoBounds getGeoBounds()
public java.lang.String getName()
public int getPickRadius()
public RenderStyle getRenderStyle()
public java.util.List<GeoShape> getShapes()
public boolean isEmpty()
public boolean isPickable()
public GeoShape pickGeo(java.awt.geom.Point2D point)
point
- the point to query, in pixel coordinatespublic void project(Projection proj)
proj
- the Projection for the conversionpublic void setColors(java.awt.Color drawColor, java.awt.Color fillColor)
drawColor
- the draw colorfillColor
- the fill colorpublic void setDrawColor(java.awt.Color color)
color
- the draw colorpublic void setFillColor(java.awt.Color color)
color
- the fill colorpublic void setMarkerShape(java.awt.Shape marker)
marker
- the marker shapepublic void setName(java.lang.String newName)
newName
- the new layer namepublic void setPickable(boolean isPickable)
isPickable
- true if this layer is pickable, false otherwisepublic void setPickRadius(int radius)
radius
- the radius for pickingpublic void setRenderStyle(RenderStyle style)
style
- The rendering stylepublic java.lang.String toString()
toString
in class java.lang.Object