|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.map.DefaultMapContext
The default implementation of the interface
Field Summary | |
protected java.lang.String |
abstracts
Holds value of property abstracts. |
protected java.lang.String |
contactInformation
Holds value of property contactInformation. |
protected java.lang.String[] |
keywords
Holds value of property keywords. |
protected MapLayerListener |
layerListener
|
protected javax.swing.event.EventListenerList |
listenerList
Utility field used by event firing mechanism. |
protected java.beans.PropertyChangeSupport |
propertyChangeSupport
Utility field used by bound properties. |
protected java.lang.String |
title
Holds value of property title. |
Constructor Summary | |
DefaultMapContext()
Creates a default empty map context |
|
DefaultMapContext(MapLayer[] layers)
Creates a map context with the provided layers and title |
|
DefaultMapContext(MapLayer[] layers,
java.lang.String title,
java.lang.String contextAbstract,
java.lang.String contactInformation,
java.lang.String[] keywords)
Creates a map context |
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 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(java.beans.PropertyChangeListener listener)
Registers PropertyChangeListener to receive events. |
void |
clearLayerList()
DOCUMENT ME! |
java.lang.String |
getAbstract()
Getter for property abstracts. |
com.vividsolutions.jts.geom.Envelope |
getAreaOfInterest()
Gets the current area of interest. |
java.lang.String |
getContactInformation()
Getter for property contactInformation. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Get the current coordinate system. |
java.lang.String[] |
getKeywords()
Getter for property keywords. |
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()
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. |
java.util.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(java.beans.PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners. |
void |
setAbstract(java.lang.String abstractValue)
Setter for property abstracts. |
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)
Setter for property contactInformation. |
void |
setKeywords(java.lang.String[] keywords)
Setter for property keywords. |
void |
setTitle(java.lang.String title)
Setter for property title. |
void |
transform(java.awt.geom.AffineTransform transform)
Transform the coordinates according to the provided transform. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.event.EventListenerList listenerList
protected MapLayerListener layerListener
protected java.lang.String abstracts
protected java.beans.PropertyChangeSupport propertyChangeSupport
protected java.lang.String contactInformation
protected java.lang.String[] keywords
protected java.lang.String title
Constructor Detail |
public DefaultMapContext()
public DefaultMapContext(MapLayer[] layers)
layers
- DOCUMENT ME!public DefaultMapContext(MapLayer[] layers, java.lang.String title, java.lang.String contextAbstract, java.lang.String contactInformation, java.lang.String[] keywords)
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 featureSource, Style style)
LayerListEvent
.
addLayer
in interface MapContext
featureSource
- Then new layer that has been added.style
- DOCUMENT ME!public void addLayer(org.opengis.coverage.grid.GridCoverage gc, Style style)
LayerListEvent
.
addLayer
in interface MapContext
gc
- Then new layer that has been added.style
- DOCUMENT ME!
public void addLayer(FeatureCollection collection, Style style)
LayerListEvent
.
addLayer
in interface MapContext
collection
- Then new layer that has been added.style
- DOCUMENT ME!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 java.lang.IndexOutOfBoundsException
getLayer
in interface MapContext
index
- index of layer to return.
java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic int indexOf(MapLayer layer)
MapContext
indexOf
in interface MapContext
MapContext.indexOf(org.geotools.map.MapLayer)
public java.util.Iterator iterator()
iterator
in interface MapContext
public com.vividsolutions.jts.geom.Envelope getLayerBounds() throws java.io.IOException
getLayerBounds
in interface MapContext
java.io.IOException
- DOCUMENT ME!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.
setAreaOfInterest
in interface MapContext
areaOfInterest
- The new areaOfInterest.coordinateReferenceSystem
- The coordinate system being using by
this model.
java.lang.IllegalArgumentException
- if an argument is null
.
java.lang.NullPointerException
- DOCUMENT ME!public void setAreaOfInterest(com.vividsolutions.jts.geom.Envelope areaOfInterest)
BoundingBoxEvent
.
setAreaOfInterest
in interface MapContext
areaOfInterest
- The new area of interest.
java.lang.NullPointerException
- DOCUMENT ME!public com.vividsolutions.jts.geom.Envelope getAreaOfInterest()
getAreaOfInterest
in interface MapContext
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
getCoordinateReferenceSystem
in interface MapContext
public void transform(java.awt.geom.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!
java.lang.IndexOutOfBoundsException
- DOCUMENT ME!public void clearLayerList()
clearLayerList
in interface MapContext
public int getLayerCount()
getLayerCount
in interface MapContext
public java.lang.String getAbstract()
getAbstract
in interface MapContext
public void setAbstract(java.lang.String abstractValue)
setAbstract
in interface MapContext
abstractValue
- New value of property abstracts.
java.lang.NullPointerException
- DOCUMENT ME!public java.lang.String getContactInformation()
getContactInformation
in interface MapContext
public void setContactInformation(java.lang.String contactInformation)
setContactInformation
in interface MapContext
contactInformation
- New value of property contactInformation.
java.lang.NullPointerException
- DOCUMENT ME!public java.lang.String[] getKeywords()
getKeywords
in interface MapContext
public void setKeywords(java.lang.String[] keywords)
setKeywords
in interface MapContext
keywords
- New value of property keywords.
java.lang.NullPointerException
- DOCUMENT ME!public java.lang.String getTitle()
getTitle
in interface MapContext
public void setTitle(java.lang.String title)
setTitle
in interface MapContext
title
- New value of property title.
java.lang.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(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface MapContext
listener
- The listener to register.public void removePropertyChangeListener(java.beans.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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |