Release Notes
yFiles for Java (Swing)

Version 4.0.0.1 is the latest release for yFiles for Java (Swing) in the yFiles for Java (Swing) 4.0 major release series.
See the changelog for a list of all changes in this and all other versions.

Below you will find the technical requirements and a list of all new features and improvements.

Technical Requirements

Building applications based on yFiles for Java (Swing) requires the Java SE Development Kit 8 or newer. Running the demo applications requires JRE 21 or newer.

All changes
Version 4.0

This version brings a major overhaul of many parts of the API, resulting in a lot of incompatible changes. We have designed many functions to be simpler, more intuitive and more consistent and removed technical debt. In addition, this release contains numerous new features, improvements, and bug fixes to all parts of the library.

New Features, Improvements, and Bug Fixes

Categories: General Graph GraphBuilder Components Rendering Selection, Focus, Highlight Styles Interaction Label Editing Snapping Clipboard Folding GraphML Demos View-Layout-Bridge Layout Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Circular Layout Radial Layout Radial Tree Layout Alignment Stage Series-parallel Layout Clear Area Layout Multi-page Layout Partial Layout Tabular Layout Component Layout Algorithms Analysis Geometry

General

New Features and Improvements

  • The yFiles for Java (Swing) event handling has been refactored to be in line with the Java event handling API:
    • The IEventArgs interface that all yFiles *EventArgs classes inherited from has been removed. Instead, the *EventArgs classes now extend java.util.EventObject.
    • As EventObject takes the event source as parameter and provides it as property, all constructors now take the event source as first parameter.
    • The IEventListener interface now extends java.util.EventListener and the event source parameter has been removed from its onEvent method.
  • The lookup API has been restructured. In particular, the LookupDecorator class is now easier to use, but most use cases are covered without having to access the low-level lookup architecture.
  • Added missing information whether method return values, method parameters, or properties can or cannot be null.

Graph

New Features and Improvements

  • The new IGraph#getEdgesBetween method returns all edges between two ports or port owners.
  • CompositeLabelModel now cannot only combine label models but also individual label model parameters or a mix of both kinds. Furthermore, it supports assigning a profit value to a parameter or model that can be used when placing labels during an automatic layout.
  • The new CompositeLabelModel#addParameter method wraps a given parameter of one of the composed label models.
  • The methods of IGraph now check consistently whether given geometric arguments are neither infinite nor NaN.
  • The rotation direction of OrientedRectangle, NodeLabel, EdgeLabel and FreeEdgeLabelModel is now clockwise to be consistent with the other models.
  • The default placement for new edge labels is now on the middle of the edge path instead of on the first edge segment.
  • The label models ExteriorLabelModel, InteriorLabelModel, and InteriorStretchLabelModel have been renamed to ExteriorNodeLabelModel, InteriorNodeLabelModel, and StretchNodeLabelModel, respectively, to make it clear that only nodes are supported as label owner for these models.
  • The implementations of ILabelModelParameter and IPortLocationModelParameter used by the ILabelModel and IPortLocationModel classes are now public and provide all properties necessary to recreate them on the models. Consequently, the static LabelModelParameterSerializer and PortLocationModelParameterSerializer classes, which could be used to retrieve those properties and recreate the parameter, have been removed.
  • The ILabelModel parameter of the ILabelModelParameterFinder#findBestParameter and ILabelModelParameterProvider#getParameters methods has been removed as it was only very rarely required.
  • The GraphCopier API has been enhanced to offer improved clarity and functionality.
  • The SimpleNode, SimpleEdge, SimpleBend, SimpleLabel, and SimplePort classes now provide a convenience LookupDecorator instance through the getDecorator method.
  • The ILabelModel#createDefaultParameter method and most of its implementations have been removed as it was often unclear what β€œdefault” meant. Most label models already had a corresponding Create*Parameter method. For the remaining models, the GroupNodeLabelModel#createTabParameter method and the FreeNodeLabelModel#CENTER and FreePortLabelModel#CENTER fields have been added.
  • The structural properties on graph items now are never null. This affects IEdge#SourcePort, IEdge#TargetPort, ILabel#Owner, IPort#Owner, and IBend#Owner.
  • The IGraph#groupNodes method now has overloads with additional parameters that specify the Style and Tag of the newly created group.
  • EdgePathLabelModel and EdgeSegmentLabelModel have been improved to provide better placements with edge-cases where the path is too short for the label or degenerates completely.
  • GroupNodeLabelModel no longer triggers an IllegalArgumentException when used with / set for a node that does not use GroupNodeStyle. GroupNodeLabelModel is still not intended to be used with nodes that do not use GroupNodeStyle. This restriction has been lifted to support workflows where the node style is set to GroupNodeStyle after the label model is set to GroupNodeLabelModel.
  • Changing the height of an arc or bridge edge via its handle is now undoable.
  • The static parameter fields of FreeNodePortLocationModel have been renamed analogue to the static parameter fields in InteriorNodeLabelModel.
  • FilteredGraphWrapper now supports changing the node and edge predicates after creation.
  • The PropertyChanged event on the UndoEngine class is now also emitted if the token is changed.
  • The methods YList#addFirst and YList#addLast have been renamed to push and pushLast, so they don't conflict with the default methods
    List#addFirst and addLast that have been added with JDK 21.

Bug Fixes

  • Fixed ILabelOwner.getLabels().contains and IPortOwner.getPorts().contains implementations. Previously, these methods returned true for all labels/ports in the owner's graph instead of only for labels/ports belonging to the owner.
  • Fixed a bug in EdgeSegmentLabelModel and EdgePathLabelModel which caused a gap in supported positions close to the source and target node.
  • When using the EdgeSegmentLabelModel and SmartEdgeLabelModel classes, label placement at source and target nodes is now correct when an index is specified that is less than zero or greater than the number of bends of the edge.
  • The EdgeSegmentLabelModel class now calculates valid label locations for selfloop paths with one port at the side of the node.
  • The EdgeSegmentLabelModel class now calculates valid label locations for paths with duplicate bends, i.e., paths in which two or more consecutive bends have the same location.
  • GraphClipboard now properly respects ParentNodeDetection mode for sub trees.
  • GraphClipboard's ParentNodeDetection now can use ParentNodeDetectionModes#NONE as fallback if no valid parent is found for modes ParentNodeDetectionModes#SELECTION or ParentNodeDetectionModes#PREVIOUS_PARENT.
  • Fixed NullPointerException that occured when removing highlighted edges from their graph.
  • Fixed memory leak in HighlightIndicatorManager that occurred when removing highlighted model items from their graph.
  • Fixed a bug where labels with an initial opening brace were not correctly serialized.
  • NinePositionsEdgeLabelModel center placements above and below the edge have been improved when the angle wasn't close to one of the two coordinate axes and the distance was non-zero. Previously, labels could seem to jump around when the path changed and weren't always close to the center of the path.
  • GroupNodeLabelModel no longer stretches tab labels and tab background labels into the collapse/expand icon of the corresponding GroupNodeStyle.
  • GroupingSupport's methods enlargeGroupNode and enlargeAllGroupNodes do not create empty undo units anymore if nothing has changed.
  • The methods NavigationInputMode#expandGroup and NavigationInputMode#enterGroup, as well as the Command#EXPAND_GROUP and Command#ENTER_GROUP commands do not create empty undo units anymore if nothing has changed.
  • Method NavigationInputMode#exitGroup and the Command#EXIT_GROUP command now create undo units if the bounds of the exited group node were adjusted.

GraphBuilder

New Features and Improvements

  • The NodeCreator#getUpdatedStyle, EdgeCreator#getUpdatedStyle, and LabelCreator#getUpdatedStyle methods now uses the default style from the graph as fallback if the style provider is not set.
  • The LabelCreator#getUpdatedLayoutParameter method now uses the default layout parameter from the graph as fallback if the layout parameter provider is not set.
  • The NodeCreator, EdgeCreator, and LabelCreator classes can now be used without a GraphBuilder. This enables developers to apply styles and labels from a data object in cases where a GraphBuilder is not suitable for graph creation.
  • A NodesSource now allows for recursive definition of child nodes in a grouping hierarchy. The new methods addChildNodesSource and createChildNodesSource allow for defining a source to fetch child node items from a node data item.
  • A NodesSource now allows for implicit definition of parent nodes in a grouping hierarchy. The new methods addParentNodesSource and createParentNodesSource allow for defining a source to fetch a parent node item from a node data item.

Components

New Features and Improvements

  • The rendering order of nodes in the GraphOverviewComponent has been improved to be more in sync with the rendering order in the corresponding GraphComponent.
  • GraphOverviewComponent now uses its ContentGroup instead of the RootGroup to add the visualization of its graph content. This makes it easier to customize the overview for example by adding a background visual.
  • The GraphModelManager#LabelLayerPolicy property, which defines whether labels should be rendered at their owner or in a separate layer, has been split into three separate properties NodeLabelLayerPolicy, EdgeLabelLayerPolicy, and PortLabelLayerPolicy to support different policies for node, edge, and port labels.
  • The new SelectionModelChanged event of GraphComponent is raised when the model managing the selection is changed itself, not when the selected items change.
  • Adding visuals without an explicit size directly to canvas object groups (instead of VisualGroup instances) now works consistently. Previously, they may sometimes never have appeared.
  • ViewportLimiter now also works with isometric projections and offers options to use the CanvasComponent#ContentBounds for the limiting. It now offers the possibility to specify margins in the view coordinate system around the specified bounds, and bounds can be given as a list of convex polygon points. CanvasComponent now also notifies the viewport limiter when the size of the ContentBounds or the size of the CanvasComponent changes.
  • CanvasComponent and GraphComponent now have a new scroll bar design, as well as new behavior if either HorizontalScrollBarPolicy or VerticalScrollBarPolicy is set to AS_NEEDED. The new style is similar to system scrollbars in many operating systems, overlays the content and gets out of the way when not needed or interacted with. These dynamic scroll bars can be disabled using a client property with key CanvasComponent#DISABLE_DYNAMIC_SCROLL_BARS.
  • GraphComponent now uses GraphViewerInputMode as the default InputMode for basic graph exploration.
  • The ICanvasContext#CanvasComponent property (and consequently IRenderContext and IInputModeContext) is now guaranteed to have a non-null value.
  • All predefined IEventRecognizer constants can now be found in the same class, IEventRecognizer, which improves discoverability. In addition, their names now follow the platform conventions, i.e. they are formulated in the present tense and use the same wording as corresponding input events.
    Similarly, the events on CanvasComponent which are related to input devices now have the same consistent names.
  • The CanvasComponent#ContentRect property is now named ContentBounds to make its purpose more clear. The ContentRectUpdatingEnabled method has been renamed likewise.
  • The superfluous CanvasComponent#setContentRect method has been removed in favor of the setter of the ContentBounds property.
  • It is now possible to have more than one BridgeManager. This allows you to have different types of bridges on different types of edges.
  • Small scrollbar changes and the factor for scrolling with the mouse wheel (MouseWheelScrollFactor) have been increased to allow for faster scrolling.
  • The new CanvasComponent#HorizontalScrollEventRecognizer property allows customizing switching from vertical to horizontal scrolling.

Bug Fixes

  • CanvasComponent: Animated viewport changes could lead to strange behavior if maximum or minimum zoom were set and violated by the viewport change.
  • Fixed a bug which might have caused port selection visualizations to disappear in image export or printing under rare conditions.
  • Fixed an issue where a sequential animation would break when the preferred duration was set to zero.

Rendering

New Features and Improvements

Selection, Focus, Highlight

New Features and Improvements

Styles

New Features and Improvements

  • New styles that are based on the composition design pattern make it easier to combine existing styles into a single item visualization. These styles are available for all graph items via the CompositeNodeStyle, CompositeEdgeStyle, CompositeLabelStyle, and CompositePortStyle classes.
  • Similarly, new styles that are based on the delegation design pattern make it easier to implement custom styles that extend an existing style. For this, derive your style implementation from the DelegatingNodeStyle, DelegatingEdgeStyle, DelegatingLabelStyle, or DelegatingPortStyle class.
  • The new ShapePortStyle class displays ports as geometric shapes and supports the same shapes as the ShapeNodeStyle class.
  • The Arrow class now supports more types and features. In particular:
    • There are three new shapes that are similar to what is available in common drawing apps: ArrowType#CHEVRON, ArrowType#DELTOID, and ArrowType#KITE.
    • The width and height can now be scaled independently from each other.
    • An arrow can now specify whether the end of the edge the arrow belongs to should be cropped at the port or at the boundary of the port's owner. This alleviates the need to use PortDecorator#EdgePathCropper for this.
  • The new AbstractPathEdgeStyle class simplifies using a complex GeneralPath as the edge path of a style. Subclasses only have to create the path while the style already handles the visualization, including placing arrows and bridges. Several callback methods can be overridden to customize the behavior.
  • The ShapeNodeStyle class now supports more shapes, namely PENTAGON, OCTAGON_STANDING, TRIANGLE_POINTING_LEFT, and TRIANGLE_POINTING_RIGHT. These shapes are also available as TextWrappingShape.
  • Node shapes that are stars or arbitrary polygons are now easy to implement with new factory methods of the GeneralPathNodeStyle class.
  • Group nodes and nodes with GroupNodeStyle now have more useful default port candidates. Either four candidates, one in each cardinal direction, for group nodes with GroupNodeStyle. Or a single central port for folder nodes with a GroupNodeStyle.
  • The CollapsibleNodeStyleDecorator class positions and styles the button now closer to what GroupNodeStyle does to achieve a more modern look.
  • The new getLassoTestable method of the interfaces INodeStyleRenderer, IEdgeStyleRenderer, ILabelStyleRenderer, and IPortStyleRenderer is similar to the existing getMarqueeTestable method, so marquee and lasso selection do no longer differ in the ways the testable is retrieved.
  • The ArrowEdgeStyle's bounds now are tightly enclosing the rendered shape. Before they were too large.
  • Bends in edges that use ArcEdgeStyle, ArrowEdgeStyle, or BridgeEdgeStyle are no longer shown when selecting these edges. Additionally, marquee and lasso selection will not select these bends anymore even if they lie in the selection rectangle.
  • The IconLabelStyle now has a default icon size of 24x24 instead of empty, such that the icon is always visible.
  • If GroupNodeStyle's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e. the corners of the content area on the side of the style's tab) to 0.
  • GroupNodeStyle's new MinimumContentAreaSize property simplifies enforcing a minimum size for the content area a group node.
  • GroupNodeStyle offers the possibility to have its tab width grow (or shrink) depending on the preferred size of associated tab and tab background labels.
  • The new GroupNodeStyle#RenderingTransparentContentAreaEnabled property controls whether a semi-transparent ContentAreaPaint works as expected by showing what's behind the group node.
  • ShapeNodeStyle now considers the pen thickness when rendering rectangle, round rectangle and ellipse shapes, i.e. the pen is rendered half inside and half outside the node bounds, like for the other shapes.
  • Pens with dash pattern now support BasicStroke#CAP_BUTT as end line cap. Previously the cap was changed to BasicStroke#CAP_SQUARE.
  • The classes AbstractEdgeStyle, AbstractNodeStyle, AbstractLabelStyle, AbstractPortStyle, and AbstractStripeStyle are now generic and take the subtype of the IVisual that is returned by their createVisual and updateVisual methods as generic type.

Bug Fixes

  • GroupNodeStyle's associated IGroupPaddingProvider now correctly calculates insets for β€œsmall” nodes, i.e. nodes whose height (or width) is less than the style's TabHeight property.
  • The selection, highlighting and focus visualization of edges using BridgeEdgeStyle or ArcEdgeStyle no longer disappears too early if the edge path is only partially in the viewport.
  • The intersection calculation for RectangleNodeStyle has been corrected for some previously failed instances that caused edges to end in midair or disappear.
  • The following node styles now consider the pen thickness in the visibility test: ShapeNodeStyle, ArrowNodeStyle, GeneralPathNodeStyle, GroupNodeStyle, and RectangleNodeStyle.
  • With ArcEdgeStyle, the three center positions of the NinePositionsEdgeLabelModel are now in the right places. Previously they were often way off.
  • GroupNodeStyle's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests.
  • GroupNodeStyle no longer renders a hairline in place of the tab when using a Pen with TabWidth 0.
  • LabelStyle now adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape.
  • Bezier edges no longer devolve into polyline paths under rare circumstances.
  • ArrowEdgeStyle now correctly considers its visibility with thicknesses greater than 13.

