GoDiagram 3.0 released

<O:P></O:P>
Summary of Significant New Features since 2.6.2
The complete list of changes and new features is included in *Readme files.

GoShape and Brush/Pen changes: [limited in GoDiagram Pocket]
  • added GoBrushStyle enum, enumerating common simple brushes (including hatch patterns and various gradients)
  • added GoShape.Fill... methods, for convenience in specifying common simple gradient brushes [not in GoDiagram Pocket]
  • added GoShape/GoListGroup properties: BrushStyle, BrushColor, BrushForeColor, BrushMidColor, BrushMidFraction, BrushPoint, BrushStartPoint, BrushFocusScales
  • improved GoShape.Brush, when set to a simple LinearGradientBrush or PathGradientBrush, to automatically rescale and translate the brush as the shape is moved or resized; when set to a TextureBrush, it is automatically translated as the shape is moved
  • added GoShape.PenColor and GoStroke.HighlightPenColor and GoStroke.HighlightPenWidth properties
  • promoted GoStroke.PenWidth property to GoShape.PenWidth [but wide pens are only supported on GoStroke in GoDiagram Pocket]
  • added GoListGroup properties: LinePenColor, LinePenWidth, BorderPenColor, BorderPenWidth
  • added GoSubGraph properties: BorderPenColor, BorderPenWidth
  • added GoTextNode.Shape property, returning the Background as a GoShape, for convenience in modifying the shape
  • added GoComment.Shape property, returning the Background as a GoShape, for convenience in modifying the shape
GoDrawing and GoFigure: [but not in GoDiagram Pocket]
  • added GoDrawing class and GoFigure enum
  • added GoBasicNode(GoFigure) constructor and GoBasicNode.Figure property
  • added GoTextNode(GoFigure) constructor and GoTextNode.Figure property
  • improved GoIconicNode/GoSimpleNode/GoGeneralNode to create a GoDrawing instead of a GoImage as the Icon when the call to Initialize(ResourceManager, String, ...) has a null value for the "iconname" parameter
  • added GoIconicNode/GoSimpleNode/GoGeneralNode.Shape property, referring to the Icon as a GoShape when it is a GoDrawing
  • added GoIconicNode/GoSimpleNode/GoGeneralNode.Figure property, referring to the GoDrawing.Figure of the Icon when it is a GoDrawing
GoGeneralNode:
  • added GoGeneralNode.LeftPortLabelsInside and RightPortLabelsInside properties, to determine whether GoGeneralNodePortLabels should be inside the node, over the Icon
  • added GoGeneralNode.LeftPortsLabelSpacing and RightPortsLabelSpacing properties, to specify the spacing between GoGeneralNodePorts and their GoGeneralNodePortLabels
  • added GoGeneralNode.LeftPortsAlignment and RightPortsAlignment properties, to specify the positioning of ports outside/straddled/inside the Icon edge
Miscellaneous:
  • added GoRoundedRectangle.RoundedCornerSpots property, to specify which corners should be rounded
  • added GoText.EditableWhenSelected property to have GoText.OnSingleClick only start in-place editing when part of a selected object
  • added caching of Images by GoImage: from ImageList, from ResourceManager, from disk files, and from the web
  • added GoObject.GetContextMenuStrip method, for .NET 2.0 or later [but not in GoDiagram Pocket]
  • added GoDocument.TestSerialization method, to help debug serialization errors, e.g. during a copy-and-paste [not in GoDiagram Pocket]
XML binding:
  • added GoXmlBindingTransformer class, for declarative binding of XML attributes with object properties
GoLayoutForceDirected:
  • improved performance when starting with overlapping nodes, particularly for somewhat tree-like structured graphs
  • improved GoLayoutForceDirected to support laying out GoBalloon comments associated with nodes
GoLayoutLayeredDigraph
  • improved routing of Bezier-style or Orthogonal links

The GoFigure enumeration, listing various predefined GoDrawings. Can be used with Pens, Brushes, gradients for variety.

You can look at an old User's Guide to see the amount of effort required previously for a Rounded Rectangle with a gradient fill. You basically derive a class from GoRoundedRectangle, override the Brush getter to create the gradient brush, etc.

In 3.0:
GoBasicNode node = new GoBasicNode();
node.Shape = new GoRoundedRectangle();
node.Shape.FillHalfGradient(Color.Blue);
will get you:

GoXmlBindingTransformer makes the reading and writing XML a lot easier. You create a GoXmlBindingTransformer for each class you want to store in XML, then add a binding for each element attribute you want to save.

Here’s some sample code from DoubleTree:

[code] // load the tree, as nodes and links, from an XML file
using (Stream stream = typeof(Form1).Assembly.GetManifestResourceStream(“DoubleTree.data.xml”)) {
// construct a prototype node
GoBasicNode protonode = new GoBasicNode();
protonode.Shape = new GoRoundedRectangle();
protonode.LabelSpot = GoObject.Middle;
protonode.Text = “”;
protonode.Label.Multiline = true;

    GoXmlBindingTransformer tr = new GoXmlBindingTransformer("node", protonode);
    tr.AddBinding("text", "Text");
    tr.AddBinding("dir", "UserFlags");
    tr.AddBinding("color", "Shape.BrushColor");

    // construct a prototype link
    tr.TreeStructured = true;  // XML will consist of nested <node>s
    GoLink protolink = new GoLink();
    protolink.ToArrow = true;
    tr.TreeLinkPrototype = protolink;

    GoXmlReader xr = new GoXmlReader();
    xr.AddTransformer(tr);
    xr.RootObject = doc;   // add nodes and links to the view's document
    xr.Consume(stream);
  }[/code]

