yFiles for Java (Swing)
Changelog

yFiles for Java (Swing) 4.0.0.1

This first bugfix release for yFiles for Java (Swing) 4.0 corrects some errors.

This release supports Java 8 and newer, including the LTS releases Java 11, 17, and 21. It has been tested successfully with OpenJDK 25.0.4 and OpenJDK 26.0.2.

Bug Fixes

Graph

Controls

  • Fixed a potential memory leak where the old graph instance was still keeping a reference to the GraphComponent after the Graph has been replaced in GraphComponent.
  • Fixed a bug where MinimumZoom and MaximumZoom were not respected in some cases when fitting graph bounds.
  • Fixed distorted rendering of selection, focus, and highlight indicators when a projection is set on the GraphComponent.

Styles

Interaction

  • Zooming with the mouse wheel in the overview component no longer scrolls the underlying container.
  • HandleInputMode now supports updates to the HandlesRenderer property even after the mode's installation.
  • Fixed a bug where an edge was being deselected during port relocation.

GraphML

  • Fixed parsing empty strings into lists or arrays.
  • Fixed IllegalStateException when parsing GraphML elements representing empty arrays.

Layout

  • The static LayoutGraphGrouping#isFlat method now correctly identifies graphs that have become flat because the last group node was deleted from the graph.

Hierarchical Layout

  • The HierarchicalLayout now correctly handles grouped input graphs when grid spacing is defined. Previously this could lead to an error if a self-loop edge at a group node existed.
  • The HierarchicalLayout's integrated edge labeling no longer produces avoidable overlaps between node margins and port labels.
  • The HierarchicalLayout now correctly considers the specified critical edge priorities for edges with LayoutPortCandidates. Previously, it sometimes ignored these priorities for edges with port candidates at side PortSides#ANY.
  • The HierarchicalLayout now works correctly with grouped self-loops. Previously, an error could occur in rare cases.
  • The HierarchicalLayoutNodeContext#Layer property now returns -1 if the node is not assigned to a layer. Previously, an error occurred.
  • The properties HierarchicalLayoutNodeContext#AssociatedNode and HierarchicalLayoutNodeContext#AssociatedEdge now correctly marked as nullable.
  • LayoutGraphSequenceConstraints created with the methods createReadonlyView or createWritableCopy now correctly include constraints between edges if there are nodes with constraints as well. Previously, in that case the edge constraints were ignored.
  • Sequence constraints and layer constraints defined with the methods of SequenceConstraintData and LayerConstraintData are now only represented once in data structures attached to the graph, which can be accessed, e.g., via LayoutGraphSequenceConstraints#createReadonlyView. Previously, they were inserted twice. This did not affect the resulting layouts.

Orthogonal Layout

  • The OrthogonalLayout class now correctly considers the specified bend costs and edge orientation. Previously, for some setups, specifying both could lead to an error.

Edge Router

  • The EdgeRouter class no longer throws an exception in some cases with bus-style routing (EdgeRouterData#Buses).

Organic Layout

Circular Layout

  • The CircularLayout now correctly considers the specified node margins and labels. Previously, it sometimes produced overlapping margins regions or label overlaps.
  • The CircularLayout now correctly considers the minimum radius specified by the PartitionDescriptor#MinimumRadius property.

Algorithms

  • The LayoutGraphAlgorithms#allPairsShortestPath method publishes the calculated results now.
  • The LayoutGraphAlgorithms#allUnweightedShortestPaths method publishes the calculated results now.
    However, publishing the calculated results required changing the type of parameters resultPathEdges and resultPathNodes from java.lang.Iterable to java.util.Collection.

Demos

Noteworthy Demo Improvements

  • The new Obfuscation Demo shows how to obfuscate and deploy an application that uses yFiles for Java (Swing).

Incompatible Changes

  • The LayoutGraphAlgorithms#allUnweightedShortestPaths method publishes the calculated results now.
    However, publishing the calculated results required changing the type of parameters resultPathEdges and resultPathNodes from java.lang.Iterable to java.util.Collection.

yFiles for Java (Swing) 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

yFiles for Java (Swing) 3.6.0.1

Bug Fixes

Cactus Group Layout

View

  • Fixed cleanup of CanvasComponent that prevented the component from being garbage collected after removing it from the component hierarchy.

GraphML

  • Fixed deserialization of string arrays that contain empty strings.

Hierarchic Layout

  • The HierarchicLayout class no longer assigns superfluous space to group nodes if there are grouped edges.
  • The HierarchicLayout class no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints.
  • The HierarchicLayout class no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer.
  • The HierarchicLayout class no longer produces superfluous crossings for tabular group nodes with fixed children order.
  • The HierarchicLayout 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 HierarchicLayout class no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints.
  • Rare combinations of PortCandidates in PortCandidateSets no longer result in exceptions.

Tree Layout

  • The AspectRatioNodePlacer class no longer ignores the specified AspectRatioNodePlacer#FillStyle for some specific setups (e.g., if all children are leaves and have the same size).

Orthogonal Layout

  • The OrthogonalLayout class no longer throws an exception for some input graphs with tree substructures when the TreeStyle is set to a value different from TreeLayoutStyle#NONE.

Edge Router

  • 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 IntegratedEdgeLabelingEnabled property is true.

Partial Layout

  • 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 ComponentAssignmentStrategy#SINGLE. Previously, such components were sometimes placed far away from the remaining graph elements.

Algorithms

  • 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 all kinds of functionality running into null fields and properties.

Analysis

  • The ShortestPaths class now correctly calculates the k-shortest paths of graphs (see methods ShortestPaths#KShortestPaths and ShortestPaths#KShortestPathsCursor). Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.

yFiles for Java (Swing) 3.6

This release brings exciting new major features, and many other minor new features, improvements, and bugfixes to all parts of the library. As always, there are new and improved demos demonstrating these features and improvements.

If you are updating from an older version of yFiles for Java (Swing), have a look at the list of incompatible changes.

Major new features

New styles for graph items

The RectangleNodeStyle class is a new node style that uses a rectangular shape whose corners are either rounded or cut diagonally. Its properties specify which corners get rounded, the corner radius, its fill, and its border stroke.

The new GroupNodeStyle class is a node style primarily designed for collapsed and expanded group nodes. It draws a (rounded) rectangle with an optional tab or ribbon, and offers extensive configuration options for an optional icon, its various fills, and paddings. The new GroupNodeLabelModel is tailored to place labels in the tab or tab background of a GroupNodeStyle.

The new ArrowNodeStyle class draws a node as an arrow shape. The arrow can point in one of the four compass directions, and the arrow head slope, the shaft thickness, the fill, and the border stroke can be configured.

Similarly, the new ArrowEdgeStyle class draws an edge as an arrow shape. This style always points from the source port to the target port, ignoring bends, and can be configured in the same way as the node style.

The DefaultLabelStyle class now supports different common background shapes.

The ShapeNodeStyle class now supports three additional shapes: HEXAGON2 (a six-sided polygon with tips at top and bottom), STAR5_UP (a five-pointed star with one tip pointing upwards), and PILL (a stadium shape with the shorter sides rounded).

Its new property KeepingIntrinsicAspectRatioEnabled defines whether to keep the intrinsic aspect ratio of the shape.

The new BridgeEdgeStyle class renders an edge as a 3-segment bridge with a given height between the edge's source and target port locations. This is especially useful to distinguish parallel multi-edges between the same pair of nodes.

Wrap text to shape

The text wrapping feature of DefaultLabelStyle now wraps the text inside a given shape instead of just the rectangular label bounds. The TextWrappingShape enum provides the predefined shapes, and includes for example pill, ellipse, and hexagon. The new DefaultLabelStyle.TextWrappingPadding property defines the padding between the chosen shape and the text.

If the predefined shapes don't fit your needs, you can override the DefaultLabelStyleRenderer.getTextWrappingOutline method to return any custom convex path as GeneralPath instead.

Compact disk layout

The new CompactDiskLayout class arranges a graph on a disk, packing the nodes as dense as possible. This layout is mostly suitable for graphs with small components whose loosely connected nodes should be grouped and packed in a small area.

The associated new class CompactDiskLayoutData allows to specify custom data considered during the layout calculation.

Cactus group layout

The new CactusGroupLayout class offers an alternative representation of hierarchically nested data. It places the children of a group along the groups circular border, resembling the structure of a cactus.

The associated new class CactusGroupLayoutData allows to specify custom data considered during the layout calculation.

New Features

View

Interaction

  • Handles can now react to mouse click events. The handleClick method has been added to the IHandle interface and is called when HandleInputMode#ClickedRecognizer was triggered on a targeted handle. To customize the general handle click handling, the Clicked event can be listened to or the method HandleInputMode#handleClick can be overridden.

Hierarchic Layout

  • The HierarchicLayout class now supports so-called tabular group nodes. The children of such groups are arranged in a compact tabular fashion (i.e., like a single column table for layout orientation left-to-right). Property HierarchicLayoutData#TabularGroups allows to mark groups as "tabular" and property HierarchicLayoutData#TabularGroupChildComparators to specify a custom order for the children.

Organic Layout

  • The OrganicLayout class now offers the possibility to define a group substructure scope, see property GroupSubstructureScope. Group substructures that lie in the specified scope are treated as substructures in the layout process, i.e., the child nodes are arranged on a disk that is contained in the group node.
  • In addition, the new property ClusterAsGroupStructureAllowed allows to specify whether or not detected clusters (see property ClusteringPolicy) are taken into account as group substructures.
  • The OrganicLayout class now offers two new ChainSubstructureStyles called DISK and DISK_NESTED that lead to a compact disk-like layout for chains.
  • The OrganicLayout class now offers the possibility to define tree substructures (stars, chains, cycles and parallel structures are already supported). The OrganicLayout#TreeSubstructureStyle property specifies the style of tree substructures and the OrganicLayout#TreeSubstructureSize property specifies their minimum size (structures of smaller size are not handled as a tree substructure).

Balloon Layout

  • The BalloonLayout class now supports node types. The types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are weaker than a user-specified custom order defined via a comparison function. Types can be defined via the BalloonLayoutData#NodeTypes property.

Radial Layout

  • The RadialLayout now supports a new layering strategy that produces a circular dendrogram drawing.
  • The RadialLayout now supports two new edge routing styles, namely a radial polyline style and a curved style. The radial polyline style produces edge paths which consist of a series of straight and arc segments. The curved polyline style routes the edges as curved bezier paths. In the latter case, the edge paths can be also returned as control points that represent cubic bezier control points.
  • The RadialLayout now supports integrated node labeling i.e., the node labels are taken into consideration when determining the positions for the nodes of the graph and guarantees that labels will not overlap with other objects in the graph.

Circular Layout

  • The CircularLayout now supports integrated node labeling i.e., the node labels are taken into consideration when determining the positions for the nodes of the graph and guarantees that labels will not overlap with other objects in the graph.
  • The CircularLayout class now supports curved edge routing within and between circles.

Analysis

  • Added the new RankAssignment analysis algorithm class that solves the rank assignment problem on an acyclic graph using the simplex method.
  • The new analysis class Intersections finds intersections and overlaps between graph items, featuring flexible configuration options to find only specific intersections. The respective com.yworks.yfiles.layout.Intersections class provides the functionality also for the LayoutGraph API, but offers less convenience.

Improvements

General

  • The documentation about configuring the item visualization has been improved. All styles and their configuration options are now described in a Developer's Guide chapter.

View

Interaction

Styles

  • The Pen#DashStyle property is now marked as @Nonnull, since several internal usages assumed that to be the case anyway. In addition, the documentation of the DashStyle#Dashes property now clarifies that both an empty collection and null result in a solid Pen.
  • Added a new property KeepingAspectRatioEnabled to ImageNodeStyle and MemoryImageNodeStyle to support keeping the image's aspect ratio during resizes.
  • Nodes rendered with the ShapeNodeStyle now respect their actual outline shape when selected with the LassoSelectionInputMode.

GraphBuilder

Hierarchic Layout

  • The HierarchicLayout class now allows to combine the SimplexNodePlacer#StraightenEdges and SimplexNodePlacer#BarycenterMode properties. Previously, edge straightening was not supported in barycenter mode.
  • The HierarchicLayout class generates more compact results for some cases with edges between nodes of the same layer and integrated edge labeling where previously unnecessarily large distances to the label and edge were kept.
  • The HierarchicLayout class now places nodes without any edges as far left as possible without violating any constraints. That way they do not disturb the layout for the connected part of the graph.
  • For input graphs with a PartitionGrid structure, the HierarchicLayout class now correctly considers the layering produced by the FromScratchLayerer if it is already compatible with the specified grid structure. Previously, for such cases, the algorithm may have calculated an entirely different layer assignment.
  • The HierarchicLayout class now considers the flow direction to place the ports of port groups when combined with direct group content edges.
  • The HierarchicLayout class comes with an improved support for subcomponent layouts (see HierarchicLayoutData#Subcomponents). Defining subcomponents now works by assigning instances of the new SubcomponentDescriptor class to nodes so that nodes mapped to the same descriptor instance form a component. Components that have inter-edges only to a single non-component node are now integrated directly at that node when using the new placement policies SubcomponentPlacementPolicy#AlwaysIntegrated or SubcomponentPlacementPolicy#Automatic (and if the orientation of the sub-layout permits it). The overall results for such cases feature better edge routing quality and more compact drawings.
  • The HierarchicLayout class now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (property HierarchicLayout#RecursiveGroupLayering). Previously, such constraints were ignored in that case.
  • The HierarchicLayout class now uses a more compact layer placement for graphs with edge labels between layers.
  • The HierarchicLayout class now requires fewer bends for some inputs with grouped edges and port constraints or port candidates.

Organic Layout

  • The OrganicLayout class now produces stable results for inputs with node labels and in deterministic mode, where it previously could generate a slightly different arrangement when applied twice with the same parameters.
  • The OrganicLayout class now allows to specify custom node clusters by setting the ClusteringPolicy property to ClusteringPolicy#USER_DEFINED. The custom cluster IDs have to be specified by means of the OrganicLayoutData#ClusterIds property.

Circular Layout

  • The CircularLayout class now supports node types (see CircularLayoutData#NodeTypes) also for the layout of the cycle partitions. Previously, the types had an influence only on the layout of a partition itself. If all nodes of a partition are of the same type, then the partition gets that type as well, so that partitions of same type are preferably placed next to each other.
  • The CircularLayout class has received a faster algorithm for calculating edge bundles.

Tree Layout

Edge Router

  • The EdgeRouter class now produces better results for some setups with monotonic path restrictions and edges with vertically/horizontally overlapping endpoints.
  • The EdgeRouter class now tries to avoid routes that cross fixed external ports of other edges as well as fixed internal ports at group nodes of other edges. The new property PenaltySettings#PortCrossingPenalty allows to specify the cost of such crossings.
  • The EdgeRouter class now supports buses that include self-loops (see class BusDescriptor). Previously, self-loops were ignored.

Generic Labeling

  • The generic labeling algorithm has an additional preset to avoid overlaps of labels and the partition grid.

Layout

Analysis

Bugfixes

View

  • Combining HierarchicNestingPolicy#GROUP_NODES, LabelLayerPolicy#AT_OWNER and undo no longer throws a NullPointerException.
  • Viewport animations no longer suddenly stop when the zoom level is near CanvasComponent#MinimumZoom or MaximumZoom.
  • Holding down a scrollbar button no longer scrolls beyond the scrollable area indicated by this scrollbar.
  • Changing the ICanvasObject#Group property no longer triggers unnecessary recreation of the visuals anymore.
  • Fixed a bug in SelectionIndicatorManager that didn't call removeSelection when an item was deselected.
  • Changing the GraphComponent#GraphModelManager property no longer leaks memory in certain situations.
  • Calling IFoldingView#collapse on a normal (i.e. non-group) node no longer creates an UndoUnit or a view state (which included an unexpected call to IFolderNodeConverter#initializeFolderNode even though the result would have never been used). Now calling IFoldingView#collapse on a normal node does nothing.
  • The automatic flipping behavior of labels now also works with projections that distort the labels.
  • ViewportAnimations now are properly cleaned up on cancel.
  • GroupNodeStyle's associated INodeInsetsProvider now correctly calculates insets for “small” nodes, i.e. nodes whose height (or width) is less than the style's TabHeight property.
  • Inertia in MoveViewportInputMode no longer stops working randomly.

Graph

Interaction

  • After pasting, a closed group node within another closed group now stays closed. Previously, it was open due to a bug in the GraphClipboard class.
  • The GraphEditorInputMode#AdjustContentRect method now only updates the CanvasComponent#ContentRect property once per call. Previously there have been circumstances where the property would have been updated twice unnecessarily.
  • The TableEditorInputMode class no longer changes the GraphComponent#Selection property unnecessarily when the GraphComponent#Graph property is changed.
  • An instance of the HandleInputMode class is no longer canceled if a handle is removed during its own DragFinished call. This fixes some very rare exceptions under complicated circumstances.
  • Multiple DropInputMode instances now correctly consider their respective priorities.
  • UndoEngine no longer adds an empty undo unit for an aborted operation in certain rare cases.
  • Fixed an issue where changing the GraphComponent#InputMode while the context menu is open would lead to a crash.
  • Fixed a bug in MoveViewportInputMode that caused the inertia feature to mistakenly start moving the viewport after the mouse pointer 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.
  • SmartEdgeLabelModel now properly supports the original position snap line.

Styles

  • Cloning an ITable instance now properly clones all of the table's internal state. Previously, changing a cloned table's insets could result in the cloned table's stripes not updating their geometry.
  • TableNodeStyle now allows the table background style to access the table node's tag.
  • The built-in styles with rounded corners now have the correct outline shape for all calculations.
  • Edges with Bézier paths can now also be animated into non-Bézier paths.
  • Edge cropping now works as expected when using the BezierEdgeStyle class and the terminating nodes have styles that do not provide an outline in their IShapeGeometry implementation.
  • 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.
  • ShapeNodeStyleRenderer now always uses the protected getPaint and getPen methods for all shapes instead of falling back to the respective style properties for some shapes.
  • IconLabelStyle's updateVisual implementation now properly updates if the style's Icon instance is changed.
  • DefaultLabelStyle now adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape.

GraphML

  • The key parameter of AbstractInputHandler#setValue method is now annotated correctly as nullable. The key may be null when the model item used as key is created after its data has been parsed.
  • Fixed GraphML serialization and deserialization for certain configurations of GeneralPathNodeStyle and ShapeNodeStyle.
  • Fixed GraphML serialization and deserialization for certain configurations of GroupNodeStyle and RectangleNodeStyle.
  • Fixed an issue in GraphMLIOHandler's WriteEvents where the DataWriting event has been dispatched after the writing process instead of before.

GraphBuilder

  • Label bindings which don't provide label data (or null) no longer add empty labels. Instead, no label will be added.
  • Fixed a potential memory leak in AdjacencyGraphBuilder. Some internal references were not cleaned up after items have been removed during updateGraph.
  • Fixed a bug in GraphBuilder where updating an existing edge whose (new) source or target nodes cannot be resolved did not remove the edge from the graph.
  • Fixed a potential memory leak in GraphBuilder, AdjacencyGraphBuilder, and TreeBuilder. Some internal map entries for labels were not discarded after their owner nodes or edges were removed.

Table

Hierarchic Layout

  • The SimplexNodePlacer class used by the HierarchicLayout no longer throws an error due to an internal overflow for very wide layouts.
  • The HierarchicLayout class now correctly considers the specified halos of group nodes when there is a partition grid defined.
  • The HierarchicLayout class no longer generates broken non-orthogonal edge segments of same-layer edges for some cases in conjunction with integrated edge labeling and edge labels placed at the ports.
  • The HierarchicLayout class now properly satisfies PortCandidates defined for same-layer edges at nodes where other edges with (rather large) source/target port labels additionally exist.
  • The HierarchicLayout class now produces a correct edge grouping structure for short edges having the same source and target group ID.
  • The HierarchicLayout class no longer throws an exception when the edge-directedness feature (HierarchicLayoutData#EdgeDirectedness) is used in conjunction with enabled back-loop routing (HierarchicLayout#BackLoopRouting).
  • The HierarchicLayout class no longer creates unnecessary spacing between sub-components (see HierarchicLayoutData#SubComponents) and other elements. This previously happened in some cases due to edge/node labels being present. In consequence, these cases are now more compact.
  • The HierarchicLayout class no longer produces overlaps between (large) external node labels and unrelated edges.
  • The HierarchicLayout class no longer produces overlaps between sub-component elements (see HierarchicLayoutData#SubComponents) and edges that are not part of the component.
  • The HierarchicLayout class now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled (see property HierarchicLayoutData#UniformPortAssignmentGroups) for some cases where it previously did not yield a uniform port distribution.
  • The HierarchicLayout now correctly considers the PreferredPlacementDescriptor settings of an edge label when there are additionally edge groupings defined. Previously, it could, for example, happen that the edge label was placed on the wrong side of the edge.
  • The HierarchicLayout class now adheres more closely to its maximum duration and its AbortHandler.
  • The HierarchicLayout class now considers the PortCandidate directions correctly for layout orientations other than TopToBottom. This also improves the optimization results with PortCandidateSets that allow multiple directions to connect to nodes.
  • For input graphs with a PartitionGrid structure, the HierarchicLayout class now correctly considers the layering produced by the FromScratchLayerer if it is already compatible with the specified grid structure.
  • The HierarchicLayout class no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode.
  • The results of the DefaultLayerSequencer class are now deterministic by default, since it no longer aborts the calculation after 10s. For this, its MaximumDuration value is now unrestricted.

Organic Layout

  • The OrganicLayout class no longer produces broken routes of self-loops at group nodes if the Scope is not equal to ALL.
  • The OrganicLayout class now correctly considers the specified PartitionGrid if substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored.
  • The OrganicLayout class now correctly considers fix-contents and fix-bounds groups (see enum GroupNodeMode) if the substructure detection is enabled.
  • The OrganicLayout class now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData#NodeTypes).
  • The OrganicLayout class now satisfies property OrganicLayout#DeterministicModeEnabled for more cases when the maximum duration is restricted. Note, however, that non-deterministic behavior is still possible when restricting the duration.
  • The OrganicLayout class no longer produces violations of the specified minimum node distance for separated radial substructures (see property StarSubstructureStyle#SEPARATED_RADIAL).

Clear Area Layout

Orthogonal Layout

  • The OrthogonalLayout class no longer produces bad edge routes where the path is non-orthogonal and does not connect to the source node anymore for some rare cases containing parallel edges or chain substructures.
  • The OrthogonalLayout class now correctly considers the specified minimum group node sizes (see GroupingKeys#MINIMUM_NODE_SIZE_DPKEY). Previously, the minimum sizes were always enlarged by the groups' insets (see GroupingKeys#GROUP_NODE_INSETS_DPKEY). Actually, the minimum size should include the insets.
  • The OrthogonalLayout class now correctly handles input graphs with parallel edges if the ParallelRoutesPreferenceEnabled property is enabled. Previously, such inputs have caused exceptions in some rare cases.
  • The OrthogonalLayout class no longer generates overlaps between edge segments (of a parallel edge) and edge labels of other edges for some rare scenarios.

Edge Router

  • The EdgeRouter class now correctly interprets specified intermediate points (EdgeLayoutDescriptor#IntermediateRoutingPoints) as well as bus points (BusDescriptor#BusPoints) in the case when the algorithm runs inside an orientation layout with an orientation other than TopToBottom.
  • The EdgeRouter class now correctly considers the maximum duration and the AbortHandler when the octilinear routing style is chosen. Previously, it could happen that the algorithm kept on running even though the time was up.
  • The EdgeRouter class no longer throws an exception for some rare cases with collinear bends.
  • The EdgeRouter class now correctly handles direct content edges that are incident to group nodes with PortCandidateSets.
  • The EdgeRouter class no longer produces bad layout results for some scenarios with grouped edges and multiple PortCandidates. Previously, the algorithm selected any of them without considering the alternative options.

Generic Labeling

  • The GenericLabeling class no longer produces superfluous label overlaps if one of its RemoveNodeOverlaps or RemoveEdgeOverlaps properties is enabled.
  • 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.

Circular Layout

  • A circular layout with LayoutStyle#BCC_ISOLATED can no longer get into an infinite loop for inputs where a component consists only of articulation points.

Single Cycle Layout

  • The SingleCycleLayout class no longer produces violations of the specified minimum node distance.

Layout

Incompatible Changes

API

  • Due to the new install and uninstall methods of the ModelManager class, the following of its members have been changed:
  • The optional SelectionModel and Model parameters of HighlightIndicatorManager and SelectionIndicatorManager have been removed from the constructors, too. Instead, you can set the corresponding properties directly.
  • The NavigationInputMode#adjustGroupNodeLocation method has now an additional parameter expandedSize that specifies the size of the group node when it is expanded.
  • The LabelCreator#addLabel method can return null if no label is added.
  • The LabelCreator#updateLabel method now returns a boolean value: true if the label has been updated, false if the label should be removed.
  • The IHandle interface has a new method handleClick. This method must be implemented by custom handle implementations.
  • The DataProviderAdapter#defined method has been removed since it had no effect.
  • The GraphModelManager#ProvideUserObjectOnMainCanvasObject property has been renamed to ProvidingUserObjectOnMainCanvasObjectEnabled.
  • The NodeLabelingPolicy enum has been moved from com.yworks.yfiles.layout.tree to com.yworks.yfiles.layout. The reason is that the policy is now not only supported by BalloonLayout but also by CircularLayout, RadialLayout and CactusGroupLayout.
  • The type of the EdgeCellInfo#CellSegmentInfos property has been changed from YList to CellSegmentInfo[].
  • The HierarchicLayoutData#SubComponents property is replaced by the new HierarchicLayoutData#Subcomponents property with a different signature. The new property uses instances of the new SubcomponentDescriptor class to define subcomponents, and the layout algorithm responsible for a component is now specified via the new SubcomponentDescriptor#LayoutAlgorithm property.
  • Similarly, the data provider keys HierarchicLayout#SUB_COMPONENT_ID_DPKEY and HierarchicLayout#SUB_COMPONENT_LAYOUT_ALGORITHM_DPKEY are replaced by the new key HierarchicLayout#SUBCOMPONENT_DESCRIPTOR_ID_DPKEY that assigns instances of the new SubcomponentDescriptor class to nodes.
  • The TemporaryGroupNodeInsertionData#Components property is replaced by the new TemporaryGroups property of type TemporaryGroupDescriptor, which now specifies groups and the applied recursive group layout algorithm.
  • Similarly, the data provider key TemporaryGroupNodeInsertionStage#COMPONENT_LAYOUT_ALGORITHM_DPKEY was removed and the name of the key TemporaryGroupNodeInsertionStage#COMPONENT_ID_DPKEY was changed to TEMPORARY_GROUP_DESCRIPTOR_DPKEY.
  • The Pen#DashStyle property is now marked as @Nonnull, since several internal usages assumed that to be the case anyway.

Changes of Default Behavior

  • The semantic of the TraversalDirection#BOTH enumeration value used by the Neighborhood and Bfs algorithms has been changed and does not ignore the direction anymore, but now returns a union of the SUCCESSOR and the PREDECESSOR results instead. The old behavior can be restored by using the new TraversalDirection#UNDIRECTED enum value. Consequently, the default value of the TraversalDirection property of both the Neighborhood and the Bfs algorithm has been changed from BOTH to UNDIRECTED.
  • With the graph builder classes, label bindings which don't provide label data (or provide null) no longer add empty labels. Instead, no label will be added. Similarly, for label sources, no label will be added for data items for which the LabelCreator#TextProvider returns null.
  • When starting to drag the handle of a selected item, the handle isn't replaced anymore by a new handle instance provided for the selected item. Previously, this happened automatically, regardless of whether necessary to support use cases where state changes should result in a different handle instance. Now, the GraphEditorInputMode#requeryHandles method has to be called explicitly when changes are made that affect handles that are potentially already visible. Alternatively, a proxy implementation can be used that dynamically dispatches to new instances on its own when required.
  • The HandleInputMode class doesn't initialize a handle drag as soon as the handle is pressed, anymore. Instead, it waits until the DraggedRecognizer is triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting the RequestMutexOnPress property to false.
  • ResizeStripeInputMode now always uses the N_RESIZE_CURSOR for resizing rows and the W_RESIZE_CURSOR for resizing columns instead of using N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR or E_RESIZE_CURSOR depending on the dragged side. The old behavior was inconsistent when dragging the border between two stripes and had no visual difference on most platforms. New cursor properties have been added that can be used to set a custom cursor for different usecases.
  • The lists returned by the GraphPartition#getCells, DynamicObstacleDecomposition#getCells and DynamicObstacleDecomposition#getObstacles methods are no longer unmodifiable.
  • The value of the DefaultLayerSequencer#MaximumDuration property is now unrestricted. Previously, it was restricted to 10 seconds. It is used by the HierarchicLayout class, which still adheres to its own maximum duration.

Deprecations

New Demos

  • The Group Node Style Demo shows the new GroupNodeStyle in different configurations.
  • The Arrow Node Style Demo shows the new ArrowNodeStyle and its setting options.
  • The Rectangle Node Style Demo shows the new RectangleNodeStyle and its setting options.
  • The Shape Node Style Demo shows the shapes that are available for the ShapeNodeStyle.
  • The Default Label Style Demo shows the background shapes that are now available for the DefaultLabelStyle.
  • The Text Wrapping Demo shows the various options of the new text wrapping feature for labels.
  • The Layout Without View Demo shows shows how to create a graph, run a graph analysis algorithm, and calculate a layout without using a view or the IGraph API.

yFiles for Java (Swing) 3.5

Major New Features

    Smooth animations

    • Many viewport transitions are now smoothly animated. This prominently includes scrolling and zooming with the mouse wheel, but also the various commands, such as zooming via a toolbar button, fitting the graph into the viewport, interacting with the overview, and many others. This can be turned off for individual interactions via the new CanvasComponent#AnimatedViewportChanges property, and customized with the new protected method CanvasComponent#getViewportAnimationDuration.

    Node Types

    • The CircularLayout class is now able to separate nodes that are on the same cycle with respect to their node type. For this, the new NodeTypeAwareSequencer class can be set as NodeSequencer on the CircularLayout#SingleCycleLayout. Node types are specified via the CircularLayoutData#NodeTypes property.
    • The ComponentLayout class now supports node types. The types influence the arrangement and ordering of the components such that components consisting mostly of nodes of the same type are put close to other components consisting of nodes of that type. Use the ComponentLayoutData#NodeTypes property to define types.
    • The TreeLayout and ClassicTreeLayout classes now support node types. The types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are a weak criterion, i.e., if the ordering and placement is determined by other constraints, these are prioritized. Types can be defined via the TreeLayoutData#NodeTypes property.
    • The HierarchicLayout class now supports node types. The types influence the ordering of nodes within their layers as a subordinate optimization criteria. More precisely, nodes of the same type are more likely to be placed next to each other if this does not violate other constraints.
    • The OrganicLayout class now allows defining node types via the new OrganicLayoutData#NodeTypes property. The types control the detection of substructures (e.g. stars, parallel structures). When types are defined, only nodes of the same type can form a substructure. For star-like and parallel substructures, it is also possible to have a single substructure with nodes of different types, see properties #ParallelSubstructureTypeSeparationEnabled and #StarSubstructureTypeSeparationEnabled. The algorithm still tries to highlight the different types by choosing a suitable layout for these components (e.g., placing nodes of the same type closer together or on the same circle).
    • The OrthogonalLayout class now allows defining node types via the new OrthogonalLayoutData#NodeTypes property. The types control the detection of substructures, i.e., chains, cycles and trees. When types are defined, only nodes of the same type can form a substructure.
    • The node types feature is shown in the new NodeTypesDemo and the new OrganicSubstructuresDemo.

    Edge routing only if needed

    • Added the new penalty property PenaltySettings#SketchViolationPenalty supported by the EdgeRouter class. It defines the cost for a deviation from the original edge path if the new routing policy property is set to #SEGMENTS_AS_NEEDED.
    • Optionally, the EdgeRouter, ChannelEdgeRouter and BusRouter classes now automatically determine whether a new path should be calculated for a certain edge. This is controlled via the new properties EdgeLayoutDescriptor#RoutingPolicy, ChannelEdgeRouter#RoutingPolicy and BusDescriptor#RoutingPolicy, respectively. The decision is based on the quality of the existing routes - edges with strict violations of the routing style or that intersect other elements will be selected for routing. Available options:
      • RoutingPolicy#ALWAYS: A new route is calculated in any case. This was the previous behavior and remains the default.
      • RoutingPolicy#PATH_AS_NEEDED: The algorithm determines whether a new route is needed. If an edge is selected, its current path is not considered when computing a new route.
      • RoutingPolicy#SEGMENTS_AS_NEEDED: The algorithm determines whether a new route is needed. If an edge is selected, its current path is preserved as much as possible. Only the required segments are changed. This is only supported by the EdgeRouter class.

    New Features

      Graph, and View

      • The graph and tree builders now support bindings for bend locations. This is implemented by new bend-related members of the EdgeCreator class.
      • The new EdgePathPortLocationModel for ports owned by edges can be used to define port locations as a ratio of the edge path length. This keeps the port location stable when bends are added onto the edge path, for example during orthogonal edge editing.

      Layout and Algorithms

      • The new TreeAnalysis algorithm offers a convenient way of analyzing tree structures and querying tree-related properties (e.g. leaf nodes, parent-child relations and more).
      • The new ParallelEdges#findParallelEdges method allows to find all sets of parallel edges contained in a given graph or incident to a specific node.
      • The new GenericLayoutData class is a generic implementation of LayoutData that allows to pass arbitrary data to layout stages. As a consequence, the LayoutData#apply, ItemCollection#provideMapper and ItemMapping#provideMapper methods were removed.
      • The new SelfLoopRouterData class specifies custom data for the SelfLoopRouter class. In more details, it allows defining which self-loop edges should be routed and which should keep their current path.
      • The new PortPlacementStageData class specifies custom data for the PortPlacementStage class. In more details, it allows defining port candidates, port constraints, and node port candidate sets which are then considered by that layout stage.
      • The SubgraphLayout class now allows defining which edges must be included or excluded in the subgraph. Previously, only nodes could be specified. The new SubgraphLayoutData class offers the #SubgraphNodes and #SubgraphEdges properties to conveniently define the nodes and edges that should form the subgraph the core layout runs on.
      • The OrganicLayout class offers the new #ClusteringPolicy property, which allows to specify the clustering algorithm that is applied to the input graph. Three clustering algorithms are available: Louvain modularity, edge betweenness, and label propagation. Previously, the node clustering was always based on edge betweenness. By default, clustering is disabled.
      • The PartialLayout class offers a new property #MovingFixedElementsAllowed to allow moving fixed elements. This often yields a better layout quality even though the preservation of the mental map declines because the fixed elements may change their position.
      • The OrganicLayout and ClassicOrganicLayout classes support the new scope MAINLY_SUBSET_GEOMETRIC. In addition to the actual affected nodes, this scope may to some degree move nodes that are geometrically close to an affected node. The existing scope MAINLY_SUBSET is similar, but it does determine the closeness of other nodes by using the graph structure instead of the current geometry (i.e. location).

      Improvements

        Interaction

        • The new HandleInputMode#QueryClosestHandle event can be used to provide the closest handle for a certain query location.
        • Tooltip contents can now be provided asynchronously. As an alternative to setting the tooltip content directly, the ToolTipQueryEventArgs class also accepts a CompletionStage that provides the tooltip content asynchronously.
        • The HandleInputMode#beginDragging method now returns a CompletionStage which indicates whether the drag of a handle has been finished or canceled.
        • Validation of the text of edited labels can now be provided asynchronously. The new LabelTextValidatingEventArgs#ValidatedText property accepts a CompletionStage that provides the validated text asynchronously.
        • The CanvasComponent#zoomToAnimated method now returns a CompletionStage that is completed when the animation has finished. The parameter of type IEventListener<AnimationEventArgs> has been removed.
        • The CreateEdgeInputMode#doStartEdgeCreation method now returns a CompletionStage that completes when the edge creation gestures has been finished or cancelled.
        • The methods GraphEditorInputMode#createLabel, #createLabelCore, #editLabel, #editLabelCore, and #addLabel now return a CompletionStage that completes when the label creation, editing or adding has been finished.
        • The methods TableEditorInputMode#createLabel, #editLabel, and #addLabel now return a CompletionStage that completes when the label has been created, edited or added.
        • The MoveInputMode#doStartDrag method now returns a CompletionStage that completes when the move gestures has been finished or cancelled.
        • Changing the selection state of a large number of elements is now faster.
        • The OrthogonalEdgeEditingContext#createOrthogonalEdgeDragHandler method now accepts an IPortOwner instead of only an INode as dragged item. This can be used for custom edge drag handling that should support orthogonal edge editing.
        • The ItemCopiedEventArgs class now guarantees that its #Original and #Copy properties are not null.

        Graph

        Organic Layout

        • For the substructures in the OrganicLayout it is now possible to explicitly specify whether structures are allowed to be nested or not. Previously, substructures were allowed to be nested by default. New styles were added while the old styles now will not generated nested structures anymore.
          • Star structures offer the new styles StarSubstructureStyle#RADIAL_NESTED and StarSubstructureStyle#CIRCULAR_NESTED.
          • ChainSubstructureStyle#RECTANGULAR_NESTED and ChainSubstructureStyle#STRAIGHT_LINE_NESTED are the new styles for nested chains.
          • CycleSubstructureStyle#CIRCULAR_NESTED is the new style for nested cycles.
        • The OrganicLayout class now offers the possibility to define the minimum sizes of substructures (stars, chains, cycles, and parallel structures). Structures of smaller size are not handled as a substructure. For each type of structure a new property was added: OrganicLayout#StarSubstructureSize, OrganicLayout#ChainSubstructureSize, OrganicLayout#CycleSubstructureSize and OrganicLayout#ParallelSubstructureSize.
        • With substructures, the OrganicLayout class now often produces more compact results and comes with an improved placement of degree-one nodes.
        • When specified for the OrganicLayout class, the scope MAINLY_SUBSET now works together with more of its other features and constraints, and has a larger impact. For example, it previously had very little or no effect when a partition grid or an output restriction was defined.

        Edge Routing

        • When the EdgeRouter class runs with a highly restricted maximum duration or is aborted via the AbortHandler class, i.e., the router operates in the fastest possible mode, the calculated edge routes now are of higher quality. The quality improvements mainly affect cases with fixed port locations.
        • The EdgeRouter class now allows to explicitly define the costs for different types of edge crossings. The new properties PenaltySettings#AdjacentEdgeCrossingPenalty and PenaltySettings#SelfCrossingPenalty relate to crossings between two adjacent edges and crossings between two line segments that belong to the same edge, respectively. Previously, all types of crossings were covered by the existing EdgeCrossingPenalty property.
          • By default, now, crossings of adjacent edges are more expensive than normal ones and self-crossings are the most expensive.
          • Furthermore, the default values of the EdgeLengthPenalty and GroupNodeCrossingPenalty properties were increased to obtain more balanced results.
        • The EdgeRouter class now produces more suitable routes for edges with octilinear routing style. Previously, the diagonal segments where often omitted after/before an edge's first/last segment.

        Hierarchic Layout

        • The HierarchicLayout class now generates shorter paths for edges that cross borders of PartitionGrid columns in cases where there are no other obvious constraints that require the edge to be longer. This holds for the default vertical layout orientation; for a horizontal orientation, edges that cross borders of rows are affected by this improvement.
        • The HierarchicLayout class now considers the edge direction when choosing a port candidate for edges with multiple candidates. This new strategy often leads to fewer bends.

        Layout

        • LayoutExecutor#start, GraphComponent#morphLayout and LayoutUtilities#morphLayout now return a CompletionStage instead of null.
        • The new BalloonLayoutData#OutEdgeComparator property specifies a comparison function used to sort a nodes' outgoing edges.
        • The new LayoutGraphAdapter#ORIGINAL_TAG_DP_KEY data provider key provides access to the object stored in the tag property of the original graph item from within custom layout code.
        • The quality of the curved edge routing was improved with respect to various aspects and such that it yields aesthetically nicer curves. To further configure the curve routing, the following settings were added.
          • CurveShortcutsAllowed: if shortcuts are allowed, curves can become smoother and more direct but may violate other constraints (e.g. edge-edge distance). Available for HierarchicLayout (RoutingStyle#CurveShortcutsAllowed), EdgeRouter (EdgeLayoutDescriptor#CurveShortcutsAllowed) and CurveRoutingStage (CurveEdgeLayoutDescriptor#CurveShortcutsAllowed).
          • CurveUTurnSymmetry: allows to specify the symmetry preference for u-turns (180 degree turns) of curved routes. The default is zero so that results are equal to previous results. Available for HierarchicLayout (RoutingStyle#CurveUTurnSymmetry), EdgeRouter (EdgeLayoutDescriptor#CurveUTurnSymmetry) and CurveRoutingStage (CurveEdgeLayoutDescriptor#CurveUTurnSymmetry).
        • The HierarchicLayout, EdgeRouter, and CurveRoutingStage classes now avoid unnecessary, consecutive Bezier segments for modeling larger straight-line parts of an edge path. The resulting reduced bend count improves the user experience when working with the BezierEdgeStyle.
        • The ClassicTreeLayout class now features properties #MinimumFirstSegmentLength and #MinimumLastSegmentLength that allow to specify the minimum first and last segment length for the orthogonal routing style.
        • The new ParallelEdgeRouterData#RoutedParallelEdges property returns which edges the ParallelEdgeRouter class routed and thus were hidden during the core layout. This can be useful if parallel, non-leading edges need further handling, e.g., for placing their labels.

        View

        • The CanvasComponent#makeVisible, CanvasComponent#fitContent, and GraphComponent#fitGraphBounds methods now return a CompletionStage that completes when the view port adjustment has been finished.
        • The Animator#animate method now returns a CompletionStage that is completed when the animation has finished. The parameter of type IEventListener<AnimationEventArgs> has been removed together with the AnimationEventArgs class.
        • The new #install and #uninstall methods of the GraphModelManager class simplify exchanging the manager used by a GraphComponent. They are called when setting/removing a GraphModelManager as GraphComponent#GraphModelManager and should also be called when combining a GraphModelManager with a CanvasComponent.
        • The new IAnimation#createDelay method creates an animation that does nothing. This is especially useful in combination with other animations that run in parallel or in sequence to create complex multi-sequence animations. The accompanying method #createDelayedAnimation for the IAnimation interface delays the provided animation.
        • The new IAnimation#fromCallback method creates an animation for a given animation callback and duration.
        • The CanvasComponent#makeVisible method now respects margins defined by the CanvasComponent#ContentMargins property. Ensure visible is called for example by keyboard navigation,.
        • The ZOOM command now respects margins defined by the CanvasComponent#ContentMargins property when executed with a rectangle as parameter.
        • The ZOOM_TO_CURRENT_ITEM command now respects the margins defined in the CanvasComponent#ContentMargins property.
        • Setting the various descriptor properties of the GraphModelManager class no longer causes updates for every installed item if the descriptor hasn't actually changed.
        • The OverviewInputMode now renders its handle on top of the viewport rectangle instead of below it.
        • The ViewportLimiter#limitViewport method now has an overload with a parameter that enforces the ViewportLimitingPolicy#STRICT policy.
        • The CanvasComponent#makeVisible method now has an overload with a parameter to specify insets to keep around what to make visible in the viewport.
        • The CanvasComponent#makeVisible method now has an additional overload to make a set of points visible in the viewport. This is mainly useful when using a Projection and trying to make something visible that is not a rectangle in world coordinates.
        • All the following features no longer block user interaction: the viewport animations for CanvasComponent#makeVisible, executing scroll commands when the CanvasComponent#ScrollCommandAnimationEnabled property is enabled, and executing ICommand#ZOOM_TO_CURRENT_ITEM.
        • The CanvasComponent#fitContent and GraphComponent#fitGraphBounds methods now have an overload with a parameter that allows changing the viewport in an animated fashion.
        • GraphComponent#openFile now auto-completes the chosen filename with the file extension chosen in the FileDialog if missing.

        Styles

        • Edge cropping now works as expected when using BezierEdgeStyle and the terminating nodes have styles that don't provide an outline in their IShapeGeometry implementation.

        Bugfixes

          Interaction

          • When expanding a closed group, the parent groups of the expanded group no longer become unnecessarily large. The incorrect behavior could be observed only under certain conditions and was caused by a bug in the NavigationInputMode class.
          • Auto dragging was not stopped in certain cases.
          • The text area shown by the TextEditorInputMode class is now correctly placed if the TextAreaPlacementPolicy#MOVE_TEXT_AREA is set and a projection is used.
          • Fixed editing self-loops with PolylineEdgeStyle and orthogonal edge editing enabled.
          • HandleInputMode is no longer canceled if a handle is removed during its own DragFinished call. This fixes some very rare exceptions under complicated circumstances.
          • Fixed a bug in CreateEdgeInputMode which prevented toggling the direction of an orthogonal edge segment when the mouse was over a potential target.

          Graph

          • The ITable#StripeChanged event now reports the correct parent when re-parenting will be undone or redone.
          • A label with EdgeSegmentLabelModel or EdgePathLabelModel now moves steadily when the segment to which it belongs moves.
          • The FilteredGraphWrapper class now dispatches ParentChanged events in the correct order after predicate changes.
          • All #setFactory methods of the Node-, Edge-, Label-, Port-, and BendDecorator classes now respect the #nullIsFallback property.
          • FilteredGraphWrapper now fires the correct events when filtering out port labels. Previously, the events contained incorrect owner information.
          • Fixed CompositeUndoUnit#UndoName setting the RedoName instead.

          Styles

          • The parameter of type IShapeGeometry of the DefaultEdgePathCropper#isInside and #getIntersection methods is now nullable.
          • Built-in styles with rounded corners now have the correct outline shape for certain calculations.
          • Edges with Bezier paths can now also be animated to non-Bezier paths.

          Geometry

          • The #Area property of an empty RectD instance (including RectD#EMPTY) is now always zero, and no longer a negative value.

          Hierarchic Layout

          • The HierarchicLayout class now correctly processes input graphs with sub-components (HierarchicLayoutData#SubComponents) and curved edge routing style. Previously, such setups may have a caused an exception.
          • The HierarchicLayout class now correctly handles grouped input graphs if the node compaction is enabled (see property SimplexNodePlacer#NodeCompactionEnabled). Previously, the algorithm sometimes produced less compact results for such inputs.
          • The HierarchicLayout class now correctly considers the specified port groups for edges (see HierarchicLayoutData#SourcePortGroupIds). Previously, such groups were not always considered properly if there are either critical edges or property SimplexNodePlacer#EdgeStraighteningEnabled is true.
          • The HierarchicLayout class now correctly considers the specified critical edge priorities (see HierarchicLayoutData#CriticalEdgePriorities) if the input graph contains grouped edges.
          • The HierarchicLayout class now adheres more closely to its maximum duration and its AbortHandler.
          • The HierarchicLayout now considers the PortCandidate directions correctly for layout orientations other than TOP_TO_BOTTOM. This also improves the optimization results with PortCandidateSets that allow multiple directions to connect to nodes.
          • The HierarchicLayout class now correctly considers input graphs with group nodes and a PartitionGrid. Previously, in some rare cases, such inputs may have caused overlapping group nodes.
          • The HierarchicLayout class no longer generates broken non-orthogonal edge segments of same-layer edges for some cases in conjunction with integrated edge labeling and edge labels placed at the ports.
          • The HierarchicLayout class now correctly routes grouped edges where in some rare cases it could previously lead to node-edge overlaps.
          • The HierarchicLayout class not properly satisfies PortCandidates defined for same-layer edges at nodes where additionally other edges with (rather large) source/target port labels exist.
          • The HierarchicLayout class now produces a correct edge grouping structure for short edges having the same source and target group ID.
          • The HierarchicLayout class no longer produces superfluous port overlaps if there are edges with strong port constraints.
          • The HierarchicLayout class now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled (see property HierarchicLayoutData#UniformPortAssignmentGroups) for some cases where it previously did not yield a uniform port distribution.
          • The HierarchicLayout now correctly considers the PreferredPlacementDescriptor settings of an edge label when there are additionally edge groupings defined. Previously, it could, for example, happen that the edge label was placed on the wrong side of the edge.
          • The HierarchicLayout no longer throws an Exception when the edge directedness feature (HierchicLayoutData#EdgeDirectedness) is used in conjunction with enabled backloop-routing (HierarchicLayout#BackLoopRoutingEnabled).
          • The HierarchicLayout class no longer creates unnecessary spacing between sub-components (see HierarchicLayoutData#SubComponents) and other elements, which previously happened in some cases due to edge/node labels being present. In consequence, these cases are now more compact.
          • The HierarchicLayout class no longer produces overlaps between (large) external node labels and unrelated edges.
          • The HierarchicLayout class no longer produces overlaps between sub-component elements (see HierarchicLayoutData#SubComponents) and edges that are not part of the component.

          Organic Layout

          • The OrganicLayout class no longer throws an exception when running it on a graph with a partition grid, group nodes and such that the IDs of the group nodes (see provider key GroupingKeys#NODE_ID_DPKEY) are defined using a provider that cannot handle null as argument to its get method.
          • The OrganicLayout and ClassicOrganicLayout classes no longer cause undesired layout side effects when a mapper is registered with key RecursiveGroupLayout#GROUP_NODE_LAYOUT_DPKEY or when data is provided via the RecursiveGroupLayoutData#GroupNodeLayouts property. Previously, the layout algorithms registered there could be applied to nodes that should actually be kept fix by the organic layout.
          • The OrganicLayout class now produces correct results if auto-clustering is enabled (i.e., property ClusteringPolicy is not NONE) and the GroupNodeMode is set to FIX_BOUNDS or FIX_CONTENTS.
          • The OrganicLayout class now correctly considers fix-contents and fix-bounds groups (see enum GroupNodeMode) if the substructure detection is enabled.
          • The OrganicLayout class now correctly handles nodes with several degree-one neighbors. Previously, such inputs could cause arrangement artifacts if the StarSubstructureStyle is NONE.
          • The OrganicLayout class now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData#NodeTypes).

          Circular Layout

          • The CircularLayout class no longer crashes when enabling edge bundling, defining node types (CircularLayoutData#NodeTypes) and applying it on a graph that contains parallel edges.
          • The CircularLayout class no longer produces node overlaps if property SingleCycleLayout#MinimumNodeDistance is set to 0.

          Partial Layout

          Clear Area Layout

          Edge Routing

          • The EdgeRouter class no longer generates unnecessary detours in the routes when it is configured with MonotonicPathRestriction#BOTH.
          • The CurveRoutingStage class now correctly considers the minimum distance to nodes specified as value of the CurveEdgeLayoutDescriptor#MinimumNodeToEdgeDistance property. Previously, the curves could violate the distance and get too close to nodes.
          • The EdgeRouter class no longer has a problem that occasionally resulted in bad edge routing artifacts if edge grouping is enabled and non-affected edges are grouped at both end points.
          • The EdgeRouter class no longer occasionally throws an exception if the input contains bus edges (defined via BusDescriptor).
          • The OrganicEdgeRouter#KeepingExistingBendsEnabled property now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends.
          • The EdgeRouter class no longer produces artifacts if there are edges with curved routing style and labels, and the integrated edge labeling is disabled (see property EdgeRouter#IntegratedEdgeLabelingEnabled).

          Layout

          View

          • The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
          • The clipboard now doesn't copy labels or ports if they are not selected and their owner's IClipboardHelper forbids copying the owner.
          • The ZOOM_TO_CURRENT_ITEM command no longer moves the current item outside the visible area in rare cases. This was caused by a problem in the ViewportLimiter class.
          • Callbacks registered for removed visuals on the CanvasObject tree now reliably run after the visual is indeed no longer visible.
          • Callbacks registered with the IRenderContext#setDisposeCallback method now are reliably called, even when a canvas object has been explicitly removed.
          • The CanvasComponent#makeVisible method no longer ignores the limited viewport size in certain cases.
          • CanvasComponent's or GraphComponent's scrollbars now respect the component's ViewPortLimiter.
          • Fixed a bug that didn't reset the cursor when exiting the canvas and hovering over the scrollbars.
          • Fixed a potential memory leak that could occur when changing the GraphComponent#GraphModelManager.
          • The CanvasComponent#ZoomToAnimated method now works correctly when a Projection is used. This has previously been reported as fixed, but was not.

          Incompatible Changes

          • The protected method HandleInputMode#isHovering has been removed. To customize what handle should be used for a certain query location, the new HandleInputMode#QueryClosestHandle event can be used.
          • The HandleInputMode#beginDragging method now returns a CompletionStage.
          • The CanvasComponent#Projection property no longer accepts transforms with a non-zero translation component.
          • The CanvasComponent#ContentViewMargins property has been renamed to #ContentMargins. Accordingly, the #onFitContentViewMarginsChanged method and the #FitContentViewMarginsChanged event have been renamed to #onContentMarginsChanged and #ContentMarginsChanged, respectively.
          • The CanvasComponent#zoomToAnimated method now returns a CompletionStage that is completed when the animation has finished. The parameter of type IEventListener<AnimationEventArgs> has been removed.
          • The CreateEdgeInputMode#doStartEdgeCreation method now returns a CompletionStage that completes when the edge creation gestures has been finished or cancelled.
          • The GraphEditorInputMode#onLabelTextEdited method now returns a CompletionStage that completes when the text validation is done and provides whether the validation succeeded or was canceled.
          • The methods GraphEditorInputMode#createLabel, #createLabelCore, #editLabel, #editLabelCore, and #addLabel now return a CompletionStage that completes when the label creation, editing or adding has been finished.
          • The methods TableEditorInputMode#createLabel, #editLabel, and #addLabel now return a CompletionStage that completes when the label has been created, edited or added.
          • The MoveInputMode#doStartDrag method now returns a CompletionStage that completes when the move gestures has been finished or cancelled.
          • LayoutExecutor#start, GraphComponent#morphLayout and LayoutUtilities#morphLayout now return a CompletionStage instead of null.
          • The Animator#animate method now returns a CompletionStage that is completed when the animation has finished. The parameter of type IEventListener<AnimationEventArgs> has been removed together with the AnimationEventArgs class.
          • Animator#animateAndWait has been removed as the waiting didn't work correctly.
          • The TextEditorInputMode#getTextBoxBounds method has been removed.
          • The new GenericLayoutData class is a generic implementation of LayoutData that allows to pass arbitrary data to layout stages. As a consequence, the LayoutData#apply, ItemCollection#provideMapper and ItemMapping#provideMapper methods were removed.
          • The PolylineEdgeRouterData class has been renamed to EdgeRouterData to match the name of the layout algorithm it supports.
          • The overload of Centrality#pageRank taking just a Graph parameter has been removed as it only returned the sum of all pageRanks. Use the overload taking a Graph and an INodeMap instead.

          Behavior

          • The provider returned by IEdgeReconnectionPortCandidateProvider#ALL_NODE_AND_EDGE_CANDIDATES now doesn't return port candidates of the reconnected edge itself anymore as this lead to an unstable reconnection behavior.
          • The FIT_CONTENT and FIT_GRAPH_BOUNDS commands now change the viewport in an animated fashion.
          • Zooming with the mouse wheel to the center of the viewport by using CanvasComponent's CenterZoomEventRecognizer no longer uses the INCREASE_ZOOM and DECREASE_ZOOM commands.
          • During animated viewport transitions, for performance reasons, mouse events are not redispatched, anymore, except for the last frame of the animation.
          • LayoutExecutor#start doesn't throw an exception anymore if an error occurred during the layout that wasn't handled in the #LayoutFinished event. Instead the CompletionStage returned by #start is completed exceptionally.
          • The OrganicLayout substructure styles StarSubstructureStyle#RADIAL, StarSubstructureStyle#CIRCULAR, ChainSubstructureStyle#RECTANGULAR, ChainSubstructureStyle#STRAIGHT_LINE and CycleSubstructureStyle#CIRCULAR do no longer allow that the detected substructures are nested inside other substructures. To get the old behavior and allow nesting, new style values were added (e.g. StarSubstructureStyle#RADIAL_NESTED).
          • The following behavior change applies to class HierarchicLayout with polyline edge routing style: the default value of property EdgeLayoutDescriptor#MinimumSlope was changed from 0.3 to 0.2 which makes the sloped segments less steep and the overall results more compact.
          • In organic layout, the way edge grouping influences the layout of certain substructures has changed. Structures are not split-up anymore into several ones when edges of nodes in the structure have different group IDs. Now, the new node types can be used to split-up structures (see OrganicLayoutData#NodeTypes). If a structure contains different edge groups, the grouping is properly considered and may influence the sorting of elements within the structure. Affected substructure styles are StarSubstructureStyle#SEPARATED_RADIAL, ParallelSubstructureStyle#RADIAL, ParallelSubstructureStyle#STRAIGHT_LINE and ParallelSubstructureStyle#RECTANGULAR.
          • The OrganicEdgeRouter#KeepingExistingBendsEnabled property now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends. Therefore, the new property OrganicEdgeRouter#ExistingBendsConsiderationEnabled was introduced to get the old behavior. Existing bends are considered, but their absolute coordinates are not kept.
          • The default value of the ClassicTreeLayout#MinimumLayerDistance property was changed from 40.0 to 20.0 and the default value of the ClassicTreeLayout#BusAlignment property was changed from 0.3 to 0.5. In addition, the new #MinimumFirstSegmentLength and #MinimumLastSegmentLength properties may lead to different results compared to previous versions. Setting both properties to zero will neutralize their influence on the result.
          • For the DefaultNodePlacer class that is used by the TreeLayout, the default values of the #HorizontalDistance and #VerticalDistance properties were changed from 40.0 to 20.0, and the default values of the #MinimumFirstSegmentLength and MinimumLastSegmentLength properties were changed from 0.0 to 20.0.
          • For the CompactNodePlacer class that is used by the TreeLayout, the default values of the #HorizontalDistance and #VerticalDistance properties were changed from 40.0 to 20.0, and the default values of the #MinimumFirstSegmentLength and #MinimumLastSegmentLength properties were changed from 10.0 to 20.0.
          • The default value of the LayeredNodePlacer#BusAlignment property was changed from 0.3 to 0.5.

          Deprecations

          • The CanvasComponent#ScrollCommandAnimationEnabled property has been deprecated in favor of the new AnimatedViewportChanges property, which offers more control over viewport animations, not just the scroll commands.
          • The OrganicLayout#NodeClusteringEnabled property is now deprecated. It is replaced by the new OrganicLayout#ClusteringPolicy property. To disable clustering specify ClusteringPolicy#NONE. To enable it and use the same algorithm as before, specify ClusteringPolicy#EDGE_BETWEENNESS.
          • The class com.yworks.yfiles.analysis.TreeAnalyzer has been deprecated. The more powerful class TreeAnalysis should be used instead.

          New Demos

          Demo Improvements

          • More sample graphs and configuration options have been added to the LayoutStyle demo.

          yFiles for Java (Swing) 3.4.0.1

          Improvements

          View

          Layout

          • The HierarchicLayout class now has an improved strategy for choosing the port candidates for same-layer edges with multiple available candidates. Previously, the chosen candidate may have led to superfluous back-loops.

          Algorithms

          • The LabelPropagationClustering algorithm now produces normalized, continuous clustering IDs. In other words, for example, if it finds 5 clusters, they get IDs from 0 to 4. Previously, the range of IDs may have contained holes. If initial label values are provided, this normalization is omitted.

          GraphML

          • The ValueSerializer for well-known color names now supports screaming snake case in addition to camel case and lower case names.

          Bugfixes

          View

          • The clipboard now doesn't copy labels or ports if they are not selected and their owner's IClipboardHelper forbids copying the owner.
          • The CanvasComponent#ZoomToAnimated method now works correctly when a Projection is used.
          • The ZOOM_TO_CURRENT_ITEM command no longer moves the current item outside the visible area in rare cases. This was caused by a problem in the ViewportLimiter class.
          • Fixed a bug in CanvasComponent#FitContent and GraphComponent#FitGraphBounds which caused FitContentViewMargins being incorrectly applied in case a Projection has been set.
          • The following issues of the ZOOM_TO_CURRENT_ITEM command have been corrected:
            • The item is now longer placed slightly out of center if scrollbars appear during the operation.
            • If the current item is too large to fit the viewport at zoom 1, the command now zooms out.
          • Fixed incorrect margins on an GraphOverviewComponent with a Projection set.
          • Fixed a bug which caused the ZOOM command to disrespect the ViewportLimiter if executed with a rectangle as parameter.
          • The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
          • Fixed Animator#animateAndWait to update the canvas during the animation.
          • GraphOverviewComponent now considers its border thickness correctly when calculating the visible area of a GraphComponent using a projection.

          Graph

          Input

          • The CreateEdgeInputMode class no longer has an error which prevented the removal of port candidate visualizations after another input mode claimed to be active.

          GraphML

          • Labels at ports of collapsed nodes are no longer lost during GraphML serialization.

          Styles

          • HtmlLabelStyle: Fixed text placement when the render size of the label text exceeds the size reserved for the label.

          Layout

          • The TabularLayout class no longer throws an exception about a missing PartitionGrid when used within RecursiveGroupLayout and RecursiveGroupLayoutData and TabularLayoutData are used without an explicit cell-id mapping.
          • The LayoutExecutor class now uses the correct target bounds when a projection is set on the GraphComponent.
          • When the MaximumDuration of the EdgeRouter class is exceeded, it now still uses the same port for edges that are grouped. Previously, edge grouping constraints were mostly ignored when the time was up.
          • Improved the reaction time of the EdgeRouter class when the MaximumDuration is exceeded or the algorithm should stop due to AbortHandler for some cases where previously the search for a path kept on running for a long time.
          • The RadialLayout class is now much faster if the input graph is a very large tree structure.
          • The OrganicLayout and ClassicOrganicLayout classes no longer produce an internal integer overflow that may lead to an early exit and, thus, poor layout results for very large input graphs.
          • The ClearAreaLayout class no longer throws an exception for some scenarios where the same algorithm instance was first applied to a graph with PartitionGrid and later to a graph without grid.
          • The EdgeRouter and PolylineLayoutStage classes no longer produce broken routes for edges with polyline segments. Previously, such broken routes may have appeared in rare cases.
          • The HierarchicLayout class now correctly considers the back-loop routing style (HierarchicLayout#BackLoopRoutingEnabled) for graphs with critical edges (see HierarchicLayoutData#CriticalEdgePriorities).
          • The ClearAreaLayout and FillAreaLayout classes no longer throw an exception for some input graphs with edge labels if property EdgeLabelConsiderationEnabled is enabled.
          • The GenericLabeling class no longer throws an exception for edge labels with preferred placement descriptor if property EdgeLabelPlacementEnabled is disabled.
          • The TreeLayout class now correctly handles trees with group nodes. Previously, it sometimes produced overlapping elements and halo violations for such inputs.
          • The curved edge routes produced by HierarchicLayout, EdgeRouter or CurveRoutingStage no longer violate the minimum node-edge distance or intersect the node. Intersections could previously happen especially when the specified node-edge distance was zero.
          • The RecursiveGroupLayout class now correctly handles setups that use both recursive and non-recursive group nodes. Previously, such use-cases may have led to invisible/ignored edges and, thus, broken edge routes.
          • The PartialLayout class now transfers the value of its PartialLayout#MaximumDuration property to the internally used edge routing algorithm. This means that when the partial layout has a restricted running time, the routing part will be restricted, too. Previously, the duration of the edge routing was unrestricted. Note that if the router instance is user-specified, this instance will not get a maximum duration.
          • The HierarchicLayout, EdgeRouter and CurveRoutingStage classes no longer occasionally throw an exception when the curved routing style is used for graphs that have self-loop edges.
          • The ClearAreaLayout class now produces correct orthogonal routes for edges if its ClearAreaStrategy property is set to a local strategy. Previously, some of the edges may have received a non-orthogonal route.
          • The EdgeRouter class no longer throws an exception if the input contains a bus defined via BusDescriptor where all the associated edges are actually fixed.

          Hierarchic Layout

          • The HierarchicLayout class no longer produces an infinite looping issue in the incremental layout mode for some input graphs with layer constraints that specify that a node should be placed in the topmost/bottommost layer.
          • The HierarchicLayout class no longer produces unnecessary edge crossings between self-loop edges at the same node in cases where a larger number of self-loops exist at a node.
          • The HierarchicLayout class no longer ignores edges connected to group nodes when the group node contains a bus structure (see HierarchicLayoutData#Buses) and no other elements. Such edges were previously actually removed from the layout graph such that other stages (e.g. the ComponentLayout) could have failed with an exception.
          • The HierarchicLayout class no longer occasionally throws an exception when enabling HierarchicLayout#GroupCompactionEnabled and in conjunction with layering constraints and/or a group node marked as incremental.
          • The HierarchicLayout class does no longer violate the specified minimum length for edges incident to group nodes.
          • The sequencing phase of the HierarchicLayout class is now faster for large graphs with sequence constraints and non-incremental layout mode.

          Edge Routing

          • The BusRouter class now produces more suitable edge routes for rare cases that were caused by an unsuitable bus placement.
          • The EdgeRouter class now uses the given ports for edges of a bus with fixed edges.
          • The EdgeRouter class now correctly considers edges incident to a fixed inner port of a group node when the routing algorithm has restricted maximum duration. Previously, this setup sometimes led to strange edge routes with many superfluous bends.
          • The EdgeRouter class no longer contains edges with self-crossings in some rare cases where it previously failed to eliminate them.
          • The EdgeRouter and CurveRoutingStage classes no longer change the path of unaffected (fixed) edges when the ControlPointCreationEnabled property of their associated EdgeLayoutDescriptor instance (CurveEdgeLayoutDescriptor respectively) is enabled.
          • The EdgeRouter class now correctly supports the use case that a subset of edges is routed with the curved routing style while another subset is routed with another routing style and different settings on the associated individual EdgeLayoutDescriptor instances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used.
          • The OrthogonalSegmentDistributionStage class does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that the ChannelEdgeRouter class is affected too, as the stage is by default called from within the router.

          Analysis

          • The Cycles#FindCycleEdges algorithm no longer crashes when the given input graph contains self-loops.

          yFiles for Java (Swing) 3.4

          This release contains many new major features and lots of other new features, improvements, and bugfixes for all parts of the library. In addition to the new demos, there are some notable demo improvements, too.

          If you are updating from an older version of yFiles for Java, have a look at the list of incompatible changes.

          Major New Features

          Isometric Drawing and Other Projections

          CanvasComponent (and thus GraphComponent) now has an additional Projection property that can be used to transform the viewport into a different parallel projection, e.g. isometric or cabinet projection. Predefined useful projections are provided as constants on the new Projections class. Interaction, including graph editing, snapping, orthogonal edge editing, etc. still work as expected, just within the new projection. That is, orthogonal edge editing becomes isometric edge editing with an isometric projection. There is a corresponding chapter in the Developer's Guide that goes into further detail what has changed and which customization options exist.

          The IsometricDrawingDemo displays graphs in an isometric fashion to create an impression of a 3-dimensional view.

          Fill Area Layout and Clear Area Layout

          The new ClearAreaLayout algorithm clears a user-specified area in an existing layout by moving elements. It is suitable if the rest of the layout should not change much but some free space is required, e.g., because new elements need to be inserted into the drawing or have been resized.

          The new FillAreaLayout algorithm fills a user-specified area in an existing layout by moving elements into or towards it. It can make layouts around the specified area more compact and is suitable if, e.g., elements were removed from the graph or their size has changed substantially.

          The following two new demos showcase the new layout algorithms:
          Aggregation and Analysis of (Large) Graphs

          Many new algorithms for analyzing graphs are now included, for example to detect components and clusters, to aggregate sub-graphs, and to calculate centrality values. In addition, the analysis algorithms now have the option to define a subset of the graph to work on. In detail, the new classes are:

          • The new NodeAggregation class provides an algorithm that intelligently aggregates nodes of (large) input graphs. It does not require complex configuration and can be used without knowledge of specific clustering or aggregation techniques.
          • The KCoreComponents class provides a component detection algorithm that finds k-cores.
          • The classes LouvainModularityClustering and LabelPropagationClustering provide two new algorithms for cluster detection.
          • The EigenvectorCentrality class offers a centrality algorithm that measures the influence of a node in a network based on the Eigenvector score.
          • The PageRank class provides a centrality algorithm that calculates the so-called page rank for the nodes.
          • The classes ChainSubstructures, CliqueSubstructures, CycleSubstructures, StarSubstructures, and SubtreeSubstructures provide new algorithms that detect isolated substructures like chains, cliques, cycles, stars, or subtrees. This can be used as an input to other (layout) algorithms.
          • The class GraphStructureAnalyzer now offers additional methods to calculate the average degree, the average weighted degree, the diameter, and the density of a given graph.
          Support for Curved Edges

          The new BezierEdgeStyle renders edges with smooth Bezier-curve paths.

          In addition, the new edge label models BezierEdgePathLabelModel and BezierEdgeSegmentLabelModel place labels optimally on curved edges rendered with this style.

          Support for curved edges has been added to the layout and edge routing algorithms EdgeRouter and the CurveRoutingStage, and HierarchicLayout.

          Interactive Node Resizing
          Resizing nodes using their handles now supports two new behaviors:
          • Center resizing keeps the center fixed and scales the node in all directions. It is active when the NodeReshapeHandleProvider#CenterReshapeRecognizer is triggered which defaults to the Alt key held down.
          • Aspect ratio resizing maintains the aspect ratio of a node. It is active when the NodeReshapeHandleProvider#RatioReshapeRecognizer is triggered which defaults the Shift key held down.
          • The NodeReshapeHandleProvider#ReshapePolicy property determines how the mouse location is interpreted when aspect ratio resizing is active.

          The ReshapeHandleProviderDemo showcases these different resizing behaviors.

          Graph Builder
          The new GraphBuilder, TreeBuilder, AdjacencyGraphBuilder have been added. These new classes facilitate building graphs from arbitrary data:
          • GraphBuilder can be used when the data consists of one or more collections of nodes, edges, and optionally, groups.
          • TreeBuilder can be used when the data consists of one or more collections of nodes, each of which knows its child nodes, and optionally, groups.
          • AdjacencyGraphBuilder can be used when the data consists of one or more collections of nodes, each of which knows its neighbors, and optionally, groups.

          New Features

          Graph

          Algorithms

          • New methods of the GraphChecker and Groups classes compute several additional network statistics, namely GraphChecker#getAverageDegree, GraphChecker#getAverageWeightedDegree, GraphChecker#getDiameter, GraphChecker#getDensity, and Groups#getModularity.
          • The new NodeAggregation class provides an algorithm that intelligently aggregates nodes of (large) input graphs. It does not require complex configuration and can be used without knowledge of specific clustering or aggregation techniques.
          • The new Transitivity#TransitiveEdges method creates the transitive edges that connect the visible nodes in an input graph.
          • The new GraphConnectivity#kCore overloaded methods compute the so-called k-cores of an undirected input graph.
          • The new Centrality#eigenvectorCentrality method computes the eigenvector centrality for each node in an undirected graph.
          • The new Centrality#pageRank method provides an implementation of the page rank algorithm that computes a rank for each node.
          • The new Groups#labelPropagation method implements the label propagation algorithm which detects communities in the input graph.
          • The new Groups#louvainModularity method detects the communities of an input graph by applying the well-known Louvain method for community detection.
          • The new Groups#getClusteringCoefficient method computes the local clustering coefficient for each node as well as the average clustering coefficient.
          • The new Substructures class offers methods to detect the following graph structures: Chains, Cliques, Cycles, Stars, and Trees.

          Layout

          • The new routing style EdgeRoutingStyle#CURVED of the HierarchicLayout class results in edge paths that consist of smooth curves that are constructed using cubic bezier splines.
          • The new property EdgeLayoutDescriptor#RoutingStyle allows specifying the routing style individually for each edge routed by the EdgeRouter class. Furthermore, the new properties MaximumOctilinearSegmentRatio and PreferredOctilinearSegmentLength on the descriptor provide means to configure the octilinear routing style.
          • The EdgeRouter class now supports a new routing style that generates curved edge paths. It can be specified for each edge individually using the EdgeRoutingStyle#CURVED enum value.
          • The new layout stage CurveRoutingStage replaces polyline edge paths with curved segments using cubic bezier splines and provides a generic way to produce layouts with curved edges.
          • The CircularLayout class now supports exterior edges that are routed around the exterior of the circle as smooth arcs. This can be specified with the new CircularLayout#EdgeRoutingPolicy property.
          • The new EdgeBundlingStage class offers edge bundling for general undirected graphs. Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes.
          • The RadialLayout class now supports a user-defined layer/circle assignment strategy. This can be specified with the LayeringStrategy#USER_DEFINED enum value and the layout data property RadialLayoutData#LayerIds.

          Improvements

          • IListEnumerable#create can now be called with any Iterable instead of only with Lists.
          • The license mechanism now only logs license messages when no valid license has been found. Previously it was also logged to System#err that a license is valid.
          • Added property LicensePath to class LicenseConfig to support license files in places other than the classpath root.

          Graph

          View

          • The CanvasComponent#updateContentRect method now throws an IllegalStateException if an element on the canvas provided invalid bounds, e.g. one with infinite values.
          • The CanvasComponent#fitContent method now respects the LimitedFitContentZoom property if a ViewportLimiter is enabled.
          • A new policy has been added to the ViewportLimiter class which allows for zooming and panning towards the limits but not away from them. This prevents the viewport from "jumping" from out-of-limit coordinates into the limited bounds.
          • The methods raise, lower, toFront and toBack on class GraphModelManager are not final anymore, thus, can now be overridden.
          • The new GraphModelManager#ProvideUserObjectOnMainCanvasObject property can be set so that a model is accessible as its main canvas object's user object.
          • The classes DefaultFolderNodeConverter and AbstractFoldingEdgeConverter provide a new protected method createPreferredLabelSize to allow for overriding the default implementations.
          • The classes NodeStyleLabelStyleAdapter, NodeStylePortStyleAdapter, and NodeStyleStripeStyleAdapter now propagate the tags of labels, ports, and stripes to the node that's rendered with the node style.
          • The GridVisualCreator class can now draw only horizontal lines or only vertical lines when its GridStyle property is set to one of the new enum values GridStyle#HORIZONTAL_LINES or GridStyle#VERTICAL_LINES.
          • The property GridVisualCreator#GridRenderPolicy has been added and can be used to switch between a high-quality and a fast-performing rendering.
          • OverviewInputMode now has a protected method updateVisibleArea which is the callback that fits the client canvas' content rectangle into the overview again after it has changed.
          • An Animation can now be paused and unpaused by setting the Paused property on the Animator class after the animation has started.

          Projections Feature

          Input

          Geometry

          • The new method PointD#interpolate calculates the linear interpolation between two points.
          • GeneralPath has a few new helper methods, mostly related to cubic Bézier curves:
            • findCurveIntersection finds the intersection between a cubic Bézier curve and the path.
            • getCubicSplitPoints determines new control points for splitting a cubic Bézier curve.
            • getProjection calculates the projection of a point onto a specific segment of the path.

          Analysis

          • Most of the algorithms in namespace Analysis provide properties SubgraphNodes and SubgraphEdges which facilitate to analyze only a subset of the given graph.
          • The GraphStructureAnalyzer class has now methods to determine whether there are multiple edges between the same pair of nodes.
          • The GraphCentrality and ClosenessCentrality analysis algorithms now calculate the centrality individually per component instead of returning a centrality value of 0.0 for nodes in graphs that are not connected.
          • In a single node graph, the single node's closeness centrality and graph centrality value is now 1.0. (Previously, it was infinity.) This also affects derived values such as minimum, maximum, and normalized centrality. The backing algorithms in the Centrality class are unchanged.
          • When EdgeBetweennessClustering and FeedbackEdgeSet are executed, the specified edge weights are checked and in case they are not positive or finite, an IllegalStateException is thrown.

          Layout

          • Frequently used types of the layout part have now nullability annotations.
          • The DefaultPortAllocator class has a new property ConsiderFixedPorts that allows to specify whether edges with strong port constraints or fixed port candidates should be considered during the port assignment. Previously, such edges were ignored which could lead to intersections with the ports of the other edges. This new feature is enabled by default.
          • The EdgeRouter class now provides an improved support for early exits. The routing algorithm now often reacts more sensibly to the case that the specified MaximumDuration is reached.
          • If the EdgeRouter algorithm runs with highly restricted time (see EdgeRouter#MaximumDuration) or when it gets stopped by means of AbortHandler, it now keeps the minimum edge to edge distance better.
          • The PartialLayout class now produces more stable results if it is multiple times applied to the same input graph and property SubgraphPlacement is set to SubgraphPlacement#FROM_SKETCH.
          • The HideGroupStage class now offers a new property ResetEdgePaths that allows to specify whether or not the stage resets the path of edges incident to group nodes.
          • The ComponentLayout class now correctly considers node and edge labels when using the packed layout styles, e.g., ComponentArrangementStyles#PACKED_RECTANGLE or ComponentArrangementStyles#PackedCircle. Previously, labels could overlap other elements when using these component arrangement styles.
          • Constructor overloads have been added to classes SingleItem, ItemCollection, ItemMapping, and ContextItemMapping that initialize one of their properties on construction.
          • The LayoutExecutor class now generates more specific port constraints with the FixPorts property enabled, resulting in better edge paths.
          • If the Mapper property of class HierarchicLayoutData#EdgeDirectedness is directly accessed (not explicitly set) its default for unset values is 1.0 (directed edge).
          • If the Mapper property of class OrganicLayoutData#GroupNodeModes is directly accessed (not explicitly set) its default for unset values is GroupNodeMode#NORMAL. This doesn't change the result of the layout.
          • For the RootPlacements, SubtreeRoutingPolicies, and SubtreeAspectRatio properties of the AspectRatioTreeLayoutData class, the type of the mapped values has been made nullable. For null or unset values, the settings on the AspectRatioTreeLayout will now be taken.
          • Relaxed the strict type requirements for IncrementalHintItemMapping's setIncrementalSequencingItems(Iterable) overload to accept specific IModelItem sub-types as well.
          • Relaxed the strict type requirements for LayoutData setter overloads that take mappings of one kind or the other to accept sub-types of the required value type. This also applies to LayoutExecutor#setPortLabelPolicies and LayoutGraphAdapter#setPortLabelPolicies.

          Bugfixes

          View

          • Layout animations for graphs with ports that are owned by edges no longer throw an exception.
          • An animation created with the Animations#createGraphAnimation method no longer throws an exception if the provided IMapper with new bend locations doesn't provide bend locations for all edges.
          • The ViewportAnimation no longer throws an Exception when applied on a zero-size GraphComponent.
          • Fixed a bug which caused the ZOOM_TO_CURRENT_ITEM command to ignore the ViewportLimiter of the corresponding CanvasComponent.
          • The CanvasComponent#zoomTo method no longer triggers two ViewportChanged events.
          • Scrolling the viewport with the mouse wheel no longer scrolls in the wrong direction if the mouse wheel is set to scroll one page at a time (instead of several lines).
          • The GraphModelManager#getMainCanvasObject method no longer throws a NullPointerException when overriding its getCanvasObject methods for items in an unexpected way.
          • Due to better null checks, several styles and input modes no longer throw an exception in the rare case that an IRenderContext doesn't provide a CanvasComponent instance.
          • Fixed a bug in FoldingManager where a predicate change in a FilteredGraphWrapper which serves as MasterGraph could trigger an Exception if a child of a folder node has been hidden.
          • The methods ICanvasObject#above and below don't unnecessarily trigger IRenderContext#ChildVisual anymore.
          • Callbacks registered via IRenderContext#setDisposeCallback are now always called when the visual was disposed. Previously there have been some cases, such as creating visuals outside of rendering (e.g. for measuring), where the callback would never be called.
          • Edges between deeper nested nodes are now displayed correctly in front of a common ancestor after that ancestor has been added or removed.
          • Fixed a bug in the GraphCopier class which caused the LabelCopied event to be dispatched twice for port labels on folder nodes.
          • Fixed a bug in the visualization of the snapping of resized nodes. Due to the bug the arrows indicating that the width or height of the node equals the width or height of other nodes were only rendered at the resized node but not at the other nodes with same width or height.
          • The file chooser dialogs shown from GraphComponent's openFile and saveFileAs methods now respect the filter values specified for CanvasResources' GraphComponent#OpenFileDialog#Filter and GraphComponent#SaveFileDialog#Filter resource keys.

          Input

          • Calling the GraphInputMode#findItems and GraphInputMode#HitTester#enumerateHits methods with a custom IInputModeContext will now always pass that context to the IHitTestable implementations of the items being hit-tested. Previously, the main input mode's own IInputModeContext was used in certain cases.
          • The paste and duplicate operations now honor the GraphEditorInputMode#shouldSelect predicate.
          • The NodeDropInputMode class now correctly considers port labels, both for creating the new node and for the preview.
          • The ICommand#SET_CURRENT_ITEM command can now also be used to “reset” the current item to null by passing null as the command parameter. This also fixes that the NavigationInputMode#SetCurrentItem and GraphInputMode#SetCurrentItem methods did nothing when null was passed as an argument.
          • The TextEditorInputMode class now correctly queries the ViewportLimiter if TextBoxPlacementPolicy#SCROLL_CANVAS is used. If the text box is still not visible because it's outside the limited viewport, the text box will be moved as well.
          • Undo and redo of additions and removals of bends on folding edges now correctly restores the bends at the location they had at the time of removal.
          • The NavigationInputMode#FitContentAfterGroupActions property is no longer ignored when the NavigationInputMode class is used as a child input mode of the GraphEditorInputMode class.
          • The NavigationInputMode class now also updates the CanvasComponent#ContentRect property when it is not used as a child input mode of the GraphEditorInputMode class.
          • The SnapContext#GridSnapDistance and SnapContext#SnapDistance properties are no longer incorrectly interpreted in world coordinates when calculating SnapResults.
          • MouseWheelEventArgs are now set to Handled = true when CanvasComponent scrolls or zooms to avoid those events from bubbling to parent controls.
          • Orthogonal edge editing does not add bends anymore to edges that are marked as not orthogonal.
          • Input modes are no longer left in an undefined state if another input mode has been activated in an event handler of the first input mode. This usually resulted in the wrong cursor being displayed.

          Geometry

          • Fixed the MaxX and MaxY properties of RectD#INFINITE which now return Double#POSITIVE_INIFINITY instead of NaN. In turn, RectD#INFINITE's TopRight, BottomRight, and BottomLeft corners were fixed, too.

          Analysis

          • The EdgeBetweennessClustering#run method no longer throws an exception with its default setting for the MaximumClusterCount property.
          • The Manhattan distance metric for HierarchicalClustering no longer ignores the vertical distance component.
          • The HierarchicalClustering class no longer throws an exception when applied to an empty graph.
          • The results of the Chains class are now correct for undirected cycles, too. If such cycles are not connected to other parts of the graph, the Nodes collection of a resulting Path could have been in an incorrect order.
          • The ClosenessCentrality class no longer calculates NaN as result of the NormalizedNodeCentrality property if the graph consists of one single node. Instead, the value of the NormalizedNodeCentrality property is now positive infinity.
          • The ClosenessCentrality#run method no longer throws an exception for unconnected graphs. Instead, all values of the NodeCentrality and NormalizedNodeCentrality properties will be 0.0 as the documentation states.
          • A number of spurious NullPointerExceptions in various graph analysis algorithms do no longer happen when configuring them with a Mapper that doesn't have an explicit value for every node/edge in the graph.

          Layout

          • The morphLayout and LayoutExecutor#start methods no longer throw an exception when applied on a zero-size GraphComponent.
          • Fixed a bug in ItemCollectionMapping that could result in a NullPointerException for added ItemCollections where no items were specified.
          • The HierarchicLayout class now correctly handles inputs that have both bus structures and edges with recursive style. Previously, an exception could be triggered when an edge was marked as recursive and belonged to a bus at the same time.
          • The HierarchicLayout class no longer throws an exception that was previously triggered in some cases with bus structures (see property HierarchicLayoutData#Buses) and in conjunction with layering constraints.
          • Fixed a bug in the HierarchicLayout class that in some cases caused a violation of the minimum first or last segment length (EdgeLayoutDescriptor#MinimumFirstSegmentLength and EdgeLayoutDescriptor#MinimumLastSegmentLength). The bug was only triggered when the minimum length values were relatively large.
          • The OrganicLayout class no longer throws an exception when having a PartitionGrid and at the same time the scope set to SUBSET or MAINLY_SUBSET where all nodes of the graph are marked as affected (could have used scope ALL instead).
          • The EdgeRouter class no longer produces unnecessary overlaps for cases where the source or target node is overlapped by (several) label elements. This generally improves the ability of the router to deal with input that contains source/target nodes that are overlapped by other elements and are required to be crossed by an edge route.
          • The EdgeRouter class no longer throws an exception when EdgeLayoutDescriptor#IntermediateRoutingPoints are too close together.
          • The EdgeRouter class no longer has a problem that appeared with a bus containing affected as well as non-affected (fixed) edges at the same time. Previously, this could trigger an exception or lead to the incorrect behavior that an actually affected other edge was not routed.
          • The EdgeRouter class no longer occasionally throws an exception if the input contains bus edges defined via BusDescriptor.
          • The EdgeRouter class no longer has a problem that occasionally resulted in bad edge routing artifacts if edge grouping is enabled and non-affected edges are grouped at both end points.
          • The EdgeRouter class no longer yields edge labels that overlap with unrelated group nodes when using the integrated label placement feature.
          • Resolved a bug in the EdgeRouter class which caused that grouped edges were sometimes actually not grouped together. This mainly appeared in conjunction with a large value of either the minimum first or last segment length.
          • The EdgeRouter class no longer produces an exception for some rare cases with fixed grouped edges and octilinear paths.
          • The EdgeRouter class now correctly observes inputs where the user specifies buses with both fixed and non-fixed edges at the same time.
          • The EdgeRouter class now properly considers ports provided by a PortCandidateSet when the set contains multiple candidates with single capacities and where the candidates are on the same node side. Previously, it could happen that only one of several edges connecting to the node correctly considered the ports.
          • The EdgeRouter class does no longer use the same fixed PortCandidate out of a specified PortCandidateSet if another non-saturated candidate can be chosen. Thus, overlapping edge segments are avoided.
          • The EdgeRouter class no longer occasionally throws an exception if the input contains bus edges (defined via BusDescriptor).
          • The BusRouter class no longer fails to generate connected buses for cases with fixed and incremental edges on the same bus. Previously it sometimes generated a disjoint bus even though the bus IDs were equal.
          • The BusRouter class no longer ignores edges that should be routed when a they are on a bus with fixed edges (see BusDescriptor#Fixed property) and when they share both source and target port with a fixed edge.
          • The element processing order in the BendConverter layout stage is now deterministic. The previous non-deterministic order of inserting and removing elements could lead to non-deterministic behavior for consecutive layout calculations.
          • The ParallelEdgeRouter class no longer throws an exception if the input has both a large number of parallel edges and a leading edge with ports on the node border.
          • The OrthogonalLayout class now correctly handles input graphs with parallel edges if the PreferParallelRoutes property is enabled. Previously, such inputs have caused exceptions in some rare cases.
          • The FamilyTreeLayout class now properly handles the case that the family tree contains cycles, e.g., due to a family founded by parent and (step-)child. Previously, it sometimes produced a stack overflow or non-orthogonal routes for such an input.
          • The AspectRatioTreeLayout class no longer crashes, causing a stack overflow, when applied to a large chain graph.
          • The AbstractNodePlacer#placeSubtree method now clears its internal caches, especially the graph cached in field AbstractNodePlacer#graph. Previously, holding onto a node placer instance could lead to subtle memory leaks.
          • The OrthogonalSegmentDistributionStage no longer produces degenerated (very large or small) coordinates for edges that contain zero-length segments, that is, duplicate edge path points.
          • The ChannelEdgeRouter class no longer yields degenerated routing results (very large or small coordinates) when using the OrthogonalPatternEdgeRouter as path finder strategy and setting its minimum distance to zero. The OrthogonalPatternEdgeRouter class now avoids duplicate points when the MinimumDistance property is set to zero.
          • The RecursiveGroupLayout class now correctly moves child nodes along with their group also in case the RecursiveGroupLayout#CoreLayout is null. Previously, if additionally a group node had a specific layout algorithm associated to it, the content was not correctly moved along. If the core layout was not null, the issue did not occur.

          Incompatible Changes

          API

          • The GraphBuilder, TreeBuilder, and AdjacentNodesGraphBuilder in the com.yworks.yfiles.graph package have been replaced with incompatible, new implementations in the com.yworks.yfiles.graph.builder package. API-compatible adapters to the old API can be found in the builder.compatibility demo.
          • The return type of ContextConfigurator's createClip method has been changed from RectD to Shape. The return value of this method is intended to be passed to Graphics2D#clip(Shape) to constrain the painting area.
          • The method CanvasComponent#createInputModeContext is protected again, after having been made public accidentally previously.
          • The GraphEditorInputMode#requeryHandles method is now public.
          • The optional IPortLocationModelParameter and IPortStyle parameters of the IGraph#addPort and GraphExtensions#addPort methods can now be null.
          • The ModelManager#unInstall method has been renamed to the canonical name uninstall.
          • The NodeReshapeSnapResultProvider#getSnapLines method now takes CollectSnapResultsEventArgs as additional parameter.
          • Several methods related to snapping now take a PointD instead of a double as delta parameter. In detail, these are SnapResults#createResizeSnapResult, NodeReshapeSnapResultProvider#addSnaplineSnapResult, NodeReshapeSnapResultProvider#addGridLineSnapResult, and NodeReshapeSnapResultProvider#addSameSizeSnapResult.
          • The following methods now require an IRenderContext instance as first parameter: AbstractLabelStyle#createLayoutTransform and JComponentLabelStyleRenderer#createLayoutTransform.
          • All overloads of YGraphAdapter#createMapper now require an additional parameter specifying the Class of the type argument. This is required for correct fallback values if an item is not explicitly mapped.
          • CanvasPrintable#getWorldBounds now returns an Iterable of PointD instead of a RectD to suit the new projection feature.
          • IGraph methods getBends, getEdgeLabels, getNodeLabels, and getPortLabels have been changed to return a "live" view of corresponding objects in the graph. Previously, these methods returned a cached view. This change necessitated changing the return type of these methods from IListEnumerable to IEnumerable.
          • The HierarchicalClustering#Result#DendrogramRoot property can now return null if the result has been obtained from an empty graph.

          Behavior

          • The view coordinate system now includes the projection. For customers who do not use a projection, nothing will change. However, when the (old) view coordinate system has been used to render parts of the visualization in a zoom-invariant manner, the equivalent now is called the intermediate coordinate system. The view coordinate system is still necessary when coordinates relative to the control are needed, e.g. for tooltips or a context menu.
          • When using the new projections feature, the CanvasComponent#ContentRect property no longer has an effect on scrollbars or the GraphComponent#fitGraphBounds method.
          • The CanvasComponent class ignores its ViewportLimiter when projections are used.
          • The ViewportLimiter no longer jumps to the limited viewports if the current viewport is outside the limited area. This behavior can be restored by setting the ViewportLimiter#LimitingPolicy property to LimitingPolicy#STRICT.
          • Visuals that are rendered in view coordinates relative to the viewport may appear in a different location when exporting an image.
          • The NavigationInputMode#adjustContentRect method doesn't fit the graph bounds in the viewport anymore.
          • NavigationInputMode#FittingContentAfterGroupActionsEnabled now is false by default.
          • The NavigationInputMode class doesn't fit the content after expand and collapse operations anymore. This can be re-enabled by setting the AutoGroupNodeAlignmentPolicy to a value other than NONE and FittingContentAfterGroupActionsEnabled to true.
          • For the RootPlacements, SubtreeRoutingPolicies, and SubtreeAspectRatio properties of the AspectRatioTreeLayoutData class, the type of the mapped values has been made nullable. For null or unset values, the settings on the AspectRatioTreeLayout will now be taken. This is the documented behavior, though.
          • GraphMLIOHandler has been improved to prevent external entity injection attacks by default. To prevent these attacks, GraphMLIOHandler disallows DTD declarations in read XML documents.
          • Added file filters for XML files and all files to the file chooser dialogs shown from GraphComponent's openFile and saveFileAs methods.
          • IGraph methods getBends, getEdgeLabels, getNodeLabels, and getPortLabels have been changed to return a "live" view of corresponding objects in the graph. Previously, these methods returned a cached view. This change necessitated changing the return type of these methods from IListEnumerable to IEnumerable.
          • The following places now throw a ConcurrentModificationException instead of an IllegalStateException:
          • The GraphCentrality and ClosenessCentrality analysis algorithms now calculate the centrality individually per component instead of returning a centrality value of 0.0 for nodes in graphs that are not connected.
          • HierarchicLayoutData#EdgeDirectedness: If the Mapper property is directly accessed (not explicitly set), its default for unset values is now 1.0 instead of 0.0. These means that such edges are now treated as directed instead of undirected.
          • The value of the read-only property EdgeRouter#Partition is now null after applying the routing algorithm. It is only intended to be used during the execution. Previously, it was cached, even though the documentation stated otherwise.

          Deprecations

          • The properties EdgeRouter#PolylineRouting, EdgeRouter#PreferredPolylineSegmentLength and EdgeRouter#MaximumPolylineSegmentRatio are now deprecated. To enable polyline routing, specify EdgeRoutingStyle#OCTILINEAR as routing style via EdgeLayoutDescriptor#RoutingStyle. The other two properties are also replaced by respective properties on the EdgeLayoutDescriptor class.

          New Demos

          Demo Improvements

          yFiles for Java (Swing) 3.3.0.1

          Bugfixes

          • IFoldingView#Collapse and #Expand now throw an IllegalArgumentException when called with a node not belonging to the graph (instead of a NullPointerException).
          • CollapsibleNodeStyleDecorator: When the wrapped style has its own IClickListener defined in its lookup, the IClickListener for the collapse/expand button has precedence but the other one is used when the button is not hit.
          • FoldingManager#hasFoldingEdgeState now returns false for non-dummy edges instead of throwing an exception.
          • FilteredGraphWrapper: Fixed a possible IllegalArgumentException ("Node not in this graph") which could occur when the parent of a node which is not visible in the filtered graph has been changed in the wrapped graph.
          • FoldingManager#getFoldingEdgeState now throws an IllegalArgumentException with a meaningful message instead of a NullPointerException if the state is queried for a master edge (both source and target node are expanded).
          • Fixed a bug in TableLayoutConfigurator which in rare cases could cause exceptions in additional layout stages.
          • ILabelCandidateDescriptor's #getProfit now is considered properly by the labeling algorithms.
          • FoldingManager: Invoking #hasFoldingEdgeState for a master edge (both source and target are expanded) yields now an IllegalArgumentException with an explaining message text instead of throwing a simple NullPointerException.
          • Fixed an issue where NavigationInputMode's #AutoGroupNodeAlignmentPolicy would sometimes not work when the expanded and collapsed group node sizes differ.
          • The FilteredGraphWrapper class now correctly handles port labels of filtered items.
          • The GeneralPath#prepend method no longer loses a part of the combined path in certain circumstances.
          • GraphMLIOHandler: Fixed an error that prevented parsing null values by input handlers added via #createMapperInputHandler.

          Layout

          • Fixed a bug in the HierarchicLayout class that could cause unnecessary (double) edge crossings when the algorithm was executed in incremental layout mode with edge grouping and alternative group bounds.
          • The EdgeRouter class now correctly observes fixed ports for some cases where it previously ignored them due to incorrect path cost calculations.
          • The EdgeRouter class now considers the correct shape of non-affected, fixed edges. Previously, it sometimes incorrectly parsed their shape which could lead to undesired effects like incorrect path cost calculation of affected edges.
          • The BalloonLayout class now longer crashes due to a stack overflow for inputs containing very long chain graphs.
          • The HierarchicLayout class now produces better results for input graphs with grouped edges and a PartitionGrid. Previously, such inputs may have produced edge routes with superfluous bends.
          • The HierarchicLayout class now correctly considers the properties MaximumNodesAfterBus and MaximumNodesBeforeBus of the BusDescriptor for single line (layer) buses. In addition, for multiple layer buses, the specified minimum node to edge distance is now considered for the distance between nodes and the vertical bus segment.
          • The OrganicLayout class now correctly removes node overlaps if its Scope is set to and its NodeOverlapsAllowed property is disabled. Previously, the layout sometimes produced superfluous overlaps for such cases.
          • The TreeMapLayout class no longer produces results that may have infinite coordinates.
          • The HierarchicLayout class no longer throws an exception that was previously triggered in some cases with bus structures (see property HierarchicLayoutData#Buses) and in conjunction with undirected edges (see HierarchicLayoutData#EdgeDirectedness).
          • The constants EdgeLabelLayoutDpKey and NodeLabelLayoutDpKey of the LabelLayoutKeys class now specify correctly that their generic type parameter is LabelLayoutData[] and not just LabelLayoutData.

          Input

          Incompatible Changes

          • FoldingManager#getFoldingEdgeState now throws an IllegalArgumentException instead of a NullPointerException if the state is queried for a master edge (both source and target node are expanded).
          • FoldingManager#hasFoldingEdgeState now throws an IllegalArgumentException instead of a NullPointerException if the state is queried for a master edge (both source and target node are expanded).
          • FoldingManager#hasFoldingEdgeState now returns false for non-dummy edges instead of throwing an exception.

          Demos and Tutorials

          The Getting Started and Custom Styles tutorial trails have been moved into the demos directory to simplify project setup for yFiles for Java (Swing)'s programming samples in IDEs.

          New Demos

          yFiles for Java (Swing) 3.3

          Major New Features

          • A large number of code examples has been added to the API Documentation.
          • The HierarchicLayout class is now able to arrange children of a specific root node in a compact bus-like way. These bus substructures are defined by the HierarchicLayoutData#Buses property, and the new BusDescriptor class provides more individual settings for the buses.
          • The EdgeRouter class now features integrated edge label placement. Labels are automatically placed when the new property IntegratedEdgeLabelingEnabled is enabled. The placement considers the optional PreferredPlacementDescriptor of a label.
          • The EdgeRouter class now supports port grouping of edges at their source and target. To specify the port group IDs, see the associated properties in the PolylineEdgeRouterData class.
          • The EdgeRouter class now supports orthogonal bus routing. The new BusDescriptor class specifies the settings for a single bus.
          • The powerful analysis algorithms got a new API that is based on the IGraph interface and streamlines working with the results. In particular, it makes working with a special analysis graph class obsolete. The algorithms that are available with the new API include centrality measures, clustering, flow calculation, rank assignment, spanning tree, shortest path, and more. This is accompanied by the new GraphStructureAnalyzer class that provides methods to check structural properties of a given graph.

          New Features

          Layout

          • The HierarchicLayout class is now able to consider individual costs for crossing a group node border. These costs are defined with the HierarchicLayoutData#GroupBorderCrossingCosts property.
          • The HierarchicLayout class is now able to consider individual crossing costs for edges. They can be defined with the HierarchicLayoutData#EdgeCrossingCosts property.
          • The new callback method DefaultLayerSequencer#getCrossingCost allows for defining an individual crossing cost value for a specific pair of edges when using the said sequencer implementation for the HierarchicLayout algorithm.
          • In order to easily retrieve the original edge instance when customizing the hierarchic layout algorithm, the HierarchicLayout#getOriginalEdge method was added.
          • The HierarchicLayout class is now able to uniformly distribute ports at group nodes - with a few restrictions. The new property HierarchicLayoutData#UniformPortAssignmentGroups. defines the groups for which the feature should be enabled.
          • The OrganicLayout class is now able to produce 3D layout results.
          • The OrganicLayout class is now able to consider user-specified inertia and stress values for nodes.
          • The new property InteractiveOrganicLayout#CompactnessFactor specifies the compactness of the result. If the graph contains several components, this feature can prevent that the components drift apart.
          • The LeftRightNodePlacer class now supports layouts with multiple branches. With this feature, subtrees can not only be placed left/right of a single vertical bus, but left/right of multiple vertical buses (the branches). The new property BranchCount allows to configure the number of branches.
          • The tree node placer GridNodePlacer offers the following new features:
            • The placement of the bus for routes to its children can now be configured using the new enumeration BusPlacement. Available placements are LEADING, TRAILING and CENTER.
            • Child sub-trees can be assigned to rows automatically using the new property GridNodePlacer#AutomaticRowAssignmentEnabled.
            • The new alignment policy GridNodePlacer#BUS_ALIGNED aligns the root node with the bus.
          • The OrthogonalLayout class is now able to consider custom crossing and bend costs for edges. They can be specified using the new properties OrthogonalLayoutData#EdgeCrossingCosts and OrthogonalLayoutData#EdgeBendCosts respectively.
          • The new class GivenCoordinatesStage changes node locations and edge paths to user-specified values before invoking the core layout algorithm. To specify locations and paths, use the new GivenCoordinatesStageData class.
          • The new GenericPartitionGridStage class offers generic support for partition grid structures.

          Viewer

          • The GraphEditorInputMode class provides the new methods raiseSelection, lowerSelection, selectionToFront and selectionToBack that change the z-order of all selected IModelItems.
          • The GraphModelManager class has the new methods raise, lower, toFront and toBack that allow for changing the z-order of IModelItems. All these z-order-related methods can also be triggered by the new commands RAISE, LOWER, TO_FRONT and TO_BACK.
          • CreateEdgeInputMode can now create edges in reversed direction, i.e. starting from target port.
            • The new EdgeDirectionPolicy supports starting creation at source, target, in the last direction, or depending on the port candidate.
            • A configurable ToggleDirectionRecognizer allows for changing the edge direction during creation.
          • The method CreateEdgeInputMode#doStartEdgeCreation that is used to programmatically start an interactive edge creation gesture now returns a Future with the newly created edge as result.
          • The method MoveInputMode#doStartDrag that is used to programmatically start an interactive drag gesture now returns a Future with the affected items as result.
          • The new property MoveLabelInputMode#MovingUnselectedLabelsAllowed enables moving labels without having to select them first.

          New Demos

          • The GraphAnalysisDemo shows how to use the new interfaces for the graph analysis algorithms and how to visualize their results.
          • The LogicGateDemo shows how yFiles can be used for the visualization of a digital system consisted of logic gates.
          • The Neo4jDemo shows how to integrate a Neo4j graph data base in your application.

          Improvements

          Algorithms

          Layout

          • Added convenience overloads for ItemCollection and ItemMapping property setters to LayoutData classes with properties of type ItemCollection or ItemMapping. E.g. hierarchicLayoutData#getEdgeLayoutDescriptors().setConstant(newDescriptor) can now be abbreviated to hierarchicLayoutData#setEdgeLayoutDescriptors(newDescriptor).
          • The HierarchicLayout class now correctly calculates the group node bounds. Previously, the groups' insets were slightly too large (up to one pixel).
          • The HierarchicLayout class now always places a port in the middle of a node side, if it is the only port on that side. Previously the port was only centered if the label was additionally placed on the edge.
          • The HierarchicLayout class now also considers critical edge priorities for grouped edges.
          • The HierarchicLayout class now requires less memory for graphs with sequence constraints.
          • The HierarchicLayout class now uses the specified layer alignment (see NodeLayoutDescriptor#LayerAlignment) to align sub-components (see HierarchicLayoutData#SubComponents).
          • The HierarchicLayout class no longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges.
          • With HierarchicLayout, the number of edges crossing through group nodes without starting or ending in them when using the default algorithm settings was reduced. Furthermore, the behavior can be customized using the new group node border crossing costs (see property HierarchicLayoutData#GroupBorderCrossingCosts).
          • The HierarchicLayout class now also considers sequence constraints for grouped edges.
          • The layering of HierarchicLayout was improved with respect to the resulting edge lengths if the recursive group layering is enabled.
          • The HierarchicLayout class now produces less overlapping elements for graphs with fixed coordinate hints.
          • The new property OrthogonalLayout#ParallelRoutesPreferenceEnabled allows for controlling how parallel edges (multi-edges) are routed.
          • The RecursiveGroupLayout class now allows to define a local PartitionGrid structure for each recursively handled group node. See the new property RecursiveGroupLayoutData#GroupNodePartitionGrids for details.
          • The EdgeRouter class now generates less edge-edge overlaps and a better distribution of edge segments when the EdgeRouter#MaximumDuration is strongly restricted or set to zero, or when the algorithm is stopped via the AbortHandler#stop method.
          • The EdgeRouter class now avoids superfluous bends that were in some cases caused by group nodes with (small) inset values.
          • The path search performance of the EdgeRouter class has been improved for cases where an edge has a strong, external PortConstraint or a fixed, external PortCandidate.
          • The EdgeRouter now supports edge grouping on both endpoints. Previously, an edge could only be part of either a source or a target group.
          • The EdgeRouter class now generates a proper routing from a group node border to a port location inside this group node defined by a strong PortConstraint or a fixed PortCandidate. Previously, the route was only calculated to the border and then the last segment was extended without consideration of obstacles and other elements.
          • The performance of the GenericLabeling algorithm and the quality of the label placements were improved.
          • The quality of edge label placement of the GenericLabeling class was improved in case that there are multiple labels with a source or target preference near the same node. They may now be placed further away but avoid undesired overlaps.
          • The PortCalculator class now considers edge label positions such that they are not affected by whether this stage is applied or not. Previously, label positions could be changed if the label position was stored relative to the first/last segment or the port.
          • If the master edge is clipped on the bounds of its source or target, the ParallelEdgeRouter class now always clips the associated parallel edges on that bounds, too.
          • The RemoveCollinearBendsStage.Scale property now also allows zero and negative numbers as its value. This makes it possible to internally round coordinates to full integer values for the comparison of bend points and, thus, the stage can be made more fuzzy.
          • The TreeReductionStage now marks non-tree edges if an IDataAcceptor is registered with the input graph with key TreeReductionStage#NonTreeEdgeSelectionKey. This way a user is able to query which edges the algorithm determined to be the non-tree edges.
          • New options on class PlaceNodesAtBarycenterStage allow for specifying the size of affected nodes, considering the grouping structure when calculating the barycenter of nodes as well as removing the bends of edges incident to affected nodes.
          • The properties Rows and Columns of class PartitionGrid are now of type IEnumerable<RowDescriptor> and IEnumerable<ColumnDescriptor> instead of an un-typed YList.
          • The PartitionGridData class has new properties RowOrderOptimizationEnabled and ColumnOrderOptimizationEnabled to indicate whether or not the order of the rows respectively columns should be chosen automatically to minimize edge lengths.
          • The new ChannelRoutingTool class brings back the features of the ChannelRouter class that was removed in version 3.0.
          • Combining multiple LayoutData classes is now easier:
          • The new properties AbortHandler, SourcePortConstraints, TargetPortConstraints, SourcePortCandidates, and TargetPortCandidates of ChannelEdgeRouterData facilitate using these features with ChannelEdgeRouter.
          • The RowIndices and ColumnIndices properties of the PartitionGridData class can now also be used in combination with the Grid property.
          • The ImprovingPortAssignment boolean property of LayoutExecutor and LayoutGraphAdapter was replaced by the PortAdjustmentPolicy property that offers more options how port locations should be adjusted after a layout calculation.

          Viewer

          • The parameter of the scroll command, that can be used to specify an additional scroll factor, can now be any numeric value of type Number.
          • CanvasComponent: Added zoomToAnimated overloads which take an optional event listener that is notified of the animation's end.
          • IMapperRegistry#createDelegateMapper has been renamed to createFunctionMapper.
          • The property ItemMapping#Delegate has been renamed to Function.
          • The property ContextItemMapping#ContextDelegate has been renamed to ContextBiFunction.
          • The property ItemCollection#Delegate has been renamed to Predicate.
          • The default methods toList and toArray have been added to IEnumerable.
          • Added convenience methods to convert view geometry classes (PointD, RectD, SizeD, InsetsD, OrientedRectangle) to layout classes (YPoint, YRectangle, YDimension, YInsets, YOrientedRectangle) and vice versa.
          • Added convenience methods for easy conversion between yFiles geometry classes and Java geometry classes:
            • IPoint#toPoint2D and PointD#fromPoint2D.
            • IRectangle#toRectangle2D and RectD#fromRectangle2D.
          • HandleInputMode now clears the AffectedItems after the Canceled event has been raised instead of before.
          • DefaultEdgePathCropper's methods cropEdgePath and cropEdgePathAtArrow are no longer final.
          • The viewport animation of the LayoutExecutor class considers now the value of the LimitingFitContentZoomEnabled property of the corresponding GraphComponent.
          • NodeStylePortStyleAdapter and AbstractJComponentPortStyle now have an Offset property that allows to shift the port visualization so that it no longer is centered over the port.
          • The GraphModelManager class has new factory methods for creating the ItemModelManager of each item group.
          • The GraphModelManager#getModelItem method now always returns the IModelItem for an ICanvasObject retrieved for it via getMainCanvasObject. Previously this only worked in all cases for the ICanvasObject retrieved via getCanvasObject.
          • Mouse move and drag events now correctly report the changed modifier keys.
          • Reduced number of cases where a new label was created by interactive editing instead of editing an existing one.
          • The methods addLabel, createLabel and editLabel of GraphEditorInputMode and TableEditorInputMode that are used to start the respective interactive label editing gesture programmatically return now a Future with the edited or newly created label as result.
          • GraphEditorInputMode provides new protected methods createLabelCore and editLabelCore to allow for overriding the default implementations.
          • GraphEditorInputMode provides a TextEditorInputModeConfigurator to allow for configuring the TextEditorInputMode before each label editing.
          • The GraphEditorInputMode#DeletedItem event provides now context information about the state before the item has been deleted. For example, if a label has been deleted you now can get its old owner.
          • The method GraphEditorInputMode#onDeletedItem is no longer final.
          • Added the GraphClipboard#getId method to facilitate retrieving the original item from which an item to be pasted has been copied from.
          • The new property GraphClipboard#ClipboardContext provides access to the current IGraphClipboardContext during a clipboard operation.
          • The new property CreateEdgeInputMode#ShowingTargetHighlightEnabled specifies whether to enable or disable highlighting of potential targets for edge creation. Also, the method updateTargetHighlight has been added to allow for further customization of the highlight.
          • NavigationInputMode: Added a property ScrollingToSelectionEnabled that controls whether a node that is focused or selected with a keyboard gesture is automatically scrolled into the viewport if necessary.
          • The new properties PortRelocationHandle#ShowingTargetHighlightEnabled and PortRelocationHandleProvider#ShowingTargetHighlightEnabled specify whether to enable or disable highlighting of potential targets for edge creation. Also, the method updateHighlight has been added to the PortRelocationHandle class to allow for further customization of the highlight.
          • The new properties PortRelocationHandle#ShowingPortCandidatesEnabled and PortRelocationHandleProvider#ShowingPortCandidatesEnabled specify whether to enable or disable showing port candidates during edge relocation.
          • The new PortStyleDecorationInstaller class allows the use of an IPortStyle to render the selection, highlight, or focus indicator of ports.
          • The properties RectangleIndicatorInstaller#Template and OrientedRectangleIndicatorInstaller#Template now return always the value that has been set by client code and are not modified by internal code anymore.
          • Snaplines are now infinitely long by default.
          • The performance of EdgePathLabelModel#getGeometry and EdgeSegmentLabelModel#getGeometry has been strongly increased.
          • The GraphMLIOHandler class now supports reading and writing arbitrary objects at graph level.
          • GraphML deserialization now supports the symbolic names "Zero" and "Infinite" for reading SizeD values.
          • GraphML deserialization now supports the symbolic name "Infinite" for reading RectD values.
          • GraphML deserialization now supports the symbolic name "Origin" for reading PointD values.
          • The type of property GraphBuilder#EdgeLabelProvider was generalized from Function<TEdge,String> to Function<TEdge,Object>.

          Bugfixes

          Algorithms

          • The Paths#findAllChains method now correctly calculates the chains of input graphs with cycles.
          • The GraphChecker#isMultipleEdgeFree method now returns the correct result for input graphs with self-loops.
          • The Bfs#getLayers method now correctly stores the layer indices in the specified INodeMap. Previously, the maximum layer index stored in the map exceeded the number of returned layers.

          Layout

          • The EdgeRouter class no longer produces bad, non-orthogonal edge segments in cases where a selected edge is grouped together with an un-selected edge and where both edges have strong PortConstraints at their common source/target node.
          • The PortPlacementStage class no longer destroys the grouping information for the core layout algorithm.
          • The EdgeRouter class now correctly considers strong port constraints of edges that belong to a bus structure.
          • The HierarchicLayout class no longer throws an exception if the component arrangement policy is set to ComponentArrangementPolicy#COMPACT and bus routing is enabled (see property HierarchicLayoutData#Buses).
          • The OrganicLayout class now correctly considers input graphs where substructure handling is enabled and all nodes are located at coordinate (0,0). Previously, such inputs may have triggered an ArgumentException.
          • Class EdgeRouter no longer throws an exception if all fixed edges of a bus are non orthogonal/octilinear.
          • The GenericLabeling class no longer throws an ArgumentException for some input graphs containing labeled edges with zero length.
          • The HierarchicLayout class no longer throws an exception if it is wrapped by an instance of RecursiveGroupLayout and the input graph contains layering constraints between elements of different groups.
          • The HierarchicLayout class now correctly considers the group insets for input graphs with nested group nodes. Previously, it sometimes produced too large insets for inner groups.
          • The HierarchicLayout class no longer throws an IllegalArgumentException for some rare cases in incremental layout mode.
          • The HierarchicLayout class now produces shorter, more direct edge routes for edges connecting at a group node and leaving on the the left/right group side. This only affects cases where the relevant group node also contains direct-content edges (see EdgeLayoutDescriptor#DirectGroupContentEdgeRoutingEnabled).
          • Self-loop segments generated by the HierarchicLayout class are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments.
          • The HierarchicLayout class now produces less superfluous crossings if there are same-layer edges with PortConstraints or PortCandidates.
          • The HierarchicLayout class now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes.
          • The HierarchicLayout class sometimes threw an IllegalArgumentException for input graphs that contained incremental elements in combination with groups.
          • The HierarchicLayout class sometimes threw an IllegalArgumentException for input graphs that contained fixed elements in combination with both swimlanes and groups.
          • The HierarchicLayout class now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other.
          • The HierarchicLayout class no longer causes non-orthogonal segments when the input contained port labels in conjunction with edge grouping.
          • The HierarchicLayout class now correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues.
          • The HierarchicLayout class no longer produces intersections between edges and elements of a sub-component (see HierarchicLayoutData#SubComponents). Note that this fix may sometimes cause less compact results within a layer.
          • Improved the path search performance of the EdgeRouter class for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios.
          • The EdgeRouter class now correctly groups edges associated with equal group IDs that have a different object ID.
          • The EdgeRouter class now avoids unnecessary bends in cases that contain PortCandidates with fixed offsets (or strong PortConstraints) where the fixed port locations have a very similar x- or y-coordinate such that the path must consist of three segments with a single, very short middle segment. Previously, five segments in total were generated.
          • A rare exception that was triggered by the EdgeRouter class during routing when a Grid is defined on which edges need to be routed is now fixed.
          • The EdgeRouter class now correctly handles edges with external ports. Previously, such inputs may have caused an exception.
          • The EdgeRouter class now correctly routes direct content edges with strong port constraints at the group nodes. Previously, the algorithm sometimes produced weird routes for such edges.
          • Fixed a bug in the EdgeRouter class that sometimes caused a non-deterministic behavior.
          • Fixed two issues in the EdgeRouter class that resulted in the violation of a PortCandidate with fixed offsets or a strong PortConstraint. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node).
          • The EdgeRouter class no longer throws an exception if its PolylineRoutingEnabled property is enabled and the input contains fixed, grouped edges.
          • The EdgeRouter class now considers the correct NodeHalo associated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments.
          • The EdgeRouter class now correctly considers intersections between edges and labels of fixed edges if property EdgeLabelConsiderationEnabled is enabled.
          • The EdgeRouter class no longer throws an exception during routing in cases where the source or target node is covered by obstacles (i.e. by other nodes or labels).
          • The EdgeRouter class now correctly considers intermediate routing points when using the polyline routing style (EdgeRouter#PolylineRoutingEnabled). Previously, it could happen that intermediate points were not part of the final polyline edge path.
          • The EdgeRouter class no longer throws an exception during the routing of some graphs with grouped edges.
          • The EdgeRouter class no longer considers all PortCandidates with multiple directions as fixed PortCandidates.
          • The EdgeRouter class now correctly handles cases where the maximum duration is exceeded and where previously an exception was triggered.
          • Fixed a StackOverflowError in EdgeRouter.
          • The OrganicLayout class no longer throws an exception when using CycleSubstructureStyle#CIRCULAR and arranging a cycle structure where at least one cycle node is also connected to a group node outside the cycle.
          • The OrganicLayout class now produces deterministic results for group nodes if its property DeterministicModeEnabled is enabled.
          • The OrthogonalLayout class no longer causes an exception for some input graphs when property FaceMaximizationEnabled is enabled.
          • The OrthogonalLayout class no longer runs into an infinite loop for some input graphs that are tree structures with mixed edge directedness (see property OrthogonalLayout#EdgeDirectednessDpKey). Note that the problem only occurred if property OrthogonalLayout#TreeStyle is not set to TreeLayoutStyle#NONE.
          • The OrthogonalLayout class no longer throws an exception when its property UniformPortAssignmentEnabled is enabled and the input contains parallel edges.
          • When using RecursiveGroupLayout, the values of the properties ComputedWidth, ComputedHeight and ComputedPosition of the classes ColumnDescriptor and RowDescriptor are now correctly set after the layout if EdgeRouter is the corresponding InterEdgeRouter.
          • The CompactNodePlacer class no longer throws an exception for input graphs with specified memento strategies (see TreeLayoutData#CompactNodePlacerStrategyMementos or CompactNodePlacer#STRATEGY_MEMENTO_DPKEY).
          • The CompactNodePlacer class now correctly considers the specified values of the VerticalDistance and HorizontalDistance properties.
          • The CompactNodePlacer class no longer throws an exception for some inputs with specified strategy memento information (either via property TreeLayoutData#CompactNodePlacerStrategyMementos or with a mapper registered with key CompactNodePlacer#STRATEGY_MEMENTO_DPKEY).
          • The SimpleNodePlacer class no longer produces very long horizontal edge segments for inputs where it isn't required.
          • The GenericLabeling class now correctly places labels of direct content edges (edges that directly connect a group node with a descendant, without leaving the group) with a free edge label model.
          • The GenericLabeling class no longer calculates wrong label profit values (AbstractLabeling#getProfit) for some edge labels. Previously, edges that had a PreferredPlacementDescriptor were sometimes affected.
          • The GenericLabeling class now produces valid results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor#DistanceToEdge) and at the same time multiple SideOfEdge preferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it.
          • The GenericLabeling class now always prefers LabelCandidates with higher profit values over others with lower profit (see AbstractLabeling#getProfit). Previously, this sometimes happened even though both candidates did not intersect with other elements.
          • The GenericLabeling class does no longer assume that all LabelCandidates associated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given.
          • Fixed a rare bug in the GenericLabeling that may have caused an IllegalArgumentException for some input graphs that contain edges with zero length segments and labels associated with a free edge label model.
          • The SeriesParallelLayout class now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception.
          • The PartialLayout class now correctly considers the specified PortCandidates during orthogonal or octilinear routing of edges.
          • The PartialLayout class does no longer reduce the size of fixed group nodes if the option PartialLayout#ResizeFixedGroups is disabled.
          • The ComponentLayout class now correctly handles input graphs with user-specified components that contain nodes with null as their component ID (see property ComponentLayoutData#ComponentIds). Previously, such inputs may have caused an exception.
          • The PolylineLayoutStage does no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes).
          • The OrganicRemoveOverlapsStage no longer produces infinite loops in some rare cases.
          • Fixed a bug in YGraphAdapter that could trigger a NullPointerException when boolean, integer or double values were requested from registered IMapper but no value had been set beforehand.

          Viewer

          • Fixed a bug in GraphEditorInputMode where changing the value of ShowHandleItems while handles were already displayed resulted in duplicate handles.
          • Fixed a bug in EdgePathLabelModel which could return an invalid geometry for parameters with a ratio < 0 and zero length edge segments.
          • A bug in CanvasComponent#fitContent has been fixed that sometimes resulted in a short flickering.
          • Mapper: Fixed default value handling for the null key.
          • Mapper: Ensured that mappings for the null key are taking into account by method getEntries.
          • Changed CommandBindingAction's actionPerformed behavior to always pass the action's target to the associated KeyboardInputMode#ExecuteCommandHandler and KeyboardInputMode#CanExecuteCommandHandler instances instead of the action event's source.
          • GeneralPath#flatten(): Fixed unexpected behavior if a curve follows after a close operation.
          • Zooming the viewport during interaction no longer synthesizes mouse-move events in the wrong locations.
          • Labels at folder nodes and their adjacent edges are no longer lost during GraphML deserialization if the DefaultFolderNodeConverter#CopyFirstLabel property is enabled.
          • Fixed a bug in PortRelocationHandleProvider where the settings ShowPortCandidates and ShowTargetHighlight were ignored.
          • Fixed a bug in CreateEdgeInputMode#getPortOwner which could return edges even if EdgeToEdgeConnectionsAllowed was set to false. This could result in the edge's IPortCandidateProvider being queried for candidates erroneously.
          • Fixed a bug in the graph implementation that sometimes lead to a runtime that was quadratic in the number of nodes when creating large graphs.
          • Reparenting an expanded group node into a collapsed group node no longer throws an exception.
          • Fixed an exception which could occur in CanvasComponent's method compareRenderOrder and when using GraphModelManager's Comparator property.
          • GraphClipboard's methods onElementCut and onElementCopied are no longer called for graph items which are not copied themselves but are owners of copied items.
          • When an edge is duplicated using GraphClipboard and a port is newly created during this operation, the new port now gets the old port's style and tag.
          • Fixed a memory leak in the UndoEngine class if the tokens returned by getToken were not disposed when the UndoEngine got cleared.
          • The CreateEdgeInputMode class now considers the value of the CanvasComponent#HitTestRadius property when its StartingOverCandidateOnlyEnabled property is enabled.
          • The visualization of source port candidates by the CreateEdgeInputMode class does not flicker, anymore.
          • With SmartEdgeLabelModel, it was impossible to move a label from the left side of an edge to the right side. Instead, the label stopped at the edge.
          • The null check for the GridVisualCreator#Pen property works correctly now.
          • The type IGridConstraintProvider cannot be used in lookup methods since it has a generic type parameter. Therefore, new specific interfaces have been added for each item type (for example INodeGridConstraintProvider).
          • The EdgeStyleDecorationInstaller class no longer causes an exception when used on edges that are attached to other edges.
          • Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
          • In rare cases, saving a graph with folding to GraphML threw an exception.

          Incompatible Changes

          Layout

          • The ImprovingPortAssignment boolean property of LayoutExecutor and LayoutGraphAdapter has been replaced by the PortAdjustmentPolicy property.
          • SingleItemCollection's Item property has been pulled up to ItemCollection. Class SingleItemCollection has been removed, its usages have been replaced by ItemCollection.
          • The property HierarchicLayoutData#AlternativeEdgePath has been renamed to HierarchicLayoutData#AlternativeEdgePaths.
          • The property HierarchicLayoutData#AlternativeEdgePaths now expects Iterable<IPoint> instead of YPointPath as mapped values.
          • The property HierarchicLayoutData#AlternativeGroupBounds now expects IRectangle instead of YRectangle as mapped values.
          • The type of the properties BalloonLayoutData#TreeRoot and TreeLayoutData#TreeRoot has been changed to SingleItem<INode>.
          • The property TreeLayoutData#LeftRightPlacersLeftNodes has been renamed to TreeLayoutData#LeftRightNodePlacerLeftNodes.
          • The property TreeLayoutData#DelegatingNodePlacersPrimaryNodes has been renamed to TreeLayoutData#DelegatingNodePlacerPrimaryNodes.
          • The properties SourceGroups and TargetGroups of RadialLayoutData have been removed since edge grouping is not supported by the RadialLayout class.
          • The properties Rows and Columns of class PartitionGrid are now of type IEnumerable<RowDescriptor> and IEnumerable<ColumnDescriptor> instead of an un-typed YList.
          • The PenaltySettings#InvalidEdgeGroupingPenalty property has been removed. If edge groups are defined, the EdgeRouter class now always considers them. Therefore, this setting no longer applies.
          • The following changes regarding the expert API related to the EdgeRouter class were made:
            • The first parameter of the constructors in class AbstractSegmentInfo is now of type Object instead of Edge. The provided type should be either PathRequest for affected edges or Edge for non-affected, fixed ones. Furthermore, the property AbstractSegmentInfo#Edge has been removed as the info is not necessarily associated with an edge anymore.
            • Simialrly, the first parameter of the constructor in class EdgeCellInfo is now of type Object instead of Edge. The provided type should be either PathRequest for affected edges or Edge for non-affected, fixed ones.
            • The constructor of class EdgeInfo now additionally takes a parameter of type Edge.
            • The parameter of type Edge from the constructor of Path as well as the respective property were removed. A path is now not necessarily associated with an edge but only with the newly introduced PathRequest.
            • The method PathSearchResult#getEdgeInfo(Path) was removed.

          Viewer

          • The property CanvasComponent#Editable and the associated event editableChanged are not necessary and have been removed.
          • IMapperRegistry#createDelegateMapper has been renamed to createFunctionMapper.
          • The property ItemMapping#Delegate has been renamed to Function.
          • The property ContextItemMapping#ContextDelegate has been renamed to ContextBiFunction.
          • The property ItemCollection#Delegate has been renamed to Predicate.
          • Changed CommandBindingAction's actionPerformed behavior to always pass the action's target to the associated KeyboardInputMode#ExecuteCommandHandler and KeyboardInputMode#CanExecuteCommandHandler instances instead of the action event's source.
          • GraphClipboard's methods onElementCut and onElementCopied are no longer called for graph items which are not copied themselves but are owners of copied items. As a consequence, the methods cut and copy of the IClipboardHelper implementations of these elements are no longer called, either.
          • The classes GeneralPath and GeneralPath.PathCursor are now final.

          Changes of Default Behavior

          Layout

          • Renamed property PartialLayout#ResizeFixedGroups to FixedGroupResizingEnabled.
          • The HierarchicLayout class now uses a higher crossing cost for group node borders. To specify custom values, use the property HierarchicLayoutData#GroupBorderCrossingCosts.
          • The GroupingSupport class no longer throws an IllegalArgumentException if there is a node without associated ID (see GroupingKeys#NODE_ID_DPKEY). Instead the class uses the node itself as ID.
          • The SimplexNodePlacer#BarycenterMode property is now enabled by default. Thus, the HierarchicLayout class with default settings now produces different (usually more symmetric) layouts.
          • The default value of the property GridNodePlacer#RootAlignment was changed to GridNodePlacer#BUS_ALIGNED from AbstractRotatableNodePlacer#RootAlignment#TRAILING.
          • If the master edge is clipped on the bounds of its source or target, the ParallelEdgeRouter class now always clips the associated parallel edges on that bounds, too.

          Viewer

          • The following places now throw a ConcurrentModificationException instead of an IllegalStateException:
            • FilteredGraphWrapper: Changing graph items while iterating those using the IListEnumerable returned by FilteredGraphWrapper#getNodes, FilteredGraphWrapper#getEdges, FilteredGraphWrapper#getLabels or FilteredGraphWrapper#getPorts.
            • FilteredGraphWrapper: Changing the edges at a port or node while iterating those edges using the IListEnumerable returned by edgesAt.
            • GeneralPath: Changing the path's structure while iterating the path using a PathCursor returned by GeneralPath#createCursor.
          • The default tooltip in the class ToolTipQueryEventArgs is now set to null. Thus, the tooltip is not displayed when the event is handled without setting the tooltip content.
          • The properties RectangleIndicatorInstaller#Template and OrientedRectangleIndicatorInstaller#Template now return always the value that has been set by client code and are not modified by internal code anymore.

          yFiles for Java (Swing) 3.2.0.3

          Bugfixes

          Viewer

          • With SmartEdgeLabelModel, it was impossible to move a label from the left side of an edge to the right side. Instead, the label stopped at the edge.
          • Fixed an exception which could occur in CanvasComponent's method #compareRenderOrder and when using GraphModelManager's #Comparator property.
          • Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
          • In rare cases, saving a graph with folding to GraphML threw an exception.
          • The NodeAlignmentPolicy values CENTER_LEFT, CENTER_RIGHT, TOP_CENTER, BOTTOM_CENTER, and BOTTOM_LEFT now work correctly.
          • Reparenting an expanded group node into a collapsed group node no longer throws an exception.
          • DefaultLabelStyle: Fixed insets calculation.

          Layout

          • Fixed a potential exception in LayoutExecutor which could occur when a layout is applied to a graph which contains table nodes which are not group nodes.

          yFiles for Java (Swing) 3.2.0.2

          New Demos

          • Added RotatableNodesDemo that shows how support for rotated node visualizations can be implemented on top of the yFiles library.
          • Added PartitionGridDemo that shows how a PartitionGrid can be used in layout calculations to restrict the node positions to grid cells.
          • Added RenderingOrderDemo that shows the effect of different render policies on the z-order of nodes, edges, labels and ports.
          • Added EdgeToEdgeDemo that demonstrates the use of edge-to-edge connections.

          Improvements

          Layout

          • Slightly improved the performance of the GenericLabeling algorithm and improved the quality of the label placements for some cases.

          Bugfixes

          View

          • Fixed null check for GridVisualCreator#Pen property.
          • Fixed an issue where EdgeStyleDecorationInstaller would cause an exception when used on edges that connect to other edges.
          • Fixed a bug, which might occur in very rare cases in the undo/redo processing of several consecutive reparent actions.
          • Fixed a bug in the graph implementation that sometimes led to a runtime that was quadratic in the number of nodes when creating large graphs.
          • CreateEdgeInputMode: Fixed a bug that caused the visualization of source port candidates to flicker.
          • The EdgeStyleDecorationsInstaller class now properly displays decorations for edges between group nodes and their descendants when displayed in view coordinates.
          • CollapsibleNodeStyleDecorator: Although the wrapped style has its own IClickListener defined in its lookup, it was not always used by the CollapsibleNodeStyleDecorator.
          • Fixed a bug in the UndoEngine that could lead to memory leaks if the tokens returned by getToken were not disposed of when the UndoEngine got cleared.
          • Fixed a bug that rendered labels or ports neither in a separate layer nor at their owner when exactly one of LabelLayerPolicy#AT_OWNER or PortLayerPolicy#AT_OWNER was used.
          • Fixed a bug in GridVisualCreator that rendered the grid at the wrong location when the viewport contained negative coordinates.
          • CollapsibleNodeStyleDecorator: IsHit respects buttons outside the node bounds.

          Algorithms

          • Method Paths#findAllChains now correctly calculates the chains of input graphs with cycles.

          Layout

          • Fixed a bug in class EdgeRouter that sometimes caused a non-deterministic behavior.
          • The PolylineLayoutStage does no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes).
          • Fixed a rare exception that was triggered by the EdgeRouter class during routing in cases where the input contained grouped edges.
          • The GenericLabeling class now produces better results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor#DistanceToEdge) and at the same time multiple SideOfEdge preferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it.
          • Fixed two issues that induced the violation of a PortCandidate with fixed offsets (or a strong PortConstraint) by the EdgeRouter class. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node).
          • The EdgeRouter class no longer throws an exception for inputs (rare) containing fixed, grouped edges and when EdgeRouter#PolylineRoutingEnabled is enabled.
          • The EdgeRouter now considers the correct NodeHalo associated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments.
          • Class EdgeRouter now correctly considers intersections between edges and labels of fixed edges if property EdgeLabelConsiderationEnabled is enabled.
          • Fixed a very rare exception that was triggered by the EdgeRouter class during routing in cases where the source/target node is covered by obstacles (i.e. other nodes, labels).
          • The EdgeRouter class now correctly considers intermediate routing points when using the polyline routing style (EdgeRouter#PolylineRoutingEnabled). Previously, it could happen that intermediate points were not part of the final polyline edge path.
          • Class PartialLayout now correctly considers the specified PortCandidates during the orthogonal/octilinear routing of edges.
          • Class EdgeRouter no longer considers all PortCandidates with multiple directions as fixed PortCandidates.
          • The OrthogonalLayout class no longer throws an exception when property OrthogonalLayout#UniformPortAssignmentEnabled is enabled and the input contains parallel edges.
          • The CompactNodePlacer class now correctly considers the specified values of the VerticalDistance and HorizontalDistance properties.
          • Class OrganicRemoveOverlapsStage no longer produces infinite loops for some rare cases.
          • The CompactNodePlacer class no longer throws an exception for some inputs with specified strategy memento information (either via property TreeLayoutData#CompactNodePlacerStrategyMementos or with a mapper registered with key CompactNodePlacer#STRATEGY_MEMENTO_DPKEY).
          • Self-loop segments generated by the HierarchicLayout class are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments.
          • When using RecursiveGroupLayout, the values of the properties ComputedWidth, ComputedHeight and ComputedPosition of the classes ColumnDescriptor and RowDescriptor are now correctly set after the layout if EdgeRouter is the corresponding InterEdgeRouter.
          • The HierarchicLayout class now produces less superfluous crossings if there are same-layer edges with PortConstraints or PortCandidates.
          • Improved the path search performance of the EdgeRouter class for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios.
          • The HierarchicLayout class now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes.
          • The HierarchicLayout class sometimes threw an ArgumentException for input graphs that contained incremental elements in combination with groups.
          • The HierarchicLayout class now prevents intersections between labels and the horizontal grid lines of a PartitionGrid.
          • The EdgeRouter class no longer throws an exception for some inputs containing edges with intermediate routing points.
          • The HierarchicLayout class now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other.
          • Class SeriesParallelLayout now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception.
          • Fixed a bug in the HierarchicLayout that could cause non-orthogonal segments when the input contained port labels in conjunction with edge grouping.
          • The OrganicLayout class now produces deterministic results for group nodes (if property DeterministicModeEnabled is enabled).
          • Fixed a StackOverflowError in EdgeRouter.

          yFiles for Java (Swing) 3.2.0.1

          Improvements

          Styles

          • PolylineEdgeStyle and ArcEdgeStyle now consider property changes of their source and target arrows. Previously the source or target arrow properties had to be changed to instantly see the effect.

          Layout

          Bugfixes

          Viewer

          Input

          Graph Model

          • Fixed an exception which might occur upon user interactions in a folded graph which contains labels at ports.
          • Fixed a bug which might have caused an edge in a folded view to lose its bends and labels after repeatedly reversing the edge.

          Layout

          yFiles for Java (Swing) 3.2

          Major New Features

          • The new LabelDropInputMode and PortDropInputMode classes implement drag and drop for labels and ports, respectively. The API of these classes is similar to NodeDropInputMode for nodes.
          • Labels can now be added to ports and the new label models FreePortLabelModel and InsideOutsideLabelModel can be used to place such labels. On the technical side, IPort now extends the ILabelOwner interface and the enum constant GraphItemTypes#PORT_LABEL was added.
          • The new LassoSelectionInputMode selects all model items inside a hand-drawn lasso region. This mode allows combinations of free-hand and straight-line sections during path creation. The following types and methods were added to support this mode.
            • Added the GraphEditorInputMode#LassoSelectionInputMode and GraphViewerInputMode#LassoSelectionInputMode properties and a corresponding factory method. LassoSelectionInputMode is disabled per default.
            • The new GraphEditorInputMode#lassoSelect and GraphViewerInputMode#lassoSelect methods programmatically selects all items in the provided GeneralPath.
            • The new ILassoTestable interface specifies whether the item is considered to be inside the lasso path. This is analog to the IMarqueeTestable interface for marquee selection.
            • Any model item can be decorated with an instance of ILassoTestable or provide one in its lookup. For this, the Node/Edge/Port/Label/BendDecorator classes got the new LassoTestableDecorator property for decorating an item with a custom ILassoTestable.
            • The new #isInPath method of AbstractNode/Edge/Port/ LabelStyle can be overridden to customize the lasso testing behavior.
          • Labels and ports can now optionally be rendered directly in front of their owner. Such a rendering order can make the ownership of labels and ports more clear if nodes overlap. Previously, all label and ports were rendered in front of all nodes. The new rendering order can be enabled by setting the new properties LabelLayerPolicy and PortLayerPolicy of GraphModelManager to LabelLayerPolicy#AT_OWNER and PortLayerPolicy#AT_OWNER.

          New Features

          • The new GraphBuilder, TreeBuilder, and AdjacentNodesGraphBuilder classes can be used to build a graph from custom data.
          • The nesting options of GraphModelManager for the visualizations of nodes and edges have been improved and clearified.
          • The mouse wheel behavior of the overview can now be switched between ZOOM, SCROLL, and NONE, and optionally, the action can be performed only when the control is focused. This can be configured with the new OverviewInputMode#MouseWheelBehavior property.
          • TableEditorInputMode: Double clicking a stripe or stripe label now edits the label in the same way as for other graph items.
          • RectD and InsetsD: Added methods to reduce the size of an RectD and InsetsD instance, respectively.
          • The new static methods IPositionHandler#combine combine multiple position handler instances into a single instance.
          • Added the events ElementsCopied, ElementsCut, and ElementsPasted to GraphEditorInputMode, and the event ElementsCopied to GraphViewerInputMode.
          • The new static IAnimation#createSequentialAnimation method creates an animation that animates multiple animations in sequence.
          • The rectangle of the marquee selection can now be customized with the new protected method MarqueeSelectionInputModes#calculateMarqueeRectangle.
          • Added new decorator implementations for table items. You can access these new decorators via the new method ITable#getDecorator with the RowDecorator, ColumnDecorator and StripeLabelDecorator properties.
          • If the new CanvasComponent#QuantizingInputCoordinatesEnabled property is enabled, world coordinates of mouse events are rounded to nicer values to avoid unnecessary precision. For example, you'll get the value 326.375 instead of 326.3758109495. The rounding is chosen based on the zoom level to ensure that there is almost no visual deviation. Lower zoom levels will result in coarser rounding, higher zoom levels will use exactly as much precision as necessary. By default, this option is enabled.

          Layout

          • OrthogonalLayout: Added support for parallel routing of parallel edges (multi-edges that share the same source and target node). They are routed as parallel as possible; if there are edge labels, the routes must differ somewhat. Previously, parallel edges were not handled explicitly and their routes were often very different, making the recognition of parallel structures difficult.
          • OrthogonalLayout: Added new property MaximumDuration, which enables to control the preferred time limit of the layout algorithms.
          • OrthogonalLayout: Added property UniformPortAssignmentEnabled that allows to obtain results with a more uniform port assignment.
          • Added convenience layout stage TemporaryGroupNodesInsertionStage that automatically generates a (non-nested) grouping structure from a given mapping of nodes to a component Id. This temporary grouping is meant for use during the run of the core layout algorithm of the stage. It allows, for example, easy use of RecursiveGroupLayout without the need for a real grouping structure when the requirement is that different sub-graphs need to be arranged with different layout algorithms.
          • Added the TemporaryGroupNodeInsertionData configuration class for the new TemporaryGroupNodeInsertionStage layout stage.
          • TreeLayout: Added node placer CompactNodePlacer that produces more compact tree layouts. It uses a dynamic optimization approach that chooses a placement strategy of the children such that the overall result is compact with respect to a specified aspect ratio, see property CompactNodePlacer#PreferredAspectRatio.
          • The new TreeLayoutData#CompactNodePlacerStrategyMementos property can be used to to maintain similar layout styles over subsequent runs of compact tree layout.
          • Added the new layout algorithm TabularLayout that generates simple tabular arrangements of nodes. It allows for placing nodes in rows and columns, such that each table cell contains at most one node. Among its features is, for example, a from-sketch mode, the possibility to exactly map nodes to specific cells or different vertical and horizontal alignments.
          • Added the TabularLayoutData configuration class for the new TabularLayout algorithm.
          • OrthogonalLayout: Added support for special layout styles of various substructures that are automatically detected in the input graph. Supported substructures are trees, chains and cycles - see the according properties OrthogonalLayout#TreeStyle, OrthogonalLayout#ChainStyle and OrthogonalLayout#CycleStyle. In addition to the style, the new feature offers more settings, like, for example, the desired tree layout orientation (see OrthogonalLayout#TreeOrientation). The orthogonal layout style LayoutStyle#NORMAL_TREE has been removed as the new tree style feature allows more settings for the arrangement of tree-like graphs.
          • Added the new layout algorithm TreeMapLayout that generates tree maps. Tree maps present hierarchical data using nested rectangles (nodes) where each rectangle (node) gets its size depending on a specific dimension of data associated to it.
          • Added the TreeMapLayoutData configuration class for the new TreeMapLayout algorithm.
          • Polyline.EdgeRouter now supports routing through user-specified intermediate points. All specified points will lie on the edge route in the given order. See new property EdgeLayoutDescriptor#IntermediateRoutingPoints.
          • Polyline.EdgeRouter: Edges that connect group nodes with their descendants can now directly connect from the inside to the group node border. Previously, an edge needed to always leave the group node before connecting to it. The feature can be enabled/disabled individually for each edge using the new property EdgeLayoutDescriptor#DirectGroupContentEdgeRoutingEnabled.
          • HierarchicLayout: Added feature that allows to define sub-components of the input graph such that each sub-component is arranged by a user-specified layout algorithm. This allows for hierarchical layouts where parts of the graph are arranged in a different fashion, e.g., to emphasize special sub-structures. The sub-components can be specified by a data provider registered with the input graph with key HierarchicLayout.SUB_COMPONENT_ID_DPKEY or with the new HierarchicLayoutData#SubComponents property .
          • ShortestPaths: Added a-star (A*) algorithm for finding the shortest path between two nodes in a directed or undirected, arbitrary graph.

          Improvements

          Graph Model

          • All methods that set a node layout or a bend location are now fail-fast if the provided layout or location contains a NaN value. Previously, this resulted not in an immediate error but broke subsequent code like an automatic layout or a content rectangle calculation.
          • The performance of FilteredGraphWrapper has been improved. Now, it depends mainly on the size of the resulting filtered graph. This allows for loading very large graphs into memory and displaying only a subset of them using FilteredGraphWrapper.
          • For ITable's default methods findRow, findColumn, findStripe and findStripes, overloads without the Predicate parameter have been added.
          • DefaultGraph has new factory methods to customize undo unit creation.
          • DefaultGraph now fills the undo engine and triggers events in a consistent manner for all graph element factory methods.
          • Many label model createParameter methods now have overloads without those parameters that are not needed every time.
          • InteriorStretchLabelModel: Added new parameters CENTER_HORIZONTAL and CENTER_VERTICAL for horizontal or vertical centered one-line labels.
          • The factory method IMapper#fromMap has been added which returns an implementation of IMapper that delegates to a java.util.Map.

          View

          • The new method GraphModelManager#getMainCanvasObject returns the canvas object that should be used when changing the visibility or z-order of a model item.
          • Assigning a new graph instance to GraphOverviewComponent now keeps configuration changes made to the overview's GraphVisualCreator instance.
          • Selfloop edges are now properly displayed in the GraphOverviewComponent.
          • Animations after a layout don't break anymore if the graph is modified concurrently.
          • Added the new CanvasComponent#LimitingFitContentZoomEnabled property which controls whether the maximum zoom level for the CanvasComponent#fitContent method as well as the FitContent command is restricted to 1 or the value of the MaximumZoom property.
          • Akin to the two CanvasComponent#zoomTo methods, there are now two CanvasComponent#zoomToAnimated methods that animate the viewport change.
          • ICanvasObjectGroup#addChild: A default method without the ICanvasObjectDescriptor parameter was added as overload which uses the ICanvasObjectDescriptor#ALWAYS_DIRTY_INSTANCE.
          • GraphModelManager now avoids unnecessary re-installation of items if they keep their ICanvasObjectGroup. By these re-installations the z-order of the item in its group was lost and a new visual was created.
          • The factory method IAnimation#createLayoutAnimation has been added which delegates to LayoutUtilities#createLayoutAnimation as the method is easier to find in IAnimation.
          • The factory methods IAnimation#createParallelAnimation now takes covariant Iterables, i.e. Iterable<T extends IAnimation> instead of Iterable<IAnimation>.
          • Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time and we fixed several problems that caused erratic behavior.
          • The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. Therefore, the visualizations no longer extend into the node bounds.

          Input

          • Don't run unneccessary hit tests when a mode is canceled.
          • The INode parameter of the NavigationInputMode#enterGroup method is now optional. If it is null the whole graph will be revealed.
          • The CanvasComponent#createInputModeContext method is now public instead of protected.
          • ItemClickedEventArgs now extends ClickEventArgs and therefore provides additional information like the InputModeContext.
          • The new overload of the CreateEdgeInputMode#doStartEdgeCreation method taking an initialTargetLocation parameter can be used to define the initial location that shall be used to find a target node.
          • CreateEdgeInputMode now removes coinciding bends if orthogonal edge creation is enabled.
          • CreateEdgeInputMode provides access to a dummy target node which is used during the interactive edge creation. This allows making the node visible during creation by setting a style and size.
          • CreateEdgeInputMode now supports edges ending without a valid target port candidate. This allows for creating new target nodes together with newly created edges.
          • The new property CreateEdgeInputMode#PrematureEndHitTestable allows for considering any location as valid target point for an edge.
          • The new CreateEdgeInputMode#DragCursor property specifies the cursor that is used during edge creation when no bend may be created at the current location.
          • CreateEdgeInputMode now supports showing port candidates at potential sources for edge creation, too.
          • CreateEdgeInputMode now always creates dummy ports during a gesture, instead of temporarily reusing real ports if available. This makes it possible to change e.g. the dummy edge's source port's style during the gesture.
          • The new CreateEdgeInputMode#StartingOverCandidateOnlyEnabled property can be used to restrict the start of an edge creation gesture to directly hovered port candidates.
          • The new protected CreateEdgeInputMode#getSourcePortCandidates method makes determining source port candidates more flexible.
          • GraphEditorInputMode and TableEditorInputMode: Method editLabel now also returns a Future, similar to addLabel and createLabel.
          • ClickInputMode now dispatches the clicked events in the same order as GraphEditorInputMode and GraphViewerInputMode, i.e. the more specific events LeftClicked, RightClicked, LeftDoubleClicked and RightDoubleClicked are now dispatched before Clicked and DoubleClicked. Hence, Clicked and DoubleClicked will only be triggered if the event wasn't handled before.
          • TableEditorInputMode now handles clicks similar to GraphEditorInputMode:
          • The properties MaximumSnapDistance, ShowingHitPortOwnerCandidatesOnlyEnabled and Visualization have been added to PortRelocationHandleProvider and are applied to each PortRelocationHandle created by this provider.
          • The default value of DefaultPortCandidate#LocationParameter is now FreeNodePortLocationModel#NODE_CENTER_ANCHORED for nodes and BendAnchoredPortLocationModel#FIRST_BEND for edges instead of a parameter of an internal model.
          • During interactive edge creation, the tip of a newly created edge now only snaps to valid target port candidates to create orthogonal end segments.
          • Moving a node with the MoveInputMode for unselected nodes now moves the bends of adjacent self-loops, too.
          • Added overridable methods to PortRelocationHandle to allow customization of the port candidates.
          • The new TextEditorInputMode#TextAreaPlacementPolicy property provides finer control of what happens when the TextArea is (partially) outside of the viewport.
          • The new TextEditorInputMode#TextAreaPadding property controls the padding between the TextArea and the border of the canvas.
          • The CanvasComponent#Mouse2DClicked event now reports the position of the mouse down event as its location. Previously, this was the location of the up events which can be slightly different.
          • The new PortRelocationHandle#Visualization property controls how the preview during edge reconnection is handled. A new option is to change the edge during the gesture, which improves fidelity of the preview in certain cases.
          • MoveLabelInputMode: The visualization of a moved label has been improved. The new property Visualization allows easy switching between a symbolic preview, a preview or a live view.
          • The following input modes now release the mutex before dispatching their final event:
          • The new methods findNextItem and findNearestItem of NavigationInputMode can be used to configure the determination of the "next" item.
          • The type parameter T of class ItemDropInputMode<T> is no longer restricted to IModelItem.
          • Overloads of the methods GraphCopier#copy and GraphClipboard#duplicate without the IElementCopiedCallback parameter have been added.
          • The new GraphEditorInputMode#MoveUnselectedInputMode property provides a child input mode for moving unselected items. It supersedes the previous #createMoveUnselectedInputMode method. This input mode is disabled by default.
          • The static constants SELECTED_MOVABLES_POSITION_HANDLER and SELECTED_MOVABLES_HIT_TESTABLE have been added to GraphEditorInputMode. These are used as default PositionHandler and HitTestable properties of GraphEditorInputMode#MoveInputMode and can be reused for other input modes.

          Layout

          • HierarchicLayout: Reduced required memory for graphs with sequence constraints.
          • Polyline.EdgeRouter: Improved routing quality for edges between group nodes and their descendants in the case that the routing is aborted via AbortHandler or when the maximum duration time limit is up. Previously, such edges might not have been handled in this case, whereas now they always get a simple but valid orthogonal route.
          • HierarchicLayout: Improved handling of sequence and layering constraints between sub-components, see HierarchicLayout#SUB_COMPONENT_ID_DPKEY or HierarchicLayoutData#SubComponent. Previously, such constraints were ignored.
          • OrthogonalLayout: Reduced the number of bends of directed edges.
          • OrthogonalLayout: Reduced number of crossings for directed edges.
          • BusRouter: Now automatically ignores non-orthogonal edges with fixed bus descriptor (see BusDescriptor#isFixed) or transforms them into orthogonal edges if they are octilinear. In previous versions, the layout algorithm simply throws an IllegalArgumentException in such cases.
          • OrthogonalLayout: Improved compactness of the layout results.
          • OrthogonalLayout: Improved result of the perceived bends optimization (see OrthogonalLayout#PerceivedBendsOptimizationEnabled).
          • OrthogonalLayout: The postprocessing step now also applies special transformations that can reduce the overall edge length.
          • MultiPageLayout: Improved runtime as well as layout quality if the input is a tree structure and the specified #CoreLayout is either an instance of class TreeLayout or ClassicTreeLayout. Furthermore, property MultiPageLayout#AdditionalParentCount allows for specifing the number of additional proxies that the algorithm tries to add to a subtree. The original nodes associated with these proxies lie on the path of the tree's root to the subtree placed on a page.
          • MultiPageLayout: Added property #ProxyReferenceNodeCreationEnabled that allows for disabling the creation of proxy reference nodes as well as property #MultipleComponentsOnSinglePagePlacementEnabled that allows to prevent that elements of different connected components are placed on the same page.
          • PortPlacementStage now additionally considers port grouping constraints. If two edges are port-grouped at a certain node, the stage assigns the same port location to the edges. For more information about port grouping, see PortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY.
          • TreeComponentLayout: Added property UndirectedTreeConsiderationEnabled that allows for specifing whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered.
          • OrthogonalLayout: Reduced the length of straight-line edges which can lead to layouts that are significantly more compact.
          • OrthogonalLayout: Improved optimization that reduces the number of perceived bends, see OrthogonalLayout#PerceivedBendsOptimizationEnabled.
          • HierarchicLayout: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers.
          • Added new stage PlaceNodesAtBarycenterStage that places a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these node are hidden.
          • DefaultNodePlacer and SimpleNodePlacer now both support to specify a minimum distance between the edge segments that are routed orthogonally in the channel between the root node and the child nodes, see method DefaultNodePlacer#MinimumChannelSegmentDistance and SimpleNodePlacer#MinimumChannelSegmentDistance respectively.
          • ClassicTreeLayout now allows for specifying a minimum vertical distance for the horizontal edge segments of the bus, see ClassicTreeLayout#MinimumBusSegmentDistance.
          • Major performance improvement for Polyline.EdgeRouter and routing scenarios where it is unavoidable to cross obstacles (e.g. other nodes, labels) in order to reach the target, including cases where a crossing is necessary to guarantee that port candidates/constraints at the target side are satisfied.
          • Polyline.EdgeRouter: Improved quality in maze routing scenarios. Previously, it could happen that edge-node overlaps occurred even though there exists a more complicated path that yields no overlaps.
          • Several minor performance improvements for Polyline.EdgeRouter that affect the path search phase as well as the segment location assignment phase.
          • The new TreeLayoutData#CriticalEdgePriorities property can be used to specify critical edges.
          • The new LayoutExecutor#createLayoutGraphAdapter callback method makes it possible to configure the LayoutGraphAdapter that is used for the layout calculation.
          • SmartEdgeLabelModel now is properly handled by labeling algorithms, resulting in better label placements.
          • The new ImprovingPortAssignmentEnabled property of LayoutExecutor and LayoutGraphAdapter enables PortCalculator to improve the port assignment.
          • The combination of PartitionGridData and TableLayoutConfigurator has been improved:
          • The new properties LayerConstraints and SequenceConstraints of HierarchicLayoutData can be used to configure layer and sequence constraints for the HierarchicLayout. These supersede the previous LayerConstraintFactory and SequenceConstraintFactory properties.
          • The property ItemMapping#Map has been added that allows you to use a java.util.Map for the mapping from items to values.

          Demos

          Further improvements

          • The PointD#toMutablePoint and RectD#toMutableRectangle methods now return a MutablePoint instead of IMutablePoint and a MutableRectangle instead of a IMutableRectangle, respectively.
          • The new method GeneralPath#intersects(GeneralPath) determines whether the path intersects with another GeneralPath.
          • The GeneralPath#createSmoothedPath method now has additional parameters to change how smoothing is applied. Those new options result in nicer smoothing when combined with large smoothing lengths and many different segment lengths in the path.
          • When reading GraphML with the deserialization property IgnoreXamlDeserializationErrors enabled, invalid property content is now skipped instead of discarding the whole object with such content.
          • Added a remove method to NodeDecorator, LabelDecorator, EdgeDecorator, PortDecorator, and BendDecorator for easy removal of decorations.
          • PolylineEdgeStyle renders better looking paths for self loop edges whose ports are near the node border.
          • The performance of the DefaultLabelStyle has been improved. Using another VisualCachingPolicy then VisualCachingPolicy#Never now also speeds up the DefaultLabelStyle.
          • The class CanvasResourceBundle has been added which can be used to replace the default command binding key strokes and command names via ResourceBundles.
          • The new class LicenseConfig has been added whose static INSTANCE can be optionally used to configure the license resolving:
            • If the content of the license file is set as LicenseString property, it is used directly instead of trying to load a license file.
            • Otherwise if the LicenseClassLoader property is set, this ClassLoader is used to load the license file.
          • The PlatformClassloader introduced with JDK 9 is now recognized per default when writing GraphML. For JDK classes of JDK 9 that are no longer known to the bootstrap classloader but only to the platform classloader no explicit XamlNamespaceMapping has to be added to GraphMLIOHandler.

          Bugfixes

          Graph Model

          View

          • The methods getBounds and isVisible describing the RectangleIndicatorInstaller returned wrong values. This could impact the performance as e.g. some node selection highlights were updated although they were not in the view port and result in unnecessary large content rectangles.
          • GraphModelManager: Fixed NullPointerException that occured when any of the Descriptor properties were set while the GraphModelManager instance was not yet associated to an IGraph.
          • Bridges: For edges which cross each other with the same absolute slope now a bridge is added on exactly one of these edges, depending on the crossing policy (was: either on both edges or none of them).
          • Reduced memory consumption of DefaultEdgePathCropper.
          • Removing an item that is currently highlighted with a custom HighlightIndicatorManager, FocusIndicatorManager, or SelectionIndicatorManager no longer results in a NullPointerException.
          • Selected stripe labels no longer remain selected after their owning stripe is deleted.
          • Selected stripe labels no longer cause exceptions when hovering over them.
          • The selection indicator for selected stripe labels is now shown correctly.
          • The methods GraphClipboard#copy and GraphClipboard#cut don't copy items anymore which depend on items that are selected but not included in GraphClipboard#CopyItems.
          • Undo units created by the execution of a layout algorithm are now correctly merged with undo units of the previously executed interactive gesture.
          • Corrected weird scrolling behavior of the scroll bar when the viewport was outside the content rectangle.
          • The commands COPY, CUT, and DUPLICATE are no longer enabled if there are no elements to cut, copy or duplicate.
          • Fixed a bug that sometimes prevented dispatching the mouse up event.
          • CanvasComponent#fitContent now takes into account that scroll bars that are currently visible may vanish.
          • Mouse wheel scrolling and scroll commands no longer move the view to the top left corner if a the viewport is limited by a ViewportLimiter.
          • Bridges did sometimes not appear on edges when they were scrolled into the viewport.

          Input

          • PortRelocationHandleProvider now can handle null as graph constructor parameter.
          • PortRelocationHandle#GHOST_VISUALIZATION_PEN_KEY now is excluded from obfuscation.
          • Fixed IHitTestable implementation of DefaultPortCandidateDescriptor which used incorrect coordinates.
          • The ParentInputMode property of the InputModeEventArgs now is the input mode which has raised the event. Previously, some input modes erroneously set the ParentInputMode to the containing GraphEditorInputMode or GraphViewerInputMode.
          • Switching the input mode in an event handler of the current input mode no longer throws an exception.
          • ItemHoverInputMode updates the hovered item upon mouse drag events, too. This is the documented behavior. Previously, the hovered item was only updated on mouse move events.
          • ItemHoverInputMode removes the hovered item upon cancel.
          • GraphClipboard: The contents of a folder node was not copied if the folder was copied from within a group view, i.e. if the user entered a group node. In the worst case, this might have frozen the complete application.
          • Fixed an exception when an edge or label is pasted without selected target while its original owner is not in the current view.
          • ClickInputMode provided wrong click locations in the Clicked event if a Mouse2DEventTypes#CLICKED event without preceding Mouse2DEventTypes#PRESSED event was processed.
          • CreateEdgeInputMode and CreateBendInputMode now cancel on MOUSE_LOST_CAPTURE_DURING_DRAG event.
          • CreateEdgeInputMode did not show port candidates after re-installation of the input mode.
          • Moving an edge label with SmartEdgeLabelModel that is owned by an edge without visible path no longer throws an exception.
          • ItemHoverInputMode now resets the hovered item when moving the mouse out of the component.
          • GraphEditorInputMode and GraphViewerInputMode no longer ignore changes to their sub-input modes after having been installed once.
          • The HitTestRadius property of the following implementations of ICanvasContext now correctly contain the value in world coordinates instead of view coordinates:
          • Disabling MarqueeSelectionInputMode during the gesture via code left the marquee visible on the screen.
          • When a selected stripe label is edited its TextArea now is correctly placed.
          • While relocating edges, dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
          • The Clicked and DoubleClicked events of ClickInputMode were sometimes missing when clicking on a node or edge. Now, they are always triggered unless the event was handled before.
          • Snap lines which indicate the same size are no longer shown for implicitly re-sized parent group nodes.
          • TextEditorInputMode: Inserting a line break now replaces selected text.
          • Node-to-edge snapping is now disabled by default which is the documented and intended value. For this, the initial value of the GraphSnapContext#NodeToEdgeDistance property is set to -1.0.
          • The LabelEditingEventArgs#Context#ParentInputMode property provided in the events GraphEditorInputMode#LabelAdding, GraphEditorInputMode#LabelEditing, TableEditorInputMode#LabelAdding and TableEditorInputMode#LabelEditing now contains the corresponding GraphEditorInputMode or TableEditorInputMode instance.
          • The default implementation of IPortSnapResultProvider never returned any snap results.
          • CreateEdgeInputMode: The ValidBeginCursor is now correctly hidden during edge creation when bend creation isn't allowed.
          • CreateEdgeInputMode didn't always update the highlight of possible source port candidates when its ShowPortCandidates property was configured to show the source port candidates.
          • GraphEditorInputMode/GraphViewerInputMode: Corrected the popup menu location if the menu is opened using the keyboard. Previously, the menu could appear outside the GraphComponent if the selected items or the current item were not completely inside the current viewport. Now the popup menu location (i.e. the menu's upper left corner) will be always inside the GraphComponent.
          • ReparentStripePositionHandler: The source and target ghost visualization was not always updated correctly when custom ghosts were used.
          • Changing the values of the CreateEdgeInputMode#DummyEdgeGraph#EdgeDefaults property had no effect for some interactions.
          • Fixed a possible infinite loop in OrthogonalEdgeHelper.
          • The cursor is now correctly reset after editing an orthogonal edge.
          • Fixed a possible NullPointerException which could occur in customized LabelDropInputMode and PortDropInputMode classes.
          • The CreateEdgeInputMode doesn't show port candidates anymore if bend creation is enforced (by pressing CTRL key during edge creation).
          • The indicators for bend grid snapping were not always drawn at the correct position for bends which were implicitly moved with a selected edge.

          Layout

          • HierarchicLayout: Fixed problem where edges between group nodes contained superfluous bends if there were grouped edges in the input graph.
          • Polyline.EdgeRouter: Fixed issue that sometimes caused weird edge routes if there are edges with intermediate routing points.
          • Polyline.EdgeRouter: Fixed NullPointerException that was triggered when the list of intermediate points for an edge consisted of exactly two equal points.
          • OrganicLayout: Fixed IllegalArgumentException that could appear if cycle substructure detection is enabled, see OrganicLayout#CycleSubstructureStyle.
          • HierarchicLayout: Fixed an issue that caused non-symmetric results for grouped edges even though property SimplexNodePlacer#BaryCenterModeEnabled was enabled.
          • OrthogonalLayout: Fixed rare infinite loop issue for grouped graphs.
          • Polyline.EdgeRouter: Fixed rare NullPointerException.
          • Polyline.EdgeRouter: Fixed NullPointerException that occurred when there were intermediate routing points and the path search got aborted (e.g. because of maximum duration time limit).
          • ShortestPaths: Fixed possible NullPointerException that occurred when the a-star algorithm was applied to a graph with non-monotonic heuristic costs.
          • HierarchicLayout: Fixed UnsupportedOperationException that was triggered when a DataProviderAdapter that does not implement IDataProvider#get was registered with key GivenLayersLayerer#LAYER_ID_DPKEY. The issue only appeared in conjunction with sub-components, see HierarchicLayout#SUB_COMPONENT_ID_DPKEY.
          • FamilyTreeLayout: Fixed bug that caused that the preferred family member order wasn't considered, see FamilyTreeLayout#FamilyMembersSortingPolicy.
          • GenericLabeling: Fixed bug that could cause that a label candidate with a lower profit (see AbstractLabeling#Profit) was preferred over another candidate with higher profit even though both candidates did not overlap with any other elements.
          • GenericLabeling: Fixed unexpected labeling results that occurred if a label had label candidates with different sizes. The labeling algorithm previously calculated profits of candidates under the assumption that all candidates have equal size.
          • HierarchicLayout: Fixed rare infinite looping issue for input graphs with fixed (i.e., non-incremental) nodes and layering constraints.
          • Polyline.EdgeRouter: Fixed a rare bug that caused port candidate failures for edges grouped with fixed edges.
          • Polyline.EdgeRouter: Fixed a bug that caused collinear bends and self-crossings to be removed from fixed edges. Now, such fixed edges are not changed anymore.
          • HierarchicLayout: Fixed bug that sometimes caused a NullPointerException if the input graph contains port groups, see PortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY.
          • HierarchicLayout: Fixed bug that sometimes caused superfluous bends if the edges were routed on a grid and the grid reference point was different from (0,0), see property NodeLayoutDescriptor#GridReference.
          • GraphLayoutLineWrapper: Fixed bug that sometimes caused a large empty space inside the drawing.
          • CircularLayout: Now correctly considers whether or not an inter-partition edge should be bundled or not (see EdgeBundleDescriptor#isBundled). Previously, when having multiple partitions, inter-partition edges where sometimes bundled even if the bundling property was disabled.
          • HierarchicLayout: Fixed a bug where the edge thickness of grouped edge segments was not considered correctly (e.g. there was not enough space for a thick edge).
          • BusRouter: Fixed non-deterministic behavior with respect to multiple runs that occurred in very rare cases.
          • Corrected an error in the Rectangle2D#Contains(Rectangle2D) method. As a consequence of this error, the results of various algorithms and automatic layouts could have been wrong.
          • OrthogonalLayout now considers edge grouping also if there are no directed edges specified.

          Further Bugfixes

          • GenericLabelModel serialization: Fixed cyclic reference in GraphML which could happen while serializing a GenericLabelModel with a parameter with associated descriptor.
          • PolylineEdgeStyle now takes arrow heads into account for visibility checks.
          • The default method IOrientedRectangle#getCenter didn't return the correct center if the width or height of the rectangle was equal to 0.
          • Sometimes the GroupNodeDefaults#LabelDefaults#AutoAdjustingPreferredSizeEnabled property and the GroupNodeDefaults#PortDefaults#AutoCleanupEnabled property were not considered for labels and ports of groups.
          • The GroupingSupport#hasGroupNodes method now returns only true if there are actually group nodes in the graph. Previously, it returned also true if there once were group nodes which had been removed in the meantime.
          • TableNodeStyle: Fixed missing default visualization.
          • Fixed a possible NullPointerException in TableNodeStyleRenderer when a TableNodeStyle is rendered with #Table set to null.
          • The clone method now is overridable in all style implementations.

          Incompatible Changes

          • ReparentStripePositionHandler: All callback methods dealing with ghost objects have been renamed consistently:
          • The method Arrow#getAsFrozen was removed as there was no benefit in converting the Arrow instance in an immutable instance.
          • The protected factory method MoveLabelInputMode#createLabelHitTestable has been removed. Developers who want to set a custom instance need to set it directly to the HitTestable property.
          • The #CanvasClicked event of GraphEditorInputMode/GraphViewerInputMode now provides the GraphEditorInputMode/GraphViewerInputMode as parent input mode in the Context property of its ClickEventArgs.
          • The ITable#RelativeLocation property has been removed. Use ITable#Insets with corresponding Left and Top values instead.
          • Renamed all occurrences of Cleanup to CleanUp in API names.
          • ItemClickedEventArgs now extends ClickEventArgs.
          • CreateEdgeInputMode's EdgeCreator might receive null as targetPortCandidate parameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null.
          • The StripeSubregion#TargetTableNode property is now read-only.
          • Renamed the enumeration value ShowFocusPolicy#WHEN_FOCUSED to ONLY_WHEN_FOCUSED.
          • Renamed the Animator#destroy method to stop.
          • The GraphEditorInputMode#createMoveUnselectedInputMode method has been removed. Use the property MoveUnselectedInputMode instead.
          • The boolean CreateEdgeInputMode#PortCandidateShowingEnabled property has been replaced by the CreateEdgeInputMode#ShowPortCandidates property which has the enum type ShowPortCandidates.
          • The boolean OverviewInputMode#AutoMouseWheelZoomEnabled property has been replaced by the OverviewInputMode#MouseWheelBehavior property which has the enum type MouseWheelBehaviors.
          • Classes PropertyInfo, TypedKey, XamlHelper and XmlName were removed from the layout distribution where they were not used.
          • CanvasComponent: Removed the events MouseWheelZoomFactorChanged, MouseWheelScrollFactorChanged, AutoDragChanged and HitTestRadiusChanged. These events are unneeded since the corresponding properties are not changed by library code.
          • The method Pen#adopt has been renamed to #commit to better reflect what it really does.
          • DpKeyBase has been renamed to AbstractDpKey and made an abstract class. AbstractDpKey and all subclasses now take the value type as additional constructor parameter. This value type may be retrieved through read-only property ValueType.
          • IMapperRegistry: The value type parameter was removed from all default methods taking NodeDpKey, EdgeDpKey or ILabelLayoutDpKey.
          • MoveViewportInputMode: The properties that controlled the inertia behavior have been removed since they no longer apply to the new algorithm. Instead, the new property InertiaDuration can be used to specify the duration of the inertia scrolling.
          • GraphModelManager#HierarchicNodeNestingEnabled has been removed. Set the new HierarchicNestingPolicy property to HierarchicNestingPolicy#NONE to disable node nesting or to either HierarchicNestingPolicy#NODES or HierarchicNestingPolicy#NODES_AND_EDGES to use nesting. Similarly, GraphModelManager#HierarchicEdgeNestingEnabled has been removed. Use either HierarchicNestingPolicy#NODES_AND_EDGES to enable edge nesting or any other policy to disable it.
          • The method CanvasComponent#animateScrollTo has been removed and is superseded by the new #zoomToAnimated methods.
          • The property SliderEdgeLabelLayoutModel#AutoFlipping has been renamed to #AutoFlippingEnabled.
          • The property TableLayoutConfigurator#Compaction has been renamed to #CompactionEnabled.
          • The property GraphPartitionManager#FiringGraphEventsEnabled has been removed.
          • The overloads of ValueSerializer#getSerializerFor taking no context have been removed.
          • The class com.yworks.yfiles.layout.hierarchic.GroupingSupport has been removed.

          Changes of Default Behavior

          • The IGraph#setNodeLayout method and the various methods to create a node now throw an IllegalArgumentException if the layout rectangle contains one or more NaN values. Similarly, the IGraph#setBendLocation and the various methods to add a bend to an edge now throw an IllegalArgumentException if the location point contains one or two NaN values.
          • By default, stripe labels that are programmatically selected or highlighted don't show a selection or highlight indicator anymore.
          • Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time. Previously, the duration depended on the initial inertia velocity.
          • GraphML: Duplicate properties on XAML input are now considered an error in accordance with the XAML specification.
          • The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. This can result in a slightly different rendering of the arrows.
          • The CreateEdgeInputMode#DummyEdge property is now always reset after the edge creation was finished or canceled.
          • RectD#isFinite and SizeD#isFinite now also consider empty instances as not finite.
          • MoveLabelInputMode: The moved label now is visualized as a preview instead of a symbolic rectangle. Set the Visualization property to Visualization#GHOST to restore the old mode.
          • The LayoutExecutor#ContentRectUpdatingEnabled property is now enabled by default.
          • CreateEdgeInputMode: The determination whether the mouse hovers over a valid end has changed. If ForcingSnapToCandidateEnabled is disabled, the EndHitTestable now is queried first and a target port candidate is only searched if the hit testable returns true. Previously, the hit testable was only queried if no target port candidate was found at the current location.
          • Previously, even if the GraphModelManager#UsingHierarchicEdgeNestingEnabled property was set to true, canvas objects for edges were added to the GraphModelManager#EdgeGroup as long as no group nodes were part of the graph. The corresponding new HierarchicNestingPolicy NODES_AND_EDGES has no such behavior and thus, EdgeGroup is empty by default. Use one of the other polices if canvas objects for edges should be part of EdgeGroup.
          • PolylineEdgeStyle defaults to an improved smoothing algorithm when using the SmoothingLength property. This is especially apparent when using large values for SmoothingLength.
          • The method CollapsibleNodeStyleDecorator#createSelectionInstaller has been removed.
          • ClickInputMode now dispatches the more specific events LeftClicked, RightClicked, LeftDoubleClicked and RightDoubleClicked before the general Clicked and DoubleClicked events. Hence, Clicked and DoubleClicked will only be triggered if the event wasn't handled before.

          Deprecated

          yFiles for Java (Swing) 3.1.0.1

          Improvements

          Demos

          • Added new demos:
            • The GraphEvents demo can be used to explore the different kinds of events dispatched by yFiles for Java.
            • The IsometricDrawing demo displays graphs in an isometric fashion to create an impression of a 3-dimensional view.
            • The EdgeBundling demo shows how to reduce visual clutter through edge bundling.
            • The Uml demo shows interactive creation and editing of UML class diagrams.
          • PDFImageExportDemo, SVGImageExportDemo and SVGNodeStyleDemo: Made the build scripts Java 9 ready.

          Viewer

          • Improved general rendering performance, which especially affects large graphs dramatically.
          • GridVisualCreator now respects the clip of the render context passed to its #createVisual and #updateVisual methods.
          • IArrow#CIRCLE now uses a real circle for rendering.
          • Removed unusable SnapLine resource keys from CanvasComponent's client properties.

          Bugfixes

          Viewer

          • GraphEditorInputMode and GraphViewerInputMode no longer ignore changes to the sub-input modes exposed as properties after having been installed once.
          • Fixed a bug in CanvasComponent that moved the viewpoint too much when changing the zoom property.
          • Fixed a bug in GraphML serialization that always looked for singletons on classes that were annotated with @GraphML even if the GraphML#singletonContainers property was not set.
          • TextEditorInputMode: The size calculation for the editing #TextArea was fixed to respect all properties of the #TextArea.
          • TextEditorInputMode: Using ENTER as #LineBreakRecognizer no longer results in two new lines each time ENTER is pressed.
          • Fixed a bug that might occur when changing wrapped styles in CollapsibleNodeStyleDecorator, ShadowNodeStyleDecorator, FixedShapeShadowNodeStyleDecorator and NodeStylePortStyleAdapter.
          • DefaultLabelStyle: Fixed line breaks when text wrapping is enabled.
          • Added missing Obfuscation annotation for DashStyle constants.
          • Fixed serialization of shared collection resources.
          • Fixed parsing of font style constants of GraphML files written with yFiles for Java 3.0.
          • DefaultLabelStyle: Fixed #updateVisual to take all style properties into account when determining whether or not the visualization has to be re-created.
          • AbstractJComponentStyle: Fixed a bug that prevented serialization of the #ContextLookup property after obfuscating the library.
          • XmlWriter: Fixed JDK 9 only additional, undesired whitespace when writing CData nodes.
          • Several context implementations throughout the library now use the correct value in world coordinates for the HitTestRadius property instead of view coordinates:
          • InteriorStretchLabelModel#getMinimumNodeSize now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width.
          • The NodeStyleStripeStyleAdapter#updateVisual method always created a new visual by delegating to the #createVisual method.
          • Mouse wheel zoom during an input gesture no longer results in incorrect coordinates for the subsequently dispatched mouse event.
          • Switching the GraphComponent's #InputMode in a key event handler no longer throws an exception.
          • MapperRegistry#addMapper no longer throws an exception when trying to replace a mapper for an existing key.
          • Labels with NinePositionsEdgeLabelModel now disappear when the owner edge has no visible edge path. This can happen for example when nodes are moved onto each other. Previously they appeared at unexpected locations, including the origin (0,0) and the upper left corner of the source node.
          • GeneralPath#getTangent now returns null if there is no tangent at the requested position. Previously, it returned a bogus tangent.
          • FreeLabelModel#INSTANCE, FreeEdgeLabelModel#INSTANCE, and FreeNodeLabelModel#INSTANCE are now serialized correctly to GraphML when not used as part of their parameters (e.g. within CompositeLabelModel).
          • Fixed an unnecessary exception in IGraph#calculateLabelPreferredSize which was thrown when the label owner was not part of the graph, but all optional parameters have been passed anyway. In that case there was no need to fetch the appropriate LabelDefaults and thus the question of whether the owner is in the graph or not is irrelevant.
          • During reparenting, the edges at reparenting nodes were drawn below the group(s) and thus they were not visible. If reparenting was canceled, these edges stayed behind the group(s) and remained invisible.
          • CreateEdgeInputMode did not always start correctly for quick gestures on slow devices.
          • CreateEdgeInputMode did not trigger the #EdgeCreationStarted event for programmatic initialization of the edge creation gesture.
          • HandleInputMode's #CurrentHandle property could not always be obtained during the #DragFinished, #DragFinishing, #DragCanceling, and #DragCanceled events of HandleInputMode.
          • Setting CreateEdgeInputMode's #CancelRecognizer could potentially get the input mode into a broken state.
          • The ICommand#COPY command is no longer executed twice.
          • Fixed a bug in ViewportAnimation that sometimes moved the viewport a bit before the animation started.
          • Fixed an exception in DropInputMode which occurred if a drag enter was recognized while another drag action was still running.
          • CreateEdgeInputMode no longer fires gesture cancel events if it has not been started before.
          • StripeDropInputMode no longer calls #ItemCreator twice.
          • The StripeDropInputMode#ItemCreated event was not raised.
          • GeneralPath#isVisible often returned true for invisible paths.
          • UndoEngine now uses the end time of the previous undo unit for automatic bracketing instead of the start time. This improves auto-bracketing to work as intended for undo units spanning a time greater than #AutoMergeTime.

          Layout

          • Corrected an error in the Rectangle2D#contains(Rectangle2D) method. As a consequence, the results of various algorithms and automatic layouts could have been wrong.
          • PortPlacementStage: Fixed bug that caused NullPointerException when the ports of edges in the input graph were outside the node bounds.
          • BusRouter: Fixed rare NullPointerException that could be triggered if there are buses with both fixed and movable edges at the same time.
          • AbstractLabelLayout: Fixed bug that the box returned by AbstractLabelLayout#BoundingBox was not consistent with the bounding box of the oriented box (AbstractLabelLayout#OrientedBox). This was the case when the mutable oriented box instance was changed.
          • LayeredNodePlacer: Fixed bug that caused node-edge overlaps for some configurations.
          • MultiPageLayout: Fixed bug that edge type EdgeType#PROXY was never used.
          • Setting PartialLayout#EdgeRoutingStrategy to StraightLine erroneously rerouted all edges in the graph instead of just the ones that were required.
          • polyline.EdgeRouter: Fixed RuntimeException that could be triggered when the graph contained fixed edges (see EdgeRouter#SphereOfAction) with very short segments.
          • HierarchicLayout: Fixed IllegalArgumentException that could be triggered when the user specified both edge directedness (see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY) and layering constraints.
          • OrthogonalLayout: Fixed rare bug that caused node-edge overlaps.
          • HierarchicLayout and SimplexNodePlacer: Fixed rare IllegalArgumentException that could be triggered when the input graph had a partition grid and PortCandidates or PortConstraints.
          • OrganicRemoveOverlapsStage: Improved adherence to the specified maximum duration.
          • HierarchicLayout: Improved port assignment for edges incident to group nodes that are routed directly (see EdgeLayoutDescriptor#DirectGroupContentEdgeRouting). Previously, such edges were often reversed.
          • HierarchicLayout: Fixed bug that caused violation of specified PortCandidates of edges with labels with preferred placement specifier LabelPlacements#AT_SOURCE_PORT or LabelPlacements#AT_TARGET_PORT when using an orientation other than top-to-bottom.
          • SeriesParallelLayout: Fixed bug that caused misplaced edge labels for graphs containing only a single edge.
          • HierarchicLayout: Improved adherence to the specified maximum duration by applying a suitable runtime restriction to class PortCandidateOptimizer. Previously, this class didn't have any runtime restrictions.
          • OrthogonalLayout: Fixed rare bug that caused overlapping nodes.
          • OrthogonalLayout: Improved from-sketch mode (see UseSketchDrawing) in conjunction with node labels or node halos. Previously, in the presence of the mentioned elements, the layout results did not always correctly resemble the sketch drawing, even if it was a good sketch.
          • HierarchicLayout: Fixed bug that caused that property HierarchicLayout#ComponentArrangementPolicy was not correctly considered when there are undirected edges (see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY).
          • HierarchicLayout: Fixed bug that lead to edge ports lying outside the node boundaries when using the edge thickness feature (i.e. edges with thickness greater than zero, see HierarchicLayout#EDGE_THICKNESS_DPKEY) together with a (rather large) grid spacing value and the default port assignment PortAssignmentMode#DEFAULT.
          • HierarchicLayout: Fixed bug that caused unnecessarily large layer distances in case that there exist empty partition grid rows with a minimum row height.
          • HierarchicLayout with partition grid: Fixed bug that in some cases caused an IllegalArgumentException when the layout algorithm was configured to stop after the layering or sequencing phase (see HierarchicLayout#StopAfterLayeringEnabled and HierarchicLayout#StopAfterSequencingEnabled).
          • DefaultNodePlacer: Fixed bug in DefaultNodePlacer#MinimumLastSegmentLength that caused that the value of DefaultNodePlacer#MinimumFirstSegmentLength was returned.
          • TreeLayout: Fixed bug in DefaultPortAssignment that caused a memory leak.
          • TreeLayout: Fixed bug in the integrated edge labeling feature that caused that multiple edge labels were not always ordered correctly along the edge with respect to their preferred placement setting (i.e., place at source, center or target preference). For example, a source label should always come before a target label in the direction of the actual edge flow.
          • polyline.EdgeRouter: Fixed bug that sometimes caused a violation of the minimum first or last segment length if they were set to relatively large values.
          • OrthogonalLayout: Fixed rare bug that caused non-orthogonal line segments and bad edge end points.

          Incompatible Changes

          View

          yFiles for Java (Swing) 3.1

          General Improvements

          • The naming of classes, members and parameters has been reviewed and now uses more consistent and intuitive names. Please consult the Developer's Guide for a complete list of renamings.
          • Some functionality has been removed from the API to reduce its complexity and some of the functionality has been moved to different classes or packages. Again, see the Developer's Guide to get a full list of moved/removed functionality.

          Features

          Layout

          • HierarchicLayout: Added support for port grouping, see PortConstraintKeys#SOURCE_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_GROUP_ID_DPKEY. Edges are bundled at their ports, but routed independently.
          • HierarchicLayout now allows to specify the directedness of edges, see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY. This new feature enables to, for example, support mixed graphs that contain both directed and undirected edges: While for directed edges the layering step tries to find a solution where the source of an edge is placed above the target (with respect to the main layout direction), for undirected edges the direction doesn't matter and the edge may also be inserted as same-layer edge. This feature also enables to force some edges to specifically point against the main layout direction.
          • HierarchicLayout: Added support for edges with a specific thickness. Minimum distances in the layout will consider these thicknesses, see HierarchicLayout#EDGE_THICKNESS_DPKEY.
          • LabelPlacements: Added preferred placement specifiers #AT_SOURCE_PORT and #AT_TARGET_PORT for edge labels which express that the label should be placed directly at the source/target port of the edge. Currently, the specifiers are only considered by the integrated labeling of the HierarchicLayout and can be specified with property PreferredPlacementDescriptor#PlaceAlongEdge.
          • OrganicLayout now supports the detection of regular substructures in the graph (see methods #setChainSubstructureStyle(ChainSubstructureStyle), #setStarSubstructureStyle(StarSubstructureStyle), #setCycleSubstructureStyle(CycleSubstructureStyle), and #setParallelSubstructureStyle(ParallelSubstructureStyle) and applies a specific layout style to them such that they can be better recognized.
          • TreeReductionStage: Added possibility to specify a custom labeling algorithm that places labels of non-tree edges. Now, users do not need to take care of such edge labels themselves after using a tree layout algorithm on a non-tree input graph in conjunction with the reduction stage. See properties #NonTreeEdgeLabelingAlgorithm and #NonTreeEdgeLabelSelectionKey.
          • SeriesParallelLayout: Added possibility to specify a custom labeling algorithm that places labels of non-series-parallel edges. Such labels are now automatically handled. Users do not need to handle them after running the algorithm with a non-series-parallel input graph. See properties #NonSeriesParallelEdgeLabelingAlgorithm and #NonSeriesParallelEdgeLabelSelectionKey.

          Improvements

          Viewer

          • IGraph: The default methods #applyLayout(ILayoutAlgorithm) and #applyLayout(ILayoutAlgorithm, LayoutData) have been added.
          • FilteredGraphWrapper now no longer queries the node and edge predicates as often.
          • IMapperRegistry: Several overloads for the #create*Mapper methods have been added that take more specific tags but allow to omit the keyType parameter.
          • GraphComponent: Four #morphLayout convenience methods have been added that run a layout on the graph of the component and animate the results.
          • The property GraphComponent#GraphMLIOHandler has been added to set a custom GraphMLIOHandler to be used by the IO commands and convenience IO methods. Previously the lookup of the class needed to be decorated.
          • GraphComponent: The overloads #importFromGraphML(java.io.Reader), #importFromGraphML(java.io.InputStream), #exportToGraphML(java.io.OutputStream, java.net.URI) and #exportToGraphML(java.io.Writer, java.net.URI) have been added.
          • Animator: A getter for the CanvasComponent, which had been passed to the constructor, was added.
          • The types of the static #INSTANCE fields of VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, VoidPortStyle, VoidStripeStyle and VoidStripeStyleRenderer have been changed to the concrete types instead of the interface types (e.g. INodeStyle).
          • IconLabelStyle: A constructor has been added that only takes a custom renderer as argument.
          • Class DefaultPortCandidateDescriptor, which is used to visualize IPortCandidates, now provides static ResourceKey fields that are used to lookup IVisualTemplates for the different states of IPortCandidates. Custom IVisualTemplates can be used by either registering them via CanvasComponent#putClientProperty or by the new convenience method DefaultPortCandidateDescriptor#setTemplate.
          • Resizing a table row or column now respects the GraphEditorInputMode#AdjustContentRectPolicy.
          • CreateEdgeInputMode now respects the settings #SnappingBendsToSnapLinesEnabled and #SnappingBendAdjacentSegmentsEnabled on GraphSnapContext. It also handles grid snapping according to the configuration for snapping.
          • Nodes now show their target grouping hierarchy z-order during a reparenting gesture.
          • GraphMLIOHandler now has #addXamlNamespaceMapping methods for easier control of the XML namespace for certain types.
          • GraphMLIOHandler has two new events, #QueryType and #QueryName that allow for fine-grained control over XML namespace writing and parsing for certain types.
          • GraphMLIOHandler: The overloads #read(IGraph,java.io.Reader), #read(IGraph, java.io.InputStream), #write(IGraph, java.io.OutputStream, java.nio.charset.Charset, java.net.URI) and #write(IGraph, java.io.Writer, java.net.URI) have been added.
          • GraphMLParser: The overloads #parse(IGraph,Reader,IGraphElementFactory) and #parse(IGraph, InputStream, IGraphElementFactory) have been added.
          • GraphML: The performance for parsing java enums and FlagsEnums has been improved.
          • GraphML: Parsing java enums and FlagsEnums has been refactored and now respects SerializationProperties#IGNORE_PROPERTY_CASE.

          Layout

          • HierarchicLayout: Slightly reduced the number of bends when integrated edge labeling is enabled.
          • HierarchicLayout: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to orientations LayoutOrientation#LEFT_TO_RIGHT, LayoutOrientation#RIGHT_TO_LEFT and LayoutOrientation#BOTTOM_TO_TOP. Geometry information registered with data providers with keys HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY and HierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEY is now automatically rotated according to the specified layout orientation.
          • HierarchicLayout: Improved support for PortCandidates at group nodes. Previously, they were only obeyed if there was just a single candidate defined, which also applied to the opposite node (not necessarily a group node). Now, out of the given candidates, one is selected and considered for the routing. Still, fixed candidates are treated like free ones and are not supported at the side of group nodes.
          • HierarchicLayout: Routing of grouped edges that connect to nodes of different groups now assures that the whole bus segment remains outside the different group nodes. This avoids that group nodes get unnecessarily large and potentially makes drawings more symmetric.
          • HierarchicLayout: Improved edge grouping such that it is now possible to group incoming/outgoing edges as well as same-layer/backloop edges with common edges.
          • HierarchicLayout: Can now take the original edge route into account to determine the route of a self-loop.
          • MultiPageLayout: Added new option #StrictClusterSeparationEnabled that allows to specify whether or not nodes with different cluster IDs may be placed onto the same page.
          • The tree algorithms BalloonLayout, TreeLayout and AspectRatioTreeLayout now support custom selection of the root node of the tree.
          • BalloonLayout: Interleaved child placement now works in conjunction with from sketch-mode and custom child order comparators. This means that the settings #FromSketchModeEnabled and #Comparator are no longer ignored when enabling the interleaved placement mode (see #InterleavedMode).
          • TreeLayout: Now take into consideration the minimum group node size specified by the user with a IDataProvider registered with the graph with key GroupingKeys#MINIMUM_NODE_SIZE_DPKEY.
          • SeriesParallelLayout: Now takes into consideration the minimum node size specified by the user with a IDataProvider registered with the graph with key GroupingKeys#MINIMUM_NODE_SIZE_DPKEY.
          • Improved the runtime of EdgeRouter when routing edges that have PortConstraints or PortCandidates.
          • Improved the performance of OrthogonalSegmentDistributionStage and thus also ChannelEdgeRouter which by default uses the mentioned stage as edge distribution strategy.
          • ChannelRouter: Improved order of segments to avoid edge crossings when there are multiple segments that have one common end point.
          • Improved the performance of PartialLayout for input graphs that feature a high number of large subgraph components. Does not apply for component assignment strategy ComponentAssignmentStrategy#SINGLE.
          • LayoutUtilities#applyLayout now supports layout of tables.
          • ItemMapping: The property #Mapper is now automatically set on first read-access to the property, enabling more convenient use of the mapper without first having to instantiate a matching instance.
          • PartitionGridData: It is now sufficient to specify one of a row mapping or the column mapping. The unspecified one will automatically be set to 0, resulting in a single row or column being used.
          • BalloonLayoutData, HierarchicLayoutData, LabelingData, OrthogonalLayoutData, SeriesParallelLayoutData and TreeLayoutData now have an EdgeLabelPreferredPlacement property which supports an ItemMapping for edge labels to provide a PrefererredPlacementDescriptor. Can be used as alternative to mappers registered with LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEY.
          • PlanarEmbedding has been added and allows to calculate and query an embedding of a planar graph.

          Bugfixes

          Viewer

          Model
          • Fixed a bug in IGraph#addLabel that ignored an explicitly specified preferred size if folding is enabled.
          • FilteredGraphWrapper: The fail-fast mechanism to detect concurrent modification changes in the #Nodes, #Edges, #Labels and #Ports IListEnumerables didn't detect all modifications correctly.
          • Folding:
            • Fixed a bug that sometimes ignored the view state for a port on a folder node when a folding edge was created.
            • Fixed a potential exception when using folding on a filtered graph when either nodes with labels or ports, or edges with bends or labels are shown for the first time after being hidden before.
            • Fixed a bug that treated group nodes with no children als non-group nodes after they have been expanded.
            • Fixed a bug that creates folders with empty size when manually creating groups and the folding view is configured to collapse group nodes by default.
          • SandwichLabelModel: Fixed incorrect DefaultValue annotation for some created parameters.
          • SmartEdgeLabelModel: An exception was thrown if the path of the corresponding edge contained bends that were close together or at the same location.
          • NinePositionsEdgeLabelModel: Fixed the placement for the positions #SOURCE_BELOW and #TARGET_BELOW.
          Geometry
          • GeneralPath#equals does no longer check for path equivalence (same coordinates etc.), but simply checks reference equality. This makes it consistent with the #hashCode method. To check for path value equivalence, use the new method #isEquivalentTo instead.
          View
          • Fixed GraphComponent's #importFromGraphML(java.io.File) method to respect the GraphMLIOHandler's #ClearingGraphBeforeReadEnabled property. (All the other #importFromGraphML methods already did so.)
          • Label text isn't mirrored anymore if ComponentOrientation#RIGHT_TO_LEFT is set on the GraphComponent.
          • GraphOverviewComponent: Setting a new #OverviewInputMode updates now the #InputMode property accordingly.
          • Fixed a bug that might occur when changing wrapped styles in CollapsibleNodeStyleDecorator, ShadowNodeStyleDecorator, NodeStyleLabelStyleAdapter and NodeStylePortStyleAdapter.
          • Fixed a bug in GraphModelManager that didn't update the child groups if a new #ContentGroup is set.
          • Fixed a bug in GraphModelManager where #HierarchicEdgeNestingEnabled set to false was not respected when the graph changed or a group node was created first on a yet ungrouped graph.
          • Fixed some styles to call IRenderContext#childVisualRemoved after the IVisual actually has been removed instead of just before the removal.
          • Fixed a possible NullPointerException in the graph rendering code when items were removed from the graph during their style's #updateVisual method. This could happen when removing graph items from a different thread (which is still not supported, but at least this particular case won't crash anymore).
          • Fixed the maximum y-coordinate for horizontal grid lines produced by GridVisualCreator with grid style LINES.
          Input
          • All shortcuts have been adapted to the operation system conventions, e.g. shortcuts on Mac do not use the Control key anymore but the Command key as modifier instead.
          • CreateEdgeInputMode: Fixed a bug that didn't show the edge preview when the edge would be created between a node and one of its ancestors or vice versa.
          • CreateEdgeInputMode: The #EdgeCreated event triggered before the corresponding undoable edit was committed. This could result in a broken undo queue, if e.g. an animated layout was started during in the event listener. The event now triggers after the edit has been committed. With automatic undo unit merging, this should not make a difference for the end user, however from the perspective of the code there will be two subsequent edits, rather than one compound, if the code in the listener actually modifies the edge.
          • CreateEdgeInputMode: Fixed a bug that broke the edge preview after the input mode was uninstalled and reinstalled again.
          • Fixed a bug in bend creation for orthogonal edges when grid snapping was enabled.
          • A bug in orthogonal edge editing was fixed where an edge could become non-orthogonal when a non-selected bend was moved.
          • Fixed an issue with orthogonal edge editing where canceling moving a port or node would add bends to otherwise straight edge segments.
          • Self-loops with same source and target location are now treated as orthogonal.
          • When dragging an unselected bend and canceling the gesture by pressing ESC, the dragged bend was removed.
          • Fixed a bug that prevented individually disabling certain grouping commands.
          • OverviewInputMode: Fixed a bug that could break the overview visualization if the overview has a specific very small width or height.
          • StripeDropInputMode: Fixed a bug that could result in nodes being moved to a wrong stripe when a new stripe was created or an existing one relocated.
          • NodeDropInputMode: Fixed a possible exception when snapping is enabled, but preview disabled.
          • When a node and its parent group node were both selected and moved with the SHIFT key held down the node was erroneously reparented to the root.
          • Fixed reparent highlighting when multiple nodes are reparented together.
          • Fixed an issue where the parameter finder for FreeEdgeLabelModel cannot place the label correctly for self-loops. Labels previously always appeared at the port location in this case.
          • Hiding INodeSnapResultProvider or IBendSnapResultProvider from the lookup no longer leads to a crash when nodes or bends are moved.
          • Fixed an issue where ICommand#EDIT_LABEL would not work directly on labels when a TableEditorInputMode is active.
          Styles
          GraphML
          • Fixed a bug in GraphML parsing that prevented finding the annotated @GraphML#contentProperty of a class.
          • Fixed a bug in GraphML parsing that could result in an exception when parsing an empty text element.
          • Fixed a bug in GraphML serialization that ignored @GraphML annotations for static fields.
          • Fixed structured GraphML serialization of DashStyle, Pen and URL instances.
          • The ValueSerializer used for predefined Pens and IArrows now also respects the SerializationProperty#IGNORE_PROPERTY_CASE.
          • Methods GraphMLIOHandler#addRegistryOutputMapper(String,Object) and #addRegistryOutputMapper(String, String, Object, IEventListener) created multiple GraphML key definitions for the same mapper instance
          • Arrow: Added @Obfuscation annotation to exclude the class from obfuscation. Excluding Arrow from obfuscation is necessary for properly reading (and writing) GraphML files.
          • Fixed the @DefaultValue annotations for the #Pen and #Paint properties in ArcEdgeStyle, PolylineEdgeStyle, GeneralPathNodeStyle and ShapeNodeStyle.
          • Fixed GraphML (de-)serialization of ports using SegmentRatioPortLocationModel and corresponding port location parameter instances.

          Layout

          • HierarchicLayout: Fixed bug that caused a violation of the specified minimum distance or edge overlaps in the case of same-layer edges.
          • HierarchicLayout: Fixed rare bug that caused same-layer edge to cross through their source or target node, e.g., the port was at the top of the source node but the edge crossed through the source node to leave it at the bottom.
          • HierarchicLayout: Fixed bug that sometimes caused the route of back-loop edges with at least one endpoint incident to a group node to unnecessarily enter this group node.
          • HierarchicLayout: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled.
          • HierarchicLayout: Fixed bug that caused that the directedness of edges incident to groups wasn't considered correctly (see HierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY).
          • HierarchicLayout: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications.
          • RecursiveGroupLayout when used with HierarchicLayout as core layout algorithm: Fixed IllegalStateException that could be triggered when group nodes of the input graph have PortCandidates.
          • RecursiveGroupLayout: Fixed bug that caused edges to share the same port even though they should be assigned to different ports. Note that this problem only appeared if the core layout algorithm (see CoreLayout) is an instance of class HierarchicLayout.
          • SimplexNodePlacer: Fixed bug that caused overlaps between edges and nodes when enabling node compaction (see #NodeCompaction) and having edges with either strong PortConstraints or PortCandidates.
          • OrganicLayout: Fixed bug that caused group nodes with zero height/width in the layout result. The bug appeared when having empty groups, group node insets smaller than one (defined via GroupingKeys#GROUP_NODE_INSETS_DPKEY) and no minimum group node size specified (GroupingKeys#MINIMUM_NODE_SIZE_DPKEY).
          • OrganicLayout and ClassicOrganicLayout: Fixed bug that caused the algorithm to not consider the specified custom IGroupBoundsCalculator (see ClassicOrganicLayout#GroupBoundsCalculator).
          • Fixed OrganicLayout ignoring the GroupNodeMode settings.
          • OrganicLayout, ClassicOrganicLayout and InteractiveOrganicLayout: Fixed IllegalArgumentException that was triggered due to NaN values that could occur in case the input graph has a very large number of nodes.
          • CircularLayout and RadialLayout: Fixed bug that caused that always all edges are bundled if bundling is enabled for at least one single edge. More precisely, property EdgeBundleDescriptor#Bundled wasn't considered correctly.
          • CircularLayout: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled.
          • SingleCycleLayout: Fixed bug that may lead to a ClassCastException if edge bundling is enabled and a custom node sequencer is specified (see SingleCycleLayout#NodeSequencer).
          • AspectRatioTreeLayout#ROOT_PLACEMENT_DPKEY is now of type NodeDpKey<RootPlacement>.
          • AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DPKEY is now of type NodeDpKey<SubtreeArrangement>.
          • AspectRatioTreeLayoutData did not register the correct values with the graph for the root placement and the subtree routing policy.
          • MultiPageLayout: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes.
          • IsolatedGroupComponentLayout: Fixed bug that caused edge labels that intersect with group nodes even though option ComponentLayout#LabelConsiderationEnabled is enabled.
          • EdgeRouter: Fixed rare RuntimeException that appeared if there were fixed (see #Scope) and grouped edges at the same time.
          • EdgeRouter: Fixed rare IllegalArgumentException that was triggered when having multiple target port candidates, where at least one must be fixed. Furthermore, to trigger the exception it is necessary that the path search algorithm tries to perform an early exit due to maximum duration restrictions or a stop request via AbortHandler.
          • EdgeRouter: Fixed bug that caused violations of minimum first/last segment lengths of grouped edges when using different edge layout descriptors and, second, made the layout algorithm remove a user-registered IDataProvider with key EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DPKEY.
          • EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions (see EdgeLayoutDescriptor.MonotonicPathRestriction).
          • ChannelEdgeRouter: Fixed routing of self-loops that have both source and target end point at the same side of the node. Previously, when multiple such self-loops were present at the same node, the routing produced bad end points located outside of the node.
          • Groups#hierarchicalClustering(Graph,int,INodeMap,INodeDistanceProvider,Linkage): Fixed NullPointerException that occurred when the given maximum number of clusters was 0 or 1.
          • Fixed NullPointerExceptions in some LayoutData implementations that could happen if some of the mappings where accessed but were never really used in client code.
          • Fixed a bug in TableLayoutConfigurator which altered the size of a column or row if an edge routing algorithm has been applied.
          • Fixed a bug in TableLayoutConfigurator which sometimes used the wrong table insets.
          • LayoutGraphAdapter/CopiedLayoutIGraph: IMappers which use ILabels as key and boolean, int or double as value are now correctly translated into data providers for layout algorithms.
          • Fixed a bug that a dataprovider with key LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEY that has been filled by a LayoutData has been ignored.

          Incompatible Changes

          Viewer

          Model
          • IGraph: The signature of method #addBend(IEdge, int, PointD) has been changed to #addBend(IEdge, PointD, int).
          • IMapperRegistry: Renamed the methods #add* to #create*. The type of property #MapperMetadata has been changed from IMapperMetadata to MapperMetadata.
          • DefaultGraph and AbstractGraphWrapper: The signature of method #addBend(IEdge, int, PointD) has been changed to #addBend(IEdge, PointD, int).
          • FoldingEdgeState: The signature of method #addBend(int, PointD) has been changed to #addBend(PointD, int).
          Geometry
          View
          Input
          Styles
          GraphML

          Algorithms

          • The following classes have been deprecated: GraphEvent, IGraphListener, Maps.HighPerformanceIntMap and Maps.HighPerformanceDoubleMap.
          • YList: The constructor YList(Collection<Object>) has been changed to YList(Collection<Iterable>). Method #remove(int) has been deprecated.
          • Comparators: Method #compare(int, int) has been deprecated.
          • Graph: Methods #addGraphListener(IGraphListener), #edgeObjects(), #getSource(Object), #getTarget(Object), #nodeObjects(), #removeGraphListener(IGraphListener), #firePostEvent() and #firePreEvent() have been deprecated.

          Layout

          • ClassicOrganicLayout: The return type of method property #PreferredEdgeLength has been changed from int to double. Note that this also induces a corresponding change in class OrganicLayoutData.
          • OrganicLayout and ClassicOrganicLayout: The type of constant #PREFERRED_EDGE_LENGTH_DPKEY has been changed from EdgeDpKey<Integer> to EdgeDpKey<Double>.
          • LayoutGraph: Methods #getEdgeLabelLayout(Object), #getEdgeLayout(Object), #getNodeLabelLayout(Object) and #getNodeLayout(Object) have been deprecated.
          • HierarchicLayoutCore.IncrementalHint has been deprecated. Method INodeData#getIncrementalHint() now returns Object.
          • LayoutGraphAdapter: The type of the provided data provider keys have been changed from Object to a more specific type.
          • PartitionCellId: The return type of property #Cells has been changed from Collection<Object> to Iterable<Cell>.
          • HierarchicLayout:
            • The edge grouping now supports to group incoming and outgoing edges of a node. In previous versions incoming and outgoing edges always defined separate groups even though the user specified the same group IDs for such edges.
            • Method #isIntegratedEdgeLabelingEnabled does now always return false if the labeling algorithm is disabled (see MultiStageLayout#isLabelingEnabled. In previous versions it was only required that an appropriate labeling algorithm was specified, but it was not necessary that it is enabled. Therefore, the integrated labeling state queried from the property might not have corresponded to what the layout algorithm actually did. The same behavior change applies for the following methods:
              • HierarchicLayout#isNodeLabelConsiderationEnabled
              • OrthogonalLayout#isIntegratedEdgeLabelingEnabled
              • OrthogonalLayout#isNodeLabelConsiderationEnabled
            • HierarchicLayout may now place source/target labels in layers that contain common nodes. In previous versions such labels were always placed in separate layers which often led to less compact drawings with superfluous bends.
            • Geometry information registered with data providers with keys #ALTERNATIVE_GROUP_BOUNDS_DP_KEY and #ALTERNATIVE_EDGE_PATH_DP_KEY is now automatically rotated according to the specified layout orientation. This fixes unstable from-sketch behavior in incremental layout mode when using an orientation other than top-to-bottom. User that
          • OrganicLayout does no longer resize empty group nodes, possible ignoring a minimum group node size for them (see GroupingKeys#MINIMUM_NODE_SIZE_DPKEY). The behavior with respect to empty group nodes is now in line with the behavior of other common layout algorithms.
          • Method Centrality#closenessCentrality now sets the closeness of a node to Infinity if the sum of the shortest path distances is 0. Before, it was set to NaN in such cases.
          • Groups.Dendrogram does no longer extend class Graph. To enable convenient iteration of a dendrogram, method #getChildren(Node) was added.
          • SingleCycleLayout: Property #NodeSequencer now allows to specify null to return to the default sequencer. In previous versions, specifying null leads to an IllegalStateException.

          Demo Improvements

          • The package structure of the source code demos has been changed to a more intuitive structure.
          • The Viewer distribution now provides several source code demos.
          • The layout code in the BPMN demo was simplified and is now easier to adjust
          • A new demo application that shows how to configure hierarchic layout for arranging Sankey diagrams was added.
          • The new GraphMLCompatibilityDemo that shows how to load GraphML files created by yFiles for Java 3.0.x was added.

          yFiles for Java (Swing) 3.0.0.4

          Improvements

          Demos

          Bugfixes

          Viewer

          • Folding: Fixed a bug in the folding mechanism that could lead to an endless loop when loading a GraphML file containing FoldingEdgeState information.
          • PathBasedEdgeStyleRenderer: Fixed bug that could leave visual artifacts when switching to an arrow that returned a null visual.
          • CanvasComponent: Fixed a bug in the mouse wheel scroll behavior that moved the viewport in the wrong direction when scrolling page-wise vertically.

          Layout

          • Fixed java.lang.IllegalArgumentException: Comparison method violates its general contract! problems caused by calling java.util.Arrays.sort for java.util.Comparator implementations that do not imply a total order.
          • HierarchicLayout: Fixed bug that caused a violation of the minimum first/last segment length for reversed/backloop edges which connect to group nodes.
          • HierarchicLayout: Fixed rare bug that may cause overlaps between labels and segments of edges with octilinear routes.
          • HierarchicLayout: Fixed possible infinite loop if there are critical edges (see CRITICAL_EDGE_DP_KEY).
          • TreeLayout: Fixed possible group node overlaps in conjunction with some node placers, for example AssistantNodePlacer.
          • TreeLayout: Fixed bug that caused less compact layout results when using node halos (see NodeHalo).
          • OrganicLayout: The type of the dataprovider key GROUP_NODE_MODE_DPKEY was fixed from NodeDpKey<Object> to NodeDpKey<GroupNodeMode>.
          • OrganicLayoutData: The type of the property GroupNodeModes was fixed from ItemMapping<Node, GroupNodeMode> to ItemMapping<INode, GroupNodeMode>.

          yFiles for Java (Swing) 3.0.0.3

          Bugfixes

          Viewer

          • Folding: when using a MergingFoldingEdgeConverter the FoldingEdgeState representing multiple edges could become inconsistent after removing or reconnecting some of the edges.
          • Path Cropping: fixed a certain case where inaccurate numeric results with ports on node shape outlines would result in the first or last edge segment being completely removed.
          • DefaultEdgePathCropper: fixed an issue where getIntersection would not be called when cropping an edge at the source end.
          • IInputModeContext: fixed a bug in getGraph that could cause a stack overflow.
          • Edge Creation: fixed bug that could cause a 'Node not in this graph' exception during interactive edge creation.
          • PopupMenuInputMode: moved the default popup menu location one pixel to the right and one pixel down to prevent the mouse cursor from being positioned directly on the popup menu's border. (Mouse clicks on the popup menu's border do neither close the popup menu nor trigger any of the popup menu's entries.)

          Layout

          yFiles for Java (Swing) 3.0.0.2

          Improvements

          Documentation

          • The Developer's Guide has been completely revised. Now it consists of two parts: The first part covers the basics of yFiles for Java, while the second part describes in detail how the behavior of the library can be adapted to the customer's requirements.

          Viewer

          Bugfixes

          Viewer

          Layout

          • HierarchicLayout: Fixed NullPointerException that could happen in AsIsSequencer when incremental group hints are defined (see IncrementalHintsFactory.createIncrementalGroupHint) along with specific port constraints on edges incident to an incremental group node.
          • HierarchicLayout: Improved result if compact label placement is enabled (which is the default), see SimplexNodePlacer.LabelCompaction. In previous versions the labels may have been placed in a stacked style even if this did not make the result more compact (e.g. if all labels are placed to the right of the edges).
          • GraphPartitionManager: Fixed functionality to hide edges when using methods GraphPartitionManager.hide. Previously, edges were actually not hidden from the graph.
          • HierarchicLayout: Fixed distance between vertical (in a top-to-bottom layout) segments of same layer edges that connect to group nodes. This also applies to self-loops that connect to the top or bottom of a group node with both ends as well as same layer parts of other edges like back-loops.
          • HierarchicLayout: Fixed bug that caused the minimum edge-to-edge distance to be violated by edges with strong port constraints that cross each other.

          Demos

          • BPMNEditorDemo: Fixed positioning of the dynamic substate button of activity and choreography nodes.
          • Fixed invalid HTML structure of demo readmes.

          yFiles for Java (Swing) 3.0.0.1

          Demos and Tutorials

          • Added new demo layout.LayoutStylesDemo that presents all major layout algorithms in an easily explorable and configurable manner.
          • Added new demo viewer.svgimageexport.SVGImageExportDemo that shows how to export the contents of a GraphComponent to SVG.
          • Added new demo viewer.pdfimageexport.PDFImageExportDemo that shows how to export the contents of a GraphComponent to PDF, EPS and EMF.
          • Added new demo viewer.svgnodestyle.SVGNodeStyleDemo that shows how to use SVG for node visualization.
          • Added new demo bpmn.editor.BPMNEditorDemo with corresponding graph element styles and a customized layout algorithm that demonstrates how to use yFiles for BPMN applications
          • GraphViewerDemo: Shift click on a node in the movie graph opens now a related link in the default browser (as already stated by the graph's description).

          Improvements

          Viewer

          Documentation Viewer

          • Method parameters are shown in search results and quick navigation popups.
          • Default properties are listed in a separate member section.
          • The documentation viewer can be used offline by running bower install and opening index-offline.html.
          • Fixed links to package documentation pages.

          Bugfixes

          Viewer

          Layout

          Incompatible Changes

          Changes in Default Behavior

          Viewer
          • FlagsEnum members now respect GraphML annotations for renaming. Such members can't be read back in prior versions of the library. Reading older files with the current version still works.

          yFiles for Java (Swing) 3.0

          This is the initial release of the 3.0 series that brings a modernized API, many new or improved library features and support for current Java language features.

          Please see the Developer's Guide for migration instructions from yFiles for Java 2.x