Package com.luciad.lucy.map.sld
Class TLcySLDLayerStyle
java.lang.Object
com.luciad.lucy.map.sld.TLcySLDLayerStyle
- All Implemented Interfaces:
ILcyLayerStyle
,ILcdChangeSource
,ILcdCloneable
,Cloneable
Represents a layer style that supports styling as described in the OGC Styled Layer Descriptor and Symbology Encoding specifications.
Formats that support layers with this style can do this by either using the
feature type
name of the style to associate specific styles to specific types of elements that are painted,
or they can ignore the feature type name and use the same style for all types of elements that
are painted.
If the feature type name is used, it can be assumed that there is only one style for each type
name. If it is not used, the feature type name is
null
, and there is only one style.
To retrieve and apply the style, use an ILcyLayerStyleProvider
.- Since:
- 10.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ILcdChangeListener aListener) Registers the given listener so it will receive change events from this source.clone()
Creates a copy of the style.Convenience method that returns the style with the given feature type name from all styles.Returns the set of feature type styles that are used by this layer style.void
removeChangeListener
(ILcdChangeListener aListener) Removes the specified listener so it is no longer notified.
-
Constructor Details
-
TLcySLDLayerStyle
public TLcySLDLayerStyle()Default constructor. Add styles usinggetStyles()
.
-
-
Method Details
-
getStyles
Returns the set of feature type styles that are used by this layer style. Each style in the set should have a unique feature type name. It is also possible for a style to have no type name. In this case the style is considered to be applicable for all types of elements. For data formats that use the ILcdDataObject interface, the feature type name is the same as the name of the data type of the elements in the model. It is allowed to add and/or remove styles from the returned set. It is not allowed to modify aTLcdSLDFeatureTypeStyle
instance of this set. If you want to modify such aTLcdSLDFeatureTypeStyle
instance, you should use theclone
method of theTLcdSLDFeatureTypeStyle
and modify the clone. Then you remove the original style from the set, and add the modified clone.- Returns:
- The set of feature type styles.
-
clone
Description copied from interface:ILcyLayerStyle
Creates a copy of the style. When a layer style is cloned, its listeners should not be cloned as well.
A clone of an
ILcyLayerStyle
is not linked to any layer.- Specified by:
clone
in interfaceILcdCloneable
- Specified by:
clone
in interfaceILcyLayerStyle
- Overrides:
clone
in classObject
- See Also:
-
getStyle
Convenience method that returns the style with the given feature type name from all styles.- Parameters:
aFeatureTypeName
- The feature type name of the style to retrieve- Returns:
- The style that is associated with the given feature type name, or null.
-
addChangeListener
Description copied from interface:ILcdChangeSource
Registers the given listener so it will receive change events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a
ALcdWeakChangeListener
instance as change listener.- Specified by:
addChangeListener
in interfaceILcdChangeSource
- Parameters:
aListener
- The listener to be notified when a change has happened.- See Also:
-
removeChangeListener
Description copied from interface:ILcdChangeSource
Removes the specified listener so it is no longer notified.- Specified by:
removeChangeListener
in interfaceILcdChangeSource
- Parameters:
aListener
- The listener to remove.
-