Many of the sample applications have been updated to use GoXmlBindingTransformer. For example, note how StateCharter has been extended with all of the Pen/Brush/Font info from GoDrawing as well.

The new BeatPaths sample demonstrates the improved routing of Bezier style link by GoLayoutLayeredDigraph.

<o:p>The BeatPaths sample also demonstrates GoImage.NameIsUri, where the images can be on the web.</o:p>

no wise cracks about the Patriots, either.

I want to highlight my favorite little one-plus:

added GoText.EditableWhenSelected property to have GoText.OnSingleClick only start in-place editing when part of a selected object
Allows you to click on the label part of a node to select the node without the @%#&$^ thing going into edit mode. A second click on the label will start editing.

Jake will answer your release date question – it should be soon, since we’re just improving the documentation and waiting for any bugs to be reported on the public beta release.

I just wanted to post a screenshot of another neat new feature: controlling the relative positions of the ports and of their labels on a GoGeneralNode.

Of course the appearance of each port is controlled by the GoPort.Style property, as well as its Brush… and Pen… properties, since GoPort inherits from GoShape.

The first node was created by:

GoGeneralNode gn = new GoGeneralNode(); gn.Initialize(null, null, "PortsAlignment", "outside", 5, 5); gn.Shape.Width = 50; gn.Shape.BrushColor = Color.Gray; goView1.Document.Add(gn);
The rest of the nodes just had their …PortsAlignment and …PortLabelsInside properties set appropriately, for both the Left side and the Right side.

We have also added the GoRoundedRectangle.RoundedCornerSpots property, so that you can specify which of the four corners should be rounded. Use any combination of the flags: GoObject.TopLeft, GoObject.TopRight, GoObject.BottomRight, GoObject.BottomLeft.

Here’s all sixteen possible combinations of values for RoundedCornerSpots:

Another useful feature is the GoPort.IsValidSingleLink property. When set, the user may draw at most one link connected to that port. It does not matter whether the link is going into or coming out of the port. If you want to limit the direction for which users can draw links, you can continue to set the GoPort.IsValidFrom or GoPort.IsValidTo properties.

This is the same as if one set the value of LimitedNodePort.MaxLinks = 1 or MultiPortNodePort.MaxLinks = 1, for those two example classes in Demo1.

Of course if you need the flexibility to allow a maximum number of links to be something greater than 1, you will still need to override GoPort.CanLinkFrom and GoPort.CanLinkTo, just as LimitedNodePort and MultiPortNodePort do.

Samples in V3, by environment (WinForms, WebForms and WinForms GoDiagram Express) in C# and Visual Basic. (new samples in red)



Sample Name Win C# WinVB Web C# Web VB Express C# Express VB
AnimatedBasicApp
X
X
BasicApp
X
X
X
X
X
X
BeatPaths
X
X
X
X
Classier
X
X
X
X
X
X
DataSetDemo
X
X
X
X
Demo1
X
X
X
X
X
X
DoubleTree
X
X
X
X
FamilyTree
X
X
X
X
X
X
Fishbone
X
X
X
X
FlowCharter
X
X
X
X
X
X
Flowgrammer
X
X
X
X
GridApp
X
X
X
X
IconicApp
X
X
X
X
X
X
InstrumentDemo
X
X
X
X
InteractiveForce
X
X
LayoutDemo
X
X
X
X
MinimalApp
X
X
X
X
X
X
MovableLinkApp
X
X
ObjectBrowser
X
X
X
X
OrgCharter
X
X
X
X
X
X
Planogrammer
X
X
X
X
Processor
X
X
X
X
ProtoApp
X
X
X
X
SequenceDiagram
X
X
X
X
SequentialFunctionChart
X
X
X
X
SharedStates
X
X
X
X
StateCharter
X
X
X
X
X
X
SubGraphApp
X
X
X
X
TreeApp
X
X
X
X
X
X
UpdateDemo
X
X
X
X
WebWalker
X
X
X
X
WPFinGoView *
X
WPFusingGoView *
X
  • these 2 WPF samples are only in the kit for .NET 3.5 / Visual Studio 2008.

New Sample: DoubleTree

New Sample: SharedStates

New sample: Sequence Diagram

New sample: Sequential Function Chart

New sample: GridApp. Shows Grids, restricted dragging.

New sample: AnimatedBasicApp

Often people ask about how to animate motion along links. This sample demonstrates using a Timer, custom Painting by a GoLink, and changing the GoBasicNode.Shape.PenWidth.

Here are two screenshots, taken some time apart:

New example class: Timeline

This was added to the InstrumentDemo sample in version 2.6.2, but apparently we forgot to publicize it.

Two screenshots of differently configured TimelineGroups:

Remember that these are GoObjects, not Windows Forms or Web Forms Controls.

Sometimes we do a little thing we don’t think much about, but it can be a huge help to people getting started with GoDiagram. One thing we did in 3.0 was to define Visual Studio Solution files for ALL of the demos in one solution.

Samples/Samples2.sln - VS 2005
Samples/Samples3.sln - VS 2008
SamplesVB/SamplesVB2.sln - VS2005
SamplesVB/SamplesVB3.sln - VS2008
Each of these opens all the samples in one easy operation. This makes it easy to search all the samples, and find (for example) that GoXmlBindingTransformer is used in Demo1, FlowCharter, OrgCharter, Planogrammer, ProtoApp and StateCharter.