|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Store context information about a map display. This object is based on the OGC Web Map Context Specification.
Method Summary | |
void |
addLayer(FeatureCollection collection,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(FeatureSource 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. |
com.vividsolutions.jts.geom.Envelope |
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. |
com.vividsolutions.jts.geom.Envelope |
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)
Set a new area of interest and trigger an BoundingBoxEvent . |
void |
setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest,
org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
Set a new area of interest and trigger a BoundingBoxEvent . |
void |
setContactInformation(java.lang.String contactInformation)
Set contact inforation associated with this class. |
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 |
public boolean addLayer(MapLayer layer)
LayerListEvent
.
layer
- the layer to be inserted
public 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
public void addLayer(FeatureSource featureSource, Style style)
LayerListEvent
.
public void addLayer(FeatureCollection collection, Style style)
LayerListEvent
.
public void addLayer(org.opengis.coverage.grid.GridCoverage gridCoverage, Style style)
LayerListEvent
public boolean removeLayer(MapLayer layer)
LayerListEvent
.
public MapLayer removeLayer(int index)
LayerListEvent
.
index
- The index of the layer that it's going to be removed
public int addLayers(MapLayer[] layers)
LayerListEvent
.
layers
- The new layers that are to be added.
public void removeLayers(MapLayer[] layers)
LayerListEvent
.
layers
- The layers that are to be removed.public void clearLayerList()
public MapLayer[] getLayers()
public MapLayer getLayer(int index) throws java.lang.IndexOutOfBoundsException
index
- index of layer to return.
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic void moveLayer(int sourcePosition, int destPosition)
sourcePosition
- the layer current positiondestPosition
- the layer new positionpublic java.util.Iterator iterator()
public int indexOf(MapLayer layer)
public int getLayerCount()
public com.vividsolutions.jts.geom.Envelope getLayerBounds() throws java.io.IOException
java.io.IOException
- if an IOException occurs while accessing the FeatureSource boundspublic void 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.public void removeMapLayerListListener(MapLayerListListener listener)
LayerListEvent
.
listener
- The object to stop sending LayerListEvent
s.public void setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest, org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem) throws java.lang.IllegalArgumentException
BoundingBoxEvent
. Note that this is the
only method to change coordinate system. A setCoordinateReferenceSystem
method is not provided to ensure this class is not dependant on transform classes.
areaOfInterest
- The new areaOfInterest.
java.lang.IllegalArgumentException
- if an argument is null
.public void setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest)
BoundingBoxEvent
.
areaOfInterest
- The new area of interest.
java.lang.IllegalArgumentException
- if an argument is null
.public com.vividsolutions.jts.geom.Envelope getAreaOfInterest()
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
public void transform(java.awt.geom.AffineTransform transform)
transform
- The transform to change area of interest.public void addMapBoundsListener(MapBoundsListener listener)
MapBoundsEvent
s.
listener
- The object to notify when the area of interest has changed.public void removeMapBoundsListener(MapBoundsListener listener)
BoundingBoxEvent
s.
listener
- The object to stop sending change events.public java.lang.String getAbstract()
public void setAbstract(java.lang.String conAbstract)
conAbstract
- the Abstract.public java.lang.String getContactInformation()
public void setContactInformation(java.lang.String contactInformation)
contactInformation
- the ContactInformation.public java.lang.String[] getKeywords()
public void setKeywords(java.lang.String[] keywords)
keywords
- the Keywords.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the title.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to register.public 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 |