Interaction

New Features and Improvements

  • Marquee and lasso selection have been enhanced to support multiple selection policies. While the default gestures replaces the selection, pressing the Ctrl , Shift , or Alt modifier during the gestures extends, subtracts or toggles the current selection with the elements in the marquee or lasse area.
  • The IHitTester interface has been changed to support faster hit testing. The generic type has been removed. Instead, a GraphItemTypes parameter has been added that is used to reduce hit tests to the specified item types.
  • The new PointerLongPress event is raised when the mouse is pressed and stays still for a configurable amount of time.
  • The new PointerLongRest event is raised when the pointer stays still for a configurable amount of time during a move or drag gesture.
  • All events of an IInputMode which report creation of, changes to, or deletion of model items now have arguments of type InputModeItemEventArgs or InputModeItemChangedEventArgs. This type provides the affected item and the IInputModeContext for the involved input mode.
  • The keys to modify the gestures of various input modes have been adjusted to better match those of other often used applications:
    • To temporarily disable snapping during edge creation, moving, or resizing items, the Alt key can now be pressed instead of the Ctrl key.
    • When resizing a node using its reshape handles, the Ctrl key instead of the Alt key can be pressed to keep the center of the reshaped node.
    • To reparent a node to another parent during a drag gesture, the Ctrl key has to be pressed instead of the Shift key.
  • Moving items interactively now supports constraining the move gesture to an octilinear direction. This constraint is used when pressing the Shift key while dragging the items.
  • The new GraphEditorInputMode#CreationSelectableItems property allows you to specify GraphItemTypes which should be selected after creation.
  • The new CreateEdgeInputMode#EdgeDirectionReversed event and the new CreateEdgeInputMode#onEdgeDirectionReversed method are triggered when the direction of the edge creation changed during edge creation.
  • The new HandleType#VOID enum value makes a handle invisible and excludes it from hit testing.
  • Reconnecting edges to other nodes is now allowed per default.
  • Elements can now be moved without selecting them first.
  • The new CreateEdgeInputMode#MinimumSelfLoopBendCount property allows for specifying the number of bends an edge must at least have before it can be created as selfloop.
  • The new CreateEdgeInputMode#ShowStartPortCandidateDelay property allows for specifying a delay after which start port candidates are displayed when the user hovers over a start port candidate owner.
  • The new GraphEditorInputMode#MovableUnselectedItems property allows for defining items which can be moved without selecting them first. The MovableUnselectedItemsPredicate property can be used for closer specification.
  • Edge creation now supports constraining the current edge segment to use an octilinear direction. This constraint is used when pressing the Shift key while dragging the pointer.
  • The new GraphEditorInputMode#setNodeLocation method uses the IPositionHandler of a node to change its location, and this way also adjusts the attached orthogonal edges and the position of child nodes if the given node is a group node.
  • The CanvasComponent's event system is now based on the PointerEventArgs API instead of mouse events.
  • The MoveInputMode class now also handles moving labels, thus the MoveLabelInputMode has been removed.
  • The event ItemsCopied on GraphViewerInputMode and the events ItemsCopied, ItemsCut, ItemsPasted, ItemsDuplicated, and DeletedSelection on GraphEditorInputMode now use ItemsEventArgs providing the items that are the subjects of the events.
  • Lowered the MoveViewportInputMode#Priority to 105 to make viewport panning with CTRL or SPACE modifiers easier in dense graphs.
  • The rendering order of visuals created by an InputMode now corresponds to the input mode's Priority. In other words, visualizations of input modes with a smaller priority value (= higher priority) are drawn on top.
  • The GraphViewerInputMode#findItems and GraphEditorInputMode#findItems methods now consider the actual z-order of the hit items.
  • The GraphViewerInputMode#ItemClicked and GraphEditorInputMode#ItemClicked events and the cyclic selection now consider the actual z-order of the hit items at the cursor location. Bends and invisible ports are now properly taken into account and hit before their owners.
  • The PointerEventArgs#Handled property has been added that can be used to set and detect if another listener already handled the event.
  • MoveViewportInputMode now gracefully handles concurrent programmatic viewport modifications.
  • The modifier for using the ILabelModelParameterFinder during label movement can now be changed with the LabelPositionHandler#UseParameterFinderRecognizer property.
  • The ClickInputMode#Clicked event is now raised also for double-clicks and multi-clicks. Clicking multiple times in the same location increments the ClickEventArgs#ClickCount by one for each click.
  • The MoveInputMode and MoveUnselectedInputMode properties of GraphEditorInputMode have been renamed to MoveSelectedItemsInputMode and MoveUnselectedItemsInputMode to better describe what they are used for. Associated properties and methods have been renamed accordingly.
  • Starting edge-creation from a child node inside a group node now does not immediately snap to the parent when moving over the group nodes content. Instead, it only snaps to the closest port when hovering the tab or stroke.
  • Toggling the item selection via Ctrl+Space now prefers toggling the selection state of GraphComponent#CurrentItem over deselecting a single selected item.
  • The IInputMode API has been updated for clarity: the InputMode property has been removed from the interface. Instead, most implementations now offer the protected ParentInputModeContext property to clearly indicate its role as the input mode's parent context. Most input modes can create a context which can be passed to dependents via the protected createInputModeContext method. The created context has the input mode set as the parent input mode. The new InputModeContext class may be used by implementations to conveniently create new contexts.
  • When using the GraphViewerInputMode, the viewport can now be moved by either dragging with the left or middle mouse button.
  • When using the GraphEditorInputMode, the viewport can now be moved by either dragging with the middle mouse button or by dragging with the left mouse button when pressing the Ctrl or Space key.
  • The new Command#ZOOM_TO_SELECTION zooms to the bounding box around all selected items. It can be triggered by the keyboard short cut Alt+2.
  • Edge creation can now be cancelled by ending the gesture over the source node.
  • Edge creation is canceled if the GraphComponent loses the focus.
  • GraphViewerInputMode's and GraphEditorInputMode's ClickHitTestOrder now reflects the z-Order of the elements. By enabling SkippingHitLabelsEnabled (the default) elements behind labels can still be prioritized over the labels.
  • Several default keyboard shortcuts have been adjusted to more widely used ones:
    • Ctrl+0 or Alt+0 sets the zoom to 100%.
    • Alt+1 fits the content in the view.
    • Alt+2 brings the selection into the view.
    • Alt+3 brings the current item into the view.
    • Ctrl+Plus increases the zoom value.
    • Ctrl+Minus decreases the zoom value.
    • Alt+Left collapses a selected group node.
    • Alt+Right expands a selected folder node.
    • Alt+Up exits the current folder node.
    • Alt+Down enters the current folder node.
    • Alt+Shift+Left or Alt+Shift+Right toggles the expansion state of a selected group or folder node.
  • GraphEditorInputMode now allows for starting label editing just by starting to type. The EditLabelOnTypingAllowed property can be used to configure this setting, which is turned on, by default.
  • The default gesture for label editing has been updated to also trigger when the user hits the Enter key.
  • The HandleTypes enums has been refactored to a non-flaggable HandleType enum, and the values have been adjusted to those used in the library as well as some custom variants for individual use.
  • Custom IHandle implementations can use the new IHandle#Tag property for various purposes, including custom handle visualizations. yFiles does not use the property and initializes it with null, but decorating handles forwards any values unmodified.
  • OverviewInputMode now uses the CanvasComponent's MouseWheelZoomEventRecognizer to determine if the used performed a zoom gesture.
  • Dragging a selected edge doesn't move all its bends anymore which often screwed up the first and last edge segment.
  • If a Wheel event is handled by code, the default behavior (zoom/scroll) will be cancelled.
  • Command handling has been improved: The previous ICommand, inspired by WPF's commands, has been replaced with an enumeration of primary input gestures called Command. GraphComponent now manages the execution of commands:
    • GraphComponent#executeCommand runs the specified command with an optional parameter.
    • GraphComponent#canExecuteCommand indicates whether the specified command can be executed.
    • The CanExecuteChanged event is triggered when the executable state of a command has changed.
  • The MouseHoverInputMode has been renamed to ToolTipInputMode to better reflect its function.
  • The handleIsHit and getClosestHitHandle methods of HandleInputMode now have an additional parameter which specifies the PointerType of the related user gesture.
  • The GraphEditorInputMode#OrthogonalEdgeEditingContext property is now set and enabled per default and may not be null anymore. Edges can be individually configured to be edited orthogonally by providing an apropriate IOrthogonalEdgeHelper in their lookup.
    • For edges using a PolylineEdgeStyle, the style's new OrthogonalEditingEnabled property can be set so such a helper is automatically provided.
    • To disable orthogonal editing for all edges, the Enabled property of the OrthogonalEdgeEditingContext can be set to false.
    • To enable orthogonal edge editing for all edges that don't explicitly forbid this, the OrthogonalEdgeEditingContext#FallbackEdgeHelperProvider property can be set to a helper supporting orthogonal edge editing.
  • NavigationInputMode now interprets the direction of arrow keys in view coordinates by default. Previously the default settings could lead to surprising behavior when combined with a Projection on GraphComponent.
  • Improved keyboard navigation for graph items.
  • The protected Should- methods of the input modes have been removed and replaced by predicate properties. This simplifies adjusting the behavior without the need to subclass the input modes.
  • LabelDropInputMode now consults the IEditLabelHelper of possible drop targets when dragging and dropping labels.
  • New overloads of the CreateEdgeInputMode#startEdgeCreation method can be used to start interactive edge creation from a node or port, respectively.
  • The parent node detection of GraphClipboard has been streamlined.
  • The new GraphViewerInputMode#HitTester property works in the same way as the GraphEditorInputMode#HitTester property.
  • The GraphEditorInputMode#duplicateSelection method now also dispatches MultiSelectionStarted and MultiSelectionFinished events.
  • The items reported by the HandleInputMode#AffectedItems property now include edges that were modified with the height handle of BezierEdgeStyle and ArcEdgeStyle.
  • The PortRelocationHandle#createDummyEdge method has been renamed to createPreviewEdge and can be overridden.
  • The protected CreateEdgeInputMode#createPreviewBend method has been added that can be overridden to customize bends added during edge creation.
  • The edge creation start gesture while dragging inside the source node can now be customized with CreateEdgeInputMode#StartPortOwnerDraggingFinishedRecognizer.
  • The ItemDropInputMode#DragDropped event is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere.
  • The MoveInputMode and HandleInputMode sub-modes of GraphEditorInputMode no longer have a pre-set SnapContext. Instead, they get their SnapContext from the InputModeContext. That way, setting the SnapContext on GraphEditorInputMode will affect all sub-modes unless a custom SnapContext is set to them.
  • The resize handle rendering order has been adapted to improve usability for small nodes.
  • The static member GraphClipboard#DefaultGraphClipboard has been added and is used per default as GraphComponent#Clipboard. This way copy&paste operations work between multiple GraphComponent instances without the need to set a shared GraphClipboard instance first.
  • The sub-input modes of GraphViewerInputMode and GraphEditorInputMode can now be replaced while the input mode is installed.

Bug Fixes

  • After moving a folder node in closed state with orthogonal edge editing enabled, folding edges no longer get incorrect additional segments when the folder is expanded.
  • Toggling the selection of an item using the keyboard now always toggles the selection of the focused item. Previously, if exactly one other item was selected when toggling, that item was deselected, making it virtually impossible to select multiple individual items using the keyboard.
    To fix this, the behavior of Command#TOGGLE_ITEM_SELECTION has been adjusted accordingly, and the behavior the Command#SELECT_ITEM and Command#DESELECT_ITEM has also been changed accordingly.
  • NavigationInputMode now reliably brings items selected with keyboard navigation into the view. Previously this only worked for nodes.
  • DropInputMode (and derived types) now continues working properly even if the control's template changes.
  • Several members of EditLabelInputMode could not be overwritten by mistake. The install, uninstall, stop, and cancel methods and the Enabled property can now be overwritten.
  • GraphViewerInputMode#findItems and GraphEditorInputMode#findItems methods: when the filter includes both edges and bends, the edge will no longer be ignored if any of its bends are hit.
  • GraphViewerInputMode#findItems and GraphEditorInputMode#findItems method: when using GraphItemTypes#ALL, bends will not be ignored. Furthermore, the interfaces IBendSelectionTester and IPortSelectionTester are properly queried.
  • GraphViewerInputMode#findItems and GraphEditorInputMode#findItems method: Ports with a style are no longer reported twice.
  • When moving the viewport in a GraphComponent that has a projection, the inertia now works in the right direction.
  • Fixed that the marqueeSelect and lassoSelect methods of GraphEditorInputMode and GraphViewerInputMode were called with a wrong input mode context.
  • Overloading GraphViewerInputMode#findItems or GraphEditorInputMode#findItems without the context parameter now finds the items correctly.
  • Fixed an issue where keyboard navigation would stop working when two items were positioned at the same location.
  • Fixed an issue where changing the GraphComponent#InputMode while the context menu is open would lead to a crash.
  • Fixed a bug in HighlightIndicatorManager that could result in missing or surplus highlight visualizations when changing the GraphComponent#HighlightIndicatorManager.
  • Self-loops no longer disappear when resizing nodes while orthogonal editing is enabled.
  • Fixed a bug in MoveViewportInputMode that caused the inertia feature to mistakenly start moving the viewport after the mouse has stopped before being released.
  • Starting a CanvasComponent/GraphComponent viewport animation now properly stops a running MoveViewportInputMode inertia animation.
  • The direction of the first edge segment during orthogonal edge creation is now correctly determined when the source port candidate lies on the node border.
  • Fixed a bug in some input modes which led to undefined behavior if the mode has been uninstalled in a handler for its own events.
  • Fixed, that the ClickInputMode#FocusClickSwallowingEnabled property had no effect.

Label Editing

New Features and Improvements

Snapping

New Features and Improvements

  • The snapping feature has been refactored and enhanced to support more use cases. Previously, items could only snap to points or orthogonal lines. Now lines with any orientation and circle segments can be defined as references where items can snap to. Furthermore:
  • Snapping to circles, grids, and specific node sizes has been refactored to work analogue to the snapping to a SnapLine, so SnapCircle, SnapGrid, and SnapSize instances are created and are available for the SnapResult providers.
  • Label snapping is now also handled by the GraphSnapContext, so the LabelSnapContext has been removed. Configuration options have been moved from LabelSnapContext to GraphSnapContext.
  • Additional improvements:

Clipboard

New Features and Improvements

Bug Fixes

  • In certain rare cases, the insertion of edges could end up in an endless loop. This has now been fixed.

Folding

New Features and Improvements

  • The process of configuring edges at folder nodes has been simplified, resulting in a significant reduction in the number of configuration calls for merged edges.
  • The default implementation for folder nodes and folding edge converters has been enhanced, providing more powerful capabilities for synchronizing and initializing various aspects with granularity.
  • Collapsed group nodes (folder nodes) can now have different tags from their expanded form (group nodes).
  • Changes made to view states (folder nodes, folding edges) can now be reflected back to the master items. New methods, updateGroupNodeState and updateMasterEdges, have been added to IFolderNodeConverter and IFoldingEdgeConverter, respectively, for handling these updates.

Bug Fixes

  • Setting the source or target port of an edge to a port at another edge does no longer lead to an exception if the edge is represented in a managed view (IFoldingView). Instead, the edge is now removed from the view.
  • Fixed a bug which could cause an edge in a folding view to be created at different ports as those which were given as parameters. This could lead to unexpected connections during interactive edge creation in rare cases.
  • Fixed a bug that could lead to an exception when duplicating a port on the GraphClipboard if it is duplicated.
  • Changes to ports of an edge whose source or target node is hidden are no longer reverted when the node is subsequently collapsing and expanding.
  • Label changes on folder nodes are no longer reverted by FolderNodeConverter if labels are copied between master and view node.

Demos

New Features and Improvements

  • A lot of new demo applications have been added that show all kinds of aspects of using the yFiles API: demonstrating basic features, going into detail for specific usecases, and building complex showcase applications.
  • The tutorials have been restructured and split into five separate tutorials covering basic yFiles features, using the GraphBuilder to populate your graph, and implementing custom styles for nodes, for edges or for labels.
  • For all demos, a Maven configuration is added to make it easy to start exploring the yFiles functionality.
  • All demos were modernized using new language features up to level 21.

Bug Fixes

GraphML

New Features and Improvements

  • Improved GraphML serialization of Colors#TRANSPARENT.

Bug Fixes

View-Layout-Bridge

New Features and Improvements

  • LayoutExecutor can now automatically create port constraints for edges at ports that use a CompositePortLocationModel. For all parameters added to a CompositePortLocationModel, a fixed port candidate is created. The cost, capacity, and PortSide of this candidate can be specified when adding the parameter to the model.
  • The LayoutExecutor#TableLayoutConfigurator feature now uses more flexible placements for nodes that don't belong to any table node.

Bug Fixes

  • The LayoutExecutor and LayoutGraphAdapter classes now correctly assign port group IDs to edges that connect to the same port. Previously, in some cases involving ports with a single incoming and outgoing edge, the port group IDs were omitted, which could cause incorrect layout results (such as diagonal segments instead of orthogonal ones).

Layout

New Features and Improvements

  • LayoutPortCandidates now have a MatchingId. When finding matching LayoutPortCandidates at nodes and for edges, two LayoutPortCandidates can only match if their MatchingId properties are equal.
  • The LayoutAnchoringStage class (previously called FixNodeLayoutStage) now allows using not only nodes but also edges and labels to anchor the graph's position.
  • The ComponentLayout has now the ability to specify which layout to apply to individual components using ComponentLayoutData#ComponentLayouts property. Additionally, edges between components can be routed using a router set via ComponentLayout#InterEdgeRouter.
  • It is now possible to specify multiple layout grids for a graph (previously called PartitionGrid). This is made possible by the new LayoutGrid.CellDescriptor#LayoutGrid property. This way it is no more required to set the global layout grid with the LayoutGridData#Grid property. If a node is to be placed in a grid but not in a specific cell, this can now be achieved using the new LayoutGrid#createDynamicCellDescriptor method. Be aware that many layout algorithms like HierarchicalLayout don't support multiple layout grids.
  • The LayoutData classes are now generic and can be used for items of a LayoutGraph, too. Of course, it's still possible to use LayoutData with IGraph items.
    • LayoutData instances when used with IGraph typically need INode, IEdge, ILabel, and ILabel as their type arguments.
    • LayoutData instances when used with LayoutGraph typically need Node, Edge, NodeLabel, and EdgeLabel as their type arguments.
    • Instances of LayoutData classes can be created via factory methods on the layout algorithm themselves, for example, HierarchicalLayout#createLayoutData. Depending on the type of graph that is provided as the argument, the correct data instance will be created.
  • The API around the LayoutGraph class has received a major rework. The LayoutGraph is the only remaining graph implementation for the layout analysis part. Classes Graph (previously used for graph analysis, only) and CopiedLayoutGraph have been removed and functionality was moved to LayoutGraph.
    • The API has been made more similar to the API of the IGraph with respect to creation, modification and access to nodes, edges and labels.
    • Low-level data types like NodeList and EdgeList have been removed as well as cursor for iteration over the elements.
    • Properties NodeCount and EdgeCount have been removed. Query the size of the Nodes and Edges properties instead.
    • Layout information about items must no longer be queried from the graph instance (e.g. previously with methods like LayoutGraph#getLayout). It is now accessible on the items itself and is also mutable, see Node#Layout property.
    • The edge path information is now defined by properties on the edge, most importantly these are SourcePortLocation, TargetPortLocation and Bends.
    • Labels of nodes and edges are now accessed via a property on the respective owning item. To add labels, use LayoutGraph#addLabel method. The complicated ILabelLayoutFactory that covered that use case in the past has been removed.
    • Hiding items is no longer possible via the graph itself. To do so, use the helper LayoutGraphHider class.
    • The Graph#containsEdge method has been removed in favor of LayoutGraph#getEdgesBetween. The same holds for the Node#getEdgeTo and Node#getEdgeFrom methods.
    • Convenience properties like Node#Neighbors have been removed. Instead, query all edges (using the Edges property) and filter the required adjacent nodes manually.
    • To copy a LayoutGraph instance, the new LayoutGraph#createCopy method has been added.
    • If a LayoutGraph without coordinate/path information is needed (to optimize memory performance), it can be created using the factory LayoutGraph#createStructureGraph method.
  • LayoutExecutor now supports arranging graphs without a GraphComponent.
  • The new LayoutGraph#getEdgesBetween method returns all edges between two nodes.
  • The PortPlacementStage now computes cost-minimal matchings between port candidates at nodes and edges.
  • Most layouts now support port grouping and port candidates at nodes and edges. These features are implemented through a post-processing step using the PortPlacementStage, rather than being natively integrated into the layouts. As a result, the quality may be poor.
  • For oriented rectangles the intersection test no longer allocates unnecessary memory and no longer creates unnecessary objects, which improves its allocation performance.

Bug Fixes

  • The CurveFittingStage now correctly respects the maximum error. Previously, it sometimes produced curves that violated the maximum error.
  • The LineSegment#getIntersection method no longer produces incorrect results when the specified epsilon is zero. Previously, there were some edge cases where the algorithm failed to detect an intersection and returned null instead.
  • Added the protected ParallelEdgeRouter#hideMultiEdges method, which is required to meaningfully overwrite the existing protected ParallelEdgeRouter#findAndHideMultiEdges method.
  • The PortPlacementStage now correctly considers port candidates together with port groups.
  • The TreeReductionStage, CircularLayout, and RadialLayout classes no longer produce results with a lot of superfluous, collinear bends for bundled edges.

Hierarchical Layout

New Features and Improvements

  • The HierarchicalLayout class now supports defining minimum distances between the ports. They can be specified per node side using the HierarchicalLayoutNodeDescriptor#MinimumPortDistance property. The node size is increased if necessary in order to accommodate the minimum distances.
  • The Hierarchical Layout class now supports aligning the ports of edges incident to the same node, that is, the ports are placed at the same x- or y-coordinate. This can be particularly useful to visualize paths in a graph. Which ports to align is specified by the new properties PortData#SourcePortAlignmentIds and PortData#TargetPortAlignmentIds accessible via HierarchicalLayoutData#Ports.
  • The HierarchicalLayout now produces fewer bends for multi-edges with labels when integrated edge labeling is enabled.
  • The HierarchicalLayout class now produces better results for graphs with tabular groups where all children have a fixed user-specified order.
  • The routes of self-loops now consider both node and edge labels preventing overlaps if possible.
  • The ports of edges with free ports are no longer placed at the same location as fixed ports, which previously could happen if multiple edges had the same fixed port.
  • The HierarchicalLayout no longer produces overlapping edge segments if there are grouped edges with different thicknesses values. Previously, the user had to ensure that all these edges use the same thickness.
  • In barycenter mode the HierarchicalLayout now enforces a more symmetric placement of the nodes that are part of chains or height-2 trees.
  • The HierarchicalLayout class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled ( HierarchicalLayout#GroupLayeringPolicy property). Previously, such constraints were ignored in that case.

Bug Fixes

  • The HierarchicalLayout algorithm now correctly handles node and edge labels with width or height set to negative values. Previously, large negative values may have caused exceptions.
  • Instances of LayerConstraintData and SequenceConstraintData that are configured with comparables can now be reused for multiple layout calculations.
  • The HierarchicalLayout class no longer creates avoidable crossings between edges with the same target node when FromSketchModeEnabled property is enabled.
  • The HierarchicalLayout class no longer unnecessarily enlarges group nodes in the case when no group node padding is defined, i.e. no data registered with the LayoutKeys#GROUP_NODE_PADDING_DATA_KEY property.
  • The value of the HierarchicalLayout#StopDuration property is no longer ignored during the execution of some ILayerAssigner or ICoordinateAssigner implementations that have their own specific StopDuration. The HierarchicalLayout class will now always consider the shortest applicable duration.
  • The HierarchicalLayout class now always places aligned ports correctly in from-sketch mode.
  • The HierarchicalLayout class no longer assigns superfluous space to group nodes if there are grouped edges.
  • The HierarchicalLayout class no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints.
  • The HierarchicalLayout class no longer produces an error for labeled graphs with port alignment constraints when the integrated edge label placement is enabled.
  • The HierarchicalLayout class no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer.
  • The HierarchicalLayout class no longer produces superfluous crossings for tabular group nodes with fixed children order.
  • The HierarchicalLayout now properly handles self-loop edges when the edge is at a group node and furthermore edge/port grouped with the same ID on both sides. Previously, it was not routed correctly or that it was removed from the LayoutGraph instance when running the layout algorithm directly on the graph instance without using a copy.
  • The HierarchicalLayout class no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints.
  • The HierarchicalLayout class no longer produces superfluous crossings for some graphs with group nodes in incremental layout mode.
  • Edges between two subcomponents now correctly consider fixed any-side port candidates.
  • The HierarchicalLayout class no longer produces very long edge segments for some input graphs containing groups with node halos and polyline edge routing.
  • The HierarchicalLayout class no longer throws an exception for graphs with bus structures if the algorithm runs in incremental mode and the group transposition feature is enabled.
  • The HierarchicalLayout class no longer misplaces port labels at the connector nodes of integrated subcomponents.
  • The HierarchicalLayout class no longer produces intertwined edge routes with many superfluous crossings and bends for some cases with sequence constraints placeAtHead or placeAtTail. The problem mainly occurred with graphs with groups or LayoutGrid and incompatible sequence constraints.
  • The HierarchicalLayout class no longer produces superfluous crossings for some edges with alternative paths that are incident to group nodes (see HierarchicalLayoutData#AlternativeEdgePaths).
  • The HierarchicalLayout algorithm no longer requires a long runtime for some larger, grouped graphs with layering constraints and non-recursive layering.
  • The HierarchicalLayout algorithm no longer requires a long runtime for some larger graphs with layering constraints when a maximum duration is specified.
  • The HierarchicalLayout class no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode.

Tree Layout

New Features and Improvements

Bug Fixes

Orthogonal Layout

New Features and Improvements

  • The newly added OrthogonalLayout#QualityTimeRatio property allows controlling the layout quality by automatically enabling/disabling additional optimization steps.
  • The OrthogonalLayout algorithm now supports specifying edges that should be routed against the main layout orientation in addition to the option to route with the main layout orientation. See OrthogonalLayoutData#EdgeOrientation property.

Bug Fixes

  • The OrthogonalLayout now automatically places edge labels of the parallel edges handled by its ParallelEdgeRouter instance, when integrated edge labeling is enabled.
  • The OrthogonalLayout class no longer throws an exception for some input graphs with tree substructures when the TreeSubstructureStyle is set to a value different from TreeSubstructureStyle#NONE.

Edge Router

New Features and Improvements

  • The quality of edge routing for buses is improved.
  • If EdgeRouter is run with the buses feature and a limited duration, it now splits the available time amongst buses, meaning that it will not get "stuck" on a single bus, which could otherwise impact the quality of the remaining buses and non-bus edge routings.

Bug Fixes

  • The EdgeRouter now prefers to use fixed port candidates that are not overlapped by other nodes.
  • The EdgeRouter class no longer produces uncovered buses. Previously, there were some rare cases where the specified bus edges didn't constitute a bus.
  • When routing edges to and from fixed ports in the interior of group nodes, other nodes in the group are not ignored anymore, so that the edge does not overlap them if possible.
  • The EdgeRouter class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph.
  • The EdgeRouter class no longer produces self-crossing routes of edges with labels if EdgeRouterEdgeLabelPlacement property is set to EdgeRouterEdgeLabelPlacement .INTEGRATED.
  • The EdgeRouter class no longer produces bad layout results for some scenarios with grouped edges and multiple LayoutPortCandidate. Previously, the algorithm selected any of them without considering the alternative options.

Labeling

Bug Fixes

  • The GenericLabeling algorithm now correctly considers the case where model parameters of a CompositeLabelModel have different weight values. Higher weights are preferred.
  • The EdgeLabelCandidates#buildCandidates method does no longer return null for some setups with free edge label models. Instead it returns an empty IStreamIterable now.
  • The GenericLabeling class now produces less node-label overlaps.
  • The GenericLabeling class no longer produces non-optimal label placements for some rare setups of graphs with node halos.
  • The GenericLabeling class no longer produces bad label placements for edges with direct group content routing, i.e., edges that connect a group node with one of its descendants and are routed directly without leaving the group.

Organic Layout

New Features and Improvements

  • The OrganicLayout class now supports integrated edge labeling which can be enabled with EdgeLabelPlacement property.
  • The OrganicLayout class now provides a feature that dynamically detects whether nodes already lie almost on a common line or circle and, if so, snaps the nodes to this line/circle. This new feature can be enabled with the ChainRecognitionEnabled and CircleRecognitionEnabled properties.
  • The OrganicLayout class now supports drawing the edges such that they point to the main layout direction. Whether an edge should follow the main orientation can be specified with the new OrganicLayoutData#EdgeOrientation property.
  • The OrganicLayout class now supports individual minimum lengths of edges that can be specified with the new OrganicLayoutData#MinimumEdgeLengths property.
  • The OrganicLayout class now supports different types of constraints that restrict the placement of the graph’s nodes. These constraints can be specified with the new OrganicConstraintData class (cf. the OrganicLayoutData#Constraints property).
  • The performance for the OrganicLayout has been substantially improved for large graphs without group nodes. The improvement is triggered if no special constraints are defined and no shape recognition is enabled.
  • The OrganicLayout now supports different styles for group substructures, which are set via the GroupSubstructureStyle property.

Bug Fixes

  • The OrganicLayout now automatically places edge labels of the parallel edges handled by its ParallelEdgeRouter instance, when integrated edge labeling is enabled.
  • The OrganicLayout class no longer ignores the preferred edge length in incremental layout mode with a single affected element.
  • Fixed an issue that may have automatically disabled the component layout when using constraint-based features.
  • The OrganicLayout class now supports specified minimum group node sizes with more feature combinations. Previously, the minimum group node size was sometimes violated.
  • The OrganicLayout class no longer produces edge overlaps when ChainRecognitionEnabled property is enabled.
  • In rare cases fixed nodes could move when also a group node was fixed.

Circular Layout

New Features and Improvements

  • The CircularLayout class now offers the possibility to define star substructures. The CircularLayout#StarSubstructureStyle property specifies the style of star substructures and the CircularLayout#StarSubstructureSize property their minimum size (structures of smaller size are not handled as a star substructure). Furthermore, the CircularLayout#StarSubstructureTypeSeparationEnabled property specifies whether star substructures should be separated by the node type.
  • The CircularLayoutData class offers the new EdgeDirectedness property that influences the detection of star-substructures; see CircularLayout#StarSubstructureStyle.

Bug Fixes

  • The CircularLayout class no longer produces strange routes for some bundled edges.
  • The CircularLayout class no longer throws an exception if StarSubstructureStyle property is set to StarSubstructureStyle#RADIAL and the whole input graph is a star.

Radial Layout

New Features and Improvements

  • The RadialLayout class now allows defining a custom order of child nodes around a local root node. The order can be individually specified for each node by using the new RadialLayoutData#ChildOrder property. It is especially suitable for tree-like input graphs. For specifying a single global order for all nodes, for example, alphabetically, the new ChildOrderData#TargetNodeComparables property is a more convenient option.
  • The RadialLayout class now supports node types. The types influence the ordering of nodes of the same circle such that nodes of the same type are preferably placed next to each other if this does not induce additional crossings or conflicts with other constraints. Node types can be defined via the RadialLayoutData#NodeTypes property.

Bug Fixes

  • The RadialLayout class no longer throws an exception if the layout algorithm is executed too many times from the same instance.

Radial Tree Layout

New Features and Improvements

Alignment Stage

New Features and Improvements

  • The new AlignmentStage class places the nodes of a given layout on automatically determined horizontal and/or vertical lines. This stage is particularly designed as a post-processing step that snaps suitable nodes to the same x- or y-coordinates to obtain a grid-like structure. When rearranging the initial layout, the stage moves the nodes as little as possible.
    The associated new AlignmentStageData class allows to specify custom data considered during the layout calculation.

Series-parallel Layout

Bug Fixes

Clear Area Layout

Bug Fixes

Multi-page Layout

Bug Fixes

  • MultiPageLayout algorithm will adhere to page size specifications in rare cases that could previously cause the maximum page size to be exceeded.

Partial Layout

New Features and Improvements

  • PartialLayout now supports specifying inversely directed edges in addition to undirected and directed edges.

Bug Fixes

  • PartialLayoutScopeData will no longer mark any edges as affected when only nodes are specified to be in scope, nor mark any nodes as affected when only edges are specified to be in scope.
  • The PartialLayout class does no longer yield different results in rare cases when the same instance is applied twice to the same input graph.
  • The PartialLayout class now correctly places disconnected components for cases where a layout orientation is specified, and the ComponentAssignmentStrategy property is not SINGLE. Previously, such components were sometimes placed far away from the remaining graph elements.

Tabular Layout

New Features and Improvements

  • The TabularLayout class now supports the calculation of node arrangements that lead to a low overall edge length. This feature can be enabled with the new EdgeConsiderationEnabled property.
  • The new TabularLayoutData#LayoutGridData property makes it easy to query the cell to which a node was assigned to by the TabularLayout class after applying it.

Bug Fixes

Component Layout

New Features and Improvements

Algorithms

New Features and Improvements

  • The LongestPath algorithm now uses double values instead of integers for edge traversal costs. This improves the Paths, LayoutGraphAlgorithms, and LongestPath classes.
  • The LayoutGraphAlgorithms#findCycleEdges method has been improved and now requires fewer edges to be reversed. In addition, a new, even better but slower heuristic can be enabled with a new optional parameter.

Bug Fixes

  • The Intersections class does not dispose FilteredGraphWrapper instances that it is given with no subgraph nodes or edges specified anymore. Previously, this caused the graph instance to become defunct, resulting in various operations running into null fields and properties, generating exceptions that were non-trivial to understand.
  • Intersections.Result no longer includes intersections that have no actual intersection points. This issue occurred when two graph elements were within a small epsilon distance of each other.

Analysis

New Features and Improvements

  • The KShortestPaths class has a new implementation of the k-shortest path algorithm that allows for the exclusion of non-simple paths (i.e., paths with repeating vertices). Previously, these paths could not be excluded. The new implementation is used by default and can be disabled with the SimplePaths parameter.
  • For usage with a LayoutGraph, the algorithm is also available via the LayoutGraphAlgorithms#kShortestPaths method.

Bug Fixes

  • Fixed the issue of excessive memory consumption in the analysis algorithm Paths when a large number of start and end nodes were set.
  • The KShortestPaths class now correctly calculates the k-shortest paths of graphs. Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.

Geometry

New Features and Improvements

  • The new GeneralPath#areaOrPathContains method tests if the path fuzzily contains a point and can be used for hit-testing a GeneralPath.
  • All methods on the GeneralPath class now consistently accept IPoint instead of PointD and IRectangle instead of RectD.
  • There are now methods on RectD and PointD to calculate the distance between points and rectangles.
  • The GeneralPath#getProjection method is now faster for paths with Bezier segments.
  • The IRectangle interface no longer implements IPoint. As a consequence, it is no longer possible to inadvertently use rectangles as parameters for methods that expect a point. You can still easily get the top-left corner of a rectangle with its getTopLeft method. Similarly, IMutableRectangle no longer implements IMutablePoint.

Bug Fixes

  • The GeneralPath#pathMayIntersectClip method has been corrected for paths with multiple segments, at least one of which is a cubic segment.
  • The SizeD#Area property now returns 0 for empty sizes. This is consistent with the behavior of the RectD#Area property.

Incompatible Changes

Categories: General Graph GraphBuilder Components Rendering Selection, Focus, Highlight Styles Interaction Snapping Clipboard Folding Lookup GraphML View-Layout-Bridge Layout Layout Data Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Interactive Organic Layout Circular Layout Radial Layout Radial Tree Layout Radial Group Layout Series-parallel Layout Compact Disk Layout Multi-page Layout Partial Layout Tabular Layout Component Layout Tree Map Layout Recursive Group Layout Layout Grid Other Layouts Algorithms Analysis Collections Geometry

General

Incompatible API Changes

Graph

Incompatible API Changes

Incompatible Behavior Changes

GraphBuilder

Incompatible API Changes

Components

Incompatible API Changes

Incompatible Behavior Changes

  • For new GraphModelManager instances, the install method has to be called either directly or indirectly by assigning the GraphModelManager to the GraphComponent#GraphModelManager property.
  • Changed the default CanvasComponent#MouseWheelBehavior to MouseWheelBehavior.SCROLL.or(MouseWheelBehavior.ZOOM)
  • Changed default modifier for MouseWheelBehavior.SCROLL.or(MouseWheelBehavior.ZOOM):
    • Mousewheel without any modifier zooms
    • Mousewheel+shift pans horizontally
    • Mousewheel+ctrl pans vertically
    • Mousewheel+alt is center zoom

Rendering

Incompatible API Changes

Selection, Focus, Highlight

Incompatible API Changes

Styles

Incompatible API Changes

Interaction

Incompatible API Changes

Incompatible Behavior Changes

Snapping

Incompatible API Changes

Clipboard

Incompatible API Changes

Folding

Incompatible API Changes

Incompatible Behavior Changes

  • Tags are not automatically the same on group and folder nodes or master and folding edges (master and view states). Instead, they have to be synchronized using the IFolderNodeConverter and IFoldingEdgeConverter implementations. The default implementations already synchronize the tags.
  • In the graph of a folding view, the createGroup method now always creates a group even if the isExpanded predicate specified in the FoldingManager#createFoldingView method specifies otherwise. Create the group on the master graph if you want the predicate to be respected.

Lookup

Incompatible API Changes

GraphML

Incompatible API Changes

View-Layout-Bridge

Incompatible API Changes

Incompatible Behavior Changes

  • Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly.
  • The LayoutGraphAdapter class does no longer offer a method to create a layout graph several times but is now meant to create exactly one layout graph copy which can be accessed via the LayoutGraph property and initialized with method LayoutGraphAdapter#initialize. After initialization, changing properties of the LayoutGraphAdapter has no effect anymore.

Layout

Incompatible API Changes

Incompatible Behavior Changes

  • Method LayoutGraph#reverseEdge now reverses the edge path too. To exchange only source and target of an edge use LayoutGraph#changeEdge method.

Layout Data

Incompatible API Changes

  • The type SingleItem<TItem> was removed. Affected properties use ItemCollection<TItem> instead.
  • Properties of type ItemMapping in LayoutData classes are now named using plural consistently.
  • The value type of properties HierarchicalLayoutData#LayerIndicesResult, HierarchicalLayoutData#SequenceIndicesResult, HierarchicalLayoutData#GivenLayersIndices, RadialLayoutData#LayerIds and CircularLayoutData#CircleIdsResult has been changed from primitives to their boxed type. Null as value means that nothing was published for an item.
  • The value type of the keys HierarchicalLayout#LAYER_INDEX_RESULT_DATA_KEY, HierarchicalLayout#SEQUENCE_INDEX_RESULT_DATA_KEY, GivenLayersAssigner#LAYER_INDEX_DATA_KEY, RadialLayout#LAYER_ID_DATA_KEY and CircularLayout#CIRCLE_ID_RESULT_DATA_KEY has been changed from primitives to their boxed type. Null as value means that the nothing was published for an item.

Hierarchical Layout

Incompatible API Changes

Incompatible Behavior Changes

Tree Layout

Incompatible API Changes

Incompatible Behavior Changes

  • The TreeLayout now considers node labels by default.
  • The TreeLayout now places edge labels by default using an integrated labeling algorithm.
  • Port candidates are always considered if they are specified.

Orthogonal Layout

Incompatible API Changes

Incompatible Behavior Changes

Edge Router

Incompatible API Changes

Incompatible Behavior Changes

  • The default of ParallelEdgeRouter#RelativeJoinEndDistanceFactor has changed from 0.1 to 0.
  • The EdgeRouter now considers node labels by default.
  • The EdgeRouter now places edge labels by default using a generic labeling algorithm.

Labeling

Incompatible API Changes

Organic Layout

Incompatible API Changes

Incompatible Behavior Changes

Interactive Organic Layout

Incompatible API Changes

Circular Layout

Incompatible API Changes

  • Renamed the ExteriorEdgeLayoutDescriptor#EdgeToEdgeDistance property to CircularLayoutExteriorEdgeDescriptor#EdgeDistance.
  • Renamed EdgeLayoutDescriptor to CircularLayoutEdgeDescriptor.
  • Renamed CircularLayout#DefaultEdgeLayoutDescriptor to EdgeDescriptor.
  • Renamed ExteriorEdgeLayoutDescriptor to CircularLayoutExteriorEdgeDescriptor.
  • Renamed CircularLayout#ExteriorEdgeLayoutDescriptor to ExteriorEdgeDescriptor.
  • The type of the CircularLayout#MaximumDeviationAngle property has been changed to double.
  • The SingleCycleLayout has been removed. The CircularLayout with PartitioningPolicy set to SINGLE_CYCLE can be used instead.
  • CircularLayout#SingleCycleLayout has been replaced by CircularLayout#PartitionDescriptor.
  • CircularLayout#DefaultEdgeLayoutDescriptor has been renamed to EdgeDescriptor.
  • CircularLayout#BalloonLayout has been renamed to BackboneLayout.
  • The CircularLayout#LayoutStyle property has been renamed to PartitioningPolicy to better reflect the fact that it controls how nodes are partitioned. The corresponding enum has also been renamed from to PartitioningPolicy.
  • Removed the enum value EdgeRoutingPolicy#MARKED_EXTERIOR. To manually select which edges should be routed externally, use the CircularLayoutData#ExteriorEdges property instead.
  • Renamed CircularLayout#LayoutStyle to CircularLayout#PartitioningPolicy.
  • Renamed circular#LayoutStyle to circular#PartitioningPolicy.
  • Removed the enum value LayoutStyle#CUSTOM_GROUPS. If custom partitions are specified using CircularLayoutData#Partitions, they are respected by the CircularLayout automatically.
  • The INodeSequencer class has been removed from the API. Use the new CircularLayoutData#NodeComparison property to specify custom node orders.

Incompatible Behavior Changes

Radial Layout

Incompatible API Changes

Incompatible Behavior Changes

  • The default style of the RadialLayout's ComponentLayout is changed to PACKED_CIRCLE.
  • The RadialLayout now considers node labels by default.
  • The RadialLayout now places edge labels by default using a generic labeling algorithm.
  • The RadialLayout.NodePlacementResult#SectorStart property is now interpreted in clockwise direction.
  • Custom layers are now always used if defined via RadialLayoutData#LayerIds property.
  • Custom center nodes are now always used if defined via RadialLayoutData#CenterNodes property.

Radial Tree Layout

Incompatible API Changes

Incompatible Behavior Changes

Radial Group Layout

Incompatible API Changes

Incompatible Behavior Changes

Series-parallel Layout

Incompatible API Changes

Incompatible Behavior Changes

Compact Disk Layout

Incompatible Behavior Changes

Multi-page Layout

Incompatible API Changes

Partial Layout

Incompatible API Changes

  • Renamed partial#LayoutOrientation to PartialLayoutOrientation.
  • The PartialLayout#layoutSubgraph method has been removed.
  • The callback configureEdgeRouter method has been removed from classes PartialLayout and ClearAreaLayout. The router instance can be specified via the PartialLayout#EdgeRouter and ClearAreaLayout#EdgeRouter properties so that an additional configuration callback is not necessary.
  • Removed the enum value ComponentAssignmentStrategy#CUSTOMIZED. Custom components are now always used if defined with PartialLayoutData#ComponentIds, ClearAreaLayoutData#ComponentIds or FillAreaLayoutData#ComponentIds respectively.

Incompatible Behavior Changes

  • Custom components are now always used if defined with PartialLayoutData#ComponentIds.

Tabular Layout

Incompatible API Changes

Incompatible Behavior Changes

  • The TabularLayout now considers node labels by default.
  • The TabularLayout now places edge labels by default using a generic labeling algorithm.

Component Layout

Incompatible API Changes

  • The ComponentArrangementStyles enum has been renamed to ComponentArrangementStyle, as it is no longer a Flags-Enum.
    • Removed ComponentArrangementStyles#MASK.
    • Replaced ComponentArrangementStyles#MODIFIER_NO_OVERLAP with TRY_KEEP_CENTERS.
    • Replaced ComponentArrangementStyles#MODIFIER_AS_IS with ComponentLayout#FromSketchModeEnabled.
  • Renamed ComponentLayout#calculateBounds to calculateComponentBounds.
  • Renamed ComponentLayout#setOrigin to setComponentLocation.
  • The IsolatedGroupComponentLayout class has been removed.
  • Renamed ComponentArrangementStyles#NONE to ComponentArrangementStyle#KEEP_CENTERS.
  • Removed the ComponentArrangementEnabled property from ComponentLayout; use the new ComponentArrangementStyle#NONE instead to avoid arranging components.
  • Removed ComponentLayout#arrangeFields method.
  • Simplified parameter lists of methods ComponentLayout#arrangeComponents and ComponentLayout#setOrigin to now accept instances of Component class.
  • If ComponentLayout is used as a pre-processing step to apply a layout algorithm on multiple connected components, the StopDuration of that layout is divided appropriately over all components, instead of being applied once per component.

Incompatible Behavior Changes

  • ComponentArrangementStyle#PACKED_CIRCLE and ComponentArrangementStyle#PACKED_RECTANGLE now consider the convex hulls of components to determine overlaps.

Tree Map Layout

Incompatible API Changes

  • Renamed TilingPolicy to TilingStrategy and TreeMapLayout#TilingPolicy to TreeMapLayout#TilingStrategy.
  • Replaced TreeMapLayout#NodeComparator property of type Comparator with TreeMapLayoutData#ChildNodeComparison of type Comparison function.
  • Removed the NodeWeightComparator class.

Recursive Group Layout

Incompatible API Changes

  • RecursiveGroupLayout#NULL_LAYOUT is renamed to RecursiveGroupLayout#FIX_CONTENT_LAYOUT.
  • FixGroupLayoutStage is removed and its functionality is replaced by RecursiveGroupLayout using RecursiveGroupLayout#FIX_GROUP_LAYOUT for all groups.
  • The RecursiveGroupLayout class now ignores empty group nodes by default (see EmptyGroupsConsiderationEnabled property).
  • The signature of IGroupBoundsCalculator#calculateBounds method was changed. The given children are now of type IIndexedIterable<Node>.
  • The GroupBoundsCalculator implementation now keeps the center of empty group nodes if EmptyGroupsConsiderationEnabled is enabled.
  • Method GroupBoundsCalculator#calculateBounds now correctly considers the specified children. Previously, the given children were ignored and all graph elements were considered when calculating the group bounds.

Layout Grid

Incompatible API Changes

Other Layouts

Incompatible API Changes

Algorithms

Incompatible API Changes

Analysis

Incompatible API Changes

Collections

Incompatible API Changes

  • The YList#elementAt method was removed.
  • Renamed ICursor#prev to ICursor#previous.
  • Renamed ListCell#succ to ListCell#Next.
  • Renamed ListCell#pred to ListCell#Previous.
  • Removed the isEmpty method from LinkedCellList class. Test LinkedCellList#Count property for 0 instead.
  • Removed the methods succCell and predCell from LinkedCellList class. Use new properties ListCell#Next and ListCell#Previous instead.
  • Removed the methods cyclicSucc, cyclicPred, containsAll and retainAll from LinkedCellList class.
  • Removed the methods Succ and Pred from ListCell class. Use new properties Next and Previous instead.
  • Removed the Peek method from LinkedCellList class. Use First property instead.

Geometry

Incompatible API Changes