org.geotools.map
Class StyleLayer

Object
  extended by Layer
      extended by StyleLayer
Direct Known Subclasses:
FeatureLayer, RasterLayer

public abstract class StyleLayer
extends Layer

Layer responsible for rendering under control of a user supplied Style object.

The StyleLayer is expected to be subclassed; and is responsible for:

Please note that a StyleLayerDescriptor (defined by SLD) document is usually used to describe the rendering requirements for an entire Map; while a Style (defined by SE) is focused on a single layer of content

Since:
8.0

Field Summary
protected  Style style
          Style used for rendering
 
Fields inherited from class Layer
listenerList, LOGGER, selected, title, userData, visible
 
Constructor Summary
StyleLayer(Style style)
          Creates a new instance of StyleLayer
StyleLayer(Style style, String title)
           
 
Method Summary
 void dispose()
          Allows a Layer to clean up any listeners, or internal caches or resources it has added during use.
 Style getStyle()
          Get the style for this layer.
 void setStyle(Style style)
          Sets the style for this layer.
 
Methods inherited from class Layer
addMapLayerListener, connectDataListener, finalize, fireMapLayerListenerLayerChanged, fireMapLayerListenerLayerDeselected, fireMapLayerListenerLayerHidden, fireMapLayerListenerLayerPreDispose, fireMapLayerListenerLayerSelected, fireMapLayerListenerLayerShown, getBounds, getFeatureSource, getQuery, getTitle, getUserData, isSelected, isVisible, preDispose, removeMapLayerListener, setSelected, setTitle, setVisible, toString
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

style

protected Style style
Style used for rendering

Constructor Detail

StyleLayer

public StyleLayer(Style style)
Creates a new instance of StyleLayer

Parameters:
style - the style used to control drawing of this layer

StyleLayer

public StyleLayer(Style style,
                  String title)
Method Detail

dispose

public void dispose()
Description copied from class: Layer
Allows a Layer to clean up any listeners, or internal caches or resources it has added during use.

Overrides:
dispose in class Layer

getStyle

public Style getStyle()
Get the style for this layer.

If style has not been set, then null is returned.

Overrides:
getStyle in class Layer
Returns:
The style (SLD).

setStyle

public void setStyle(Style style)
Sets the style for this layer.

Parameters:
style - The new style


Copyright © 1996-2014 Geotools. All Rights Reserved.