public class TLcdSLDFont extends TLcdDataObject
Modifier and Type | Field and Description |
---|---|
static String |
CSS_PARAMETER_FONT_FAMILY
Font family parameter name
|
static String |
CSS_PARAMETER_FONT_SIZE
Font size parameter name
|
static String |
CSS_PARAMETER_FONT_STYLE
Font style parameter name
|
static String |
CSS_PARAMETER_FONT_WEIGHT
Font weight parameter name
|
static String |
CSS_PARAMETER_VALUE_BOLD
Bold font weight parameter value.
|
static String |
CSS_PARAMETER_VALUE_ITALIC
Italic font style parameter value.
|
static String |
CSS_PARAMETER_VALUE_NORMAL
Normal font style and weight parameter value.
|
static String |
CSS_PARAMETER_VALUE_OBLIQUE
Oblic font style parameter value.
|
Constructor and Description |
---|
TLcdSLDFont()
Empty constructor.
|
TLcdSLDFont(TLcdDataType aDataType)
Empty constructor.
|
TLcdSLDFont(TLcdSLDParameterValue aFontFamily,
TLcdSLDParameterValue aFontStyle,
TLcdSLDParameterValue aFontWeight,
TLcdSLDParameterValue aFontSize)
Constructor for given parameters.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptParameterName(String aParameterName)
Checks whether the given CSS parameter name would be accepted when set.
|
TLcdDataObject |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
TLcdSLDParameterValue |
getCssParameter(String aParameter)
Returns a CssParameter.
|
Object |
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.
|
getDataType, getValue, hasValue, hasValue, setValue, toString
public static final String CSS_PARAMETER_VALUE_NORMAL
public static final String CSS_PARAMETER_VALUE_ITALIC
public static final String CSS_PARAMETER_VALUE_OBLIQUE
public static final String CSS_PARAMETER_VALUE_BOLD
public static final String CSS_PARAMETER_FONT_FAMILY
public static final String CSS_PARAMETER_FONT_SIZE
public static final String CSS_PARAMETER_FONT_STYLE
public static final String CSS_PARAMETER_FONT_WEIGHT
public TLcdSLDFont()
public TLcdSLDFont(TLcdSLDParameterValue aFontFamily, TLcdSLDParameterValue aFontStyle, TLcdSLDParameterValue aFontWeight, TLcdSLDParameterValue aFontSize)
aFontFamily
- the font family.aFontStyle
- the font style.aFontWeight
- the font weight.aFontSize
- the font size.public TLcdSLDFont(TLcdDataType aDataType)
public void setCssParameter(String aParameter, TLcdSLDParameterValue aParameterValue)
aParameter
- one of CSS_PARAMETER_FONT_FAMILY
, CSS_PARAMETER_FONT_SIZE
, CSS_PARAMETER_FONT_STYLE
,
CSS_PARAMETER_FONT_WEIGHT
aParameterValue
- the valuepublic TLcdSLDParameterValue getCssParameter(String aParameter)
aParameter
- one of CSS_PARAMETER_FONT_FAMILY
, CSS_PARAMETER_FONT_SIZE
, CSS_PARAMETER_FONT_STYLE
,
CSS_PARAMETER_FONT_WEIGHT
protected boolean acceptParameterName(String aParameterName)
aParameterName
- the name of the CSS parameter.public void setValue(TLcdDataProperty aProperty, Object aValue)
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 an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public Object getValue(TLcdDataProperty aProperty)
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 an IllegalArgumentException
is thrown.
getValue
in interface ILcdDataObject
getValue
in class TLcdDataObject
aProperty
- the property for which the value is to be returnedpublic TLcdDataObject clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.