Class NodeEditor
NodeEditor extension for SystemGraph node. It is a container for the information within a node: ports, position, state of ports. Describes how to draw a node. Implements the INodeEditor
Inherited Members
Namespace: Mechatronics.SystemGraph
Syntax
[Serializable]
public class NodeEditor : INodeEditor
Constructors
NodeEditor(NodeRuntime)
Initializes a new instance of the NodeEditor class.
Declaration
public NodeEditor(NodeRuntime nodeRT)
Parameters
| Type | Name | Description |
|---|---|---|
| NodeRuntime | nodeRT | The node runtime to associate. |
Fields
AttachedProperty
The attached property
Declaration
[NonSerialized]
public IProperty AttachedProperty
Field Value
| Type | Description |
|---|---|
| IProperty |
targetGroup
The target group
Declaration
public SystemGroupView targetGroup
Field Value
| Type | Description |
|---|---|
| SystemGroupView |
Properties
DisplayName
Gets or sets the display name.
Declaration
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| String | The display name. |
Expanded
Gets or sets a value indicating whether this NodeEditor is expanded.
Declaration
public bool Expanded { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
MirrorPorts
Gets or sets a value indicating whether ports are mirrored.
Declaration
public bool MirrorPorts { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
NodeRT
Gets or sets the node runtime.
Declaration
public NodeRuntime NodeRT { get; set; }
Property Value
| Type | Description |
|---|---|
| NodeRuntime | The node runtime. |
Position
Gets or sets the position of the node editor.
Declaration
public Vector3 Position { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 | The position. |
Methods
AddDynamicPort(String, Type, PortDirection, FieldExtra)
Adds a dynamic port to the node.
Declaration
public bool AddDynamicPort(string name, Type portType, PortDirection direction, FieldExtra rw)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name. |
| Type | portType | Type of the port. |
| PortDirection | direction | The direction. |
| FieldExtra | rw | The field extra settings. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
AddListPort<T>(IPortEditor, String, T)
Adds a list port.
Declaration
public bool AddListPort<T>(IPortEditor parentPort, string childName, T portRef)
Parameters
| Type | Name | Description |
|---|---|---|
| IPortEditor | parentPort | The parent port. |
| String | childName | Name of the child. |
| T | portRef | The port reference. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
Type Parameters
| Name | Description |
|---|---|
| T |
AddListPort<T>(String)
Adds a list port.
Declaration
public IPortEditor AddListPort<T>(string parentPort)
Parameters
| Type | Name | Description |
|---|---|---|
| String | parentPort | The parent port. |
Returns
| Type | Description |
|---|---|
| IPortEditor | Added PortEditor. |
Type Parameters
| Name | Description |
|---|---|
| T |
AddListPort<T>(String, T)
Adds a list port.
Declaration
public IPortEditor AddListPort<T>(string parentPort, T portRef)
Parameters
| Type | Name | Description |
|---|---|---|
| String | parentPort | The parent port. |
| T | portRef | The port reference. |
Returns
| Type | Description |
|---|---|
| IPortEditor | Added PortEditor. |
Type Parameters
| Name | Description |
|---|---|
| T |
AddPorts()
Adds the ports of that node editor.
Declaration
public void AddPorts()
ConstructNode(Boolean)
Constructs the node from this node editor.
Declaration
public override void ConstructNode(bool removeSerializedEdges = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | removeSerializedEdges | if set to |
Overrides
GetPortIndex(PortView)
Gets the index of the port.
Declaration
public int GetPortIndex(PortView port)
Parameters
| Type | Name | Description |
|---|---|---|
| PortView | port | The port view. |
Returns
| Type | Description |
|---|---|
| Int32 | PortView index in the node. |
IsDebugMode()
Determines whether we are in debug mode.
Declaration
public bool IsDebugMode()
Returns
| Type | Description |
|---|---|
| Boolean |
|
NodeType()
Retrieve the node type name.
Declaration
public string NodeType()
Returns
| Type | Description |
|---|---|
| String | Node type name. |
RefreshBoundParameter()
Refreshes the bound parameter information.
Declaration
public override void RefreshBoundParameter()
Overrides
RemoveDynamicPort(String)
Removes a dynamic port.
Declaration
public bool RemoveDynamicPort(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name to remove. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
RemoveListPort(IPortEditor)
Removes a list port.
Declaration
public IPortEditor RemoveListPort(IPortEditor parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IPortEditor | parent | The parent port editor. |
Returns
| Type | Description |
|---|---|
| IPortEditor | IPortEditor that was removed. |
RenameDynamicPort(Int32, String)
Renames a dynamic port.
Declaration
public bool RenameDynamicPort(int idx, string toName)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | idx | The index. |
| String | toName | To name. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
RenameDynamicPort(String, String)
Renames a dynamic port.
Declaration
public bool RenameDynamicPort(string fromName, string toName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fromName | From name. |
| String | toName | To name. |
Returns
| Type | Description |
|---|---|
| Boolean |
|
SetDirty()
Sets the dirty state. Setting dirty to true will generate the serialized data for this node editor.
Declaration
public override void SetDirty()
Overrides
SortSlots()
Sorts the slots so they show up in the customized order.
Declaration
public void SortSlots()