yFiles for Java (Swing) 3.2 - Changes Since 3.1.0.1

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 properties HierarchicNodeNestingEnabled and HierarchicEdgeNestingEnabled are superseded by the new HierarchicNestingPolicy property. This property has the enum type HierarchicNestingPolicy.

The new option HierarchicNestingPolicy#GROUP_NODES configures GraphModelManager to visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth.

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.

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.

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.

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 new properties ClickableItems and ClickableRegions determine for which items and regions a click event will be raised.

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:

CreateEdgeInputMode now releases the mutex before dispatching the EdgeCreated event.

MoveInputMode now releases the mutex before dispatching the DragFinished event.

ResizeStripeInputMode now releases the mutex before dispatching the DragFinished 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

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:

PartitionGridData now reuses the PartitionGrid created by the TableLayoutConfigurator.

Several methods have been added to TableLayoutConfigurator which provide access to the PartitionCellId assignment of the configurator as well as the mappings between IRow/IColumn and RowDescriptor/ColumnDescriptor.

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

A new LargeGraphsDemo has been added that shows some strategies how to keep a smooth UI when large graphs shall be visualized.

The new GraphBuilderDemo and InteractiveNodesGraphBuilderDemo have been added that demonstrate basic usage of yFiles' new GraphBuilder classes.

A new CustomPortModelDemo has been added that shows how to create and use a custom IPortLocationModel.

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.

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

The SmartEdgeLabelModel#findBestParameter method returned a parameter that was centered on the edge even if the desired label layout overlapped only a little bit with an edge segment or was directly aside of one.

The graph of an IFoldingView now raises the NodeCreated, EdgeCreated, PortAdded, LabelAdded, and BendAdded events after the created element is registered. This fixes a bug where the master item of the created item was not available in handlers for these events.

Table: The methods setLabelText, remove, setLabelPreferredSize and setLabelLayoutParameter now throw an IllegalArgumentException instead of an InvalidStateException.

DefaultGraph now calls the onRemovingEdge and onRemovingPort methods before their incident items are removed.

When a stripe is removed, ITable#LabelRemoved events for the implicitly removed associated labels are now raised, too.

The implementations of IStripeHitTestHelper and IBoundsProvider in the lookup of an IStripe could neither be decorated nor overridden by the context lookup provided by a stripe style.

The INodeInsetsProvider implementations which can be retrieved from InteriorLabelModel and InteriorStretchLabelModel now correctly sum up the space required by overlapping labels.

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.

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:

The context created by ICanvasContext#create when passing a CanvasComponent but no hit test radius.

The context passed to IDisposeVisualCallback.

The context passed to IPositionHandlers by MoveInputMode.

The context passed to adjacent handles when moving a bend handle.

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.

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.

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:

UpdateXyzVisualization to UpdateXyzGhost.

UpdateTargetVisualizationBounds to UpdateTargetGhostBounds.

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 GraphEditorInputMode#createMoveUnselectedInputMode method has been removed. Use the property MoveUnselectedInputMode instead.

The booleanCreateEdgeInputMode#PortCandidateShowingEnabled property has been replaced by the CreateEdgeInputMode#ShowPortCandidates property which has the enum type ShowPortCandidates.

The booleanOverviewInputMode#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 HierarchicNestingPolicyNODES_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

The properties LayerConstraintFactory and SequenceConstraintFactory of HierarchicLayoutData have been marked as deprecated. The new properties LayerConstraints and SequenceConstraints should be used instead. Similarly, the factory methods LayoutUtilities#createLayerConstraintFactory(IGraph) and LayoutUtilities#createSequenceConstraintFactory(IGraph) have been marked as @Deprecated.

PartitionGrid#hasAtLeastTwoNonEmptyRows has been marked as @Deprecated and may be removed in future releases.