Package com.luciad.ogc.sld.model
Class TLcdSLDFont
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDFont
- All Implemented Interfaces:
ILcdDataObject
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
A "Font" element specifies the text font to use. The allowed CssParameters are: "font-family", "font-style",
"font-weight", and "font-size".
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Font family parameter namestatic final String
Font size parameter namestatic final String
Font style parameter namestatic final String
Font weight parameter namestatic final String
Bold font weight parameter value.static final String
Italic font style parameter value.static final String
Normal font style and weight parameter value.static final String
Oblic font style parameter value. -
Constructor Summary
ConstructorDescriptionEmpty constructor.TLcdSLDFont
(TLcdDataType aDataType) Empty constructor.TLcdSLDFont
(TLcdSLDParameterValue aFontFamily, TLcdSLDParameterValue aFontStyle, TLcdSLDParameterValue aFontWeight, TLcdSLDParameterValue aFontSize) Constructor for given parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptParameterName
(String aParameterName) Checks whether the given CSS parameter name would be accepted when set.clone()
Returns a deep clone of this object.Returns a deep clone of this object.getCssParameter
(String aParameter) Returns a CssParameter.getValue
(TLcdDataProperty aProperty) Returns the value of the given property.void
setCssParameter
(String aParameter, TLcdSLDParameterValue aParameterValue) Sets a CssParameter.void
setValue
(TLcdDataProperty aProperty, Object aValue) Sets the value of the given property for this data object.Methods inherited from class com.luciad.datamodel.TLcdDataObject
getDataType, getValue, hasValue, hasValue, setValue, toString
-
Field Details
-
CSS_PARAMETER_VALUE_NORMAL
Normal font style and weight parameter value.- See Also:
-
CSS_PARAMETER_VALUE_ITALIC
Italic font style parameter value.- See Also:
-
CSS_PARAMETER_VALUE_OBLIQUE
Oblic font style parameter value.- See Also:
-
CSS_PARAMETER_VALUE_BOLD
Bold font weight parameter value.- See Also:
-
CSS_PARAMETER_FONT_FAMILY
Font family parameter name- See Also:
-
CSS_PARAMETER_FONT_SIZE
Font size parameter name- See Also:
-
CSS_PARAMETER_FONT_STYLE
Font style parameter name- See Also:
-
CSS_PARAMETER_FONT_WEIGHT
Font weight parameter name- See Also:
-
-
Constructor Details
-
TLcdSLDFont
public TLcdSLDFont()Empty constructor. -
TLcdSLDFont
public TLcdSLDFont(TLcdSLDParameterValue aFontFamily, TLcdSLDParameterValue aFontStyle, TLcdSLDParameterValue aFontWeight, TLcdSLDParameterValue aFontSize) Constructor for given parameters.- Parameters:
aFontFamily
- the font family.aFontStyle
- the font style.aFontWeight
- the font weight.aFontSize
- the font size.
-
TLcdSLDFont
Empty constructor.
-
-
Method Details
-
setCssParameter
Sets a CssParameter.- Parameters:
aParameter
- one ofCSS_PARAMETER_FONT_FAMILY
,CSS_PARAMETER_FONT_SIZE
,CSS_PARAMETER_FONT_STYLE
,CSS_PARAMETER_FONT_WEIGHT
aParameterValue
- the value
-
getCssParameter
Returns a CssParameter.- Parameters:
aParameter
- one ofCSS_PARAMETER_FONT_FAMILY
,CSS_PARAMETER_FONT_SIZE
,CSS_PARAMETER_FONT_STYLE
,CSS_PARAMETER_FONT_WEIGHT
-
acceptParameterName
Checks whether the given CSS parameter name would be accepted when set.- Parameters:
aParameterName
- the name of the CSS parameter.- Returns:
- true if one of the constant fields of this class:
-
setValue
Description copied from interface:ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw anIllegalArgumentException
.- Specified by:
setValue
in interfaceILcdDataObject
- Overrides:
setValue
in classTLcdDataObject
- Parameters:
aProperty
- the property for which the value is to be setaValue
- the value to set- See Also:
-
getValue
Description copied from interface:ILcdDataObject
Returns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the
data object's type
or in one of its super types. Otherwise anIllegalArgumentException
is thrown.- Specified by:
getValue
in interfaceILcdDataObject
- Overrides:
getValue
in classTLcdDataObject
- Parameters:
aProperty
- the property for which the value is to be returned- Returns:
- the value of the given property for this data object
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. This method delegates toTLcdDataObject.clone(Map)
.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classTLcdDataObject
- Returns:
- a deep clone of this object
- See Also:
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. If the clone is not already present in the dictionary, a new instance if created as follows:- First, a new instance is created using Java's clone() mechanism.
- Then, all properties of this object are cloned and set on the newly created
instance. A property is cloned as follows:
- If the property value is an
ILcdDataObject
, the value is cloned by first creating a new instance via thevalue.getDataType().newInstance()
method, and then cloning its properties one by one. - If the value implements
ILcdDeepCloneable
orILcdCloneable
then this interface is used to clone the value. - Otherwise, the property value is copied by reference.
- If the property value is an
- Specified by:
clone
in interfaceILcdDeepCloneable
- Overrides:
clone
in classTLcdDataObject
- Parameters:
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.- Returns:
- a deep clone of this object
-