|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultMapContext
public class DefaultMapContext
The default implementation of the MapContext interface
Field Summary | |
---|---|
protected String |
abstracts
Holds value of property abstracts. |
protected String |
contactInformation
Holds value of property contactInformation. |
protected String[] |
keywords
Holds value of property keywords. |
protected MapLayerListener |
layerListener
|
protected EventListenerList |
listenerList
Utility field used by event firing mechanism. |
static Logger |
LOGGER
The logger for the map module. |
protected PropertyChangeSupport |
propertyChangeSupport
Utility field used by bound properties. |
protected String |
title
Holds value of property title. |
Constructor Summary | |
---|---|
DefaultMapContext()
Deprecated. |
|
DefaultMapContext(CoordinateReferenceSystem crs)
Creates a default empty map context |
|
DefaultMapContext(MapLayer[] layers)
Deprecated. |
|
DefaultMapContext(MapLayer[] layers,
CoordinateReferenceSystem crs)
Creates a map context with the provided layers and title |
|
DefaultMapContext(MapLayer[] layers,
String title,
String contextAbstract,
String contactInformation,
String[] keywords)
Deprecated. |
|
DefaultMapContext(MapLayer[] layers,
String title,
String contextAbstract,
String contactInformation,
String[] keywords,
CoordinateReferenceSystem crs)
Creates a map context |
Method Summary | |
---|---|
void |
addLayer(AbstractGridCoverage2DReader reader,
Style style)
Add a new layer and trigger a LayerListEvent . |
void |
addLayer(CollectionSource source,
Style style)
|
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 gc,
Style style)
Add a new layer and trigger a LayerListEvent . |
boolean |
addLayer(int index,
MapLayer layer)
Add a new layer if not already present and trigger a LayerListEvent . |
boolean |
addLayer(MapLayer layer)
Add a new layer and trigger a LayerListEvent . |
int |
addLayers(MapLayer[] layers)
Add an array of new layers and trigger a LayerListEvent . |
void |
addMapBoundsListener(MapBoundsListener listener)
Registers MapBoundsListener to receive events. |
void |
addMapLayerListListener(MapLayerListListener listener)
Registers MapLayerListListener to receive events. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. |
void |
clearLayerList()
DOCUMENT ME! |
String |
getAbstract()
Getter for property abstracts. |
ReferencedEnvelope |
getAreaOfInterest()
Gets the current area of interest. |
String |
getContactInformation()
Getter for property contactInformation. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Get the current coordinate system. |
String[] |
getKeywords()
Getter for property keywords. |
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()
Getter for property title. |
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)
DOCUMENT ME! |
MapLayer |
removeLayer(int index)
DOCUMENT ME! |
boolean |
removeLayer(MapLayer layer)
Remove a layer and trigger a LayerListEvent . |
void |
removeLayers(MapLayer[] layers)
Remove an array of layers and trigger a LayerListEvent . |
void |
removeMapBoundsListener(MapBoundsListener listener)
Removes MapBoundsListener from the list of listeners. |
void |
removeMapLayerListListener(MapLayerListListener listener)
Removes MapLayerListListener from the list of listeners. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners. |
void |
setAbstract(String abstractValue)
Setter for property abstracts. |
void |
setAreaOfInterest(Envelope areaOfInterest)
Deprecated. |
void |
setAreaOfInterest(Envelope areaOfInterest,
CoordinateReferenceSystem coordinateReferenceSystem)
Set a new area of interest and trigger a BoundingBoxEvent . |
void |
setAreaOfInterest(ReferencedEnvelope areaOfInterest)
Set a new area of interest and trigger an BoundingBoxEvent . |
void |
setContactInformation(String contactInformation)
Setter for property contactInformation. |
void |
setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
Set the CoordinateReferenceSystem for this map context. |
void |
setKeywords(String[] keywords)
Setter for property keywords. |
void |
setTitle(String title)
Setter for property title. |
void |
transform(AffineTransform transform)
Transform the coordinates according to the provided transform. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Logger LOGGER
protected EventListenerList listenerList
protected MapLayerListener layerListener
protected String abstracts
protected PropertyChangeSupport propertyChangeSupport
protected String contactInformation
protected String[] keywords
protected String title
Constructor Detail |
---|
public DefaultMapContext()
public DefaultMapContext(CoordinateReferenceSystem crs)
public DefaultMapContext(MapLayer[] layers)
layers
- DOCUMENT ME!public DefaultMapContext(MapLayer[] layers, CoordinateReferenceSystem crs)
layers
- DOCUMENT ME!public DefaultMapContext(MapLayer[] layers, String title, String contextAbstract, String contactInformation, String[] keywords)
layers
- DOCUMENT ME!title
- DOCUMENT ME!contextAbstract
- DOCUMENT ME!contactInformation
- DOCUMENT ME!keywords
- DOCUMENT ME!public DefaultMapContext(MapLayer[] layers, String title, String contextAbstract, String contactInformation, String[] keywords, CoordinateReferenceSystem crs)
layers
- DOCUMENT ME!title
- DOCUMENT ME!contextAbstract
- DOCUMENT ME!contactInformation
- DOCUMENT ME!keywords
- DOCUMENT ME!Method Detail |
---|
public boolean addLayer(int index, MapLayer layer)
LayerListEvent
.
addLayer
in interface MapContext
index
- DOCUMENT ME!layer
- Then new layer that has been added.
public boolean addLayer(MapLayer layer)
LayerListEvent
.
addLayer
in interface MapContext
layer
- Then new layer that has been added.
public void addLayer(FeatureSource<SimpleFeatureType,SimpleFeature> featureSource, Style style)
LayerListEvent
.
addLayer
in interface MapContext
featureSource
- Then new layer that has been added.style
- DOCUMENT ME!public void addLayer(CollectionSource source, Style style)
public void addLayer(GridCoverage gc, Style style)
LayerListEvent
.
addLayer
in interface MapContext
gc
- Then new layer that has been added.style
- DOCUMENT ME!public void addLayer(AbstractGridCoverage2DReader reader, Style style)
LayerListEvent
.
addLayer
in interface MapContext
reader
- a reader with the new layer to be added.style
- DOCUMENT ME!public void addLayer(FeatureCollection<SimpleFeatureType,SimpleFeature> collection, Style style)
LayerListEvent
.
addLayer
in interface MapContext
collection
- Then new layer that has been added.style
- DOCUMENT ME!public void addLayer(Collection collection, Style style)
MapContext
LayerListEvent
.
addLayer
in interface MapContext
collection
- Collection with the new layer that will be added.public boolean removeLayer(MapLayer layer)
LayerListEvent
.
removeLayer
in interface MapContext
layer
- Then new layer that has been removed.
public MapLayer removeLayer(int index)
removeLayer
in interface MapContext
index
- DOCUMENT ME!
public int addLayers(MapLayer[] layers)
LayerListEvent
.
addLayers
in interface MapContext
layers
- The new layers that are to be added.
public void removeLayers(MapLayer[] layers)
LayerListEvent
.
removeLayers
in interface MapContext
layers
- The layers that are to be removed.public MapLayer[] getLayers()
getLayers
in interface MapContext
public MapLayer getLayer(int index) throws IndexOutOfBoundsException
getLayer
in interface MapContext
index
- index of layer to return.
IndexOutOfBoundsException
- if the index is out of rangepublic int indexOf(MapLayer layer)
MapContext
indexOf
in interface MapContext
layer
- the MapLayer to search for
MapContext.indexOf(org.geotools.map.MapLayer)
public Iterator iterator()
iterator
in interface MapContext
public ReferencedEnvelope getLayerBounds() throws IOException
getLayerBounds
in interface MapContext
IOException
- DOCUMENT ME!public void setAreaOfInterest(Envelope areaOfInterest, CoordinateReferenceSystem coordinateReferenceSystem) throws IllegalArgumentException
BoundingBoxEvent
.
setAreaOfInterest
in interface MapContext
areaOfInterest
- The new areaOfInterest.coordinateReferenceSystem
- The coordinate system being using by this model.
IllegalArgumentException
- if an argument is null
.public void setAreaOfInterest(Envelope areaOfInterest)
BoundingBoxEvent
.
setAreaOfInterest
in interface MapContext
areaOfInterest
- The new area of interest.
IllegalArgumentException
- if an argument is null
.public ReferencedEnvelope getAreaOfInterest()
getAreaOfInterest
in interface MapContext
public CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface MapContext
public void transform(AffineTransform transform)
transform
in interface MapContext
transform
- The transform to change area of interest.public void moveLayer(int sourcePosition, int destPosition)
moveLayer
in interface MapContext
sourcePosition
- DOCUMENT ME!destPosition
- DOCUMENT ME!
IndexOutOfBoundsException
- DOCUMENT ME!public void clearLayerList()
clearLayerList
in interface MapContext
public int getLayerCount()
getLayerCount
in interface MapContext
public String getAbstract()
getAbstract
in interface MapContext
public void setAbstract(String abstractValue)
setAbstract
in interface MapContext
abstractValue
- New value of property abstracts.
NullPointerException
- DOCUMENT ME!public String getContactInformation()
getContactInformation
in interface MapContext
public void setContactInformation(String contactInformation)
setContactInformation
in interface MapContext
contactInformation
- New value of property contactInformation.
NullPointerException
- DOCUMENT ME!public String[] getKeywords()
getKeywords
in interface MapContext
public void setKeywords(String[] keywords)
setKeywords
in interface MapContext
keywords
- New value of property keywords.
NullPointerException
- DOCUMENT ME!public String getTitle()
getTitle
in interface MapContext
public void setTitle(String title)
setTitle
in interface MapContext
title
- New value of property title.
NullPointerException
- DOCUMENT ME!public void addMapLayerListListener(MapLayerListListener listener)
addMapLayerListListener
in interface MapContext
listener
- The listener to register.public void removeMapLayerListListener(MapLayerListListener listener)
removeMapLayerListListener
in interface MapContext
listener
- The listener to remove.public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface MapContext
listener
- The listener to register.public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface MapContext
listener
- The listener to remove.public void addMapBoundsListener(MapBoundsListener listener)
addMapBoundsListener
in interface MapContext
listener
- The listener to register.public void removeMapBoundsListener(MapBoundsListener listener)
removeMapBoundsListener
in interface MapContext
listener
- The listener to remove.public void setAreaOfInterest(ReferencedEnvelope areaOfInterest)
BoundingBoxEvent
.
setAreaOfInterest
in interface MapContext
areaOfInterest
- The new area of interest.
NullPointerException
- DOCUMENT ME!public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs) throws TransformException, FactoryException
MapContext
CoordinateReferenceSystem
for this map context.
setCoordinateReferenceSystem
in interface MapContext
FactoryException
TransformException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |