|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.map.DefaultMapLayer
public class DefaultMapLayer
Default implementation of the MapLayer implementation
Field Summary | |
---|---|
protected FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
featureSource
Holds value of property FeatureSource. |
protected javax.swing.event.EventListenerList |
listenerList
Utility field used by event firing mechanism. |
protected Query |
query
The query to limit the number of rendered features based on its filter |
protected boolean |
selected
Whether this layer is selected or not. |
protected FeatureListener |
sourceListener
Listener to forward feature source events as layer events |
protected Style |
style
The style to symbolize the features of this layer |
protected java.lang.String |
title
Holds value of property title. |
protected boolean |
visible
Whether this layer is visible or not. |
Constructor Summary | |
---|---|
DefaultMapLayer(AbstractGridCoverage2DReader reader,
Style style)
Constructor which adds a new layer and triggers a LayerListEvent . |
|
DefaultMapLayer(AbstractGridCoverage2DReader reader,
Style style,
java.lang.String title)
Constructor which adds a new layer and trigger a LayerListEvent . |
|
DefaultMapLayer(AbstractGridCoverage2DReader reader,
Style style,
java.lang.String title,
org.opengis.parameter.GeneralParameterValue[] params)
Constructor which adds a new layer and trigger a LayerListEvent . |
|
DefaultMapLayer(CollectionSource source,
Style style,
java.lang.String title)
|
|
DefaultMapLayer(java.util.Collection collection,
Style style)
|
|
DefaultMapLayer(java.util.Collection collection,
Style style,
java.lang.String title)
|
|
DefaultMapLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection,
Style style)
Creates a new instance of DefaultMapLayer using a non-emtpy feature collection as a parameter |
|
DefaultMapLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection,
Style style,
java.lang.String title)
Creates a new instance of DefaultMapLayer using a non-emtpy feature collection as a parameter |
|
DefaultMapLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource,
Style style)
Creates a new instance of DefaultMapLayer |
|
DefaultMapLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource,
Style style,
java.lang.String title)
Creates a new instance of DefaultMapLayer |
|
DefaultMapLayer(org.opengis.coverage.grid.GridCoverage coverage,
Style style)
* Add a new layer and trigger a LayerListEvent . |
|
DefaultMapLayer(org.opengis.coverage.grid.GridCoverage coverage,
Style style,
java.lang.String title)
* Add a new layer and trigger a LayerListEvent . |
Method Summary | |
---|---|
void |
addMapLayerListener(MapLayerListener listener)
Registers MapLayerListener to receive events. |
protected void |
fireMapLayerListenerLayerChanged(MapLayerEvent event)
Notifies all registered listeners about the event. |
protected void |
fireMapLayerListenerLayerDeselected(MapLayerEvent event)
Notifies all registered listeners about the deselection event. |
protected void |
fireMapLayerListenerLayerHidden(MapLayerEvent event)
Notifies all registered listeners about the event. |
protected void |
fireMapLayerListenerLayerSelected(MapLayerEvent event)
Notifies all registered listeners about the selection event. |
protected void |
fireMapLayerListenerLayerShown(MapLayerEvent event)
Notifies all registered listeners about the event. |
ReferencedEnvelope |
getBounds()
find out the bounds of the layer |
FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatureSource()
Getter for property featureSource. |
Query |
getQuery()
Returns the definition query established for this layer. |
CollectionSource |
getSource()
Get the data source for this layer. |
Style |
getStyle()
Getter for property style. |
java.lang.String |
getTitle()
Getter for property title. |
boolean |
isSelected()
Getter for property selected. |
boolean |
isVisible()
Getter for property visible. |
void |
removeMapLayerListener(MapLayerListener listener)
Removes MapLayerListener from the list of listeners. |
void |
setQuery(Query query)
Sets a definition query for this layer. |
void |
setSelected(boolean selected)
Setter for property selected. |
void |
setStyle(Style style)
Setter for property style. |
void |
setTitle(java.lang.String title)
Setter for property title. |
void |
setVisible(boolean visible)
Setter for property visible. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource
protected Style style
protected Query query
protected java.lang.String title
protected boolean visible
protected boolean selected
protected javax.swing.event.EventListenerList listenerList
protected FeatureListener sourceListener
Constructor Detail |
---|
public DefaultMapLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource, Style style, java.lang.String title)
featureSource
- the data source for this layerstyle
- the style used to represent this layertitle
- the layer title
java.lang.NullPointerException
- DOCUMENT ME!public DefaultMapLayer(CollectionSource source, Style style, java.lang.String title)
public DefaultMapLayer(FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> featureSource, Style style)
featureSource
- the data source for this layerstyle
- the style used to represent this layerpublic DefaultMapLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection, Style style, java.lang.String title)
collection
- the source feature collectionstyle
- the style used to represent this layertitle
- layer titlepublic DefaultMapLayer(java.util.Collection collection, Style style, java.lang.String title)
public DefaultMapLayer(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection, Style style)
collection
- the source feature collectionstyle
- the style used to represent this layerpublic DefaultMapLayer(java.util.Collection collection, Style style)
public DefaultMapLayer(org.opengis.coverage.grid.GridCoverage coverage, Style style) throws org.opengis.referencing.operation.TransformException, FactoryRegistryException, SchemaException
LayerListEvent
.
coverage
- The new layer that has been added.style
-
SchemaException
FactoryRegistryException
org.opengis.referencing.operation.TransformException
public DefaultMapLayer(AbstractGridCoverage2DReader reader, Style style, java.lang.String title, org.opengis.parameter.GeneralParameterValue[] params) throws org.opengis.referencing.operation.TransformException, FactoryRegistryException, SchemaException
LayerListEvent
.
reader
- a reader with the new layer that will be added.style
- title
- params
- GeneralParameterValue[] that describe how the AbstractGridCoverage2DReader
shall read the images
SchemaException
FactoryRegistryException
org.opengis.referencing.operation.TransformException
public DefaultMapLayer(AbstractGridCoverage2DReader reader, Style style, java.lang.String title) throws org.opengis.referencing.operation.TransformException, FactoryRegistryException, SchemaException
LayerListEvent
.
reader
- a reader with the new layer that will be added.style
- title
-
SchemaException
FactoryRegistryException
org.opengis.referencing.operation.TransformException
public DefaultMapLayer(AbstractGridCoverage2DReader reader, Style style) throws org.opengis.referencing.operation.TransformException, FactoryRegistryException, SchemaException
LayerListEvent
.
reader
- a reader with the new layer that will be addedstyle
-
SchemaException
FactoryRegistryException
org.opengis.referencing.operation.TransformException
public DefaultMapLayer(org.opengis.coverage.grid.GridCoverage coverage, Style style, java.lang.String title) throws org.opengis.referencing.operation.TransformException, FactoryRegistryException, SchemaException
LayerListEvent
.
coverage
- The new layer that has been added.style
- title
-
SchemaException
FactoryRegistryException
org.opengis.referencing.operation.TransformException
Method Detail |
---|
public FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatureSource()
getFeatureSource
in interface MapLayer
public CollectionSource getSource()
MapLayer
getSource
in interface MapLayer
FeatureSource
is usedpublic Style getStyle()
getStyle
in interface MapLayer
public void setStyle(Style style)
setStyle
in interface MapLayer
style
- New value of property style.
java.lang.NullPointerException
- DOCUMENT ME!public java.lang.String getTitle()
getTitle
in interface MapLayer
public void setTitle(java.lang.String title)
setTitle
in interface MapLayer
title
- New value of property title.
java.lang.NullPointerException
- DOCUMENT ME!public boolean isVisible()
isVisible
in interface MapLayer
public void setVisible(boolean visible)
setVisible
in interface MapLayer
visible
- New value of property visible.public boolean isSelected()
isSelected
in interface MapLayer
public void setSelected(boolean selected)
setSelected
in interface MapLayer
selected
- new value of property selected.public Query getQuery()
getQuery
in interface MapLayer
Query.ALL
, if set, returns a copy of the actual
query object to avoid external modificationMapLayer.getQuery()
public void setQuery(Query query)
If present (other than Query.ALL
, a renderer or consumer
must use it to limit the number of returned features based on the filter
it holds and the value of the maxFeatures attributes, and also can use it
as a performance control to limit the number of requested attributes
setQuery
in interface MapLayer
query
- the full filter for this layer.
java.lang.NullPointerException
- if no query is passed on. If you want to reset a definition
query, pass it Query.ALL
instead of null
MapLayer.setQuery(org.geotools.data.Query)
public ReferencedEnvelope getBounds()
MapLayer
getBounds
in interface MapLayer
public void addMapLayerListener(MapLayerListener listener)
addMapLayerListener
in interface MapLayer
listener
- The listener to register.public void removeMapLayerListener(MapLayerListener listener)
removeMapLayerListener
in interface MapLayer
listener
- The listener to remove.protected void fireMapLayerListenerLayerChanged(MapLayerEvent event)
event
- The event to be firedprotected void fireMapLayerListenerLayerShown(MapLayerEvent event)
event
- The event to be firedprotected void fireMapLayerListenerLayerHidden(MapLayerEvent event)
event
- The event to be firedprotected void fireMapLayerListenerLayerSelected(MapLayerEvent event)
event
- The event to be firedprotected void fireMapLayerListenerLayerDeselected(MapLayerEvent event)
event
- The event to be firedpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |