|
||||||||||
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.
modules/library/render (gt-render.jar)
Method Summary | |
---|---|
void |
addLayer(AbstractGridCoverage2DReader gridCoverage,
Style style)
Add a new layer and trigger a LayerListEvent |
void |
addLayer(Collection collection,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(FeatureCollection<SimpleFeatureType,SimpleFeature> collection,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(FeatureSource<SimpleFeatureType,SimpleFeature> featureSource,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(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(PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. |
void |
clearLayerList()
Clears the whole layer list. |
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. |
String |
getContactInformation()
Get the contact information associated with this context, returns an empty string if contactInformation has not been set. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Get the current coordinate system. |
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. |
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. |
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(PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners. |
void |
setAbstract(String conAbstract)
Set an abstract which describes this context. |
void |
setAreaOfInterest(Envelope areaOfInterest)
Deprecated. Use of this method is not safe. Please use setAreaOfInterest(Envelope, CoordinateReferenceSystem) instead. |
void |
setAreaOfInterest(Envelope areaOfInterest,
CoordinateReferenceSystem crs)
Set the area of interest. |
void |
setAreaOfInterest(ReferencedEnvelope areaOfInterest)
Set the area of interest. |
void |
setContactInformation(String contactInformation)
Set contact inforation associated with this class. |
void |
setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
Set the CoordinateReferenceSystem for this map context. |
void |
setKeywords(String[] keywords)
Set an array of keywords to associate with this context. |
void |
setTitle(String title)
Set the title of this context. |
void |
transform(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<SimpleFeatureType,SimpleFeature> featureSource, Style style)
LayerListEvent
.
featureSource
- a FeatureSourcevoid addLayer(FeatureCollection<SimpleFeatureType,SimpleFeature> collection, Style style)
LayerListEvent
.
collection
- a FeatureCollectionvoid addLayer(Collection collection, Style style)
LayerListEvent
.
collection
- Collection with the new layer that will be added.void addLayer(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 IndexOutOfBoundsException
index
- index of layer to return.
IndexOutOfBoundsException
- if the index is out of rangevoid moveLayer(int sourcePosition, int destPosition)
sourcePosition
- the layer current positiondestPosition
- the layer new positionIterator iterator()
int indexOf(MapLayer layer)
layer
- the MapLayer to search for
int getLayerCount()
ReferencedEnvelope getLayerBounds() throws IOException
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(Envelope areaOfInterest) throws IllegalArgumentException
areaOfInterest
- the new area of interest
IllegalArgumentException
- if the argument is null
void setAreaOfInterest(Envelope areaOfInterest, CoordinateReferenceSystem crs) throws IllegalArgumentException
areaOfInterest
- the new area of interestcoordinateReferenceSystem
- the CRS for the new area of interest
IllegalArgumentException
- if either argument is null
void setAreaOfInterest(ReferencedEnvelope areaOfInterest) throws IllegalArgumentException
areaOfInterest
- the new area of interest
IllegalArgumentException
- if the provided areaOfInterest is null
or does not have a coordinate reference systemReferencedEnvelope getAreaOfInterest()
CoordinateReferenceSystem getCoordinateReferenceSystem()
void transform(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.String getAbstract()
void setAbstract(String conAbstract)
conAbstract
- the Abstract.String getContactInformation()
void setContactInformation(String contactInformation)
contactInformation
- the ContactInformation.void setCoordinateReferenceSystem(CoordinateReferenceSystem crs) throws TransformException, FactoryException
CoordinateReferenceSystem
for this map context.
crs
-
FactoryException
TransformException
String[] getKeywords()
void setKeywords(String[] keywords)
keywords
- the Keywords.String getTitle()
void setTitle(String title)
title
- the title.void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to register.void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |