Class DockingAttribute

All Implemented Interfaces:
Comparable<Object>, Attribute, CollectionAttribute, DeepCopy, GraphicAttributeConstants, Displayable

public class DockingAttribute
extends HashMapAttribute
implements GraphicAttributeConstants
Contains the graphic attribute docking for edges. It contains the names of the ports the edge should dock to in the source/target node. Default is the empty string - the EdgeComponent knows how to interpret this correctly.
Version:
$Revision: 1.8 $
Author:
breu
  • Constructor Details

    • DockingAttribute

      public DockingAttribute​(String id)
      Constructor for Docking.
      Parameters:
      id - the id of the attriubte.
    • DockingAttribute

      public DockingAttribute​(String id, String source, String target)
      Constructor for Docking.
      Parameters:
      id - the id of the attribute.
      source - the source-value of the attribute.
      target - the target-value of the attribute.
  • Method Details

    • setCollection

      public void setCollection​(Map<String,​Attribute> attrs)
      Sets the collection of attributes contained within this CollectionAttribute. The docking values are set, additional values are simply added (that means that if there exists already a subattribute with the same id, an exception will be thrown).
      Specified by:
      setCollection in interface CollectionAttribute
      Overrides:
      setCollection in class HashMapAttribute
      Parameters:
      attrs - the map that contains all attributes.
      Throws:
      IllegalArgumentException - DOCUMENT ME!
    • setSource

      public void setSource​(String s)
      Sets the 'source'-value.
      Parameters:
      s - the 'source'-value to be set.
    • getSource

      public String getSource()
      Returns the 'source'-value of the encapsulated docking.
      Returns:
      the 'source'-value of the encapsulated docking.
    • setTarget

      public void setTarget​(String t)
      Sets the 'target'-value.
      Parameters:
      t - the 'target'-value to be set.
    • getTarget

      public String getTarget()
      Returns the 'target'-value of the encapsulated docking.
      Returns:
      the 'target'-value of the encapsulated docking.
    • copy

      public Object copy()
      Returns a deep copy of this object.
      Specified by:
      copy in interface DeepCopy
      Overrides:
      copy in class HashMapAttribute
      Returns:
      A deep copy of this object.