|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapContext
Store context information about a map display. This object is based on the OGC Web Map Context Specification.
Method Summary | |
---|---|
void |
addLayer(AbstractGridCoverage2DReader gridCoverage,
Style style)
Add a new layer and trigger a LayerListEvent |
void |
addLayer(java.util.Collection collection,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(org.opengis.coverage.grid.GridCoverage gridCoverage,
Style style)
Add a new layer and trigger a LayerListEvent |
boolean |
addLayer(int index,
MapLayer layer)
Add a new layer in the specified position and trigger a LayerListEvent . |
boolean |
addLayer(MapLayer layer)
Add a new layer if not already present and trigger a LayerListEvent . |
int |
addLayers(MapLayer[] layers)
Add an array of new layers and trigger a LayerListEvent . |
void |
addMapBoundsListener(MapBoundsListener listener)
Register interest in receiving MapBoundsEvent s. |
void |
addMapLayerListListener(MapLayerListListener listener)
Register interest in receiving a LayerListEvent . |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. |
void |
clearLayerList()
Clears the whole layer list. |
java.lang.String |
getAbstract()
Get the abstract which describes this interface, returns an empty string if this has not been set yet. |
ReferencedEnvelope |
getAreaOfInterest()
Gets the current area of interest. |
java.lang.String |
getContactInformation()
Get the contact information associated with this context, returns an empty string if contactInformation has not been set. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Get the current coordinate system. |
java.lang.String[] |
getKeywords()
Get an array of keywords associated with this context, returns an empty array if no keywords have been set. |
MapLayer |
getLayer(int index)
Return the requested layer. |
ReferencedEnvelope |
getLayerBounds()
Get the bounding box of all the layers in this MapContext. |
int |
getLayerCount()
Returns the number of layers in this map context |
MapLayer[] |
getLayers()
Return this model's list of layers. |
java.lang.String |
getTitle()
Get the title, returns an empty string if it has not been set yet. |
int |
indexOf(MapLayer layer)
Returns the index of the first occurrence of the specified layer, or -1 if this list does not contain this element. |
java.util.Iterator |
iterator()
Returns an iterator over the layers in this context in proper sequence. |
void |
moveLayer(int sourcePosition,
int destPosition)
Moves a layer from a position to another. |
MapLayer |
removeLayer(int index)
Remove a layer and trigger a LayerListEvent . |
boolean |
removeLayer(MapLayer layer)
Remove a layer, if present, and trigger a LayerListEvent . |
void |
removeLayers(MapLayer[] layers)
Remove an array of layers and trigger a LayerListEvent . |
void |
removeMapBoundsListener(MapBoundsListener listener)
Remove interest in receiving a BoundingBoxEvent s. |
void |
removeMapLayerListListener(MapLayerListListener listener)
Remove interest in receiving LayerListEvent . |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners. |
void |
setAbstract(java.lang.String conAbstract)
Set an abstract which describes this context. |
void |
setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest)
Deprecated. Use of this method is not safe. Please use setAreaOfInterest(Envelope, CoordinateReferenceSystem) instead. |
void |
setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Set the area of interest. |
void |
setAreaOfInterest(ReferencedEnvelope areaOfInterest)
Set the area of interest. |
void |
setContactInformation(java.lang.String contactInformation)
Set contact inforation associated with this class. |
void |
setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Set the CoordinateReferenceSystem for this map context. |
void |
setKeywords(java.lang.String[] keywords)
Set an array of keywords to associate with this context. |
void |
setTitle(java.lang.String title)
Set the title of this context. |
void |
transform(java.awt.geom.AffineTransform transform)
Transform the coordinates according to the provided transform. |
Method Detail |
---|
boolean addLayer(MapLayer layer)
LayerListEvent
.
layer
- the layer to be inserted
boolean addLayer(int index, MapLayer layer)
LayerListEvent
. Layer won't be added if it's already in the
list.
index
- index at which the layer will be insertedlayer
- the layer to be inserted
void addLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource, Style style)
LayerListEvent
.
featureSource
- a FeatureSourcevoid addLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection, Style style)
LayerListEvent
.
collection
- a FeatureCollectionvoid addLayer(java.util.Collection collection, Style style)
LayerListEvent
.
collection
- Collection with the new layer that will be added.void addLayer(org.opengis.coverage.grid.GridCoverage gridCoverage, Style style)
LayerListEvent
gridCoverage
- a GridCoverage with the new layer that will be added.void addLayer(AbstractGridCoverage2DReader gridCoverage, Style style)
LayerListEvent
gridCoverage
- an AbstractGridCoverage2DReader with the new layer that will be added.boolean removeLayer(MapLayer layer)
LayerListEvent
.
layer
- a MapLayer that will be added.
MapLayer removeLayer(int index)
LayerListEvent
.
index
- The index of the layer that it's going to be removed
int addLayers(MapLayer[] layers)
LayerListEvent
.
layers
- The new layers that are to be added.
void removeLayers(MapLayer[] layers)
LayerListEvent
.
layers
- The layers that are to be removed.void clearLayerList()
MapLayer[] getLayers()
MapLayer getLayer(int index) throws java.lang.IndexOutOfBoundsException
index
- index of layer to return.
java.lang.IndexOutOfBoundsException
- if the index is out of rangevoid moveLayer(int sourcePosition, int destPosition)
sourcePosition
- the layer current positiondestPosition
- the layer new positionjava.util.Iterator iterator()
int indexOf(MapLayer layer)
layer
- the MapLayer to search for
int getLayerCount()
ReferencedEnvelope getLayerBounds() throws java.io.IOException
java.io.IOException
- if an IOException occurs while accessing the FeatureSource
boundsvoid addMapLayerListListener(MapLayerListListener listener)
LayerListEvent
. A
LayerListEvent
is sent if a layer is added or removed, but
not if the data within a layer changes.
listener
- The object to notify when Layers have changed.void removeMapLayerListListener(MapLayerListListener listener)
LayerListEvent
.
listener
- The object to stop sending LayerListEvent
s.void setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest) throws java.lang.IllegalArgumentException
areaOfInterest
- the new area of interest
java.lang.IllegalArgumentException
- if the argument is null
void setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest, org.opengis.referencing.crs.CoordinateReferenceSystem crs) throws java.lang.IllegalArgumentException
areaOfInterest
- the new area of interestcoordinateReferenceSystem
- the CRS for the new area of interest
java.lang.IllegalArgumentException
- if either argument is null
void setAreaOfInterest(ReferencedEnvelope areaOfInterest) throws java.lang.IllegalArgumentException
areaOfInterest
- the new area of interest
java.lang.IllegalArgumentException
- if the provided areaOfInterest is null
or does not have a coordinate reference systemReferencedEnvelope getAreaOfInterest()
org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
void transform(java.awt.geom.AffineTransform transform)
transform
- The transform to change area of interest.void addMapBoundsListener(MapBoundsListener listener)
MapBoundsEvent
s.
listener
- The object to notify when the area of interest has changed.void removeMapBoundsListener(MapBoundsListener listener)
BoundingBoxEvent
s.
listener
- The object to stop sending change events.java.lang.String getAbstract()
void setAbstract(java.lang.String conAbstract)
conAbstract
- the Abstract.java.lang.String getContactInformation()
void setContactInformation(java.lang.String contactInformation)
contactInformation
- the ContactInformation.void setCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem crs) throws org.opengis.referencing.operation.TransformException, org.opengis.referencing.FactoryException
CoordinateReferenceSystem
for this map context.
crs
-
org.opengis.referencing.FactoryException
org.opengis.referencing.operation.TransformException
java.lang.String[] getKeywords()
void setKeywords(java.lang.String[] keywords)
keywords
- the Keywords.java.lang.String getTitle()
void setTitle(java.lang.String title)
title
- the title.void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to register.void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |