ProductsServicesDownloadsNewsCompanyContact

yFiles.NET Release Notes

yFiles.NET version 3.1 is the newest release available. It contains many exciting new features and is almost completely API compatible with the 3.0 series.

Technical Requirements

  • Visual Studio.NET 2005 with installed Visual J# .NET version 2.0 for software development with yFiles.NET.
  • Microsoft .NET Framework 2.0 and Visual J# .NET version 2.0 Redistributable Package to execute yFiles programs.
  • Microsoft Internet Explorer 6.0 or higher, Mozilla Firefox 1.5 or higher to browse the documentation.
  • A Microsoft Windows operating system that supports the .NET platform.

yFiles.NET 3.1 - Changes Since 3.0.2

Major Features Added

Grouping support yEd.NET Line-wrapped layout Incremental grouping
Grouping support yEd.NET Line-wrapped layout Incremental grouping

Support for displaying and working with hierarchically grouped graphs

  • Implementations of interface yWorks.yFiles.UI.Model.IGroupedGraph can be used to model hierarchically organized groups of nodes in a graph. Nodes can be contained in group nodes with arbitrary nesting depths. Group nodes can be used like ordinary nodes.
  • The various IInputMode implementations fully support working with hierarchically grouped graphs. There are prebuilt gestures for moving nodes into and out of group nodes, for the creation of new group nodes, for grouping existing nodes, moving nodes inside group nodes, etc.
  • The LayoutGraphAdapter class automatically provides the grouping information to the layout algorithms that support the automatic layout of grouped graphs.
  • The clipboard facility, undo engine, and I/O mechanisms fully support grouped graphs transparently, too.
  • Two new node styles have been added: IPanelNodeStyle and IBevelNodeStyle. IPanelNodeStyle is especially well suited for use with group nodes.
  • The HierarchyTreeView class is an adapter that can be used to easily display the hierarchy of a graph (or any other IHierarchy instance) in a TreeView control.
  • A new label model implementation for nodes that is especially well suited for group nodes has been added. InteriorStretchLabelModel allows for displaying a label along the sides of a node stretching the label's size to accommodate the size of the group node.
  • The GraphML framework has been extended to fully support reading and writing hierarchically grouped graphs

Visual Enhancements

  • The HighlightPaintManager class can be used to highlight elements in the canvas to give the user appropriate visual feedback during edits. Most of the IInputModes that deal with an IGraph have been updated to make use of this feature.
  • A decorating node style - ShadowNodeStyleDecorator - has been added that can wrap most INodeStyle implementations and draw a smooth drop shadow below the original node style.
  • Added better automatic support for using gradient brushes to IShapeNodeStyle and IGeneralPathNodeStyle. There is an option that automatically transforms the gradient according to the position of the node, so that the rendering is location independent.
  • A new label model has been added that can be used to easily create custom labeling models from existing label models. GenericLabelModel can be assigned any number and type of ILabelModelParameter implementations and use these as the basis for a new label model.
  • NodeStyleLabelStyleAdapter has been added to the list of available ILabelStyle implementations. It takes both an existing node style and a label style and renders the background of the label using the node style and the foreground using the label style.

User Interface Enhancements

  • An IInputMode has been added that can be used to block user input, e.g. during an animation. WaitInputMode is by default registered by any MainInputMode and can be turned on to block user input.
  • An IInputMode that prevents the accidental creation of nodes when the user tries to put the focus into the CanvasControl has been implemented. FocusGuardInputMode captures the first mouse press on the canvas within a specified amount of time when the canvas regains focus.
  • IGridConstraintProvider can be used to constrain entity locations to a grid. The various IInputMode implementations and default implementations of IReshapeHandleProvider and IPositionHandler make use of this interface and constrain the location and size of their controlled entities to a grid.

OptionHandler Framework Enhancements

  • Several new classes and interfaces have been added to support interactive editing of model item properties, such as style properties, label models, etc. These can be found in the new namespaces yWorks.Option.DataBinding and yWorks.yFiles.UI.Option and build on the existing OptionHandler infrastructure.
  • An attribute-based declarative scheme allows to elegantly define option handlers for style classes. At application runtime an option handler can be automatically built for a selection of graph elements using reflection.

Incremental Hierarchical Layout Enhanced

  • Class y.layout.hierarchic.IncrementalHierarchicLayouter now supports hierarchically organized graphs. Both incremental as well as non-incremental ("from-scratch") layout mode have been enhanced to handle group nodes and their contents when calculating hierarchical layouts.

Hierarchical Layout Enhanced

  • Class y.layout.hierarchic.HierarchicLayouter now supports the notion of "constrained layering." New layerer implementation y.layout.hierarchic.ConstraintLayerer enables user-defined constrained layering, where nodes can be specified to be placed into the topmost or bottommost layer, or can be specified to be placed into the same layer or a layer preceding/following that of a given reference node.

New Compact Orthogonal Layout Algorithm

  • New orthogonal layout class y.layout.orthogonal.CompactOrthogonalLayouter uses a divide-and-conquer approach to provide compact orthogonal layouts that fit into a specified aspect ratio.
    CompactOrthogonalLayouter is an extension of new layout stage class y.layout.PartitionLayouter which offers general support for a four-phase layout process where node partitions are found according to a customizable scheme, then a layout is calculated for each partition, afterwards the partitions are arranged in a compact manner, and finally their inter-connecting edges are routed.

New Line-Wrapping Layout Algorithm

  • New layout stage class y.layout.GraphLayoutLineWrapper can be used to 'line-wrap' or 'column-wrap' graph layouts. GraphLayoutLineWrapper allows to specify width (height) or aspect ratio for the resulting line-wrapped (column-wrapped) diagram.

Orthogonal Edge Router Enhanced

  • In addition to the concept of port constraints, class y.layout.router.OrthogonalEdgeRouter now also provides support for PortCandidates, which can be used to specify a set of allowed connection points for an edge end.

New Orthogonal Edge Routing Algorithm

  • Class y.layout.router.ChannelEdgeRouter has been added to the suite of orthogonal edge routing algorithms. It uses a two step approach to find orthogonal edge routes and nicely exposes bus-like structures, i.e., sets of parallel edges between common nodes.

New Demo: yEd.NET

  • Demo.yFiles.GraphEditor, a full-featured graph editor application that presents the capabilities of the yFiles.NET Viewer component, has been added. It uses the option handler framework to provide a convenient user interface for changing any model item-related settings, features full clipboard and undo/redo support, and also allows access to all yFiles analysis and automatic layout algorithms.
Grouping support yEd.NET Line-wrapped layout Incremental grouping
Grouping support yEd.NET Line-wrapped layout Incremental grouping

Minor Features Added

Viewer and Editor-related

  • CanvasControl now allows for configuring the default setting of the PixelOffsetMode, TextRenderingHint, and InterpolationMode for the Graphics context used during the rendering via properties that have been named accordingly.
  • CanvasControl now also implements the ILookup interface. The GraphControl implementation by default contains the model and selection model, as well as the various paint manager instances in the look-up. The look-up is used as a fallback for the InputModeContextLookup which is provided to the IInputMode instances.
  • Animator now provides a number of alternative ways to invoke animations and to easily determine when an animation has ended. Also it can automatically block user input via the new WaitInputMode if it is used in conjunction with a CanvasControl.
  • Improved hit-testing performance of the existing edge style implemenations. This results in overall smoother editor interaction.
  • TextEditorInputMode can now be instructed to return the input focus to the canvas if the canvas had focus initially. This is now the default.
  • GraphEditorInputMode now provides convenience methods to perform clipboard and undo operations itself, either programmatically or with the usual shortcuts.

Model-related

  • IUndoSupport has been enhanced to provide a simpler way of describing compound edits. The new BeginCompoundEdit makes use of the new ICompoundEdit interface to provide a convenient way of creating and canceling compound edits.
  • The DefaultGraph implementation now supports optional interfaces that can be used to register listeners that will be informed of changes in the nodes' bounds and bends' locations.
  • The DefaultGraph implementation now supports easier customization of the undoability mechanisms. See the IGraphUndoUnitSupport.
  • The new ISizeConstraintProvider interface will be respected by the default implementation of the resize handles for nodes if a corresponding instance is bound to the look-up of the nodes.
  • Many of the model classes (IGraph and geometry-related) now provide a human readable presentation via the ToString method.

Automatic Layout

  • Class y.layout.ComponentLayouter now supports arranging components from sketch and introduces a new data provider look-up key to allow external declaration of components via a data provider.
  • New layout stage class y.layout.PortConstraintEnforcementStage can be used to enforce that a layout algorithm will not change the relative coordinates of ports that are associated with a strong port constraint.
  • Class y.layout.DefaultLayoutGraph now allows to specify multiple labels per node.
  • y.layout.organic.SmartOrganicLayouter optionally uses a smarter component layouting technique if a subset of nodes should be arranged only.
  • y.layout.organic.ShuffleLayouter introduces a new data provider look-up key to enable specification of nodes that should be pinned to their locations during shuffling.
  • Improved handling of port constraints with bad orthogonal edges in y.layout.router.OrthogonalEdgeRouter.
  • y.layout.hierarchic.incremental.SimplexNodePlacer: added methods setGroupCompactionStrategy(int) and getGroupCompactionStrategy() to allow better control over group bounds compaction behavior for IncrementalHierarchicLayouter.

GraphML

  • File format has changed for arrows and user tag objects. Reading/writing the old format is still supported.
  • IXmlWriter implementations can write raw document fragments. Additionally, there are callback delegates and related factory methods for reading and writing unmodified XML data in GraphML attribute sections.
  • File format version handling has been enhanced to allow automatic reading of older file formats where possible.
  • GraphMLIOHandler can be extended much more easily now.
  • All default serializers and deserializers can be retrieved by the corresponding context's Lookup method.
  • Instance pooling for pen, brush and image objects has been made optional and is diabled by default now.
  • Default value handling has been enhanced to omit data elements that would have a default value. Default value parsing also has been enhanced.
  • id attribute values of core GraphML elements can be persisted and customized.
  • Handler precedence is also supported for output handlers.

Demo Enhancements

  • All major demo applications have been enhanced to use the new grouping functionality.
  • Demo application Demo.Graph.UMLClassStyle has been improved to use new look-up features.
  • Demo.yFiles.Graph.LookupDecorator has been enhanced and shows new look-up features.

Bugfixes

  • y.layout.router.OrthogonalEdgeRouter: fixed problem with IllegalStateException that indicated that ports were located outside of nodes. The problem could occur for edges that carried strong port constraints.
  • y.layout.router.SnapOuterPortsToNodeBorderStage: Fixed bug where in some cases ports weren't snapped to the node border for non square nodes.
  • Fixed a problem where the automatic edge labelling algorithms ceased to work when certain label models were used.
  • y.layout.hierarchic.ConstraintLayerer: improved edge weight support.
  • y.layout.organic.RemoveOverlapsLayoutStage: for certain input graphs the minimum distances between nodes were much larger than necessary
  • Fixed a possible ClassCastException when using y.layout.hierarchic.incremental.PCListOptimizer.
  • Fixed a potential thread/memory leak in Animator if Destroy() was not called.
  • Fixed KeyboardInputMode not uninstalling properly.
  • GraphML now handles multiple simple GraphML attributes with equal names, but different scopes correctly.
  • Fixed problem with relative port locations in conjunction with non default node sizes in GraphML.
  • Fixed missing serialization of several label related properties.
  • Fixed several bugs in OptionHandler and ConstraintManager related classes that could lead to race conditions for concurrent updates.

Incompatible API Changes

  • The IInputMode API has been improved. There is a new context object IInputModeContext that is used for installing and removing an IInputMode into a CanvasControl. Implementations need to adjust the signature of the methods that previously took a CanvasControl as their first argument to now accept the IInputModeContext argument. The control instance can still be obtained directly from the context argument. Custom code that needs to call this API and does not have access to a readily configured IInputModeContext instance can use the implementations provided by and in SimpleInputModeContext.
  • The IInputModeContext context object has been added to most of the interfaces that deal with IInputMode instances, most notably IHandle and IPositionHandler, but also IPortCandidateProvider, NodeCreationCallback, and all of their default abstract and concrete implementations. Existing code needs to add the additional context parameter to the signature.
  • IHandle and IPositionHandler have been refactored to use the new IDragHandler interface as their common base class. Therefore the IHandle's Center property as well as IPositionHandler's X and Y properties have been replaced by the new Location property.
  • A new boolean property called NormalizeBrushes has been added to IShapeNodeStyle, ISimpleLabelStyle, IIconLabelStyle, and IGeneralPathNodeStyle as well as to their default implementations to allow for easier reuse of gradient and texture brushes. Alternative implementations of this interface need to add that property and should return 'false' as the default in order to remain backwards compatible. The new default of that property however is 'true', which in general is the more useful setting.
  • Three new properties have been added to ISimpleLabelStyle and its subinterface IIconLabelStyle: StringFormat, NormalizeBrushes, and ClipText. These properties influence the rendering of the text inside the label's layout as well as the rendering of the background brush. Alternative implementations of this interface need to add these properties and should return 'StringFormat.GenericDefault' as the default and a suitable default for the boolean properties respectively. As a consequence of these settings the SimpleLabelStyleRenderer enforces labels to be painted within the label's layout. Overlapping text will now be clipped by default.
  • The hit-test order for selecting elements in a GraphControl has been changed. Edge label hits and bend hits will be reported before node hits.
  • The SelfloopCreationAllowed property of CreateEdgeInputMode is now respected even if UseHitNodeTargetCandidatesOnly is set to true and the port candidate provider yields candidates that would imply the creation of a self-loop.
  • Throughout the API methods have been detected that had accidentally not been declared as virtual. For those that were meant to be overridden by subclasses, this modifier has been added to the signature. Existing subclasses that overrode those methods using the 'new' modifier need to replace it using the 'override' modifier or consider refactoring their usage.
  • The Animator class now inspects the Lookup of the CanvasControl it is used in to see if there is a WaitInputMode registered and if it is, it enables waiting. This will effectively block input to the other input modes that have been registered with the WaitInputMode into the same MultiplexingInputMode. If your code depends on the fact that input was not blocked during animation, you should use the Animator constructor that uses 'Control' as the parameter rather than CanvasControl.
  • The IUndoSupport interface now has an additional method that existing implementations need to add. Implementing the necessary ICompoundEdit interface should be straightforward, however.
  • ShapeGeometryPortCandidateProvider by default does not add the existing ports to the candidate list anymore. For backwards compatibility a property has been added that allows for resetting that behavior to comply with the previous one. Also a minimum segment length property has been introduced which will result in short segments not being taken into account anymore. Set this property to -1.0 to get back the old behavior.
  • The behavior of PathBasedEdgeStyleRenderer's method GetHitTestable and IsHit has been changed. The new implementation does not call Configure() during the call to the getter. If existing subclasses had overridden IsHit and depend on the fact that Configure() had been called, they need to override GetHitTestable, too and call Configure() accordingly.
  • SandwichLabelModel has been refactored and does not subclass WrappingLabelModel anymore.
  • FreeNodeLabelModel's implementation has been changed to better adhere to the specification. The label is now rotated around the offset and the top left corner of the unrotated label is placed at the offset point. Also the FindBestParameter method has been adjusted to better anticipate the resulting size of the label (which is the label's PreferredSize) and will thus yield slightly different results for label layouts that suggest a different size.
  • FreeLabelModel's FindBestParameter method has been adjusted to better anticipate the resulting size of the label (which is the label's PreferredSize) and will thus yield slightly different results for label layouts that suggest a different size.
  • CanvasControl's serialization code has been slightly refactored. The obsolete methods ShouldSerializeXXX and ResetXXX have been removed. Code that used the ResetXXX methods should use the corresponding property instead.
  • The GetSelectedObjects() method of ISelectionModel<T> has been removed. Code that used this method should now use SelectedObjects.GetEnumerator(), which is equivalent.
  • Interface yWorks.GraphML.Reader.DOM.GraphElementFactory has been renamed to yWorks.GraphML.Reader.DOM.IGraphElementFactory in the core GraphML namespace, whereas the implementation yWorks.yFiles.IO.GraphML.Reader.IGraphElementFactory has been renamed to yWorks.yFiles.IO.GraphML.Reader.DefaultGraphElementFactory. The same renaming scheme applies to interface yWorks.GraphML.Writer.GraphElementProvider and implementations.
  • Interface yWorks.GraphML.Writer.IGraphElementProvider (see previous note) now uses enumerators instead of indexed access to the graph elements.
  • Interface IXmlWriter declares a new method WriteDocumentFragment.
  • Interface IWriteContext declares new methods Count, NestingDepth and GetSerializationProperty. Interface IParseContext declares new methods Count, NestingDepth, CurrentGraph, NextToCurrentContainer, OnGraphMLParseError, and GetDeserializationProperty, while properties GraphMLParseErrorHandler and ReadUserTags have been removed. Additionally, property Containers is of type IEnumerator now in both interfaces.
  • Interface AttributeFactory declares new methods AttributeType and AttributeScope. Interface AttributeProvider declares a new method IsDefaultValue. Interface OutputHandler declares a new method IsDefaultValue, the abstract implementation AbstractOutputHandler provides a backward compatible implementation.
  • Interface DOMInputHandler: methods AcceptKey, ParseDefaultData and ApplyDefault have different signatures. The abstract implementation AbstractOutputHandler provides backward compatible implementations. Property DefaultValue has been removed and replaced by the default value handling mechanism.
  • All methods in class DOMGraphMLParser now take an additional IParseContext parameter. Additionally, this class has a new type parameter for hyperedge types.
  • Methods in class GraphMLWriter work directly on the graph element instead of indexed access - several signatures have been changed. Additionally, this class has a new type parameter for hyperedge types.
  • All protected callback methods in class XMLAttributesParser now take an additional XmlAttributeCollection parameter.
  • Method CanHandle in interface ISerializer now takes an additional IWriteContext parameter.
  • Abstract base class AbstractArrowSerializer<T> has been removed, extend AbstractSerializer directly for your arrow type.
  • Class GraphMLIOHandler has been refactored for easier customization. This effects several callback methods and protected fields.
  • Abstract default implementations AbstractXXXStyleDeserializer of IDeserializer have been removed, instead AbstractDeserializer should be implemented directly
  • y.base.Graph: calls to disposeNodeMap(y.base.NodeMap) or disposeEdgeMap(y.base.EdgeMap) will now throw IllegalArgumentException if the given map had not been created with this specific instance. Dispose your maps on the correct Graph to avoid those exceptions.
  • Removed deprecated listeners field of class y.base.Graph and switched to a better performing internal implementation.
  • The ASP.NET related classes GraphControl/GraphImage and CanvasControl/CanvasImage now by default use the "image.ashx" string as the "ImageFileHandler". If your code relies on the old value "image.jpg", you need to manually set the property back to that value.