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.
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
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 newGroupNodeLabelModel
is tailored to place labels in the tab or tab background of aGroupNodeStyle
.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), andPILL
(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. TheTextWrappingShape
enum provides the predefined shapes, and includes for example pill, ellipse, and hexagon. The newDefaultLabelStyle.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 asGeneralPath
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
-
The new class
PortLocationModelParameterSerializer
provides static helper methods which can convert the built-inIPortLocationModelParameter
implementations into key-value pairs. It also supports creatingIPortLocationModelParameter
instances from these key-value pairs. -
Added the new property
AspectRatio
to theGeneralPathNodeStyle
which defines the aspect ratio of the path. -
The new property
CanvasControl#MouseWheelZoomEventRecognizer
can be used to set the modifier for distinguishing between mouse wheel scrolling and zooming. -
The new class
LabelModelParameterSerializer
provides static helper methods which can convert the built-inILabelModelParameter
implementations into key-value pairs. It also supports creatingILabelModelParameter
instances from these key-value pairs. -
The methods
getNodesRevealedAfterExpand
,getEdgesChangedAfterExpand
, andgetEdgesChangedAfterCollapse
have 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
handleClick
method has been added to theIHandle
interface and is called whenHandleInputMode#ClickedRecognizer
orHandleInputMode#ClickedRecognizerTouch
was triggered on a targeted handle. To customize the general handle click handling, theClicked
event can be listened to or the methodHandleInputMode#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). PropertyHierarchicLayoutData#TabularGroups
allows to mark groups as "tabular" and propertyHierarchicLayoutData#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 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
ClusterAsGroupStructureAllowed
allows to specify whether or not detected clusters (see propertyClusteringPolicy
) are taken into account as group substructures. -
The
OrganicLayout
class now offers two newChainSubstructureStyles
calledDISK
andDISK_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). TheOrganicLayout#TreeSubstructureStyle
property specifies the style of tree substructures and theOrganicLayout#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 theBalloonLayoutData#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 respectivecom.yworks.yfiles.layout.Intersections
class provides the functionality also for theLayoutGraph
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
-
GraphClipboard
now respects thePasteDelta
value when pasting items without owner (e.g. edges without selected source or target node). -
ModelManager
and its derived classesHighlightIndicatorManager
,SelectionIndicatorManager
, andFocusIndicatorManager
now haveinstall
anduninstall
methods for properly allocating and freeing resources when setting or removing a manager to aCanvasControl
. -
GraphModelManager
: the propertiesNodeManager
,EdgeManager
,PortManager
,EdgeLabelManager
,NodeLabelManager
,PortLabelManager
, andProvideUserObjectOnMainCanvasObject
have 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#uninstall
method is now virtual and can be overridden in derived classes. -
Input modes now listen for the
Touch2DLostCapture
event 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
SizeConstraintProvider
property was added toNodeReshapeHandleProvider
andNodeReshapeHandlerHandle
that is queried during node resize gestures if no explicitMinimumSize
,MaximumSize
orMinimumEnclosedArea
is set. - The input modes don't perform hit tests upon auto-repeated key down events for modifier keys anymore.
-
The new
MoveViewportInputMode#SinglePointerMovementAllowed
property 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#ValidBeginCursor
property offers the possibility to use different cursors for signaling a valid position for beginning a move operation and actually moving items. -
The
ResizeStripeInputMode
class 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
ResizeStripeInputMode
class 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
ValidBeginRecognizer
andValidBeginCursor
have been added toLassoSelectionInputMode
,MarqueeSelectionInputMode
, andMoveViewportInputMode
. TheValidBeginRecognizer
can be used to indicate whether the selection respectively move viewport gesture may begin in which case theValidBeginCursor
is used. -
The property
MouseHoverInputMode#ValidHoverLocationCursor
has been added that is used when theValidHoverLocationHitTestable
returns true for a location. -
The property
ContextMenuInputMode#ValidMenuLocationCursor
has been added that is used when theValidMenuLocationHitTestable
returns true for a location. -
IReparentNodeHandler#isValidParent
is now also called withnull
as new parent during the drag gesture if no real parent node has been tested for the location. -
Keyboard navigation with
NavigationInputMode
now always considers the current item to navigate from, regardless of the value of theNavigableItems
property. -
The
GraphClipboard
now raises the eventsElementsCutting
,ElementsCopying
,ElementsPasting
, andElementsDuplicating
at the very beginning of thecut
,copy
,paste
, andduplicate
methods. -
GraphEditorInputMode
now raises theGroupingSelection
andGroupedSelection
events at the start and end of thegroupSelection
method. Similarly, theUngroupingSelection
andUngroupedSelection
events are raised at the start and end ofungroupSelection
method. -
The new
CreateEdgeInputMode#SourceNodeDraggingCursor
property 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
'sHoverCursor
property now take effect immediately if the mouse pointer is currently hovering over an item. -
The
TextEditorInputMode
now releases the mutex before dispatching theTextEdited
event.
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 theDashStyle#Dashes
property now clarifies that both an empty collection andnull
result in a solidPen
. -
Added a new property
KeepingAspectRatioEnabled
toImageNodeStyle
andMemoryImageNodeStyle
to support keeping the image's aspect ratio during resizes. -
Nodes rendered with the
ShapeNodeStyle
now respect their actual outline shape when selected with theLassoSelectionInputMode
.
GraphBuilder
-
GraphBuilder
now 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)
. -
TreeBuilder
andAdjacencyGraphBuilder
now 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
HierarchicLayout
class now allows to combine theSimplexNodePlacer#StraightenEdges
andSimplexNodePlacer#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, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
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 (seeHierarchicLayoutData#Subcomponents
). Defining subcomponents now works by assigning instances of the newSubcomponentDescriptor
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 policiesSubcomponentPlacementPolicy#AlwaysIntegrated
orSubcomponentPlacementPolicy#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 (propertyHierarchicLayout#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 theClusteringPolicy
property toClusteringPolicy#USER_DEFINED
. The custom cluster IDs have to be specified by means of theOrganicLayoutData#ClusterIds
property.
Circular Layout
-
The
CircularLayout
class 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
CircularLayout
class has received a faster algorithm for calculating edge bundles.
Tree Layout
-
Root Alignment in
GenericTreeLayout
can also factor in the port position to straighten out an edge. -
The
TreeLayout
class now also supports integrated edge labeling for configurations that use aLayeredNodePlacer
.
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 propertyPenaltySettings#PortCrossingPenalty
allows to specify the cost of such crossings. -
The
EdgeRouter
class 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
TemporaryGroupNodeInsertionStage
class now automatically marks inserted group nodes with anIDataProvider
registered to the input graph with the keyINSERTED_GROUP_NODE_DPKEY
. -
The
TemporaryGroupNodeInsertionStage
class now also supports specifying hierarchically nested temporary groups. Therefore, the newTemporaryGroupDescriptor
class has been added.
Analysis
-
The
TraversalDirection
enumeration used by theNeighborhood
andBfs
algorithms has been extended. The enum valueUNDIRECTED
has been added that ignores the edge direction and corresponds semantically with the previous valueBOTH
. The semantic ofBOTH
has been adjusted to indeed return the union of theSUCCESSOR
and thePREDECESSOR
results. To keep the default behavior of theNeighborhood
andBfs
algorithms, the default value of theirTraversalDirection
property has been changed fromBOTH
toUNDIRECTED
. -
The
GraphStructureAnalyzer
class now supports operating on a subset of the graph. -
The new
SubgraphNodes
andSubgraphEdges
properties on theReachability
class allow to define a subset of nodes/edges the algorithm should operate on.
Bugfixes
View
-
Combining
HierarchicNestingPolicy#GROUP_NODES
,LabelLayerPolicy#AT_OWNER
and undo no longer throws aNullPointerException
. -
Viewport animations no longer suddenly stop when the zoom level is near
CanvasControl#MinimumZoom
orMaximumZoom
. - 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 callremoveSelection
when an item was deselected. -
Changing the
GraphControl#GraphModelManager
property no longer leaks memory in certain situations. -
A tooltip which is displayed at a given location by calling the
MouseHoverInputMode#show
method is no longer immediately hidden after each mouse move. It now respects theMouseHoverSize
property. -
Calling
IFoldingView#collapse
on a normal (i.e. non-group) node no longer creates anUndoUnit
or a view state (which included an unexpected call toIFolderNodeConverter#initializeFolderNode
even though the result would have never been used). Now callingIFoldingView#collapse
on a normal node does nothing. - The automatic flipping behavior of labels now also works with projections that distort the labels.
-
ViewportAnimation
s now are properly cleaned up oncancel
. -
GroupNodeStyle
's associatedINodeInsetsProvider
now correctly calculates insets for 'small' nodes, i.e. nodes whose height (or width) is less than the style'sTabHeight
property. -
Inertia in
MoveViewportInputMode
no longer stops working randomly.
Graph
-
Fixed a bug in
FilteredGraphWrapper
'sNodeRemoved
event where the provided old parent might have been present in the wrapped graph but not in the filtered graph. -
The
FilteredGraphWrapper
class now raises the correct events when filtering out port labels. Previously, the events contained incorrect owner information. -
EdgePathLabelModel
'sfindBestParameter
method now creates correct parameters for locations close to bends. -
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 correspondingGroupNodeStyle
. -
NavigationInputMode#ExpandGroup
,EnterGroup
, and theEXPAND_GROUP
andENTER_GROUP
commands do not create empty undo units anymore if nothing has changed. -
NavigationInputMode#ExitGroup
and theEXIT_GROUP
command now create undo units if the bounds of the exited group node were adjusted. -
GroupingSupport
's methodsenlargeGroupNode
andenlargeAllGroupNodes
do not create empty undo units anymore if nothing has changed. -
EdgePathLabelModel
,EdgeSegmentLabelModel
, andSmartEdgeLabelModel
findBestParameter
implementations now create correct parameters for label boxes that overlap the edge's source or target node.
Interaction
-
The
HandleInputMode#handleIsHitTouch
method now correctly uses the value of theCanvasControl#HitTestRadiusTouch
property instead of the value of theCanvasControl#HitTestRadius
property 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
GraphClipboard
class. -
The
GraphEditorInputMode#AdjustContentRect
method now only updates theCanvasControl#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 theGraphControl#Selection
property unnecessarily when theGraphControl#Graph
property is changed. -
An instance of the
HandleInputMode
class is no longercanceled
if a handle is removed during its ownDragFinished
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
GraphControl#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 or touch pointer has stopped before being released. -
Starting a
CanvasControl
/GraphControl
viewport animation now properly stops a runningMoveViewportInputMode
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 theirIShapeGeometry
implementation. -
Fixed that customer CSS styling of labels breaks the preferred size calculation of the
DefaultLabelStyle
. -
Setting the
Pen
of aShapeNodeStyle
or aGeneralPathNodeStyle
tonull
now correctly clears the shape's stroke. -
Fixed a bug in
GeneralPathNodeStyle
where setting thePen
tonull
on an already rendered node resulted in aNullPointerException
during redraw. -
ShapeNodeStyleRenderer
now always uses the protectedgetPaint
andgetPen
methods for all shapes instead of falling back to the respective style properties for some shapes. -
IconLabelStyle
'supdateVisual
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 ofAbstractInputHandler#setValue
method is now annotated correctly as nullable. The key may benull
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
,HtmlLabelStyle
, andShapeNodeStyle
. -
Fixed GraphML serialization and deserialization for certain configurations of
GroupNodeStyle
andRectangleNodeStyle
. -
Fixed an issue in
GraphMLIOHandler
'sWriteEvents
where theDataWriting
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 duringupdateGraph
. -
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
, andTreeBuilder
. Some internal map entries for labels were not discarded after their owner nodes or edges were removed.
Table
-
Fixed a bug in
StretchStripeLabelModel
that was causing incorrect handling of insets.
Hierarchic Layout
-
The
SimplexNodePlacer
class used by theHierarchicLayout
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 satisfiesPortCandidates
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 (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
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 (seeHierarchicLayoutData#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 propertyHierarchicLayoutData#UniformPortAssignmentGroups
) for some cases where it previously did not yield a uniform port distribution. -
The
HierarchicLayout
now correctly considers thePreferredPlacementDescriptor
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 itsAbortHandler
. -
The
HierarchicLayout
class now considers thePortCandidate
directions correctly for layout orientations other thanTopToBottom
. This also improves the optimization results withPortCandidateSet
s that allow multiple directions to connect to nodes. -
For input graphs with a
PartitionGrid
structure, theHierarchicLayout
class now correctly considers the layering produced by theFromScratchLayerer
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, itsMaximumDuration
value is now unrestricted.
Organic Layout
-
The
OrganicLayout
class no longer produces broken routes of self-loops at group nodes if theScope
is not equal toALL
. -
The
OrganicLayout
class now correctly considers the specifiedPartitionGrid
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 enumGroupNodeMode
) 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 propertyOrganicLayout#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 propertyStarSubstructureStyle#SEPARATED_RADIAL
).
Clear Area Layout
-
The
ClearAreaLayout
class no longer produces results where the specified area is not cleared for some input graphs when propertyClearAreaStrategy
is set toPRESERVE_SHAPES
orPRESERVE_SHAPES_UNIFORM
. -
The
ClearAreaLayout
class now correctly considers the initial partition grid assignment of nodes.
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 (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
OrthogonalLayout
class now correctly handles input graphs with parallel edges if theParallelRoutesPreferenceEnabled
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 thanTopToBottom
. -
The
EdgeRouter
class now correctly considers the maximum duration and theAbortHandler
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 withPortCandidateSets
. -
The
EdgeRouter
class 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
GenericLabeling
class no longer produces superfluous label overlaps if one of itsRemoveNodeOverlaps
orRemoveEdgeOverlaps
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
-
TableLayoutConfigurator
now considers the correctOriginalPosition
s of theRowDescriptor
s andColumnDescriptor
s when table insets are used. -
The
TableLayoutConfigurator
class now treats tables without rows or columns as tables with exactly one row and column instead of throwing an exception. -
The
PolylineLayoutStage
class now correctly considers a registeredAbortHandler
instance so that it is possible to terminate early. Previously, the stage ignored theAbortHandler
. -
The
TabularLayout
class 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
IsolatedGroupComponentLayout
class no longer produces unnecessarily large group nodes if the specifiedGridSpacing
is zero.
Incompatible Changes
API
-
Due to the new
install
anduninstall
methods of theModelManager
class, the following of its members have been changed:- The
CanvasControl
constructor parameter has been removed. Instead, you can call the newinstall
method with theCanvasControl
as parameter. Similarly, theCanvasControl
constructor parameters of the derived classes have been removed, too. - Its existing protected methods
install
anduninstall
have been renamed toinstallItem
anduninstallItem
. - Its protected methods
add
andremove
have been renamed toaddItem
andremoveItem
.
- The
-
The optional
SelectionModel
andModel
parameters ofHighlightIndicatorManager
andSelectionIndicatorManager
have been removed from the constructors, too. Instead, you can set the corresponding properties directly. -
The
NavigationInputMode#adjustGroupNodeLocation
method has now an additional parameterexpandedSize
that specifies the size of the group node when it is expanded. -
The
LabelCreator#addLabel
method can returnnull
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 methodhandleClick
. 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 toProvidingUserObjectOnMainCanvasObjectEnabled
. -
The
NodeLabelingPolicy
enum has been moved fromcom.yworks.yfiles.layout.tree
tocom.yworks.yfiles.layout
. The reason is that the policy is now not only supported byBalloonLayout
but also byCircularLayout
,RadialLayout
andCactusGroupLayout
. -
The type of the
EdgeCellInfo#CellSegmentInfos
property has been changed fromYList
toCellSegmentInfo[]
. -
The
HierarchicLayoutData#SubComponents
property is replaced by the newHierarchicLayoutData#Subcomponents
property with a different signature. The new property uses instances of the newSubcomponentDescriptor
class to define subcomponents, and the layout algorithm responsible for a component is now specified via the newSubcomponentDescriptor#LayoutAlgorithm
property. -
Similarly, the data provider keys
HierarchicLayout#SUB_COMPONENT_ID_DPKEY
andHierarchicLayout#SUB_COMPONENT_LAYOUT_ALGORITHM_DPKEY
are replaced by the new keyHierarchicLayout#SUBCOMPONENT_DESCRIPTOR_ID_DPKEY
that assigns instances of the newSubcomponentDescriptor
class to nodes. -
The
TemporaryGroupNodeInsertionData#Components
property is replaced by the newTemporaryGroups
property of typeTemporaryGroupDescriptor
, 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 keyTemporaryGroupNodeInsertionStage#COMPONENT_ID_DPKEY
was 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#BOTH
enumeration value used by theNeighborhood
andBfs
algorithms has been changed and does not ignore the direction anymore, but now returns a union of theSUCCESSOR
and thePREDECESSOR
results instead. The old behavior can be restored by using the newTraversalDirection#UNDIRECTED
enum value. Consequently, the default value of theTraversalDirection
property of both theNeighborhood
and theBfs
algorithm has been changed fromBOTH
toUNDIRECTED
. -
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#TextProvider
returnsnull
. -
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 theDraggedRecognizer
orDraggedRecognizerTouch
is triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting theRequestMutexOnPress
property tofalse
. -
The lists returned by the
GraphPartition#getCells
,DynamicObstacleDecomposition#getCells
andDynamicObstacleDecomposition#getObstacles
methods are no longer unmodifiable. -
ResizeStripeInputMode
now always uses theN_RESIZE
cursor for resizing rows and theW_RESIZE
cursor for resizing columns instead of usingN_RESIZE
,S_RESIZE
,W_RESIZE
orE_RESIZE
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 value of the
DefaultLayerSequencer#MaximumDuration
property is now unrestricted. Previously, it was restricted to 10 seconds. It is used by theHierarchicLayout
class, which still adheres to its own maximum duration.
Deprecations
-
The
BevelNodeStyle
,ShinyPlateNodeStyle
, andPanelNodeStyle
classes 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 newGroupNodeStyle
class.
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.