EdgeRule Definition

In this section, you will learn how an EdgeRule is defined and structured inside a given rules.xml or similarly named file. An EdgeRule definition has an identical structure when compared to a NodeRule. The only differences are the names and numbers of rule attributes.

Likewise, there are various attributes that can be changed to customize the runtime behavior of a VisualEdge. Below we list a few of them. You will eventually have to consult the Rules section of the Elements chapter inside the Framework Manual for more detailed explanations of all configuration attributes available to you.

Example 6.3. EdgeRule XML Fragment

          
<list name="Rule">
 <attribute name="Name" type="String" value="erule1"/>
 <attribute name="Type" type="String" value="EdgeRule"/>
 <list name="Properties">
  <attribute name="Deletable" type="Boolean" value="false"/>
  <attribute name="Moveable" type="Boolean" value="true"/>
  <attribute name="Selectable" type="Boolean" value="true"/>
  <attribute name="Resizable" type="Boolean" value="false"/>
  <attribute name="DetachableSource" type="Boolean" value="false"/>
  <attribute name="DetachableTarget" type="Boolean" value="false"/>
  <attribute name="EdgeInsertMode" value="edge insert disabled"/>
  <attribute name="SnapToPortDistance" value="5cm"/>
 </list>
</list>

There are two EdgeRule attributes that take an enumerated value. They are the following: