Class TLcdSLDStroke

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDStroke
All Implemented Interfaces:
ILcdDataObject, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdSLDStroke extends TLcdDataObject
A "Stroke" specifies the appearance of a linear geometry. It is defined in parallel with SVG strokes. The following SvgParameters may be used: "stroke" (color), "stroke-opacity", "stroke-width", "stroke-linejoin", "stroke-linecap", "stroke-dasharray", "stroke-dashoffset", "marker-start" and "marker-end". Others are not supported by this implementation.
  • Field Details

  • Constructor Details

    • TLcdSLDStroke

      public TLcdSLDStroke()
      Constructor.
    • TLcdSLDStroke

      public TLcdSLDStroke(TLcdSLDGraphic aGraphicFill, TLcdSLDGraphic aGraphicStroke)
      Constructor for either a given fill or a stroke. You must only specify a single one, as they are both mutually exclusive. A graphic fill will apply a repeating pattern to the line ("stippling"), while the graphic stroke is a repeating linear pattern. Use the null-value for the stroking-type that needs to be disabled.
      Parameters:
      aGraphicFill - the given graphic fill.
      aGraphicStroke - the given graphic stroke.
    • TLcdSLDStroke

      public TLcdSLDStroke(TLcdDataType aDataType)
      Constructor.
  • Method Details

    • setGraphicFill

      public void setGraphicFill(TLcdSLDGraphic aGraphicFill)
      Sets the graphic with which the stroke will have to be stipple filled. If the graphic fill is different from null, the graphic Stroke will be set to null.
      Parameters:
      aGraphicFill - the graphic fill.
    • setGraphicStroke

      public void setGraphicStroke(TLcdSLDGraphic aGraphicStroke)
      Sets the graphic with which the stroke will have to be filled repeated linearly. If the graphic stroke is different from null, the graphic fill will be set to null.
      Parameters:
      aGraphicStroke - the graphic stroke.
    • setCssParameter

      public void setCssParameter(String aParameterName, TLcdSLDParameterValue aParameterValue)
      Sets the value of the parameter with name aName where aName is a field constant of TLcdSLDStroke. Note that there is no check here of the values passed, since that is not possible when the parameter value type contains an expression.
      Parameters:
      aParameterName - the name of the CSS parameter, this should be one of the constant field values. Passing another name will cause an IllegalArgumentException
      aParameterValue - the value that is to be set
      Throws:
      IllegalArgumentException - when a parameter with an invalid name is passed.
      See Also:
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      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 the data 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.

      Specified by:
      setValue in interface ILcdDataObject
      Overrides:
      setValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aValue - the value to set
      See Also:
    • getValue

      public Object getValue(TLcdDataProperty aProperty)
      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 an IllegalArgumentException is thrown.

      Specified by:
      getValue in interface ILcdDataObject
      Overrides:
      getValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • getCssParameter

      public TLcdSLDParameterValue getCssParameter(String aParameterName)
      Returns the value of the parameter with name aName where aName is a field constant of this class
      Parameters:
      aParameterName - the parameter for which the value is required.
      Returns:
      the value of the requested parameter
    • acceptParameterName

      protected boolean acceptParameterName(String aParameterName)
      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: CSS_PARAMETER_STROKE, CSS_PARAMETER_STROKE_DASHARRAY, CSS_PARAMETER_STROKE_DASHOFFSET, CSS_PARAMETER_STROKE_LINECAP, CSS_PARAMETER_STROKE_LINEJOIN, CSS_PARAMETER_STROKE_OPACITY, CSS_PARAMETER_STROKE_WIDTH.
    • clone

      public TLcdDataObject clone()
      Description copied from class: TLcdDataObject
      Returns a deep clone of this object. This method delegates to TLcdDataObject.clone(Map).
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class TLcdDataObject
      Returns:
      a deep clone of this object
      See Also:
    • clone

      public TLcdDataObject clone(Map aObjectDictionary)
      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 the value.getDataType().newInstance() method, and then cloning its properties one by one.
        • If the value implements ILcdDeepCloneable or ILcdCloneable then this interface is used to clone the value.
        • Otherwise, the property value is copied by reference.
      Specified by:
      clone in interface ILcdDeepCloneable
      Overrides:
      clone in class TLcdDataObject
      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
    • getGraphicFill

      public TLcdSLDGraphic getGraphicFill()
      Returns the value of the property that maps to the GraphicFill element.

      A "GraphicFill" defines repeated-graphic filling (stippling) pattern for an area geometry.

      Returns:
      the value of the GRAPHIC_FILL_PROPERTY property.
    • getGraphicStroke

      public TLcdSLDGraphic getGraphicStroke()
      Returns the value of the property that maps to the GraphicStroke element.

      A "GraphicStroke" defines a repated-linear graphic pattern to be used for stroking a line.

      Returns:
      the value of the GRAPHIC_STROKE_PROPERTY property.
    • getGraphicStrokeInitialGap

      public TLcdSLDParameterValue getGraphicStrokeInitialGap()
      Returns the value of the property that maps to the GraphicStrokeInitialGap element.

      Initial gap defines the initial empty space, before the first Graphic or Label should be rendered.

      Returns:
      the value of the GRAPHIC_STROKE_INITIAL_GAP_PROPERTY property.
    • setGraphicStrokeInitialGap

      public void setGraphicStrokeInitialGap(TLcdSLDParameterValue aValue)
      Sets the value of the property that maps to the GraphicStrokeInitialGap element.

      Initial gap defines the initial empty space, before the first Graphic or Label should be rendered.

      Parameters:
      aValue - the value to set for the GRAPHIC_STROKE_INITIAL_GAP_PROPERTY property.
    • getGraphicStrokeGap

      public TLcdSLDParameterValue getGraphicStrokeGap()
      Returns the value of the property that maps to the GraphicStrokeGap element.

      Gap defines the empty space between two Graphics or Labels.

      Returns:
      the value of the GRAPHIC_STROKE_GAP_PROPERTY property.
    • setGraphicStrokeGap

      public void setGraphicStrokeGap(TLcdSLDParameterValue aValue)
      Sets the value of the property that maps to the GraphicStrokeGap element.

      Gap defines the empty space between two Graphics or Labels.

      Parameters:
      aValue - the value to set for the GRAPHIC_STROKE_GAP_PROPERTY property.