|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.map.FeatureSourceMapLayer
public class FeatureSourceMapLayer
Implementation of MapLayer
without restricting the return type of getFeatureSource()
allows better support of the DataAccess API;
This implementation does not support a collection or grid coverage source.
This implementation was almost entirely stolen from that of DefaultMapLayer
.
Field Summary | |
---|---|
protected FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> |
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 | |
---|---|
FeatureSourceMapLayer(FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> featureSource,
Style style)
Convenience constructor that sets title to the empty string. |
|
FeatureSourceMapLayer(FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> featureSource,
Style style,
java.lang.String title)
Constructor |
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<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> |
getFeatureSource()
Getter for property featureSource. |
Query |
getQuery()
Returns the definition query established for this layer. |
CollectionSource |
getSource()
Returns null. |
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<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> 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 FeatureSourceMapLayer(FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> featureSource, Style style, java.lang.String title)
featureSource
- the data source for this layerstyle
- the style used to represent this layertitle
- the layer titlepublic FeatureSourceMapLayer(FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> featureSource, Style style)
featureSource
- the data source for this layerstyle
- the style used to represent this layerMethod Detail |
---|
public FeatureSource<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> getFeatureSource()
getFeatureSource
in interface MapLayer
public CollectionSource getSource()
getSource
in interface MapLayer
FeatureSource
is usedMapLayer.getSource()
public 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 hto 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
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |