Northwoods.Go Assembly > Northwoods.Go Namespace : GoSimpleNode Class |
'Declaration <SerializableAttribute()> Public Class GoSimpleNode Inherits GoNode Implements IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode, IGoNodeIconConstraint
[SerializableAttribute()] public class GoSimpleNode : GoNode, IGoCollection, IGoGraphPart, IGoIdentifiablePart, IGoLabeledNode, IGoLabeledPart, IGoNode, IGoNodeIconConstraint
Call the Initialize
method to construct the standard parts of this kind of node. The ports are normally on the left side and on the right side of the icon, and the Label is on the bottom. If you set Orientation to Orientation.Vertical
, the InPort will be on top and the OutPort will be on the bottom, and the Label will be on the right side. In order to remove either port you can set either InPort or OutPort to null, or you can call GoObject.Remove on the port.
The Icon is normally a GoNodeIcon, but could be any kind of GoObject. When it is a GoImage, the Image property gives you convenient access to the icon's image properties. The image will normally be sized at MinimumIconSize.
When then first two arguments to Initialize(ResourceManager,String,String) are null, the node is initialized to use a GoDrawing instead of a GoImage. After initialization you can set the Figure property if you want to display one of the standard GoFigures.
You can also set the Icon to be any kind of GoObject, including other kinds of GoShapes. The Shape property provides convenient access to the icon when it is a GoShape, to allow you to initialize its brush and/or pen. If your icon is a GoGroup, it might be convenient to override Shape and perhaps Figure to refer to the appropriate shape or drawing in the group.
Remember that GoPort also inherits from GoShape, so you can easily set the brush and/or pen, as well as setting the port's Style.
Setting the GoNode.Location, GoNode.Resizable, GoNode.Reshapable and GoNode.Shadowed properties actually set the same properties on the SelectionObject, which is the Icon.
System.Object
Northwoods.Go.GoObject
Northwoods.Go.GoGroup
Northwoods.Go.GoNode
Northwoods.Go.GoSimpleNode
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2