The <slaveNode> element is a child element of a node. It is, for example, used to represent the input and output side at direction-dependent objects. If the slave node is assigned the attribute snapPoint="true", then it is depicted as a docking point. Arranging two master nodes with their docking points on top of each other causes an object reference to be calculated and stored in a parameter. This is indicated by red auxiliary lines that appear as crosshairs on the docking point. The docked master nodes can then be moved together in the diagram.
Docked nodes can then be separated from each other as follows:
- Highlight one of the docked nodes.
- Press and hold the [Alt] key.
- Move the highlighted nodes to one side.
- Release the [Alt] key.
Attribute name | Usage | Attribute values | Default value | Description |
---|---|---|---|---|
autoUpdated | optional | true, false | Determines the automated placement of slave nodes in the diagram true = slave nodes are placed automatically false = slave nodes are placed automatically when a master node is placed |
|
creation | manual byMaster |
byMaster | Spezifies, how the <slave> element is created (manually or automatically), if the master is created. | |
deletion | direct withMaster no |
direct | Specifies, how the <slaveNode> element is deleted direct = only the <slaveNode> element is deleted withMaster = the master element also deletes all its >slaveNode> elements no = the <slave> element cannot be deleted directly |
|
direction | optional | NORTH EAST SOUTH WEST |
Orientation of the slave relative to the master element. Can be defined as a formula or a constant | |
id | required | any | unique ID, which is referred to as reference | |
layout | required | outsideEdged insideEdged insideFree insideFloat |
Specifies the arrangement of the slaves outsideEdged = aligned to outside edges insideEdged = aligned to inside edges insideFree = free arrangement within the master (see Gantt chart) insideFloat = adjustable arrangement within the master (see Gantt chart) |
|
node | optional | Reference to the node description. Is needed for separately defined nodes. | ||
parent | required | Formula to the master object | ||
position | optional | The position of a slave node along the edge of the master node. As the value increases, the position shifts in a clockwise direction around the node. 50% = Value in Percent 50 px = Value in Pixels |
||
rotation | optional | Specifies the representation, if the <node> element is rotated in the diagram | ||
snapPoint | optional | true, false | Defines the slave node as a docking point true = slave node is a docking point false = slave node is not a docking point |
|
super | optional | Id of a node from which the properties are inherited. | ||
valid | optional | Formula to determine whether an EO is represented graphically by the current node. The formula is compared with the EO |
Allowed sub-elements | Quantity |
---|---|
figureBase | any |
figureContainer | any |
figureEllipse | any |
figureImage | any |
figureLabel | any |
figurePolygon | any |
property | any |
slaveNode | any |
figureDefinition | any |
Example:
The icon and a text, which includes the description and the processing time, is displayed as <slaveNode> underneath the graphical object of a project component.
<node id="Function" super="Component" slaveNodes="=this">
<figureImage figure="com.mind8.graph2d.figure.Image"/>
<slaveNode id="LabelAsSlave" node="LabelAsSlave" super="Component" valid="=isInstanceEO() and isInstanceOf('BodyShellWork_Architecture.LevelComponents.Function')" layout="outsideEdged" direction="SOUTH" parent="=this">
<figureLabel figure="com.mind8.graph2d.figure.Label">
<properties>
<property id="text">
<read value="=$Designation+':'+$ProcessingTime+'ms'"/>
</property>
<property id="prefWidth">
<read value="100"/>
</property>
<property id="prefHeight">
<read value="50"/>
</property>
</properties>
</figureLabel>
<property id="showLabel">
<read value="true"/>
</property>
<movement rotateWithMaster="NO" rotate="NO"/>
</slaveNode>
</node>
Result:
The slave node is displayed on the lower edge of the graphical objet with icon, description and processing time of the project component.
Example:
Thermodynamic components are traversed in one direction only. This property should be considered for the graphic objects of the Thermodynamics_Diagram. The connections of the project components are displayed in a manner that indicates the flow direction and are arranged to the master node in the correct orientation.
<node id="AbstractThermodynamicComponent" super="Component" slaveNodes="=rmos('Thermodynamic_Architecture.ConnectionPoint')" valid="=isInstanceOf('Thermodynamic_Architecture.IThermodynamikFunktion')">
<figureImage>
<configuration>
<editRequestHandler xsi:type="formui:formui-handler" />
<editRequestHandlerInfo xsi:type="formui:formui-handler-info" refId="TDD" />
</configuration>
<properties>
<property id="img">
<readvalue="=type('Thermodynamic_ModularSystem.Diagram_Configuration.Imageregister').image(this)" />
</property>
</properties>
</figureImage>
<slaveNode node="AirInput" layout="outsideEdged" direction="WEST" parent="=mc">
<movement direction="EAST SOUTH WEST NORTH" rotate="YES" />
</slaveNode>
<slaveNode node="AirOutput" layout="outsideEdged" direction="EAST" parent="=mc">
<movement direction="EAST SOUTH WEST NORTH" rotate="YES" />
</slaveNode>
</node>
Result:
The slave nodes (marked by the circles) show the direction of the air flow. If the graphical object of the master rotates, the slave nodes rotate simultaneous.
<node id="abstractBelt" slaveNodes="=mos">
<figureBase>
<properties>
<property id="resizable">
<read value="true" />
</property>
</properties>
</figureBase>
<slaveNode id="startSlave" node="snapPointStart" parent="=mc" layout="onEdge" direction="=$Direction" creation="byMaster" snapPoint="true" position="50%" />
<slaveNode id="endSlave" node="snapPointEnd" parent="=mc" layout="onEdge" direction="=$Direction" creation="byMaster" snapPoint="true" position="50%" />
<slaveNode id="stopperSlave" node="stopperApp" parent="=mc" layout="outsideEdged" creation="byMaster"/>
</node>
Result:
The slave nodes (2) are placed on the edge of the master node (1) as docking points.