Class LineModeAttribute

All Implemented Interfaces:
Attribute, DeepCopy, Displayable

public class LineModeAttribute
extends CompositeAttribute
Attribute class for a dash-object, which encapsulates the information needed to specify stroke properties.
Version:
$Revision: 1.7 $
Author:
schoeffl
  • Constructor Details

    • LineModeAttribute

      public LineModeAttribute​(String id)
      Constructor for LineModeAttribute.
      Parameters:
      id - the id of the attribute.
    • LineModeAttribute

      public LineModeAttribute​(String id, Dash d)
      Constructor for LineModeAttribute.
      Parameters:
      id - the id of the attribute.
      d - the dash-value of the attribute.
  • Method Details

    • setAttribute

      public void setAttribute​(String id, Attribute att) throws AttributeNotFoundException, IllegalArgumentException
      Description copied from class: CompositeAttribute
      Sets the given attribute to the given value. The attribute that is already location path is overwritten!
      Specified by:
      setAttribute in class CompositeAttribute
      Parameters:
      id - the id of the attribute to be set.
      att - the Attribute containing the new value for the value asociated with the given id.
      Throws:
      AttributeNotFoundException - if there is no value associated with the given id.
      IllegalArgumentException - if att has not the appropriate type.
      See Also:
      CompositeAttribute.setAttribute(String, Attribute)
    • getAttributes

      public CollectionAttribute getAttributes()
      Description copied from class: CompositeAttribute
      Transforms the CompositeAttribute into the basehierarchy. Maps relative paths to the apropriate 'standard attributes' (e.g. IntegerAttribute, StringAttribute etc.) of the composite attribute. This representation is intended to be read-only - changes to the CollectionAttribute have no effect on the values of this CompositeAttribute.
      Specified by:
      getAttributes in class CompositeAttribute
      Returns:
      the values of the composite attribute in a CollectionAttribute.
      See Also:
      CompositeAttribute.getAttributes()
    • setDashArray

      public void setDashArray​(float[] da)
      Sets the dashArray of the encapsulated Dash to the given array.
      Parameters:
      da - ths new array to set the dashArray to.
    • getDashArray

      public float[] getDashArray()
      Returns the dashArray of the encapsulated Dash.
      Returns:
      the dashArray of the encapsulated Dash.
    • setDashPhase

      public void setDashPhase​(float dp)
      Sets the dashPhase of the encapsulated Dash to the given value.
      Parameters:
      dp - the new value for the dashPhase.
    • getDashPhase

      public float getDashPhase()
      Returns the dashPhase of the encapsulated Dash.
      Returns:
      the dashPhase of the encapsulated Dash.
    • setDefaultValue

      public void setDefaultValue()
      Description copied from interface: Attribute
      The attribute's value is set so that its getValue() method will not return null.
      See Also:
      Attribute.setDefaultValue()
    • getValue

      public Object getValue()
      Returns a dash object contained in this attribute.
      Returns:
      a dash object contained in this attribute.
    • copy

      public Object copy()
      Returns a deep copy of this Attribute.
      Returns:
      a deep copy of this Attribute.
      See Also:
      DeepCopy.copy()