public interface Layer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_NAME |
static java.lang.String |
PROPERTY_PROVIDERID |
static java.lang.String |
PROPERTY_SRID |
static java.lang.String |
PROPERTY_VISIBLE |
Modifier and Type | Method and Description |
---|---|
void |
added(java.lang.Object source)
The function called when the layer is added to either a MapCanvas or an EditSession (typically both, MapCanvas first, EditSession later)
|
void |
clear()
Clears all contents of this layer.
|
void |
fromXMLElement(org.w3c.dom.Element element)
Loads the content from an XML representation
|
MapCanvas |
getCanvas()
Gets the map canvas that this layer is displayed on.
|
java.awt.geom.Rectangle2D |
getDataMBR()
Gets the minimum bounding rectangle of all the data in this layer.
|
java.awt.geom.Rectangle2D |
getFullExtent() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getName()
Gets the name of the layer.
|
java.lang.String |
getProviderID()
Returns the provider ID
|
int |
getSRID()
Gets the SRID of the Layer, 0 if it doesn't have an associated SRID
|
boolean |
handleEvent(java.util.EventObject evt)
The main method that performs event handling for this tool.
|
java.util.List<GeoObject> |
hitTest(int x, int y, int granularity)
Performs a hit test for the given mouse location (x,y).
|
java.util.List<GeoObject> |
hitTest(java.awt.geom.Rectangle2D box, int granularity)
Performs a hit test for the given rectangle.
|
boolean |
isVisible()
Checks whether this layer is currently visible.
|
void |
mapRegionChanged(MapRegionEvent e)
When the associated canvas's map region is changed, this method is called to notify the layer of the change.
|
void |
removed(java.lang.Object source)
The function called when the layer is removed from either a MapCanvas or an EditSession (typically both, MapCanvas first, EditSession later)
|
long |
render(java.awt.Graphics2D g)
Renders the layer contents to the given Graphics.
|
void |
repaint()
Tells the layer to repaint itself immediately.
|
void |
setCanvas(MapCanvas parent)
Sets the map canvas on which this layer is displayed.
|
void |
setName(java.lang.String name)
Sets the name for this layer.
|
void |
setProviderID(java.lang.String providerID)
Sets the provider ID
|
void |
setSRID(int srid)
Sets the SRID of the Layer
|
void |
setVisible(boolean v)
Sets the visibility of this layer.
|
org.w3c.dom.Element |
toXMLElement()
Returns an XML representation of the layer
|
void |
update(long elapsedTime)
updates the contents data model or structure.
|
static final java.lang.String PROPERTY_NAME
static final java.lang.String PROPERTY_VISIBLE
static final java.lang.String PROPERTY_SRID
static final java.lang.String PROPERTY_PROVIDERID
java.lang.String getName()
void setName(java.lang.String name)
name
- the name of the layerboolean isVisible()
void setVisible(boolean v)
v
-void clear()
boolean handleEvent(java.util.EventObject evt)
evt
-void update(long elapsedTime)
elapsedTime
- The elapsed time since last update.long render(java.awt.Graphics2D g)
g
- the graphics objectjava.util.List<GeoObject> hitTest(int x, int y, int granularity)
x
- mouse location xy
- mouse location yjava.util.List<GeoObject> hitTest(java.awt.geom.Rectangle2D box, int granularity)
box
- the test rectangle, in device coordinatesvoid setCanvas(MapCanvas parent)
MapCanvas getCanvas()
void mapRegionChanged(MapRegionEvent e)
void repaint()
javax.swing.Icon getIcon()
int getSRID()
void setSRID(int srid)
java.awt.geom.Rectangle2D getDataMBR()
java.awt.geom.Rectangle2D getFullExtent()
void added(java.lang.Object source)
void removed(java.lang.Object source)
org.w3c.dom.Element toXMLElement()
void fromXMLElement(org.w3c.dom.Element element)
element
-java.lang.String getProviderID()
void setProviderID(java.lang.String providerID)
providerID
-