Release notesyFiles for JavaFX
yFiles for JavaFX 3.6
The newest major release of yFiles for JavaFX is version 3.6
.
Below, find a list of all the new features and improvements, along with the incompatibility changes.
The latest bugfix release of yFiles for JavaFX is version 3.6.0.1.
See the change log for a list of all changes of this and all other versions.
What to expect on this page
Technical Requirements
- Oracle JDK 1.8 (8u40) or higher is needed for software development with yFiles for JavaFX.
- Oracle JRE 1.8 (8u40) or higher is needed to execute programs using yFiles for JavaFX.
- A browser to view the HTML documentation.
All changes Since version 3.5
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 JavaFX, have a look at the list of incompatible changes.
Major new features
- New styles for graph items
-
The
RectangleNodeStyleclass 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
GroupNodeStyleclass 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 newGroupNodeLabelModelis tailored to place labels in the tab or tab background of aGroupNodeStyle.The new
ArrowNodeStyleclass 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
ArrowEdgeStyleclass 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
DefaultLabelStyleclass now supports different common background shapes.The
ShapeNodeStyleclass 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), andPILL(a stadium shape with the shorter sides rounded).Its new property
KeepingIntrinsicAspectRatioEnableddefines whether to keep the intrinsic aspect ratio of the shape.The new
BridgeEdgeStyleclass 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
DefaultLabelStylenow wraps the text inside a given shape instead of just the rectangular label bounds. TheTextWrappingShapeenum provides the predefined shapes, and includes for example pill, ellipse, and hexagon. The newDefaultLabelStyle.TextWrappingPaddingproperty defines the padding between the chosen shape and the text.If the predefined shapes don't fit your needs, you can override the
DefaultLabelStyleRenderer.getTextWrappingOutlinemethod to return any custom convex path asGeneralPathinstead. - Compact disk layout
-
The new
CompactDiskLayoutclass 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
CompactDiskLayoutDataallows to specify custom data considered during the layout calculation. - Cactus group layout
-
The new
CactusGroupLayoutclass 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
CactusGroupLayoutDataallows to specify custom data considered during the layout calculation.
New Features
View
-
The new class
PortLocationModelParameterSerializerprovides static helper methods which can convert the built-inIPortLocationModelParameterimplementations into key-value pairs. It also supports creatingIPortLocationModelParameterinstances from these key-value pairs. -
Added the new property
AspectRatioto theGeneralPathNodeStylewhich defines the aspect ratio of the path. -
The new property
CanvasControl#MouseWheelZoomEventRecognizercan be used to set the modifier for distinguishing between mouse wheel scrolling and zooming. -
The new class
LabelModelParameterSerializerprovides static helper methods which can convert the built-inILabelModelParameterimplementations into key-value pairs. It also supports creatingILabelModelParameterinstances from these key-value pairs. -
The methods
getNodesRevealedAfterExpand,getEdgesChangedAfterExpand, andgetEdgesChangedAfterCollapsehave been added toFoldingManager. They can be used to retrieve information about folding states that would be used when a specified group node would be expanded or collapsed.
Interaction
-
Handles can now react to mouse clicks and touch tap events. The
handleClickmethod has been added to theIHandleinterface and is called whenHandleInputMode#ClickedRecognizerorHandleInputMode#ClickedRecognizerTouchwas triggered on a targeted handle. To customize the general handle click handling, theClickedevent can be listened to or the methodHandleInputMode#handleClickcan be overridden.
Hierarchic Layout
-
The
HierarchicLayoutclass 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). PropertyHierarchicLayoutData#TabularGroupsallows to mark groups as "tabular" and propertyHierarchicLayoutData#TabularGroupChildComparatorsto specify a custom order for the children.
Organic Layout
-
The
OrganicLayoutclass now offers the possibility to define a group substructure scope, see propertyGroupSubstructureScope. 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
ClusterAsGroupStructureAllowedallows to specify whether or not detected clusters (see propertyClusteringPolicy) are taken into account as group substructures. -
The
OrganicLayoutclass now offers two newChainSubstructureStylescalledDISKandDISK_NESTEDthat lead to a compact disk-like layout for chains. -
The
OrganicLayoutclass now offers the possibility to define tree substructures (stars, chains, cycles and parallel structures are already supported). TheOrganicLayout#TreeSubstructureStyleproperty specifies the style of tree substructures and theOrganicLayout#TreeSubstructureSizeproperty specifies their minimum size (structures of smaller size are not handled as a tree substructure).
Balloon Layout
-
The
BalloonLayoutclass 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 theBalloonLayoutData#NodeTypesproperty.
Radial Layout
-
The
RadialLayoutnow supports a new layering strategy that produces a circular dendrogram drawing. -
The
RadialLayoutnow 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
RadialLayoutnow 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
CircularLayoutnow 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
CircularLayoutclass now supports curved edge routing within and between circles.
Analysis
-
Added the new
RankAssignmentanalysis algorithm class that solves the rank assignment problem on an acyclic graph using the simplex method. -
The new analysis class
Intersectionsfinds intersections and overlaps between graph items, featuring flexible configuration options to find only specific intersections. The respectivecom.yworks.yfiles.layout.Intersectionsclass provides the functionality also for theLayoutGraphAPI, 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
-
GraphClipboardnow respects thePasteDeltavalue when pasting items without owner (e.g. edges without selected source or target node). -
ModelManagerand its derived classesHighlightIndicatorManager,SelectionIndicatorManager, andFocusIndicatorManagernow haveinstallanduninstallmethods for properly allocating and freeing resources when setting or removing a manager to aCanvasControl. -
GraphModelManager: the propertiesNodeManager,EdgeManager,PortManager,EdgeLabelManager,NodeLabelManager,PortLabelManager, andProvideUserObjectOnMainCanvasObjecthave been made public.
Interaction
- Pinch-zooming with two fingers now works a lot more reliably when the frame rate is low due to complex and large graphs.
- Touch move events are now guaranteed to be raised up to the location where a touch up event happens.
-
The
MoveViewportInputMode#uninstallmethod is now virtual and can be overridden in derived classes. -
Input modes now listen for the
Touch2DLostCaptureevent of the associated control, so that this event can be correctly detected in the 'recognizer' properties of an input mode. - The behavior of the inertia during touch inputs has been improved.
-
A
SizeConstraintProviderproperty was added toNodeReshapeHandleProviderandNodeReshapeHandlerHandlethat is queried during node resize gestures if no explicitMinimumSize,MaximumSizeorMinimumEnclosedAreais set. - The input modes don't perform hit tests upon auto-repeated key down events for modifier keys anymore.
-
The new
MoveViewportInputMode#SinglePointerMovementAllowedproperty can be used to disable moving the viewport with a single touch pointer. Disabling this property is especially useful for apps that allow editing since then, other gestures like moving items or creating edges can be configured to start without a long press. - Cursor property changes of active input modes are now immediately reflected in the application's mouse cursor. Previously, the application mouse cursor might have been updated only after the next mouse event.
-
The new
MoveInputMode#ValidBeginCursorproperty offers the possibility to use different cursors for signaling a valid position for beginning a move operation and actually moving items. -
The
ResizeStripeInputModeclass now offers the possibility to customize the cursors for signaling a valid position for beginning a resize operation as well as actually resizing columns or rows. -
The
ResizeStripeInputModeclass now offers properties to set an invalid end cursor for column and row resize. The invalid end cursor is shown during resize operations if the column or row in question cannot be resized to the current mouse position. -
The properties
ValidBeginRecognizerandValidBeginCursorhave been added toLassoSelectionInputMode,MarqueeSelectionInputMode, andMoveViewportInputMode. TheValidBeginRecognizercan be used to indicate whether the selection respectively move viewport gesture may begin in which case theValidBeginCursoris used. -
The property
MouseHoverInputMode#ValidHoverLocationCursorhas been added that is used when theValidHoverLocationHitTestablereturns true for a location. -
The property
ContextMenuInputMode#ValidMenuLocationCursorhas been added that is used when theValidMenuLocationHitTestablereturns true for a location. -
IReparentNodeHandler#isValidParentis now also called withnullas new parent during the drag gesture if no real parent node has been tested for the location. -
Keyboard navigation with
NavigationInputModenow always considers the current item to navigate from, regardless of the value of theNavigableItemsproperty. -
The
GraphClipboardnow raises the eventsElementsCutting,ElementsCopying,ElementsPasting, andElementsDuplicatingat the very beginning of thecut,copy,paste, andduplicatemethods. -
GraphEditorInputModenow raises theGroupingSelectionandGroupedSelectionevents at the start and end of thegroupSelectionmethod. Similarly, theUngroupingSelectionandUngroupedSelectionevents are raised at the start and end ofungroupSelectionmethod. -
The new
CreateEdgeInputMode#SourceNodeDraggingCursorproperty offers the possibility to customize the cursor that is shown while the mouse is still over the source node after starting the edge creation. -
Changes to
ItemHoverInputMode'sHoverCursorproperty now take effect immediately if the mouse pointer is currently hovering over an item. -
The
TextEditorInputModenow releases the mutex before dispatching theTextEditedevent.
Styles
-
The
Pen#DashStyleproperty is now marked as@Nonnull, since several internal usages assumed that to be the case anyway. In addition, the documentation of theDashStyle#Dashesproperty now clarifies that both an empty collection andnullresult in a solidPen. -
Added a new property
KeepingAspectRatioEnabledtoImageNodeStyleandMemoryImageNodeStyleto support keeping the image's aspect ratio during resizes. -
Nodes rendered with the
ShapeNodeStylenow respect their actual outline shape when selected with theLassoSelectionInputMode.
GraphBuilder
-
GraphBuildernow offers simplified access to a node/edge that has been created with a given ID or data item or accessing the data a node/edge has been created for via the new methodsgetNodeById,getNodeForItem,getDataItem(INode),getEdgeById,getEdgeForItem, andgetDataItem(IEdge). -
TreeBuilderandAdjacencyGraphBuildernow offer simplified access to a node that has been created with a given ID or data item or accessing the data a node/edge has been created for via the new methodsgetNodeById,getNodeForItem,getDataItem(INode), andgetDataItem(IEdge).
Hierarchic Layout
-
The
HierarchicLayoutclass now allows to combine theSimplexNodePlacer#StraightenEdgesandSimplexNodePlacer#BarycenterModeproperties. Previously, edge straightening was not supported in barycenter mode. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass 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
PartitionGridstructure, theHierarchicLayoutclass now correctly considers the layering produced by theFromScratchLayererif it is already compatible with the specified grid structure. Previously, for such cases, the algorithm may have calculated an entirely different layer assignment. -
The
HierarchicLayoutclass now considers the flow direction to place the ports of port groups when combined with direct group content edges. -
The
HierarchicLayoutclass comes with an improved support for subcomponent layouts (seeHierarchicLayoutData#Subcomponents). Defining subcomponents now works by assigning instances of the newSubcomponentDescriptorclass 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 policiesSubcomponentPlacementPolicy#AlwaysIntegratedorSubcomponentPlacementPolicy#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
HierarchicLayoutclass now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (propertyHierarchicLayout#RecursiveGroupLayering). Previously, such constraints were ignored in that case. -
The
HierarchicLayoutclass now uses a more compact layer placement for graphs with edge labels between layers. -
The
HierarchicLayoutclass now requires fewer bends for some inputs with grouped edges and port constraints or port candidates.
Organic Layout
-
The
OrganicLayoutclass 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
OrganicLayoutclass now allows to specify custom node clusters by setting theClusteringPolicyproperty toClusteringPolicy#USER_DEFINED. The custom cluster IDs have to be specified by means of theOrganicLayoutData#ClusterIdsproperty.
Circular Layout
-
The
CircularLayoutclass now supports node types (seeCircularLayoutData#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
CircularLayoutclass has received a faster algorithm for calculating edge bundles.
Tree Layout
-
Root Alignment in
GenericTreeLayoutcan also factor in the port position to straighten out an edge. -
The
TreeLayoutclass now also supports integrated edge labeling for configurations that use aLayeredNodePlacer.
Edge Router
-
The
EdgeRouterclass now produces better results for some setups with monotonic path restrictions and edges with vertically/horizontally overlapping endpoints. -
The
EdgeRouterclass 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 propertyPenaltySettings#PortCrossingPenaltyallows to specify the cost of such crossings. -
The
EdgeRouterclass now supports buses that include self-loops (see classBusDescriptor). 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
- Improved the initialization time and memory consumption of layout animations.
-
The
TemporaryGroupNodeInsertionStageclass now automatically marks inserted group nodes with anIDataProviderregistered to the input graph with the keyINSERTED_GROUP_NODE_DPKEY. -
The
TemporaryGroupNodeInsertionStageclass now also supports specifying hierarchically nested temporary groups. Therefore, the newTemporaryGroupDescriptorclass has been added.
Analysis
-
The
TraversalDirectionenumeration used by theNeighborhoodandBfsalgorithms has been extended. The enum valueUNDIRECTEDhas been added that ignores the edge direction and corresponds semantically with the previous valueBOTH. The semantic ofBOTHhas been adjusted to indeed return the union of theSUCCESSORand thePREDECESSORresults. To keep the default behavior of theNeighborhoodandBfsalgorithms, the default value of theirTraversalDirectionproperty has been changed fromBOTHtoUNDIRECTED. -
The
GraphStructureAnalyzerclass now supports operating on a subset of the graph. -
The new
SubgraphNodesandSubgraphEdgesproperties on theReachabilityclass allow to define a subset of nodes/edges the algorithm should operate on.
Bugfixes
View
-
Combining
HierarchicNestingPolicy#GROUP_NODES,LabelLayerPolicy#AT_OWNERand undo no longer throws aNullPointerException. -
Viewport animations no longer suddenly stop when the zoom level is near
CanvasControl#MinimumZoomorMaximumZoom. - Holding down a scrollbar button no longer scrolls beyond the scrollable area indicated by this scrollbar.
-
Changing the
ICanvasObject#Groupproperty no longer triggers unnecessary recreation of the visuals anymore. -
Fixed a bug in
SelectionIndicatorManagerthat didn't callremoveSelectionwhen an item was deselected. -
Changing the
GraphControl#GraphModelManagerproperty no longer leaks memory in certain situations. -
A tooltip which is displayed at a given location by calling the
MouseHoverInputMode#showmethod is no longer immediately hidden after each mouse move. It now respects theMouseHoverSizeproperty. -
Calling
IFoldingView#collapseon a normal (i.e. non-group) node no longer creates anUndoUnitor a view state (which included an unexpected call toIFolderNodeConverter#initializeFolderNodeeven though the result would have never been used). Now callingIFoldingView#collapseon 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 oncancel. -
GroupNodeStyle's associatedINodeInsetsProvidernow correctly calculates insets for 'small' nodes, i.e. nodes whose height (or width) is less than the style'sTabHeightproperty. -
Inertia in
MoveViewportInputModeno longer stops working randomly.
Graph
-
Fixed a bug in
FilteredGraphWrapper'sNodeRemovedevent where the provided old parent might have been present in the wrapped graph but not in the filtered graph. -
The
FilteredGraphWrapperclass now raises the correct events when filtering out port labels. Previously, the events contained incorrect owner information. -
EdgePathLabelModel'sfindBestParametermethod now creates correct parameters for locations close to bends. -
NinePositionsEdgeLabelModelcenter 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. -
GroupNodeLabelModelno longer stretches tab labels and tab background labels into the collapse/expand icon of the correspondingGroupNodeStyle. -
NavigationInputMode#ExpandGroup,EnterGroup, and theEXPAND_GROUPandENTER_GROUPcommands do not create empty undo units anymore if nothing has changed. -
NavigationInputMode#ExitGroupand theEXIT_GROUPcommand now create undo units if the bounds of the exited group node were adjusted. -
GroupingSupport's methodsenlargeGroupNodeandenlargeAllGroupNodesdo not create empty undo units anymore if nothing has changed. -
EdgePathLabelModel,EdgeSegmentLabelModel, andSmartEdgeLabelModelfindBestParameterimplementations now create correct parameters for label boxes that overlap the edge's source or target node.
Interaction
-
The
HandleInputMode#handleIsHitTouchmethod now correctly uses the value of theCanvasControl#HitTestRadiusTouchproperty instead of the value of theCanvasControl#HitTestRadiusproperty for its calculations. As a result, dragging handles during touch input should be much easier. -
After pasting, a closed group node within another closed group now stays closed. Previously, it
was open due to a bug in the
GraphClipboardclass. -
The
GraphEditorInputMode#AdjustContentRectmethod now only updates theCanvasControl#ContentRectproperty once per call. Previously there have been circumstances where the property would have been updated twice unnecessarily. -
The
TableEditorInputModeclass no longer changes theGraphControl#Selectionproperty unnecessarily when theGraphControl#Graphproperty is changed. -
An instance of the
HandleInputModeclass is no longercanceledif a handle is removed during its ownDragFinishedcall. This fixes some very rare exceptions under complicated circumstances. -
Multiple
DropInputModeinstances now correctly consider their respective priorities. -
UndoEngineno longer adds an empty undo unit for an aborted operation in certain rare cases. -
Fixed an issue where changing the
GraphControl#InputModewhile the context menu is open would lead to a crash. -
Fixed a bug in
MoveViewportInputModethat caused the inertia feature to mistakenly start moving the viewport after the mouse or touch pointer has stopped before being released. -
Starting a
CanvasControl/GraphControlviewport animation now properly stops a runningMoveViewportInputModeinertia 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.
-
SmartEdgeLabelModelnow properly supports the original position snap line.
Styles
-
Cloning an
ITableinstance 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. -
TableNodeStylenow 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
BezierEdgeStyleclass and the terminating nodes have styles that do not provide an outline in theirIShapeGeometryimplementation. -
Fixed that customer CSS styling of labels breaks the preferred size calculation of the
DefaultLabelStyle. -
Setting the
Penof aShapeNodeStyleor aGeneralPathNodeStyletonullnow correctly clears the shape's stroke. -
Fixed a bug in
GeneralPathNodeStylewhere setting thePentonullon an already rendered node resulted in aNullPointerExceptionduring redraw. -
ShapeNodeStyleRenderernow always uses the protectedgetPaintandgetPenmethods for all shapes instead of falling back to the respective style properties for some shapes. -
IconLabelStyle'supdateVisualimplementation now properly updates if the style's Icon instance is changed. -
DefaultLabelStylenow adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape.
GraphML
-
The
keyparameter ofAbstractInputHandler#setValuemethod is now annotated correctly as nullable. The key may benullwhen the model item used as key is created after its data has been parsed. -
Fixed GraphML serialization and deserialization for certain configurations of
GeneralPathNodeStyle,HtmlLabelStyle, andShapeNodeStyle. -
Fixed GraphML serialization and deserialization for certain configurations of
GroupNodeStyleandRectangleNodeStyle. -
Fixed an issue in
GraphMLIOHandler'sWriteEventswhere theDataWritingevent 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 duringupdateGraph. -
Fixed a bug in
GraphBuilderwhere 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, andTreeBuilder. Some internal map entries for labels were not discarded after their owner nodes or edges were removed.
Table
-
Fixed a bug in
StretchStripeLabelModelthat was causing incorrect handling of insets.
Hierarchic Layout
-
The
SimplexNodePlacerclass used by theHierarchicLayoutno longer throws an error due to an internal overflow for very wide layouts. -
The
HierarchicLayoutclass now correctly considers the specified halos of group nodes when there is a partition grid defined. -
The
HierarchicLayoutclass 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
HierarchicLayoutclass now properly satisfiesPortCandidatesdefined for same-layer edges at nodes where other edges with (rather large) source/target port labels additionally exist. -
The
HierarchicLayoutclass now produces a correct edge grouping structure for short edges having the same source and target group ID. -
The
HierarchicLayoutclass no longer throws an exception when the edge-directedness feature (HierarchicLayoutData#EdgeDirectedness) is used in conjunction with enabled back-loop routing (HierarchicLayout#BackLoopRouting). -
The
HierarchicLayoutclass no longer creates unnecessary spacing between sub-components (seeHierarchicLayoutData#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
HierarchicLayoutclass no longer produces overlaps between (large) external node labels and unrelated edges. -
The
HierarchicLayoutclass no longer produces overlaps between sub-component elements (seeHierarchicLayoutData#SubComponents) and edges that are not part of the component. -
The
HierarchicLayoutclass now correctly assigns ports to edges incident to groups if the uniform port assignment is enabled (see propertyHierarchicLayoutData#UniformPortAssignmentGroups) for some cases where it previously did not yield a uniform port distribution. -
The
HierarchicLayoutnow correctly considers thePreferredPlacementDescriptorsettings 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
HierarchicLayoutclass now adheres more closely to its maximum duration and itsAbortHandler. -
The
HierarchicLayoutclass now considers thePortCandidatedirections correctly for layout orientations other thanTopToBottom. This also improves the optimization results withPortCandidateSets that allow multiple directions to connect to nodes. -
For input graphs with a
PartitionGridstructure, theHierarchicLayoutclass now correctly considers the layering produced by theFromScratchLayererif it is already compatible with the specified grid structure. -
The
HierarchicLayoutclass no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode. -
The results of the
DefaultLayerSequencerclass are now deterministic by default, since it no longer aborts the calculation after 10s. For this, itsMaximumDurationvalue is now unrestricted.
Organic Layout
-
The
OrganicLayoutclass no longer produces broken routes of self-loops at group nodes if theScopeis not equal toALL. -
The
OrganicLayoutclass now correctly considers the specifiedPartitionGridif substructure detection is enabled. Previously, the grid cell assignment of nodes belonging to a substructure has been ignored. -
The
OrganicLayoutclass now correctly considers fix-contents and fix-bounds groups (see enumGroupNodeMode) if the substructure detection is enabled. -
The
OrganicLayoutclass now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData#NodeTypes). -
The
OrganicLayoutclass now satisfies propertyOrganicLayout#DeterministicModeEnabledfor more cases when the maximum duration is restricted. Note, however, that non-deterministic behavior is still possible when restricting the duration. -
The
OrganicLayoutclass no longer produces violations of the specified minimum node distance for separated radial substructures (see propertyStarSubstructureStyle#SEPARATED_RADIAL).
Clear Area Layout
-
The
ClearAreaLayoutclass no longer produces results where the specified area is not cleared for some input graphs when propertyClearAreaStrategyis set toPRESERVE_SHAPESorPRESERVE_SHAPES_UNIFORM. -
The
ClearAreaLayoutclass now correctly considers the initial partition grid assignment of nodes.
Orthogonal Layout
-
The
OrthogonalLayoutclass 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
OrthogonalLayoutclass now correctly considers the specified minimum group node sizes (seeGroupingKeys#MINIMUM_NODE_SIZE_DPKEY). Previously, the minimum sizes were always enlarged by the groups' insets (seeGroupingKeys#GROUP_NODE_INSETS_DPKEY). Actually, the minimum size should include the insets. -
The
OrthogonalLayoutclass now correctly handles input graphs with parallel edges if theParallelRoutesPreferenceEnabledproperty is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
OrthogonalLayoutclass no longer generates overlaps between edge segments (of a parallel edge) and edge labels of other edges for some rare scenarios.
Edge Router
-
The
EdgeRouterclass 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 thanTopToBottom. -
The
EdgeRouterclass now correctly considers the maximum duration and theAbortHandlerwhen the octilinear routing style is chosen. Previously, it could happen that the algorithm kept on running even though the time was up. -
The
EdgeRouterclass no longer throws an exception for some rare cases with collinear bends. -
The
EdgeRouterclass now correctly handles direct content edges that are incident to group nodes withPortCandidateSets. -
The
EdgeRouterclass no longer produces bad layout results for some scenarios with grouped edges and multiplePortCandidates. Previously, the algorithm selected any of them without considering the alternative options.
Generic Labeling
-
The
GenericLabelingclass no longer produces superfluous label overlaps if one of itsRemoveNodeOverlapsorRemoveEdgeOverlapsproperties is enabled. -
The
GenericLabelingclass 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_ISOLATEDcan no longer get into an infinite loop for inputs where a component consists only of articulation points.
Single Cycle Layout
-
The
SingleCycleLayoutclass no longer produces violations of the specified minimum node distance.
Layout
-
TableLayoutConfiguratornow considers the correctOriginalPositions of theRowDescriptors andColumnDescriptors when table insets are used. -
The
TableLayoutConfiguratorclass now treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception. -
The
PolylineLayoutStageclass now correctly considers a registeredAbortHandlerinstance so that it is possible to terminate early. Previously, the stage ignored theAbortHandler. -
The
TabularLayoutclass now always uses the correct bounding box values for node labels that are considered. Previously, wrong label bounds could lead to unnecessarily large rows or columns. -
The
IsolatedGroupComponentLayoutclass no longer produces unnecessarily large group nodes if the specifiedGridSpacingis zero.
Incompatible Changes
API
-
Due to the new
installanduninstallmethods of theModelManagerclass, the following of its members have been changed:- The
CanvasControlconstructor parameter has been removed. Instead, you can call the newinstallmethod with theCanvasControlas parameter. Similarly, theCanvasControlconstructor parameters of the derived classes have been removed, too. - Its existing protected methods
installanduninstallhave been renamed toinstallItemanduninstallItem. - Its protected methods
addandremovehave been renamed toaddItemandremoveItem.
- The
-
The optional
SelectionModelandModelparameters ofHighlightIndicatorManagerandSelectionIndicatorManagerhave been removed from the constructors, too. Instead, you can set the corresponding properties directly. -
The
NavigationInputMode#adjustGroupNodeLocationmethod has now an additional parameterexpandedSizethat specifies the size of the group node when it is expanded. -
The
LabelCreator#addLabelmethod can returnnullif no label is added. -
The
LabelCreator#updateLabelmethod now returns a boolean value:trueif the label has been updated,falseif the label should be removed. -
The
IHandleinterface has a new methodhandleClick. This method must be implemented by custom handle implementations. -
The
DataProviderAdapter#definedmethod has been removed since it had no effect. -
The
GraphModelManager#ProvideUserObjectOnMainCanvasObjectproperty has been renamed toProvidingUserObjectOnMainCanvasObjectEnabled. -
The
NodeLabelingPolicyenum has been moved fromcom.yworks.yfiles.layout.treetocom.yworks.yfiles.layout. The reason is that the policy is now not only supported byBalloonLayoutbut also byCircularLayout,RadialLayoutandCactusGroupLayout. -
The type of the
EdgeCellInfo#CellSegmentInfosproperty has been changed fromYListtoCellSegmentInfo[]. -
The
HierarchicLayoutData#SubComponentsproperty is replaced by the newHierarchicLayoutData#Subcomponentsproperty with a different signature. The new property uses instances of the newSubcomponentDescriptorclass to define subcomponents, and the layout algorithm responsible for a component is now specified via the newSubcomponentDescriptor#LayoutAlgorithmproperty. -
Similarly, the data provider keys
HierarchicLayout#SUB_COMPONENT_ID_DPKEYandHierarchicLayout#SUB_COMPONENT_LAYOUT_ALGORITHM_DPKEYare replaced by the new keyHierarchicLayout#SUBCOMPONENT_DESCRIPTOR_ID_DPKEYthat assigns instances of the newSubcomponentDescriptorclass to nodes. -
The
TemporaryGroupNodeInsertionData#Componentsproperty is replaced by the newTemporaryGroupsproperty of typeTemporaryGroupDescriptor, which now specifies groups and the applied recursive group layout algorithm. -
Similarly, the data provider key
TemporaryGroupNodeInsertionStage#COMPONENT_LAYOUT_ALGORITHM_DPKEYwas removed and the name of the keyTemporaryGroupNodeInsertionStage#COMPONENT_ID_DPKEYwas changed toTEMPORARY_GROUP_DESCRIPTOR_DPKEY.
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#BOTHenumeration value used by theNeighborhoodandBfsalgorithms has been changed and does not ignore the direction anymore, but now returns a union of theSUCCESSORand thePREDECESSORresults instead. The old behavior can be restored by using the newTraversalDirection#UNDIRECTEDenum value. Consequently, the default value of theTraversalDirectionproperty of both theNeighborhoodand theBfsalgorithm has been changed fromBOTHtoUNDIRECTED. -
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 theLabelCreator#TextProviderreturnsnull. -
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#requeryHandlesmethod 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
HandleInputModeclass doesn't initialize a handle drag as soon as the handle is pressed, anymore. Instead, it waits until theDraggedRecognizerorDraggedRecognizerTouchis triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting theRequestMutexOnPressproperty tofalse. -
The lists returned by the
GraphPartition#getCells,DynamicObstacleDecomposition#getCellsandDynamicObstacleDecomposition#getObstaclesmethods are no longer unmodifiable. -
ResizeStripeInputModenow always uses theN_RESIZEcursor for resizing rows and theW_RESIZEcursor for resizing columns instead of usingN_RESIZE,S_RESIZE,W_RESIZEorE_RESIZEdepending 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 value of the
DefaultLayerSequencer#MaximumDurationproperty is now unrestricted. Previously, it was restricted to 10 seconds. It is used by theHierarchicLayoutclass, which still adheres to its own maximum duration.
Deprecations
-
The
BevelNodeStyle,ShinyPlateNodeStyle, andPanelNodeStyleclasses and their renderers are now deprecated. Their appearance is rather outdated, and some of them are not very configurable. For group nodes, have a look at the newGroupNodeStyleclass.
New Demos
-
The Group Node Style Demo shows the new
GroupNodeStylein different configurations. -
The Arrow Node Style Demo shows the new
ArrowNodeStyleand its setting options. -
The Rectangle Node Style Demo shows the new
RectangleNodeStyleand 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.