yFiles for Java (Swing)Changelog
yFiles for Java (Swing) 4.0
This version brings a major overhaul of many parts of the API, resulting in a lot of incompatible changes. We have designed many functions to be simpler, more intuitive and more consistent and removed technical debt. In addition, this release contains numerous new features, improvements, and bug fixes to all parts of the library.
New Features, Improvements, and Bug Fixes
Categories: General Graph GraphBuilder Components Rendering Selection, Focus, Highlight Styles Interaction Label Editing Snapping Clipboard Folding GraphML Demos View-Layout-Bridge Layout Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Circular Layout Radial Layout Radial Tree Layout Alignment Stage Series-parallel Layout Clear Area Layout Multi-page Layout Partial Layout Tabular Layout Component Layout Algorithms Analysis Geometry
General
New Features and Improvements
-
The yFiles for Java (Swing) event handling has been refactored to be in line with the Java event handling API:
- The
IEventArgsinterface that all yFiles*EventArgsclasses inherited from has been removed. Instead, the*EventArgsclasses now extendjava.util.EventObject. - As
EventObjecttakes the event source as parameter and provides it as property, all constructors now take the event source as first parameter. - The
IEventListenerinterface now extendsjava.util.EventListenerand the event source parameter has been removed from itsonEventmethod.
- The
-
The lookup API has been restructured. In particular, the
LookupDecoratorclass is now easier to use, but most use cases are covered without having to access the low-level lookup architecture. -
Added missing information whether method return values, method parameters, or properties can or cannot be
null.
Graph
New Features and Improvements
-
The new
IGraph#getEdgesBetweenmethod returns all edges between two ports or port owners. -
CompositeLabelModelnow cannot only combine label models but also individual label model parameters or a mix of both kinds. Furthermore, it supports assigning a profit value to a parameter or model that can be used when placing labels during an automatic layout. -
The new
CompositeLabelModel#addParametermethod wraps a given parameter of one of the composed label models. -
The methods of
IGraphnow check consistently whether given geometric arguments are neither infinite norNaN. -
The rotation direction of
OrientedRectangle,NodeLabel,EdgeLabelandFreeEdgeLabelModelis now clockwise to be consistent with the other models. - The default placement for new edge labels is now on the middle of the edge path instead of on the first edge segment.
-
The label models
ExteriorLabelModel,InteriorLabelModel, andInteriorStretchLabelModelhave been renamed toExteriorNodeLabelModel,InteriorNodeLabelModel, andStretchNodeLabelModel, respectively, to make it clear that only nodes are supported as label owner for these models. -
The implementations of
ILabelModelParameterandIPortLocationModelParameterused by theILabelModelandIPortLocationModelclasses are now public and provide all properties necessary to recreate them on the models. Consequently, the staticLabelModelParameterSerializerandPortLocationModelParameterSerializerclasses, which could be used to retrieve those properties and recreate the parameter, have been removed. -
The
ILabelModelparameter of theILabelModelParameterFinder#findBestParameterandILabelModelParameterProvider#getParametersmethods has been removed as it was only very rarely required. -
The
GraphCopierAPI has been enhanced to offer improved clarity and functionality.-
The
GraphCopierhas been optimized since its support for theGraphClipboardhas been removed. -
The
GraphCopier#copymethod now uses anIStreamIterableof items to define the subset to copy.
-
The
-
The
SimpleNode,SimpleEdge,SimpleBend,SimpleLabel, andSimplePortclasses now provide a convenienceLookupDecoratorinstance through thegetDecoratormethod. -
The
ILabelModel#createDefaultParametermethod and most of its implementations have been removed as it was often unclear what โdefaultโ meant. Most label models already had a correspondingCreate*Parametermethod. For the remaining models, theGroupNodeLabelModel#createTabParametermethod and theFreeNodeLabelModel#CENTERandFreePortLabelModel#CENTERfields have been added. -
The structural properties on graph items now are never
null. This affectsIEdge#SourcePort,IEdge#TargetPort,ILabel#Owner,IPort#Owner, andIBend#Owner. -
The
IGraph#groupNodesmethod now has overloads with additional parameters that specify theStyleandTagof the newly created group. -
EdgePathLabelModelandEdgeSegmentLabelModelhave been improved to provide better placements with edge-cases where the path is too short for the label or degenerates completely. -
GroupNodeLabelModelno longer triggers anIllegalArgumentExceptionwhen used with / set for a node that does not useGroupNodeStyle.GroupNodeLabelModelis still not intended to be used with nodes that do not useGroupNodeStyle. This restriction has been lifted to support workflows where the node style is set toGroupNodeStyleafter the label model is set toGroupNodeLabelModel. - Changing the height of an arc or bridge edge via its handle is now undoable.
-
The static parameter fields of
FreeNodePortLocationModelhave been renamed analogue to the static parameter fields inInteriorNodeLabelModel. -
FilteredGraphWrappernow supports changing the node and edge predicates after creation. -
The
PropertyChangedevent on theUndoEngineclass is now also emitted if the token is changed. -
The methods
YList#addFirstandYList#addLasthave been renamed topushandpushLast, so they don't conflict with the default methodsList#addFirstandaddLastthat have been added withJDK21.
Bug Fixes
-
Fixed
ILabelOwner.getLabels().containsandIPortOwner.getPorts().containsimplementations. Previously, these methods returned true for all labels/ports in the owner's graph instead of only for labels/ports belonging to the owner. -
Fixed a bug in
EdgeSegmentLabelModelandEdgePathLabelModelwhich caused a gap in supported positions close to the source and target node. -
When using the
EdgeSegmentLabelModelandSmartEdgeLabelModelclasses, label placement at source and target nodes is now correct when an index is specified that is less than zero or greater than the number of bends of the edge. -
The
EdgeSegmentLabelModelclass now calculates valid label locations for selfloop paths with one port at the side of the node. -
The
EdgeSegmentLabelModelclass now calculates valid label locations for paths with duplicate bends, i.e., paths in which two or more consecutive bends have the same location. -
GraphClipboardnow properly respectsParentNodeDetectionmode for sub trees. -
GraphClipboard'sParentNodeDetectionnow can useParentNodeDetectionModes#NONEas fallback if no valid parent is found for modesParentNodeDetectionModes#SELECTIONorParentNodeDetectionModes#PREVIOUS_PARENT. -
Fixed
NullPointerExceptionthat occured when removing highlighted edges from their graph. -
Fixed memory leak in
HighlightIndicatorManagerthat occurred when removing highlighted model items from their graph. - Fixed a bug where labels with an initial opening brace were not correctly serialized.
-
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. -
GroupingSupport's methodsenlargeGroupNodeandenlargeAllGroupNodesdo not create empty undo units anymore if nothing has changed. -
The methods
NavigationInputMode#expandGroupandNavigationInputMode#enterGroup, as well as theCommand#EXPAND_GROUPandCommand#ENTER_GROUPcommands do not create empty undo units anymore if nothing has changed. -
Method
NavigationInputMode#exitGroupand theCommand#EXIT_GROUPcommand now create undo units if the bounds of the exited group node were adjusted.
GraphBuilder
New Features and Improvements
-
The
NodeCreator#getUpdatedStyle,EdgeCreator#getUpdatedStyle, andLabelCreator#getUpdatedStylemethods now uses the default style from the graph as fallback if the style provider is not set. -
The
LabelCreator#getUpdatedLayoutParametermethod now uses the default layout parameter from the graph as fallback if the layout parameter provider is not set. -
The
NodeCreator,EdgeCreator, andLabelCreatorclasses can now be used without aGraphBuilder. This enables developers to apply styles and labels from a data object in cases where aGraphBuilderis not suitable for graph creation. -
A
NodesSourcenow allows for recursive definition of child nodes in a grouping hierarchy. The new methodsaddChildNodesSourceandcreateChildNodesSourceallow for defining a source to fetch child node items from a node data item. -
A
NodesSourcenow allows for implicit definition of parent nodes in a grouping hierarchy. The new methodsaddParentNodesSourceandcreateParentNodesSourceallow for defining a source to fetch a parent node item from a node data item.
Components
New Features and Improvements
-
The rendering order of nodes in the
GraphOverviewComponenthas been improved to be more in sync with the rendering order in the correspondingGraphComponent. -
GraphOverviewComponentnow uses itsContentGroupinstead of theRootGroupto add the visualization of its graph content. This makes it easier to customize the overview for example by adding a background visual. -
The
GraphModelManager#LabelLayerPolicyproperty, which defines whether labels should be rendered at their owner or in a separate layer, has been split into three separate propertiesNodeLabelLayerPolicy,EdgeLabelLayerPolicy, andPortLabelLayerPolicyto support different policies for node, edge, and port labels. -
The new
SelectionModelChangedevent ofGraphComponentis raised when the model managing the selection is changed itself, not when the selected items change. -
Adding visuals without an explicit size directly to canvas object groups (instead of
VisualGroupinstances) now works consistently. Previously, they may sometimes never have appeared. -
ViewportLimiternow also works with isometric projections and offers options to use theCanvasComponent#ContentBoundsfor the limiting. It now offers the possibility to specify margins in the view coordinate system around the specified bounds, and bounds can be given as a list of convex polygon points.CanvasComponentnow also notifies the viewport limiter when the size of theContentBoundsor the size of theCanvasComponentchanges. -
CanvasComponentandGraphComponentnow have a new scroll bar design, as well as new behavior if eitherHorizontalScrollBarPolicyorVerticalScrollBarPolicyis set toAS_NEEDED. The new style is similar to system scrollbars in many operating systems, overlays the content and gets out of the way when not needed or interacted with. These dynamic scroll bars can be disabled using a client property with keyCanvasComponent#DISABLE_DYNAMIC_SCROLL_BARS. -
GraphComponentnow usesGraphViewerInputModeas the defaultInputModefor basic graph exploration. -
The
ICanvasContext#CanvasComponentproperty (and consequentlyIRenderContextandIInputModeContext) is now guaranteed to have a non-nullvalue. -
All predefined
IEventRecognizerconstants can now be found in the same class,IEventRecognizer, which improves discoverability. In addition, their names now follow the platform conventions, i.e. they are formulated in the present tense and use the same wording as corresponding input events.
Similarly, the events onCanvasComponentwhich are related to input devices now have the same consistent names. -
The
CanvasComponent#ContentRectproperty is now namedContentBoundsto make its purpose more clear. TheContentRectUpdatingEnabledmethod has been renamed likewise. -
The superfluous
CanvasComponent#setContentRectmethod has been removed in favor of the setter of theContentBoundsproperty. -
It is now possible to have more than one
BridgeManager. This allows you to have different types of bridges on different types of edges. -
Small scrollbar changes and the factor for scrolling with the mouse wheel (
MouseWheelScrollFactor) have been increased to allow for faster scrolling. -
The new
CanvasComponent#HorizontalScrollEventRecognizerproperty allows customizing switching from vertical to horizontal scrolling.
Bug Fixes
-
CanvasComponent: Animated viewport changes could lead to strange behavior if maximum or minimum zoom were set and violated by the viewport change. - Fixed a bug which might have caused port selection visualizations to disappear in image export or printing under rare conditions.
- Fixed an issue where a sequential animation would break when the preferred duration was set to zero.
Rendering
New Features and Improvements
-
The new
AbstractObjectRendererclass allows conveniently implementing theIObjectRendererinterface. -
New classes formalize the data passed as
RenderTagto implementations ofIObjectRenderer.-
The new
PortCandidateRenderTagclass will be passed as render tag for port candidates. -
The new
MarqueeRenderTagclass will be passed as render tag for the marquee rectangle renderer of theMarqueeSelectionInputModeclass. -
The new
LassoRenderTagclass will be passed as render tag for the lasso path renderer of theLassoSelectionInputModeclass. The newLassoPathStateenum defines the current state of the lasso selection path in this class. -
The new
LabelCandidateRenderTagclass will be passed as render tag to the label candidate renderer of theLabelPositionHandler.
-
The new
-
The new
IObjectRenderer#VOID_OBJECT_RENDERERconstant provides a singleton renderer that renders nothing. - Layout animation performance has been improved for edges with many bends.
Selection, Focus, Highlight
New Features and Improvements
-
The new
Domainproperty on theHighlightIndicatorManagerclass matches theDomainproperty on theSelectionIndicatorManagerclass and allows automatic removal of highlights no longer present in the domain. -
FocusIndicatorManagersupports a new policy that will only show the keyboard focus indicator, when the user is actually using the keyboard to manipulate the focus.
Styles
New Features and Improvements
-
New styles that are based on the composition design pattern make it easier to combine existing styles into a single
item visualization. These styles are available for all graph items via the
CompositeNodeStyle,CompositeEdgeStyle,CompositeLabelStyle, andCompositePortStyleclasses. -
Similarly, new styles that are based on the delegation design pattern make it easier to implement custom styles that
extend an existing style. For this, derive your style implementation from the
DelegatingNodeStyle,DelegatingEdgeStyle,DelegatingLabelStyle, orDelegatingPortStyleclass. -
The new
ShapePortStyleclass displays ports as geometric shapes and supports the same shapes as theShapeNodeStyleclass. -
The
Arrowclass now supports more types and features. In particular:-
There are three new shapes that are similar to what is available in common drawing apps:
ArrowType#CHEVRON,ArrowType#DELTOID, andArrowType#KITE. - The width and height can now be scaled independently from each other.
-
An arrow can now specify whether the end of the edge the arrow belongs to should be cropped at the port or at
the boundary of the port's owner. This alleviates the need to use
PortDecorator#EdgePathCropperfor this.
-
There are three new shapes that are similar to what is available in common drawing apps:
-
The new
AbstractPathEdgeStyleclass simplifies using a complexGeneralPathas the edge path of a style. Subclasses only have to create the path while the style already handles the visualization, including placing arrows and bridges. Several callback methods can be overridden to customize the behavior. -
The
ShapeNodeStyleclass now supports more shapes, namelyPENTAGON,OCTAGON_STANDING,TRIANGLE_POINTING_LEFT, andTRIANGLE_POINTING_RIGHT. These shapes are also available asTextWrappingShape. -
Node shapes that are stars or arbitrary polygons are now easy to implement with new factory methods of the
GeneralPathNodeStyleclass. -
Group nodes and nodes with
GroupNodeStylenow have more useful default port candidates. Either four candidates, one in each cardinal direction, for group nodes withGroupNodeStyle. Or a single central port for folder nodes with aGroupNodeStyle. -
The
CollapsibleNodeStyleDecoratorclass positions and styles the button now closer to whatGroupNodeStyledoes to achieve a more modern look. -
The new
getLassoTestablemethod of the interfacesINodeStyleRenderer,IEdgeStyleRenderer,ILabelStyleRenderer, andIPortStyleRendereris similar to the existinggetMarqueeTestablemethod, so marquee and lasso selection do no longer differ in the ways the testable is retrieved. -
The
ArrowEdgeStyle's bounds now are tightly enclosing the rendered shape. Before they were too large. -
Bends in edges that use
ArcEdgeStyle,ArrowEdgeStyle, orBridgeEdgeStyleare no longer shown when selecting these edges. Additionally, marquee and lasso selection will not select these bends anymore even if they lie in the selection rectangle. -
The
IconLabelStylenow has a default icon size of 24x24 instead of empty, such that the icon is always visible. -
If
GroupNodeStyle's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e. the corners of the content area on the side of the style's tab) to 0. -
GroupNodeStyle's newMinimumContentAreaSizeproperty simplifies enforcing a minimum size for the content area a group node. -
GroupNodeStyleoffers the possibility to have its tab width grow (or shrink) depending on the preferred size of associated tab and tab background labels. -
The new
GroupNodeStyle#RenderingTransparentContentAreaEnabledproperty controls whether a semi-transparentContentAreaPaintworks as expected by showing what's behind the group node. -
ShapeNodeStylenow considers the pen thickness when rendering rectangle, round rectangle and ellipse shapes, i.e. the pen is rendered half inside and half outside the node bounds, like for the other shapes. -
Pens with dash pattern now support
BasicStroke#CAP_BUTTas end line cap. Previously the cap was changed toBasicStroke#CAP_SQUARE. -
The classes
AbstractEdgeStyle,AbstractNodeStyle,AbstractLabelStyle,AbstractPortStyle, andAbstractStripeStyleare now generic and take the subtype of theIVisualthat is returned by theircreateVisualandupdateVisualmethods as generic type.
Bug Fixes
-
GroupNodeStyle's associatedIGroupPaddingProvidernow correctly calculates insets for โsmallโ nodes, i.e. nodes whose height (or width) is less than the style'sTabHeightproperty. -
The selection, highlighting and focus visualization of edges using
BridgeEdgeStyleorArcEdgeStyleno longer disappears too early if the edge path is only partially in the viewport. -
The intersection calculation for
RectangleNodeStylehas been corrected for some previously failed instances that caused edges to end in midair or disappear. -
The following node styles now consider the pen thickness in the visibility test:
ShapeNodeStyle,ArrowNodeStyle,GeneralPathNodeStyle,GroupNodeStyle, andRectangleNodeStyle. -
With
ArcEdgeStyle, the three center positions of theNinePositionsEdgeLabelModelare now in the right places. Previously they were often way off. -
GroupNodeStyle's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests. -
GroupNodeStyleno longer renders a hairline in place of the tab when using aPenwithTabWidth0. -
LabelStylenow adds ellipsis more reliably at the end when the text does not fit into the specified text wrapping shape. - Bezier edges no longer devolve into polyline paths under rare circumstances.
-
ArrowEdgeStylenow correctly considers its visibility with thicknesses greater than 13.
Interaction
New Features and Improvements
-
Marquee and lasso selection have been enhanced to support multiple selection policies. While the default gestures
replaces the selection, pressing the
Ctrl,Shift, orAltmodifier during the gestures extends, subtracts or toggles the current selection with the elements in the marquee or lasse area. -
The
IHitTesterinterface has been changed to support faster hit testing. The generic type has been removed. Instead, aGraphItemTypesparameter has been added that is used to reduce hit tests to the specified item types. -
The new
PointerLongPressevent is raised when the mouse is pressed and stays still for a configurable amount of time. -
The new
PointerLongRestevent is raised when the pointer stays still for a configurable amount of time during a move or drag gesture. -
All events of an
IInputModewhich report creation of, changes to, or deletion of model items now have arguments of typeInputModeItemEventArgsorInputModeItemChangedEventArgs. This type provides the affected item and theIInputModeContextfor the involved input mode. -
The keys to modify the gestures of various input modes have been adjusted to better match those of other often used
applications:
-
To temporarily disable snapping during edge creation, moving, or resizing items, the
Altkey can now be pressed instead of theCtrlkey. -
When resizing a node using its reshape handles, the
Ctrlkey instead of theAltkey can be pressed to keep the center of the reshaped node. -
To reparent a node to another parent during a drag gesture, the
Ctrlkey has to be pressed instead of theShiftkey.
-
To temporarily disable snapping during edge creation, moving, or resizing items, the
-
Moving items interactively now supports constraining the move gesture to an octilinear direction. This constraint is
used when pressing the
Shiftkey while dragging the items. -
The new
GraphEditorInputMode#CreationSelectableItemsproperty allows you to specifyGraphItemTypeswhich should be selected after creation. -
The new
CreateEdgeInputMode#EdgeDirectionReversedevent and the newCreateEdgeInputMode#onEdgeDirectionReversedmethod are triggered when the direction of the edge creation changed during edge creation. -
The new
HandleType#VOIDenum value makes a handle invisible and excludes it from hit testing. - Reconnecting edges to other nodes is now allowed per default.
- Elements can now be moved without selecting them first.
-
The new
CreateEdgeInputMode#MinimumSelfLoopBendCountproperty allows for specifying the number of bends an edge must at least have before it can be created as selfloop. -
The new
CreateEdgeInputMode#ShowStartPortCandidateDelayproperty allows for specifying a delay after which start port candidates are displayed when the user hovers over a start port candidate owner. -
The new
GraphEditorInputMode#MovableUnselectedItemsproperty allows for defining items which can be moved without selecting them first. TheMovableUnselectedItemsPredicateproperty can be used for closer specification. -
Edge creation now supports constraining the current edge segment to use an octilinear direction. This constraint is
used when pressing the
Shiftkey while dragging the pointer. -
The new
GraphEditorInputMode#setNodeLocationmethod uses theIPositionHandlerof a node to change its location, and this way also adjusts the attached orthogonal edges and the position of child nodes if the given node is a group node. -
The
CanvasComponent's event system is now based on thePointerEventArgsAPI instead of mouse events. -
The
MoveInputModeclass now also handles moving labels, thus theMoveLabelInputModehas been removed. -
The event
ItemsCopiedonGraphViewerInputModeand the eventsItemsCopied,ItemsCut,ItemsPasted,ItemsDuplicated, andDeletedSelectiononGraphEditorInputModenow useItemsEventArgsproviding the items that are the subjects of the events. -
Lowered the
MoveViewportInputMode#Priorityto105to make viewport panning withCTRLorSPACEmodifiers easier in dense graphs. -
The rendering order of visuals created by an
InputModenow corresponds to the input mode'sPriority. In other words, visualizations of input modes with a smaller priority value (= higher priority) are drawn on top. -
The
GraphViewerInputMode#findItemsandGraphEditorInputMode#findItemsmethods now consider the actual z-order of the hit items. -
The
GraphViewerInputMode#ItemClickedandGraphEditorInputMode#ItemClickedevents and the cyclic selection now consider the actual z-order of the hit items at the cursor location. Bends and invisible ports are now properly taken into account and hit before their owners. -
The
PointerEventArgs#Handledproperty has been added that can be used to set and detect if another listener already handled the event. -
MoveViewportInputModenow gracefully handles concurrent programmatic viewport modifications. -
The modifier for using the
ILabelModelParameterFinderduring label movement can now be changed with theLabelPositionHandler#UseParameterFinderRecognizerproperty. -
The
ClickInputMode#Clickedevent is now raised also for double-clicks and multi-clicks. Clicking multiple times in the same location increments theClickEventArgs#ClickCountby one for each click. -
The
MoveInputModeandMoveUnselectedInputModeproperties ofGraphEditorInputModehave been renamed toMoveSelectedItemsInputModeandMoveUnselectedItemsInputModeto better describe what they are used for. Associated properties and methods have been renamed accordingly. - Starting edge-creation from a child node inside a group node now does not immediately snap to the parent when moving over the group nodes content. Instead, it only snaps to the closest port when hovering the tab or stroke.
-
Toggling the item selection via
Ctrl+Spacenow prefers toggling the selection state ofGraphComponent#CurrentItemover deselecting a single selected item. -
The
IInputModeAPI has been updated for clarity: theInputModeproperty has been removed from the interface. Instead, most implementations now offer the protectedParentInputModeContextproperty to clearly indicate its role as the input mode's parent context. Most input modes can create a context which can be passed to dependents via the protectedcreateInputModeContextmethod. The created context has the input mode set as the parent input mode. The newInputModeContextclass may be used by implementations to conveniently create new contexts. -
When using the
GraphViewerInputMode, the viewport can now be moved by either dragging with the left or middle mouse button. -
When using the
GraphEditorInputMode, the viewport can now be moved by either dragging with the middle mouse button or by dragging with the left mouse button when pressing theCtrlorSpacekey. -
The new
Command#ZOOM_TO_SELECTIONzooms to the bounding box around all selected items. It can be triggered by the keyboard short cutAlt+2. - Edge creation can now be cancelled by ending the gesture over the source node.
-
Edge creation is canceled if the
GraphComponentloses the focus. -
GraphViewerInputMode's andGraphEditorInputMode'sClickHitTestOrdernow reflects the z-Order of the elements. By enablingSkippingHitLabelsEnabled(the default) elements behind labels can still be prioritized over the labels. -
Several default keyboard shortcuts have been adjusted to more widely used ones:
-
Ctrl+0orAlt+0sets the zoom to 100%. -
Alt+1fits the content in the view. -
Alt+2brings the selection into the view. -
Alt+3brings the current item into the view. -
Ctrl+Plusincreases the zoom value. -
Ctrl+Minusdecreases the zoom value. -
Alt+Leftcollapses a selected group node. -
Alt+Rightexpands a selected folder node. -
Alt+Upexits the current folder node. -
Alt+Downenters the current folder node. -
Alt+Shift+LeftorAlt+Shift+Righttoggles the expansion state of a selected group or folder node.
-
-
GraphEditorInputModenow allows for starting label editing just by starting to type. TheEditLabelOnTypingAllowedproperty can be used to configure this setting, which is turned on, by default. -
The default gesture for label editing has been updated to also trigger when the user hits the
Enterkey. -
The
HandleTypesenums has been refactored to a non-flaggableHandleTypeenum, and the values have been adjusted to those used in the library as well as some custom variants for individual use. -
Custom
IHandleimplementations can use the newIHandle#Tagproperty for various purposes, including custom handle visualizations. yFiles does not use the property and initializes it withnull, but decorating handles forwards any values unmodified. -
OverviewInputModenow uses theCanvasComponent'sMouseWheelZoomEventRecognizerto determine if the used performed a zoom gesture. - Dragging a selected edge doesn't move all its bends anymore which often screwed up the first and last edge segment.
-
If a
Wheelevent is handled by code, the default behavior (zoom/scroll) will be cancelled. -
Command handling has been improved: The previous
ICommand, inspired by WPF's commands, has been replaced with an enumeration of primary input gestures calledCommand.GraphComponentnow manages the execution of commands:-
GraphComponent#executeCommandruns the specified command with an optional parameter. -
GraphComponent#canExecuteCommandindicates whether the specified command can be executed. -
The
CanExecuteChangedevent is triggered when the executable state of a command has changed.
-
-
The
MouseHoverInputModehas been renamed toToolTipInputModeto better reflect its function. -
The
handleIsHitandgetClosestHitHandlemethods ofHandleInputModenow have an additional parameter which specifies thePointerTypeof the related user gesture. -
The
GraphEditorInputMode#OrthogonalEdgeEditingContextproperty is now set and enabled per default and may not benullanymore. Edges can be individually configured to be edited orthogonally by providing an apropriateIOrthogonalEdgeHelperin their lookup.-
For edges using a
PolylineEdgeStyle, the style's newOrthogonalEditingEnabledproperty can be set so such a helper is automatically provided. -
To disable orthogonal editing for all edges, the
Enabledproperty of theOrthogonalEdgeEditingContextcan be set to false. -
To enable orthogonal edge editing for all edges that don't explicitly forbid this, the
OrthogonalEdgeEditingContext#FallbackEdgeHelperProviderproperty can be set to a helper supporting orthogonal edge editing.
-
For edges using a
-
NavigationInputModenow interprets the direction of arrow keys in view coordinates by default. Previously the default settings could lead to surprising behavior when combined with aProjectiononGraphComponent. - Improved keyboard navigation for graph items.
-
The protected
Should-methods of the input modes have been removed and replaced by predicate properties. This simplifies adjusting the behavior without the need to subclass the input modes. -
LabelDropInputModenow consults theIEditLabelHelperof possible drop targets when dragging and dropping labels. -
New overloads of the
CreateEdgeInputMode#startEdgeCreationmethod can be used to start interactive edge creation from a node or port, respectively. -
The parent node detection of
GraphClipboardhas been streamlined. -
The new
GraphViewerInputMode#HitTesterproperty works in the same way as theGraphEditorInputMode#HitTesterproperty. -
The
GraphEditorInputMode#duplicateSelectionmethod now also dispatchesMultiSelectionStartedandMultiSelectionFinishedevents. -
The items reported by the
HandleInputMode#AffectedItemsproperty now include edges that were modified with the height handle ofBezierEdgeStyleandArcEdgeStyle. -
The
PortRelocationHandle#createDummyEdgemethod has been renamed tocreatePreviewEdgeand can be overridden. -
The protected
CreateEdgeInputMode#createPreviewBendmethod has been added that can be overridden to customize bends added during edge creation. -
The edge creation start gesture while dragging inside the source node can now be customized with
CreateEdgeInputMode#StartPortOwnerDraggingFinishedRecognizer. -
The
ItemDropInputMode#DragDroppedevent is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
The
MoveInputModeandHandleInputModesub-modes ofGraphEditorInputModeno longer have a pre-setSnapContext. Instead, they get theirSnapContextfrom theInputModeContext. That way, setting theSnapContextonGraphEditorInputModewill affect all sub-modes unless a customSnapContextis set to them. - The resize handle rendering order has been adapted to improve usability for small nodes.
-
The static member
GraphClipboard#DefaultGraphClipboardhas been added and is used per default asGraphComponent#Clipboard. This way copy&paste operations work between multipleGraphComponentinstances without the need to set a sharedGraphClipboardinstance first. -
The sub-input modes of
GraphViewerInputModeandGraphEditorInputModecan now be replaced while the input mode is installed.
Bug Fixes
- After moving a folder node in closed state with orthogonal edge editing enabled, folding edges no longer get incorrect additional segments when the folder is expanded.
-
Toggling the selection of an item using the keyboard now always toggles the selection of the focused item.
Previously, if exactly one other item was selected when toggling, that item was deselected, making it virtually
impossible to select multiple individual items using the keyboard.
To fix this, the behavior ofCommand#TOGGLE_ITEM_SELECTIONhas been adjusted accordingly, and the behavior theCommand#SELECT_ITEMandCommand#DESELECT_ITEMhas also been changed accordingly. -
NavigationInputModenow reliably brings items selected with keyboard navigation into the view. Previously this only worked for nodes. -
DropInputMode(and derived types) now continues working properly even if the control's template changes. -
Several members of
EditLabelInputModecould not be overwritten by mistake. Theinstall,uninstall,stop, andcancelmethods and theEnabledproperty can now be overwritten. -
GraphViewerInputMode#findItemsandGraphEditorInputMode#findItemsmethods: when the filter includes both edges and bends, the edge will no longer be ignored if any of its bends are hit. -
GraphViewerInputMode#findItemsandGraphEditorInputMode#findItemsmethod: when usingGraphItemTypes#ALL, bends will not be ignored. Furthermore, the interfacesIBendSelectionTesterandIPortSelectionTesterare properly queried. -
GraphViewerInputMode#findItemsandGraphEditorInputMode#findItemsmethod: Ports with a style are no longer reported twice. -
When moving the viewport in a
GraphComponentthat has a projection, the inertia now works in the right direction. -
Fixed that the
marqueeSelectandlassoSelectmethods ofGraphEditorInputModeandGraphViewerInputModewere called with a wrong input mode context. -
Overloading
GraphViewerInputMode#findItemsorGraphEditorInputMode#findItemswithout the context parameter now finds the items correctly. - Fixed an issue where keyboard navigation would stop working when two items were positioned at the same location.
-
Fixed an issue where changing the
GraphComponent#InputModewhile the context menu is open would lead to a crash. -
Fixed a bug in
HighlightIndicatorManagerthat could result in missing or surplus highlight visualizations when changing theGraphComponent#HighlightIndicatorManager. - Self-loops no longer disappear when resizing nodes while orthogonal editing is enabled.
-
Fixed a bug in
MoveViewportInputModethat caused the inertia feature to mistakenly start moving the viewport after the mouse has stopped before being released. -
Starting a
CanvasComponent/GraphComponentviewport 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.
- Fixed a bug in some input modes which led to undefined behavior if the mode has been uninstalled in a handler for its own events.
-
Fixed, that the
ClickInputMode#FocusClickSwallowingEnabledproperty had no effect.
Label Editing
New Features and Improvements
-
The API related to label editing has been enhanced by introducing a new
EditLabelInputMode, which is now a subordinate mode ofGraphEditorInputMode. The new input mode consolidates the methods, properties, and events necessary for customizing label editing. The key methods,addLabelandeditLabel, remain accessible throughGraphEditorInputMode. - The text editor will now stay open by default if label text validation fails.
-
Each
ILabelandILabelOwnernow includes a default implementation ofIEditLabelHelperin itslookup. TheIEditLabelHelperinterface has been updated to offer greater control over the label editing process. -
The API related to label editing has been removed from
TableEditorInputMode, except for the key methodsaddLabelandeditLabel. Label editing is now handled throughGraphEditorInputMode'sEditLabelInputMode.
Snapping
New Features and Improvements
- The snapping feature has been refactored and enhanced to support more use cases. Previously, items could only snap to points or orthogonal lines. Now lines with any orientation and circle segments can be defined as references where items can snap to. Furthermore:
-
Snapping to circles, grids, and specific node sizes has been refactored to work analogue to the snapping to a
SnapLine, soSnapCircle,SnapGrid, andSnapSizeinstances are created and are available for theSnapResultproviders. -
Label snapping is now also handled by the
GraphSnapContext, so theLabelSnapContexthas been removed. Configuration options have been moved fromLabelSnapContexttoGraphSnapContext. -
Additional improvements:
-
The new
GraphSnapContext#AffectedItemsproperty provides the items for whichSnapResultshall be collected. -
The configuration options of
GraphSnapContextare now easier to use and more concise. -
The new protected methods
collectGridSnapReferencesandcollectSameSizeSnapReferencesofGraphSnapContextcan be overridden to customize theSnapGridandSnapSizeinstances items can snap to. -
The new
SnapReferenceclass is now the base class ofSnapLine, and the newSnapGrid,SnapSize, andSnapCircleclasses. The newSnapReference#SnappableItemsproperty describes which item types may snap to this reference. -
The new
SnapContext#SnapResultPenproperty is used as default pen for theSnapResultrendering. -
The new
OrthogonalSnapLine#Croppableproperty is used to decide which snap lines to crop ifGraphSnapContext#SnapLineCroppingEnabledistrue. -
The new properties
Reference,Item, andItemAnchorof theSnapResultclass can be used by theIObjectRendererfor the visualization of theSnapResult. -
New methods of
ReshapeRectangleContextsimplify the calculation of the bounds for a specified pointer delta or theSnapConstraintnecessary to result in a specified width, height or side location.
-
The new
Clipboard
New Features and Improvements
-
Members of
GraphClipboardandGraphEditorInputModewithElementin their name that actually referred to model items were renamed toItemto clarify their usage. -
The
GraphClipboard#pastemethod now accepts an optionalpasteLocationparameter specifying the center of the bounds of the pasted items. -
The events on
GraphClipboardnow useGraphClipboardEventArgsthat provide the currentIGraphClipboardContextand theItems. -
IClipboardHelpernow has methods to supportduplicate, too:shouldDuplicateandonDuplicated. -
GraphClipboard'scut,copy,paste, andduplicatemethods now use anIStreamIterableto determine the subgraph to copy. -
GraphClipboardnow uses an optimizedClipboardGraphCopierfor its clipboard operations instead of the generalGraphCopier.
Bug Fixes
- In certain rare cases, the insertion of edges could end up in an endless loop. This has now been fixed.
Folding
New Features and Improvements
- The process of configuring edges at folder nodes has been simplified, resulting in a significant reduction in the number of configuration calls for merged edges.
- The default implementation for folder nodes and folding edge converters has been enhanced, providing more powerful capabilities for synchronizing and initializing various aspects with granularity.
- Collapsed group nodes (folder nodes) can now have different tags from their expanded form (group nodes).
-
Changes made to view states (folder nodes, folding edges) can now be reflected back to the master items. New
methods,
updateGroupNodeStateandupdateMasterEdges, have been added toIFolderNodeConverterandIFoldingEdgeConverter, respectively, for handling these updates.
Bug Fixes
-
Setting the source or target port of an edge to a port at another edge does no longer lead to an exception if the
edge is represented in a managed view (
IFoldingView). Instead, the edge is now removed from the view. - Fixed a bug which could cause an edge in a folding view to be created at different ports as those which were given as parameters. This could lead to unexpected connections during interactive edge creation in rare cases.
-
Fixed a bug that could lead to an exception when duplicating a port on the
GraphClipboardif it is duplicated. - Changes to ports of an edge whose source or target node is hidden are no longer reverted when the node is subsequently collapsing and expanding.
-
Label changes on folder nodes are no longer reverted by
FolderNodeConverterif labels are copied between master and view node.
Demos
New Features and Improvements
- A lot of new demo applications have been added that show all kinds of aspects of using the yFiles API: demonstrating basic features, going into detail for specific usecases, and building complex showcase applications.
-
The tutorials have been restructured and split into five separate tutorials covering basic yFiles features,
using the
GraphBuilderto populate your graph, and implementing custom styles for nodes, for edges or for labels. - For all demos, a Maven configuration is added to make it easy to start exploring the yFiles functionality.
Bug Fixes
-
Fixed
BPMN-DIimport forLaneSetsin a Subprocess.
GraphML
New Features and Improvements
-
Improved GraphML serialization of
Colors#TRANSPARENT.
Bug Fixes
-
Fixed GraphML serialization and deserialization for certain configurations of
GroupNodeStyleandRectangleNodeStyle.
View-Layout-Bridge
New Features and Improvements
-
LayoutExecutorcan now automatically create port constraints for edges at ports that use aCompositePortLocationModel. For all parameters added to aCompositePortLocationModel, a fixed port candidate is created. The cost, capacity, andPortSideof this candidate can be specified when adding the parameter to the model. -
The
LayoutExecutor#TableLayoutConfiguratorfeature now uses more flexible placements for nodes that don't belong to any table node.
Bug Fixes
-
The
LayoutExecutorandLayoutGraphAdapterclasses now correctly assign port group IDs to edges that connect to the same port. Previously, in some cases involving ports with a single incoming and outgoing edge, the port group IDs were omitted, which could cause incorrect layout results (such as diagonal segments instead of orthogonal ones).
Layout
New Features and Improvements
-
LayoutPortCandidates now have aMatchingId. When finding matchingLayoutPortCandidates at nodes and for edges, twoLayoutPortCandidates can only match if theirMatchingIdproperties are equal. -
The
LayoutAnchoringStageclass (previously calledFixNodeLayoutStage) now allows using not only nodes but also edges and labels to anchor the graph's position.-
The new
NodeAnchoringPolicies,EdgeAnchoringPolicies,NodeLabelAnchoringPoliciesandEdgeLabelAnchoringPoliciesproperties specify which part of the items should be used to calculate the anchor point. -
The new
LayoutExecutor#AnchoredItemsproperty specifies the graph items used to anchor the graph's position.
-
The new
-
The
ComponentLayouthas now the ability to specify which layout to apply to individual components usingComponentLayoutData#ComponentLayoutsproperty. Additionally, edges between components can be routed using a router set viaComponentLayout#InterEdgeRouter. -
It is now possible to specify multiple layout grids for a graph (previously called
PartitionGrid). This is made possible by the newLayoutGrid.CellDescriptor#LayoutGridproperty. This way it is no more required to set the global layout grid with theLayoutGridData#Gridproperty. If a node is to be placed in a grid but not in a specific cell, this can now be achieved using the newLayoutGrid#createDynamicCellDescriptormethod. Be aware that many layout algorithms likeHierarchicalLayoutdon't support multiple layout grids. -
The
LayoutDataclasses are now generic and can be used for items of aLayoutGraph, too. Of course, it's still possible to useLayoutDatawithIGraphitems.-
LayoutDatainstances when used withIGraphtypically needINode,IEdge,ILabel, andILabelas their type arguments. -
LayoutDatainstances when used withLayoutGraphtypically needNode,Edge,NodeLabel, andEdgeLabelas their type arguments. -
Instances of
LayoutDataclasses can be created via factory methods on the layout algorithm themselves, for example,HierarchicalLayout#createLayoutData. Depending on the type of graph that is provided as the argument, the correct data instance will be created.
-
-
The API around the
LayoutGraphclass has received a major rework. TheLayoutGraphis the only remaining graph implementation for the layout analysis part. ClassesGraph(previously used for graph analysis, only) andCopiedLayoutGraphhave been removed and functionality was moved toLayoutGraph.-
The API has been made more similar to the API of the
IGraphwith respect to creation, modification and access to nodes, edges and labels. -
Low-level data types like
NodeListandEdgeListhave been removed as well as cursor for iteration over the elements. -
Properties
NodeCountandEdgeCounthave been removed. Query the size of theNodesandEdgesproperties instead. -
Layout information about items must no longer be queried from the graph instance (e.g. previously with methods
like
LayoutGraph#getLayout). It is now accessible on the items itself and is also mutable, seeNode#Layoutproperty. -
The edge path information is now defined by properties on the edge, most importantly these are
SourcePortLocation,TargetPortLocationandBends. -
Labels of nodes and edges are now accessed via a property on the respective owning item. To add labels, use
LayoutGraph#addLabelmethod. The complicatedILabelLayoutFactorythat covered that use case in the past has been removed. -
Hiding items is no longer possible via the graph itself. To do so, use the helper
LayoutGraphHiderclass. -
The
Graph#containsEdgemethod has been removed in favor ofLayoutGraph#getEdgesBetween. The same holds for theNode#getEdgeToandNode#getEdgeFrommethods. -
Convenience properties like
Node#Neighborshave been removed. Instead, query all edges (using the Edges property) and filter the required adjacent nodes manually. -
To copy a
LayoutGraphinstance, the newLayoutGraph#createCopymethod has been added. -
If a
LayoutGraphwithout coordinate/path information is needed (to optimize memory performance), it can be created using the factoryLayoutGraph#createStructureGraphmethod.
-
The API has been made more similar to the API of the
-
LayoutExecutornow supports arranging graphs without aGraphComponent. -
The new
LayoutGraph#getEdgesBetweenmethod returns all edges between two nodes. -
The
PortPlacementStagenow computes cost-minimal matchings between port candidates at nodes and edges. -
Most layouts now support port grouping and port candidates at nodes and edges. These features are implemented
through a post-processing step using the
PortPlacementStage, rather than being natively integrated into the layouts. As a result, the quality may be poor. - For oriented rectangles the intersection test no longer allocates unnecessary memory and no longer creates unnecessary objects, which improves its allocation performance.
Bug Fixes
-
The
CurveFittingStagenow correctly respects the maximum error. Previously, it sometimes produced curves that violated the maximum error. -
The
LineSegment#getIntersectionmethod no longer produces incorrect results when the specified epsilon is zero. Previously, there were some edge cases where the algorithm failed to detect an intersection and returnednullinstead. -
Added the protected
ParallelEdgeRouter#hideMultiEdgesmethod, which is required to meaningfully overwrite the existing protectedParallelEdgeRouter#findAndHideMultiEdgesmethod. -
The
PortPlacementStagenow correctly considers port candidates together with port groups. -
The
TreeReductionStage,CircularLayout, andRadialLayoutclasses no longer produce results with a lot of superfluous, collinear bends for bundled edges.
Hierarchical Layout
New Features and Improvements
-
The
HierarchicalLayoutclass now supports defining minimum distances between the ports. They can be specified per node side using theHierarchicalLayoutNodeDescriptor#MinimumPortDistanceproperty. The node size is increased if necessary in order to accommodate the minimum distances. -
The Hierarchical Layout class now supports aligning the ports of edges incident to the same node, that is, the ports
are placed at the same x- or y-coordinate. This can be particularly useful to visualize paths in a graph. Which
ports to align is specified by the new properties
PortData#SourcePortAlignmentIdsandPortData#TargetPortAlignmentIdsaccessible viaHierarchicalLayoutData#Ports. -
The
HierarchicalLayoutnow produces fewer bends for multi-edges with labels when integrated edge labeling is enabled. -
The
HierarchicalLayoutclass now produces better results for graphs with tabular groups where all children have a fixed user-specified order. - The routes of self-loops now consider both node and edge labels preventing overlaps if possible.
- The ports of edges with free ports are no longer placed at the same location as fixed ports, which previously could happen if multiple edges had the same fixed port.
-
The
HierarchicalLayoutno longer produces overlapping edge segments if there are grouped edges with different thicknesses values. Previously, the user had to ensure that all these edges use the same thickness. -
In barycenter mode the
HierarchicalLayoutnow enforces a more symmetric placement of the nodes that are part of chains or height-2 trees. -
The
HierarchicalLayoutclass now also considers layering constraints between elements of different grouping hierarchies if the recursive group layering is enabled (HierarchicalLayout#GroupLayeringPolicyproperty). Previously, such constraints were ignored in that case.
Bug Fixes
-
The
HierarchicalLayoutalgorithm now correctly handles node and edge labels with width or height set to negative values. Previously, large negative values may have caused exceptions. -
Instances of
LayerConstraintDataandSequenceConstraintDatathat are configured with comparables can now be reused for multiple layout calculations. -
The
HierarchicalLayoutclass no longer creates avoidable crossings between edges with the same target node whenFromSketchModeEnabledproperty is enabled. -
The
HierarchicalLayoutclass no longer unnecessarily enlarges group nodes in the case when no group node padding is defined, i.e. no data registered with theLayoutKeys#GROUP_NODE_PADDING_DATA_KEYproperty. -
The value of the
HierarchicalLayout#StopDurationproperty is no longer ignored during the execution of someILayerAssignerorICoordinateAssignerimplementations that have their own specificStopDuration. TheHierarchicalLayoutclass will now always consider the shortest applicable duration. -
The
HierarchicalLayoutclass now always places aligned ports correctly in from-sketch mode. -
The
HierarchicalLayoutclass no longer assigns superfluous space to group nodes if there are grouped edges. -
The
HierarchicalLayoutclass no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints. -
The
HierarchicalLayoutclass no longer produces an error for labeled graphs with port alignment constraints when the integrated edge label placement is enabled. -
The
HierarchicalLayoutclass no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer. -
The
HierarchicalLayoutclass no longer produces superfluous crossings for tabular group nodes with fixed children order. -
The
HierarchicalLayoutnow properly handles self-loop edges when the edge is at a group node and furthermore edge/port grouped with the same ID on both sides. Previously, it was not routed correctly or that it was removed from theLayoutGraphinstance when running the layout algorithm directly on the graph instance without using a copy. -
The
HierarchicalLayoutclass no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints. -
The
HierarchicalLayoutclass no longer produces superfluous crossings for some graphs with group nodes in incremental layout mode. - Edges between two subcomponents now correctly consider fixed any-side port candidates.
-
The
HierarchicalLayoutclass no longer produces very long edge segments for some input graphs containing groups with node halos and polyline edge routing. -
The
HierarchicalLayoutclass no longer throws an exception for graphs with bus structures if the algorithm runs in incremental mode and the group transposition feature is enabled. -
The
HierarchicalLayoutclass no longer misplaces port labels at the connector nodes of integrated subcomponents. -
The
HierarchicalLayoutclass no longer produces intertwined edge routes with many superfluous crossings and bends for some cases with sequence constraintsplaceAtHeadorplaceAtTail. The problem mainly occurred with graphs with groups orLayoutGridand incompatible sequence constraints. -
The
HierarchicalLayoutclass no longer produces superfluous crossings for some edges with alternative paths that are incident to group nodes (seeHierarchicalLayoutData#AlternativeEdgePaths). -
The
HierarchicalLayoutalgorithm no longer requires a long runtime for some larger, grouped graphs with layering constraints and non-recursive layering. -
The
HierarchicalLayoutalgorithm no longer requires a long runtime for some larger graphs with layering constraints when a maximum duration is specified. -
The
HierarchicalLayoutclass no longer throws an exception for some invalid specifications of alternative group bounds in incremental layout mode.
Tree Layout
New Features and Improvements
-
Added the new
TreeLayout#FromSketchModeEnabledproperty to consider the initial coordinates of the graph elements. This has an effect only if the used subtree placers implementIFromSketchSubtreePlacer. -
Added the
TreeLayoutData#MultiParentDescriptorsproperty that allows to specify style information for multi-parent structures. -
The
TreeReductionStageDataclass now offersNonTreeEdgesResultproperty. It allows to conveniently query the set of edges that the stage actually selected as non-tree edges. -
The
TreeLayoutnow considers minimum last segment lengths no matter on which side the port shall be placed. -
The
LeftRightSubtreePlacernow supports minimum segment length, which can be set with the propertiesMinimumFirstSegmentLengthandMinimumLastSegmentLength. -
All subtree placers that used
AbstractRotatableSubtreePlacer.RootAlignmentsupport placing the subtree root centered above the ports with the new valueCENTER_OVER_PORTS. -
The
SingleLayerSubtreePlacersupports placing the subtree root centered with respect to the ports at its children with the new enum valueSingleLayerSubtreePlacerRootAlignment#CENTER_OF_PORTS. -
The
AspectRatioSubtreePlacernow supports minimum first and last segment lengths. -
The
AspectRatioSubtreePlacernow supports multiple variants how to place the root node with respect to its children, which can be set using the propertiesChildArrangementandRootPlacement. -
Added properties of
TreeReductionStageDatadirectly to theLayoutDataof tree layouts, includingRadialLayoutData,RadialTreeLayoutData, andTreeLayoutData. -
The
TreeLayoutclass now places the ports of edges incident to multi-parent nodes and with port constraints (excluding any-side constraints) at the nodes' border. Previously, unlike as for edges incident to other nodes, the edge ports where located at the nodes' center.
Bug Fixes
-
The
TreeLayoutnow correctly handles the specifiedCompactSubtreePlacerStrategyMementos(STRATEGY_MEMENTO_DATA_KEY) for nodes associated with aCompactSubtreePlacer. Previously, the algorithm incorrectly overwrote the value for the leaves. -
The
TreeLayoutclass no longer ignores the initial locations for some subtree placers if theFromSketchModeEnabledproperty is enabled. -
The
TreeLayoutnow automatically places edge labels of the parallel edges handled by itsParallelEdgeRouterinstance, when integrated edge labeling is enabled. -
The
TreeLayoutclass no longer produces broken edge routes for some input graphs with multi-parent structures. -
The
AspectRatioSubtreePlacerclass no longer ignores the specifiedAspectRatioSubtreePlacer#ChildAlignmentPolicyfor some specific setups (e.g., if all children are leaves and have the same size).
Orthogonal Layout
New Features and Improvements
-
The newly added
OrthogonalLayout#QualityTimeRatioproperty allows controlling the layout quality by automatically enabling/disabling additional optimization steps. -
The
OrthogonalLayoutalgorithm now supports specifying edges that should be routed against the main layout orientation in addition to the option to route with the main layout orientation. SeeOrthogonalLayoutData#EdgeOrientationproperty.
Bug Fixes
-
The
OrthogonalLayoutnow automatically places edge labels of the parallel edges handled by itsParallelEdgeRouterinstance, when integrated edge labeling is enabled. -
The
OrthogonalLayoutclass no longer throws an exception for some input graphs with tree substructures when theTreeSubstructureStyleis set to a value different fromTreeSubstructureStyle#NONE.
Edge Router
New Features and Improvements
- The quality of edge routing for buses is improved.
-
If
EdgeRouteris run with the buses feature and a limited duration, it now splits the available time amongst buses, meaning that it will not get "stuck" on a single bus, which could otherwise impact the quality of the remaining buses and non-bus edge routings.
Bug Fixes
-
The
EdgeRouternow prefers to use fixed port candidates that are not overlapped by other nodes. -
The
EdgeRouterclass no longer produces uncovered buses. Previously, there were some rare cases where the specified bus edges didn't constitute a bus. - When routing edges to and from fixed ports in the interior of group nodes, other nodes in the group are not ignored anymore, so that the edge does not overlap them if possible.
-
The
EdgeRouterclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
EdgeRouterclass no longer produces self-crossing routes of edges with labels ifEdgeRouterEdgeLabelPlacementproperty is set toEdgeRouterEdgeLabelPlacement.INTEGRATED. -
The
EdgeRouterclass no longer produces bad layout results for some scenarios with grouped edges and multipleLayoutPortCandidate. Previously, the algorithm selected any of them without considering the alternative options.
Labeling
Bug Fixes
-
The
GenericLabelingalgorithm now correctly considers the case where model parameters of aCompositeLabelModelhave different weight values. Higher weights are preferred. -
The
EdgeLabelCandidates#buildCandidatesmethod does no longer returnnullfor some setups with free edge label models. Instead it returns an emptyIStreamIterablenow. -
The
GenericLabelingclass now produces less node-label overlaps. -
The
GenericLabelingclass no longer produces non-optimal label placements for some rare setups of graphs with node halos. -
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.
Organic Layout
New Features and Improvements
-
The
OrganicLayoutclass now supports integrated edge labeling which can be enabled withEdgeLabelPlacementproperty. -
The
OrganicLayoutclass now provides a feature that dynamically detects whether nodes already lie almost on a common line or circle and, if so, snaps the nodes to this line/circle. This new feature can be enabled with theChainRecognitionEnabledandCircleRecognitionEnabledproperties. -
The
OrganicLayoutclass now supports drawing the edges such that they point to the main layout direction. Whether an edge should follow the main orientation can be specified with the newOrganicLayoutData#EdgeOrientationproperty. -
The
OrganicLayoutclass now supports individual minimum lengths of edges that can be specified with the newOrganicLayoutData#MinimumEdgeLengthsproperty. -
The
OrganicLayoutclass now supports different types of constraints that restrict the placement of the graphโs nodes. These constraints can be specified with the newOrganicConstraintDataclass (cf. theOrganicLayoutData#Constraintsproperty). -
The performance for the
OrganicLayouthas been substantially improved for large graphs without group nodes. The improvement is triggered if no special constraints are defined and no shape recognition is enabled. -
The
OrganicLayoutnow supports different styles for group substructures, which are set via theGroupSubstructureStyleproperty.
Bug Fixes
-
The
OrganicLayoutnow automatically places edge labels of the parallel edges handled by itsParallelEdgeRouterinstance, when integrated edge labeling is enabled. -
The
OrganicLayoutclass no longer ignores the preferred edge length in incremental layout mode with a single affected element. - Fixed an issue that may have automatically disabled the component layout when using constraint-based features.
-
The
OrganicLayoutclass now supports specified minimum group node sizes with more feature combinations. Previously, the minimum group node size was sometimes violated. -
The
OrganicLayoutclass no longer produces edge overlaps whenChainRecognitionEnabledproperty is enabled. - In rare cases fixed nodes could move when also a group node was fixed.
Circular Layout
New Features and Improvements
-
The
CircularLayoutclass now offers the possibility to define star substructures. TheCircularLayout#StarSubstructureStyleproperty specifies the style of star substructures and theCircularLayout#StarSubstructureSizeproperty their minimum size (structures of smaller size are not handled as a star substructure). Furthermore, theCircularLayout#StarSubstructureTypeSeparationEnabledproperty specifies whether star substructures should be separated by the node type. -
The
CircularLayoutDataclass offers the newEdgeDirectednessproperty that influences the detection of star-substructures; seeCircularLayout#StarSubstructureStyle.
Bug Fixes
-
The
CircularLayoutclass no longer produces strange routes for some bundled edges. -
The
CircularLayoutclass no longer throws an exception ifStarSubstructureStyleproperty is set toStarSubstructureStyle#RADIALand the whole input graph is a star.
Radial Layout
New Features and Improvements
-
The
RadialLayoutclass now allows defining a custom order of child nodes around a local root node. The order can be individually specified for each node by using the newRadialLayoutData#ChildOrderproperty. It is especially suitable for tree-like input graphs. For specifying a single global order for all nodes, for example, alphabetically, the newChildOrderData#TargetNodeComparablesproperty is a more convenient option. -
The
RadialLayoutclass now supports node types. The types influence the ordering of nodes of the same circle such that nodes of the same type are preferably placed next to each other if this does not induce additional crossings or conflicts with other constraints. Node types can be defined via theRadialLayoutData#NodeTypesproperty.
Bug Fixes
-
The
RadialLayoutclass no longer throws an exception if the layout algorithm is executed too many times from the same instance.
Radial Tree Layout
New Features and Improvements
-
Added data key
OUT_EDGE_COMPARATOR_DATA_KEYtoRadialTreeLayoutclass (formerlyBalloonLayout).
Alignment Stage
New Features and Improvements
-
The new
AlignmentStageclass places the nodes of a given layout on automatically determined horizontal and/or vertical lines. This stage is particularly designed as a post-processing step that snaps suitable nodes to the same x- or y-coordinates to obtain a grid-like structure. When rearranging the initial layout, the stage moves the nodes as little as possible.
The associated newAlignmentStageDataclass allows to specify custom data considered during the layout calculation.
Series-parallel Layout
Bug Fixes
-
The
SeriesParallelLayoutnow automatically places edge labels of the parallel edges handled by itsParallelEdgeRouterinstance, when integrated edge labeling is enabled.
Clear Area Layout
Bug Fixes
-
The
ClearAreaLayoutclass no longer produces violations of theLayoutGridif theClearAreaStrategyis set toLOCALorLOCAL_UNIFORM. -
The
ClearAreaLayoutclass no longer produces results where the specified area is not cleared for some input graphs whenClearAreaStrategyproperty is set toPRESERVE_SHAPESorPRESERVE_SHAPES_UNIFORM.
Multi-page Layout
Bug Fixes
-
MultiPageLayoutalgorithm will adhere to page size specifications in rare cases that could previously cause the maximum page size to be exceeded.
Partial Layout
New Features and Improvements
-
PartialLayoutnow supports specifying inversely directed edges in addition to undirected and directed edges.
Bug Fixes
-
PartialLayoutScopeDatawill no longer mark any edges as affected when only nodes are specified to be in scope, nor mark any nodes as affected when only edges are specified to be in scope. -
The
PartialLayoutclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
PartialLayoutclass now correctly places disconnected components for cases where a layout orientation is specified, and theComponentAssignmentStrategyproperty is notSINGLE. Previously, such components were sometimes placed far away from the remaining graph elements.
Tabular Layout
New Features and Improvements
-
The
TabularLayoutclass now supports the calculation of node arrangements that lead to a low overall edge length. This feature can be enabled with the newEdgeConsiderationEnabledproperty. -
The new
TabularLayoutData#LayoutGridDataproperty makes it easy to query the cell to which a node was assigned to by theTabularLayoutclass after applying it.
Bug Fixes
-
The layout algorithms do no longer throw an
Exceptionwhen aLayoutGridincluding a mapping from nodes toLayoutGridCellDescriptorsis defined and if algorithmTabularLayoutwas executed before withLayoutModeAUTO_SIZEorFROM_SKETCH. In these modes theTabularLayoutautomatically assigns cells to nodes so that any mapping defined prior will be ignored now.
Component Layout
New Features and Improvements
-
ComponentLayoutnow supportsNodeMargins(formerlyNodeHalos) for eachComponentArrangementStyleother thanNONEandKEEP_CENTERS.
Algorithms
New Features and Improvements
-
The
LongestPathalgorithm now uses double values instead of integers for edge traversal costs. This improves thePaths,LayoutGraphAlgorithms, andLongestPathclasses. -
The
LayoutGraphAlgorithms#findCycleEdgesmethod has been improved and now requires fewer edges to be reversed. In addition, a new, even better but slower heuristic can be enabled with a new optional parameter.
Bug Fixes
-
The
Intersectionsclass does not disposeFilteredGraphWrapperinstances that it is given with no subgraph nodes or edges specified anymore. Previously, this caused the graph instance to become defunct, resulting in various operations running intonullfields and properties, generating exceptions that were non-trivial to understand. -
Intersections.Resultno longer includes intersections that have no actual intersection points. This issue occurred when two graph elements were within a small epsilon distance of each other.
Analysis
New Features and Improvements
-
The
KShortestPathsclass has a new implementation of the k-shortest path algorithm that allows for the exclusion of non-simple paths (i.e., paths with repeating vertices). Previously, these paths could not be excluded. The new implementation is used by default and can be disabled with theSimplePathsparameter. -
For usage with a
LayoutGraph, the algorithm is also available via theLayoutGraphAlgorithms#kShortestPathsmethod.
Bug Fixes
-
Fixed the issue of excessive memory consumption in the analysis algorithm
Pathswhen a large number of start and end nodes were set. -
The
KShortestPathsclass now correctly calculates the k-shortest paths of graphs. Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.
Geometry
New Features and Improvements
-
The new
GeneralPath#areaOrPathContainsmethod tests if the path fuzzily contains a point and can be used for hit-testing aGeneralPath. -
All methods on the
GeneralPathclass now consistently acceptIPointinstead ofPointDandIRectangleinstead ofRectD. -
There are now methods on
RectDandPointDto calculate the distance between points and rectangles. -
The
GeneralPath#getProjectionmethod is now faster for paths with Bezier segments. -
The
IRectangleinterface no longer implementsIPoint. As a consequence, it is no longer possible to inadvertently use rectangles as parameters for methods that expect a point. You can still easily get the top-left corner of a rectangle with itsgetTopLeftmethod. Similarly,IMutableRectangleno longer implementsIMutablePoint.
Bug Fixes
-
The
GeneralPath#pathMayIntersectClipmethod has been corrected for paths with multiple segments, at least one of which is a cubic segment. -
The
SizeD#Areaproperty now returns 0 for empty sizes. This is consistent with the behavior of theRectD#Areaproperty.
Incompatible Changes
Categories: General Graph GraphBuilder Components Rendering Selection, Focus, Highlight Styles Interaction Snapping Clipboard Folding Lookup GraphML View-Layout-Bridge Layout Layout Data Hierarchical Layout Tree Layout Orthogonal Layout Edge Router Labeling Organic Layout Interactive Organic Layout Circular Layout Radial Layout Radial Tree Layout Radial Group Layout Series-parallel Layout Compact Disk Layout Multi-page Layout Partial Layout Tabular Layout Component Layout Tree Map Layout Recursive Group Layout Layout Grid Other Layouts Algorithms Analysis Collections Geometry
General
Incompatible API Changes
-
The
IEnumerableinterface has been renamed toIStreamIterableand several of its static and default methods have been removed. Most of the removed methods can be replaced by using the Java stream API. Furthermore, itsenumeratormethod together with theIEnumeratorinterface have been removed and the usages replaced by the inheritediteratormethod. -
The
IListEnumerableinterface has been renamed toIIndexedIterable -
IEnumerable.EMPTYandIListEnumerable.EMPTYfields have been removed. If there is need of an empty instance of those interfaces,IIndexedIterable.createcan be called withCollections.emptyList()as parameter. -
The
ICollectionandIListinterfaces has been removed. -
The
YListclass has been renamed toLinkedCellList -
Removed the
StripeSelectionclass. Instead, use the instance returned by theTableEditorInputMode#StripeSelectionproperty. -
The following classes are now sealed:
BorderLineSegment,LabelScopeData,ItemCollection,ItemMapping,FreePortLabelModel, andFreeNodeLabelModel. They either already had an internal constructor or do not offer any meaningful members for overriding. -
Removed the
Defaultprefix from the names of the following types:DefaultEdgePathCropper,DefaultFoldingEdgeConverter,DefaultFolderNodeConverter,DefaultLabelStyle,ObservableCollection,DefaultPortCandidate, andDefaultSelectionModel. -
Removed
DefaultLabelModelParameterFinder. -
Consistently use names
PaddingandMarginsin member names:-
Renamed the
TextEditorInputMode#TextAreaPaddingproperty toTextAreaMargins. -
Renamed the
LabelStyleIndicatorRenderer#Paddingproperty toMargins. -
Renamed the
GraphEditorInputMode#ContentRectMarginsproperty toContentMargins. -
Renamed the
OverviewInputMode#Marginsproperty toContentMargins. -
Renamed the
ViewportAnimation#TargetBoundsproperty toTarget. -
Renamed the
ViewportAnimation#TargetViewMarginsproperty toTargetMargins. -
Renamed the
StripeLabelModel#UsingActualInsetsEnabledproperty toUsingTotalPaddingEnabled. -
Renamed the
StretchStripeLabelModel#UsingActualInsetsEnabledproperty toUsingTotalPaddingEnabled. -
Renamed the
IStripe#getActualInsetsmethod togetTotalPadding. -
Renamed the
GroupNodeStyle#ContentAreaInsetsproperty toContentAreaPadding. -
Renamed
YInsetsproperties of allILabelModelimplementations toMargins. -
Replace name part
Insetsof other types and members withPadding.
-
Renamed the
-
Removed the
BridgeManager#ClipMarginproperty. -
Enum values that followed the
NORTH,EAST,SOUTH,WESTnaming convention have been renamed to follow aTop,Right,Bottom,Leftnaming convention. In particular, the values of the following enums have been renamed:HandlePositions,EdgeSegmentDirection,ExteriorLabelModel.Position,InteriorLabelModel.Position,InteriorStretchLabelModel.Position,StretchStripeLabelModel.Position, andStripeLabelModel.Position,. -
Renamed the
PortSideenum toPortSides. -
Added missing information whether method return values, method parameters, or properties can or cannot be
null. This might require additionalnullchecks or changed signatures of method overrides. -
Renamed the
CreateEdgeInputMode#SelfloopsAllowedproperty toSelfLoopsAllowed. -
Renamed the
GraphEditorInputMode#selectNodeAndSelfloopBendsmethod toselectNodeAndSelfLoopBends. -
Renamed the
GraphEditorInputMode#AutoSelectingSelfloopBendsEnabledproperty toAutoSelectingSelfLoopBendsEnabled. -
Renamed the
IEdge#isSelfloopmethod toIEdge#isSelfLoop.
Graph
Incompatible API Changes
-
The
ILookupinterface and its extension methods have been moved to thecom.yworks.yfiles.utilspackage. -
The
IMapperinterface and the Mappers class have been moved to thecom.yworks.yfiles.utilspackage. -
The
DefaultGraphclass has been renamed toGraph. -
The properties
LabelDefaultsofINodeDefaults,IEdgeDefaultsandIPortDefaultshave been renamed toLabels. -
The properties
PortDefaultsofINodeDefaultsandIEdgeDefaultshave been renamed toPorts. -
EdgePathLabelModelandEdgeSegmentLabelModelhave been modified to yield better results for some degenerate path cases. This leads to greater visual stability when the path is not long enough for the label or even completely invisible due to overlapping nodes. Technically, this can result in slightly different placements with the same parameter values in these edge-cases. -
Adding a label with
GroupNodeLabelModelto a node that does not useGroupNodeStyleor setting aGroupNodeLabelModel-created parameter for a label whose owner node does not useGroupNodeStyleno longer throws anIllegalArgumentExceptionclaiming "The parameter does not support this kind of label.". -
The
SegmentRatioPortLocationModelclass is now namedEdgeSegmentPortLocationModel, similar toEdgeSegmentLabelModel. -
The
createFromSourceandcreateFromTargetmethods of theSegmentRatioPortLocationModelandBendAnchoredPortLocationModelare now namedcreateParameterFromSourceandcreateParameterFromTarget. -
Removed the
TableAnimationclass. Use the factoryIAnimation#createTableAnimationmethod as a replacement. -
GenericPortLocationModelhas been renamed toCompositePortLocationModeland doesn't implementIStreamIterableanymore. Instead, theParametersproperty can be used to iterate the parameter. -
The
FreeEdgeLabelModel#createEdgeAnchoredmethod has been renamed tocreateParameter. -
The
FreeNodeLabelModel#createDefaultParametermethod has been removed and replaced by the newFreeNodeLabelModel#CENTERfield. -
The
FreeNodeLabelModel#createCanonicalParametermethod has been renamed tocreateParameter. -
The
FreePortLabelModel#createDefaultParametermethod has been removed and replaced by the newFreePortLabelModel#CENTERfield. -
The label models
ExteriorLabelModel,InteriorLabelModel, andInteriorStretchLabelModelhave been renamed toExteriorNodeLabelModel,InteriorNodeLabelModel, andStretchNodeLabelModel, respectively,. -
The
GenericLabelModelclass has been removed. Its functionality has been integrated into theCompositeLabelModel, which can be used instead. -
The
CompositeLabelModel#LabelModelsproperty has been removed. Instead of adding label models to this list, the newaddModelmethod has to be called. -
The static
LabelModelParameterSerializerandPortLocationModelParameterSerializerclasses have been removed. These classes could be used to retrieve the properties of label model parameters and port location model parameters and are not necessary anymore as the parameter classes are now public. -
The
ILabelModelparameter of theILabelModelParameterFinder#findBestParameterandILabelModelParameterProvider#getParametersmethods has been removed. -
The classes
ConsumerUndoUnitandCompositeUndoUnithave been removed. The new factory methodsIUndoUnit#fromConsumerandIUndoUnit#combinecan be used instead. -
The
AbstractUndoUnitclass has been removed. Subclasses now have to implement theIUndoUnitinterface instead. -
The
ownerparameter of theITable#createRow,createColumn, andsetParentmethods has been renamed toparent. -
Changes to the
GraphCopierclass:-
The methods
copyNodeStyle,copyEdgeStyle,copyPortStyle,copyLabelStyle,getOrCreateCopy,copyLabelLayoutParameter, andcopyPortLocationParameterhave been made protected. -
The methods
copyNode,copyGroupNode, andcopyEdgehave been renamed tocreateNode,createGroupNode, andcreateEdgeto clarify their role. -
The
Cloneproperty has been renamed toCloneTypes. -
The
Copymethod now uses anIStreamIterableof items instead of a filter predicate to define the subset to copy.
-
The methods
-
The
ILabelModel#createDefaultParametermethod has been removed. Instead suitable other Create*Parameter methods of the concrete label model implementations should be used. -
The
IPortLocationModelParameter#supportsmethod has been removed. Instead, theIPortLocationModel#getLocationmethod may now throw an exception if the port and port location model parameter don't match. -
The structural properties of graph items (
IEdge#SourcePort,IEdge#TargetPort,ILabel#Owner,IPort#Owner,IBend#Owner) now throw exceptions if accessed for items that are no longer in the graph. If it is unknown whether the item is still in the graph, please test the item withhasOwnerorhasSourceAndTargetPortfirst before accessing these properties. -
IEdge'sgetSourceNodeandgetTargetNodemethods now throw exceptions if called for an edge that is no longer in the graph or if the owner of the edge's source or target port is not a node. -
The
ILabelModelParameter#supportsmethod has been removed. Instead, theILabelModel#getGeometrymethod may now throw an exception if the label and label model parameter don't match. -
The
GraphItemTypes#notContainsmethod was removed, use thecontainsmethod instead. -
Method
GroupingSupport#getPathToRoothas been renamed togetAncestorsand returns anIIndexedIterableinstead of anIList. -
The static parameter fields of
FreeNodePortLocationModelhave been renamed analogue to the static parameter fields inInteriorNodeLabelModel. -
The
GraphClipboard#isDummymethod has been renamed toisHelper. -
The
UndoEngine#Tokenproperty replaces theUndoEngine#getTokenmethod. -
The
IMapperRegistryinterface, theMapperRegistryclass, and theIGraph#MapperRegistryproperty have been removed. To store additional information for graph items, either use the item's Tag property or keep a dictionary alongside the graph.
To configure layout settings for individual items, useLayoutDatainstead. -
The
ITagOwnerinterface is now in thecom.yworks.yfiles.utilspackage.
Incompatible Behavior Changes
-
The rotation direction of
OrientedRectangle,NodeLabel,EdgeLabelandFreeEdgeLabelModelis now clockwise to be consistent with the other models. -
The
EdgeSegmentPortLocationModel#createParameterFromTargetmethod now interprets the parameter ratio from the target to the source side. -
The arrow of the default edge style is now
ArrowType#TRIANGLE. -
The default edge label model parameter is now created from an
EdgeSegmentLabelModelusing itscreateParameterFromCentermethod instead ofcreateParameterFromSource. -
The default value for the
Paddingproperties ofExteriorNodeLabelModel,InteriorNodeLabelModel,StretchNodeLabelModel, andStretchStripeLabelModelhave been changed from empty insets to insets with value 2 on each side. This way the label bounds per default don't touch the bounds of their owner anymore. -
The default value for the
Distanceproperties of theEdgePathLabelModelandEdgeSegmentLabelModelwhen using their default constructors have been changed from 0 to 2. This way the label bounds per default don't touch the edge path of their owner anymore when anEdgeSideother thanON_EDGEis used. -
The default lookup for
INodedoesn't return anIMutableRectangleanymore, the default lookup forIBenddoesn't return anIMutablePointanymore, and the default lookup forILabeldoesn't return anIMutableSizeanymore. -
SegmentRatioPortLocationModelnow uses the path geometry from the edge's style instead of bend locations to determine segments.
GraphBuilder
Incompatible API Changes
-
TreeNodesSourceandAdjacencyNodesSourceno longer inherit fromNodesSource. -
TreeBuilder#setDataonly accepts aTreeNodesSourceand no longer aNodesSourceas a parameter.
Components
Incompatible API Changes
-
The
XMLnamespace for yFiles Java has changed and is nowhttp://www.yworks.com/xml/yfiles-for-java/4.0. -
The
GraphModelManager#LabelLayerPolicyproperty has been removed. Use the more specific propertiesNodeLabelLayerPolicy,EdgeLabelLayerPolicy, andPortLabelLayerPolicyinstead. -
GridVisualCreatorhas been renamed toGridRenderer. -
Renamed the coordinate transformation methods to also include the source coordinate system in their names:
-
Renamed
CanvasComponent#toViewCoordinatestoworldToViewCoordinates. -
Renamed
CanvasComponent#toWorldCoordinatestoviewToWorldCoordinates. -
Renamed
IRenderContext#toViewCoordinatestoworldToViewCoordinates.
-
Renamed
-
The default
InputModeinGraphComponentis no longernullbut is now set toGraphViewerInputMode. -
Renamed
HighlightIndicatorManager#SelectionModeltoItems. -
Renamed
SelectionIndicatorManager#SelectionModeltoItems. -
Renamed
SelectionIndicatorManager#ModeltoDomain. -
Renamed commands
MOVE_FOCUS_BACKandMOVE_FOCUS_FORWARDtoMOVE_FOCUS_LEFTandMOVE_FOCUS_RIGHT. -
Renamed the
CanvasComponent#AutoDragEnabledproperty toAutoScrollingOnBoundsEnabled. -
Renamed the
CanvasComponent#AutoDragInsetsproperty toAutoScrollPadding. -
Renamed the
ViewportChanges#AUTO_DRAGfield toAUTO_SCROLL_ON_BOUNDS. -
Renamed the
CanvasComponent#AutoDragEnabledproperty toAutoScrollingOnBoundsEnabled. -
Renamed the
CanvasComponent#AutoDragInsetsproperty toAutoScrollPadding. -
Renamed the
ViewportChanges#AUTO_DRAGfield toAUTO_SCROLL_ON_BOUNDS. -
Removed the
DragSize,DragTimeandDoubleClickSizeproperties of theCanvasComponentclass. -
Some rarely used constants in
IEventRecognizerhave been removed. -
The events on
CanvasComponentwhich are related to input devices and the correspondingIEventRecognizerconstants have been renamed to conform to platform conventions. -
The new
CanvasComponent#RenderTreeproperty now encapsulates all low-level render object related API which was previously available directly onCanvasComponent.-
This includes the default render tree groups (
RootGroup,BackgroundGroup,ForegroundGroup,ContentGroup,SelectionGroup,FocusGroup,HighlightGroup,InputModeGroup), the helper methods relating to render tree elements (hitElementsAt,isHit,getVisual,getVisualCreator,getCanvasObjects(nowgetElements),getBounds). -
Furthermore, some functionality previously available on
ICanvasObject(Group)has been moved toRenderTreeas well, such as creating new elements or groups, changing the parent group or removing a render tree element.
-
This includes the default render tree groups (
-
The superfluous
CanvasComponent#setContentRectmethod has been removed in favor of the setter of theContentBoundsproperty. -
The
GraphModelManagerconstructor no longer hascanvasComponentandcontentGroupparameters. Also, theContentGroupproperty can no longer be set directly. Instead, theinstallmethod now sets bothCanvasComponentandContentGroup. -
Renamed
Canvasword components in properties and method parameter names toCanvasComponent. -
ViewportLimiter#limitViewportnow uses a signature that works with the new typeViewportDescriptorand respects the newViewportLimitingModeenum. -
ViewportLimiter#HonoringBothDimensionsEnabledis now calledViewportLimiter#StrictBoundsContainmentEnabledand the default value changed to false. -
The
ICanvasObject#Groupproperty has been renamed toParent.
Incompatible Behavior Changes
-
For new
GraphModelManagerinstances, theinstallmethod has to be called either directly or indirectly by assigning theGraphModelManagerto theGraphComponent#GraphModelManagerproperty. -
Changed the default
CanvasComponent#MouseWheelBehaviortoMouseWheelBehavior.SCROLL.or(MouseWheelBehavior.ZOOM) -
Changed default modifier for
MouseWheelBehavior.SCROLL.or(MouseWheelBehavior.ZOOM):Mousewheelwithout any modifier zoomsMousewheel+shiftpans horizontallyMousewheel+ctrlpans verticallyMousewheel+altis center zoom
Rendering
Incompatible API Changes
-
The
ICanvasObjectDescriptorinterface has been renamed toIObjectRendererand itsisDirtymethod has been removed. -
The
ICanvasObjectinterface has been renamed toIRenderTreeElementand itsUserObjectproperty has been renamed toTag. ItsDescriptorproperty has been replaced with propertyRendererof typeIObjectRenderer. -
The
ICanvasObjectGroupinterface has been renamed toIRenderTreeGroup. -
The
ICanvasObjectInstallerinterface has been removed. -
The singletons of the
ICanvasObjectDescriptorclass are no longer necessary, and thus, this class has been removed. There is now aIObjectRenderer#VOID_OBJECT_RENDERERsingleton. -
The
IFocusIndicatorInstaller,IHighlightIndicatorInstaller, andISelectionIndicatorInstallerinterfaces have been renamed toIFocusRenderer,IHighlightRenderer, andISelectionRendererrespectively and now inherit fromIObjectRendererinstead ofICanvasObjectInstaller. Classes implementing these interfaces have been changed accordingly (EdgeStyleDecorationInstaller,LabelStyleDecorationInstaller,NodeStyleDecorationInstaller, andPortStyleDecorationInstallerhave been renamed toEdgeStyleIndicatorRenderer,LabelStyleIndicatorRenderer,NodeStyleIndicatorRenderer, andPortStyleIndicatorRendererrespectively). -
The
getInstallermethods on theModelManager,FocusIndicatorManager,HighlightIndicatorManager, andSelectionIndicatorManagerclasses are now calledgetRendererand returnIObjectRenderer. Similarly, thegetCanvasObjectGroupmethods of these classes have been renamed togetRenderTreeGroup. -
The members of class
GraphModelManagerhave been adjusted to reflect theICanvasObjectDescriptorandICanvasObjectrenamings. More precisely,DEFAULT_EDGE_DESCRIPTOR,DEFAULT_LABEL_DESCRIPTOR,DEFAULT_NODE_DESCRIPTOR,DEFAULT_PORT_DESCRIPTOR,EdgeDescriptor,EdgeLabelDescriptor,NodeDescriptor,NodeLabelDescriptor,PortDescriptor,PortLabelDescriptor,ProvidingUserObjectOnMainCanvasObjectEnabled,getCanvasObject,getCanvasObjectGroup,getCanvasObjectGroup,getCanvasObjectGroup,getCanvasObjectGroup, andgetMainCanvasObjecthave been renamed toDEFAULT_EDGE_RENDERER,DEFAULT_LABEL_RENDERER,DEFAULT_NODE_RENDERER,DEFAULT_PORT_RENDERER,EdgeRenderer,EdgeLabelRenderer,NodeRenderer,NodeLabelRenderer,PortRenderer,PortLabelRenderer,ProvidingRenderTagOnMainRenderTreeElementEnabled,getRenderTreeElement,getRenderTreeGroup,getRenderTreeGroup,getRenderTreeGroup,getRenderTreeGroup, andgetMainRenderTreeElementrespectively. -
The members of class
ItemModelManagerhave been adjusted to reflect theICanvasObjectDescriptorandICanvasObjectrenamings. More precisely,CanvasObjectGroup,Descriptor,getCanvasObject,getCanvasObjectGroup, andgetDescriptorhave been renamed toRenderTreeGroup,Renderer,getRenderTreeElement,getRenderTreeGroup, andgetRendererrespectively. -
The
RectangleIndicatorInstaller,OrientedRectangleIndicatorInstaller, andPointSelectionIndicatorInstallerclasses have been removed. -
The
IStripeInputVisualizationHelperinterface is now calledIStripeInputRendererand extendsIObjectRenderer, theDefaultStripeInputVisualizationHelperclass has been removed. -
The
StripeDecorator#InputVisualizationDecoratorproperty has been renamed toInputRenderer. -
The
DefaultPortCandidateDescriptorclass is now calledPortCandidateRenderer. The class no longer has theCANDIDATE_DRAWING_VALID_NON_FOCUSED_KEY,CANDIDATE_DRAWING_VALID_FOCUSED_KEY,CANDIDATE_DRAWING_INVALID_NON_FOCUSED_KEY, andCANDIDATE_DRAWING_INVALID_FOCUSED_KEYstatic properties. -
The new
PortCandidateRendererproperty on theCreateEdgeInputModeclass replaces theCandidateDescriptorandClosestCandidateDescriptorproperties. -
The new public property
PortCandidateRendereron thePortRelocationHandleclass replaces thecreatePortCandidateDescriptorandcreateCurrentPortCandidateDescriptorprotected methods. -
The new public property
PortCandidateRendereron thePortRelocationHandleProviderallows customizing the renderer for the port candidates. -
The new
ViewportRectangleRendererproperty on theOverviewInputModeclass allows customizing the renderer for the viewport rectangle. It replaces theTemplateproperty and theVIEWPORT_TEMPLATE_KEYstatic property. -
The new
MarqueeSelectionInputMode#MarqueeRendererproperty replaces theTemplateproperty andMARQUEE_RECTANGLE_TEMPLATE_KEYstatic property. -
The new
LassoSelectionInputMode#LassoRendererproperty replaces theFinishRegionTemplateandFinishRegionHighlightTemplateproperties and theFINISH_REGION_TEMPLATE_KEYandFINISH_REGION_HIGHLIGHT_TEMPLATE_KEYstatic properties. Also, theLASSO_PEN_KEYandLASSO_FILL_KEYstatic properties have been removed. -
The new
CandidateRendererproperty on theLabelPositionHandlerclass replaces theCandidateTemplateandHighlightTemplateproperties and theCANDIDATE_TEMPLATE_KEYandHIGHLIGHT_TEMPLATE_KEYstatic properties. -
The
getCanvasObjectandgetCanvasObjectsmethods of classCanvasComponenthave been renamed togetRenderTreeElementand have been moved to theGraphModelManagerclass. -
The
createSnapResultCanvasObjectDescriptormethod of classSnapContexthas been renamed tocreateSnapResultRenderer. -
The
GraphVisualCreatorproperty of classGraphOverviewComponentis now calledGraphOverviewRendererand of typeIObjectRenderer. -
The
OverviewGraphVisualCreatorclass is now calledGraphOverviewRendererand implementsIObjectRendererinstead ofIVisualCreator.
Selection, Focus, Highlight
Incompatible API Changes
-
Replaced event
FocusIndicatorManager#PropertyChangedwith eventFocusedItemChanged. -
Renamed Method
FocusIndicatorManager#onPropertyChangedtoonFocusedItemChangedand changed signature. -
The
EdgeStyleDecorationInstaller,LabelStyleDecorationInstaller,NodeStyleDecorationInstaller, andPortStyleDecorationInstallerclasses were removed. Use theEdgeStyleIndicatorRendereretc. classes instead. -
The
addSelectionandremoveSelectionmethods on theSelectionIndicatorManagerclass were removed. Instead, modify theItemsproperty directly. -
FocusIndicatorManager#ShowFocusPolicychanged its default to the newWHEN_USING_KEYBOARD. The old policy calledONLY_WHEN_FOCUSEDis now calledWHEN_FOCUSED. -
HighlightIndicatorManagernow by default uses the newGraphComponent#Highlightscollection. Adding, removing, and clearing highlights should now be done via theGraphComponent#Highlightsproperty. -
The
ISelectionModelinterface has been removed and usages have been replaced byIObservableCollection. Thus, selecting an element works by callingCollection#add, deselecting works by callingCollection#remove, and checking the selection state is done viaCollection#contains. -
The
ItemSelectionChangedEventArgshave been replaced by usages ofItemEventArgsand there are now two separate events for adding/selecting and removing/deselecting elements from the collections. TheItemSelectionChangedEventArgstype has been removed. -
The default implementations of
IGraphSelectionandIStripeSelectionhave been removed from the public API.
Styles
Incompatible API Changes
-
ShapeVisual#Fillproperty has been renamed toPaint. -
The
TextAlignmentenum has been renamed toHorizontalTextAlignment. -
The
VerticalAlignmentenum has been renamed toVerticalTextAlignment. -
The
LabelStyle#TextAlignmentproperty has been renamed toLabelStyle#HorizontalTextAlignment. -
If
GroupNodeStyle's tab width is set to 0, the tab width does not reduce the corner radius of the style's outline anymore. However, it still forces the corner radius of the style's inner corners (i.e. the corners of the content area on the side of the style's tab) to 0. -
The class
Arrowis now immutable and comes with separate scale factors for arrow length and width. The default arrow was renamed toArrowType#STEALTH, circle arrow toArrowType#ELLIPSE, and simple arrow toArrowType#OPEN. The short arrow type was removed. -
The
Wrappedproperty ofCollapsibleNodeStyleDecorator,ShadowNodeStyleDecorator, andIconLabelStylehas been renamed toWrappedStyle. -
Most item style implementations have become sealed, and their renderers have been removed from the API. Instead of
subclassing the styles or their renderers, custom style implementations should use delegation instead. For this the
new
DelegatingNodeStyleandCompositeNodeStylestyle variants may be used. - The item style constructors taking a custom renderer implementation have been removed. Instead, a custom style should be implemented that may delegate to one of the library styles.
-
The
TableNodeStyle#copyBackgroundStylemethod has been removed. Theclonemethod doesn't deep copy the background style but just uses it for the clone as well, which also was the previous default behavior. -
The deprecated styles
BevelNodeStyle,PanelNodeStyleandShinyPlateNodeStylehave been removed. -
Renamed some values of
TextWrappingShapeandShapeNodeShape:-
Triangle2 is now
TRIANGLE_POINTING_DOWN. -
Hexagon2 is now
HEXAGON_STANDING.
-
Triangle2 is now
-
Removed the following values from
ShapeNodeShape:SHEARED_RECTANGLE,SHEARED_RECTANGLE2,TRAPEZ,TRAPEZ2,FAT_ARROW, andFAT_ARROW2.-
Use the
ArrowNodeStylefor more flexible visualizations of these geometries.
-
Use the
-
Renamed
STAR5_UPtoSTAR5, removed old (down pointing)STAR5.-
Use the factory methods on
GeneralPathNodeStylefor stars and polygons with an arbitrary number of points/edges and configurable rotation angle.
-
Use the factory methods on
-
Removed the following values from
TextWrappingShape:SHEARED_RECTANGLE,SHEARED_RECTANGLE2,TRAPEZ, andTRAPEZ2. -
The
IArrowinterface now requires theCropAtPortproperty to be provided by implementations. For backward compatibility return false in simple subclasses. -
The
VOID_NODE_STYLE,VOID_EDGE_STYLE,VOID_LABEL_STYLE,VOID_PORT_STYLE,VOID_STRIPE_STYLEclasses, and the respective renderer classes were removed. Use one of the following constant singletons instead:INodeStyle#VOID_NODE_STYLE,IEdgeStyle#VOID_EDGE_STYLE,ILabelStyle#VOID_LABEL_STYLE,IPortStyle#VOID_PORT_STYLE, andIStripeStyle#VOID_STRIPE_STYLE. -
The
VoidShapeGeometryandVoidPathGeometryclasses were removed. Use one of the following constant singletons instead:IShapeGeometry#VOID_SHAPE_GEOMETRYandIPathGeometry#VOID_PATH_GEOMETRY. -
The
IVisualTemplateinterface and the templating mechanism has been removed and replaced by theIObjectRendererAPI. -
The static getter methods on
Penreturning thePenconstants have been replaced by corresponding static fields (e.g.Pen.getAzure()byPen.AZURE). -
The
Pen#EndCapproperty has been renamed toEndLineCap. -
The
MemoryImageNodeStyle#BitmapSourcehas been renamed toImages.
Interaction
Incompatible API Changes
-
CanvasComponent'sLastEventLocationproperty has been removed. UsegetLastPointerEvent().getLocation()instead. -
CanvasComponent'sLastInputEventproperty has been renamed toLastPointerEventto better reflect its type. -
The generic
IGridConstraintProviderinterface has been removed, its usages have been replaced with the existing item-specific interfaces, and the unusedILabelGridConstraintProviderandILabelOwnerGridConstraintProviderhave been removed. In addition, theGridConstraintProviderclass is no longer generic and implements all remaining item-specific interfaces. -
Removed the
PortRelocationHandle#createDummyEdgeVisualCreatormethod. To change the preview edge's style overwritePortRelocationHandle#createPreviewEdgeinstead. -
The
LabelPositionHandler#setPositionmethod has been removed. -
The
LabelPositionHandler#UsingFinderEnabledproperty has been removed. Use the newUseParameterFinderRecognizerproperty instead. -
The
LabelPositionHandler#useParameterFindermethod has been renamed toshouldUseParameterFinder. -
The protected virtual
createEdgeCreationInputModeContextmethod on theCreateEdgeInputModeclass has been removed. Use or override thecreateInputModeContextmethod, instead. -
The
ToolTipQueryEventArgsclass is now namedQueryToolTipEventArgsto properly match the corresponding event's name. -
Renamed
DoubleClickPolicytoClickReportingPolicy. -
Renamed
ClickInputMode#DoubleClickPolicytoClickReportingPolicy. -
Renamed
DoubleClickPolicy#INITIAL_SINGLE_AND_DOUBLE_CLICKtoClickReportingPolicy#INSTANT. -
Renamed
DoubleClickPolicy#DOUBLE_CLICK_ONLYtoWAIT_FOR_DOUBLE_CLICK. -
Removed
DoubleClickPolicy#BOTH_SINGLE_CLICKS_AND_DOUBLE_CLICK. -
Changed the default of
ClickInputMode#ClickReportingPolicytoClickReportingPolicy#INSTANT. -
Removed the
preventNextDoubleClickmethod fromClickInputModeclass. Use thecancelmethod instead. -
The
LassoSelectionEventArgs#SelectionPathproperty has been renamed toPath. -
The core
marqueeSelectandlassoSelectmethods ofGraphEditorInputModeandGraphViewerInputMode, that take an enumerable and predicate, have been removed while the othermarqueeSelectandlassoSelectmethod got an additional parameter of typeSelectionPolicy. -
Renamed
DropInputMode#MousePositiontoPointerPosition. -
Renamed
ItemDropInputMode#SnappedMousePositiontoSnappedPointerPosition. -
The generic type of the
IHitTesterinterface has been removed. Instead, a parameter of typeGraphItemTypeshas been added to itsiterateHitsmethod. -
Renamed
LabelDropInputMode#UsingBestMatchingParameterEnabledandPortDropInputMode#UsingBestMatchingParameterEnabledtoUsingLocationForParameterEnabled. -
Events which involve item changes triggered by input modes are now of type
InputModeItemEventArgsinstead ofItemEventArgs. These are the events:-
CreateBendInputMode:BendCreated. -
CreateEdgeInputMode:StartPortCandidateChanged,EndPortCandidateChanged,EdgeCreated,PortAdded,EdgeCreationStarted. -
GraphEditorInputMode:LabelEdited,LabelAdded,NodeCreated,PortAdded. -
ItemDropInputModeand inheritors:ItemCreated. -
NavigationInputMode:GroupCollapsing,GroupCollapsed,GroupExpanding,GroupExpanded,GroupEntering,GroupEntered,GroupExiting,GroupExited. -
TableEditorInputMode:DeletedItem. -
EditLabelInputMode:LabelAdded,LabelEditingStarted,LabelEditingCanceled,LabelEdited. -
StripeDropInputMode:StripeCreated.
-
-
Events which involve item deletion or structural changes triggered by input modes are now of type
InputModeItemChangedEventArgs:-
GraphEditorInputMode#DeletedItem:InputModeItemChangedEventArgsinstead ofIEventListener<ItemEventArgs>. -
GraphEditorInputMode#EdgePortsChanged:InputModeItemChangedEventArgsinstead ofEdgeEventArgs. -
GraphEditorInputMode#NodeReparented:InputModeItemChangedEventArgsinstead ofNodeEventArgs. -
EditLabelInputMode#LabelDeleted:InputModeItemChangedEventArgsinstead ofLabelEventArgs.
-
-
Renamed "Source" to "Start" and "Target" to "End" in the following members of
CreateEdgeInputModeclass:-
Renamed
ResolvingSourcePortCandidatesEnabledtoResolvingStartPortCandidatesEnabled. -
Renamed
ResolvingTargetPortCandidatesEnabledtoResolvingEndPortCandidatesEnabled. -
Renamed
SourcePortCandidateChangedtoStartPortCandidateChanged. -
Renamed
TargetPortCandidateChangedtoEndPortCandidateChanged. -
Renamed
SourcePortCandidatetoStartPortCandidate. -
Renamed
TargetPortCandidatetoEndPortCandidate. -
Renamed
SnappingToTargetCandidateEnabledtoSnappingToEndCandidateEnabled. -
Renamed
CancelGestureOnInvalidTargettoCancelingGestureOnInvalidEndEnabled. -
Renamed
SourceNodeDraggingCursortoStartPortOwnerDraggingCursor. -
Renamed
ShowSourcePortCandidatesHitTestabletoShowStartPortCandidatesHitTestable. -
Renamed
onSourcePortCandidateChangedtoonStartPortCandidateChanged. -
Renamed
onTargetPortCandidateChangedtoonEndPortCandidateChanged. -
Renamed
SourcePortCandidateChangedtoStartPortCandidateChanged. -
Renamed
TargetPortCandidateChangedtoEndPortCandidateChanged. -
Renamed
getSourcetogetStartPortOwner. -
Renamed
getTargettogetEndPortOwner. -
Renamed
getSourcePortCandidateProvidertogetStartPortCandidateProvider. -
Renamed
getTargetPortCandidateProvidertogetEndPortCandidateProvider. -
Renamed
getSourcePortCandidatestogetStartPortCandidates. -
Renamed
getTargetPortCandidatestogetEndPortCandidates. -
Renamed
getSourcePortCandidate(IEnumerable,<IPortCandidate>PointD, boolean) toselectStartPortCandidate. -
Renamed
getClosestCandidatetoselectClosestCandidate. -
Renamed
getClosestSourceCandidatetoselectClosestStartCandidate. -
Renamed
getClosestTargetCandidatetoselectClosestEndCandidate. -
Renamed
SourcePortCandidateHitRadiustoStartPortCandidateHitRadius. -
Renamed
updateTargetLocationtoupdateEndLocation. -
Renamed
ShowingTargetHighlightEnabledtoShowingEndHighlightEnabled. -
Renamed
updateTargetHighlighttoupdateEndHighlight. -
Renamed
DummyTargetNodetoPreviewEndNode. -
Renamed
DummyTargetNodePorttoPreviewEndNodePort.
-
Renamed
-
Renamed
ShowPortCandidates#SOURCEtoStartandShowPortCandidates#TARGETtoEnd. -
Removed
CreateEdgeInputMode#createDummyEdgeGraph,CreateEdgeInputMode#createDummyEdge,CreateEdgeInputMode#createDummyTargetNode,CreateEdgeInputMode#createDummyTargetNodePort,CreateEdgeInputMode#updateDummyEdgeSourcePort, andCreateEdgeInputMode#updateDummyEdgeTargetPort. -
The
InputModeContextproperty has been removed from theIInputModeinterface. In input mode implementations, the property has been renamed toParentInputModeand changed to protected access to prevent incorrect usage. -
ICanvasContext#DEFAULTandICanvasContext#createhave been removed. A validICanvasContextcan be retrieved from theCanvasComponent#CanvasContextproperty. -
IInputModeContext#EMPTYhas been removed. A validIInputModeContextcan be retrieved usingCanvasComponent#InputModeContextproperty. -
The factory methods for input mode contexts on the
IInputModeContextinterface have been removed. AppropriateIInputModeContextimplementations can be obtained usingInputModeContextclass withCanvasComponent#InputModeContextas parent context. -
The static fields
ALL_NODE_CANDIDATESandALL_NODE_AND_EDGE_CANDIDATESonIEdgeReconnectionPortCandidateProviderhave been replaced by the factory methodsfromAllNodeCandidatesandfromAllNodeAndEdgeCandidates. The implementations now provide a port candidate for the unchanged port of the edge when collecting the port candidates from theIPortCandidateProviderinstances of the nodes and edges. -
CreateEdgeInputMode's methods have been renamed:-
getClosestSourceCandidatetoselectClosestStartCandidate. -
getClosestCandidatetoselectClosestCandidate. -
getClosestTargetCandidatetoselectClosestEndCandidate.
-
-
CreateEdgeInputMode#StartPortCandidateHitRadiusnow is defined in view coordinates. -
The
HandleTypesenums has been refactored to a non-flaggableHandleTypeenum, and the values have been adjusted. -
A
Tagproperty has been added to theIHandleinterface. yFiles does not use the property and initializes it withnull, but decorating handles forward any values unmodified. -
The
textProviderparameter forToolTipInputMode's constructor has been removed. An event handler for theQueryToolTipevent can be registered instead. -
The
ICommandinterface and its implementations have been replaced with the enumCommand. -
Constants of
ICommandhave been replaced with equally named constants of enumCommand. -
The methods
canExecuteandexecuteand itsCanExecuteChangedevent inICommandhave been replaced withCanvasComponent'scanExecuteCommandandexecuteCommandmethods and theCanExecuteChangedevent, respectively. -
Custom commands can no longer be created. As an alternative, register handlers on
KeyboardInputMode. -
Removed callback methods which only raised the related events from classes
CanvasComponentandGraphComponent. -
Removed the factory methods for the sub-input modes from
GraphViewerInputMode,GraphEditorInputMode,TableEditorInputMode, andTextEditorInputMode(e.g.createKeyboardInputMode). Set custom instances using the properties, instead. -
Removed the factory methods for the
ToolTipandTextAreaproperties on classesToolTipInputModeandTextEditorInputMode, respectively. Set custom instances using the properties, instead. -
Removed the methods
getBounds,getVisual,getVisualCreator, andisHitfromCanvasComponentclass. Use the respective methods ofRenderTreeclass instead. -
The
MouseHoverInputModeclass has been renamed toToolTipInputMode. -
The
GraphViewerInputMode#MouseHoverInputModeandGraphEditorInputMode#MouseHoverInputModeproperties have been renamed toToolTipInputMode. -
The
NavigationInputMode#findNearestItemmethod now gets thestartItemas a parameter instead of the location of it, and this item is also included in theitemsToCheckparameter. Implementations may use the newgetReferenceLocationmethod to find the starting location and should make sure not to return thestartItemitself. -
The protected
Should-methods of the input modes have been removed and replaced by predicate properties. -
The event
GraphEditorInputMode#LabelTextChangedhas been changed toLabelEditedto reflect the broader scope of changes allowed during label editing. Similarly,GraphEditorInputMode#onLabelTextChangedis now namedonLabelEdited. -
Most methods, properties, and events related to label editing have been moved from
GraphEditorInputModetoEditLabelInputMode:AutoRemovingEmptyLabelsEnabled,HidingLabelDuringEditingEnabled,TextEditorInputMode,TextEditorInputModeConfigurator,createLabel,createLabelCore,editLabelCore,openTextEditor,LabelDeleted,LabelTextEditingStarted,LabelTextEditingCanceled, andValidateLabelText. The eventsLabelEditingandLabelAddinghave been moved toEditLabelInputModeand renamed toQueryLabelEditingandQueryLabelAdding, respectively, to clarify their purpose. -
Most methods, properties, and events related to label editing have been moved from
TableEditorInputModetoEditLabelInputMode:AutoRemovingEmptyLabelsEnabled,HidingLabelDuringEditingEnabled,TextEditorInputMode,TextEditorInputModeConfigurator,createLabel,createLabelCore,editLabelCore,openTextEditor,LabelDeleted,LabelTextEditingStarted,LabelTextEditingCanceled, andValidateLabelText. The eventsLabelEditingandLabelAddinghave been moved toEditLabelInputModeand renamed toQueryLabelEditingandQueryLabelAdding, respectively, to clarify their purpose. -
Replaced
Mouse2DEventArgswithPointerEventArgs. -
Removed all
ClickInputModeevents except forClicked. Click buttons and click count can be obtained from theClickEventArgs. -
Method
getBendsInPathhas been added to theIBendSelectionTesterinterface and is used to check for bends that should be lasso selected. -
Method
getPortsInPathhas been added to theIPortSelectionTesterinterface and is used to check for ports that should be lasso selected. -
InvalidItemsDiscardingEnabledinItemHoverInputModehas been renamed toIgnoringInvalidItemsEnabled, and its behavior was reversed. -
The
ItemDropInputMode#DragDroppedevent is now raised after the drop gesture has actually finished, in line with how similar events are raised elsewhere. -
Bends in edges that use
ArcEdgeStyle,ArrowEdgeStyle, orBridgeEdgeStyleare no longer shown when selecting these edges. Additionally, marquee and lasso selection will not select these bends anymore even if they lie in the selection rectangle. -
The
MoveLabelInputModeclass and its corresponding property onGraphEditorInputModehave been removed. Label movement is now handled directly byMoveInputMode. Most customizations related tolabelmovement (as opposed to the move gesture in general) can now be done onLabelPositionHandler, instead. -
The
MoveInputModeandHandleInputModesub-modes ofGraphEditorInputModeno longer have a pre-setSnapContext. Instead, they take theSnapContextfrom theInputModeContext. That way, changing theSnapContextonGraphEditorInputModewill also affect the sub-modes. -
HoveredItemChangedEventArgsis no longer a subclass of the unrelatedItemEventArgs. -
Replaced
Dummyin names with a more descriptive term. In particular:-
In
CreateEdgeInputMode,DummyEdge,DummyEdgeGraph,DummyTargetNode,,DummyTargetNodePort,updateDummyEdgeSourcePort,updateDummyEdgeTargetPort,getDummyEdgeSnapLines, andCreateDummyBendhave been renamed toPreviewEdge,PreviewGraph,PreviewEndNode,PreviewEndNodePort,updatePreviewEdgeStartPort,updatePreviewEdgeEndPort,getPreviewEdgeSnapLines, andcreatePreviewBend. -
The
Visualization#DUMMYenum value has been renamed toVisualization#PLACEHOLDER. -
In
PortRelocationHandle,createDummyEdgehas been renamed tocreatePreviewEdge.
-
In
-
The event
DeletedSelectionofGraphEditorInputModenow usesItemsEventArgsinstead ofSelectionEventArgs. -
The
doStartEdgeCreationmethod on theCreateEdgeInputModeclass is now calledstartEdgeCreation. -
The
doStartDragmethod on theMoveInputModeclass is now calledstartDrag. -
The
beginDraggingmethod on theHandleInputModeclass is now calledstartDrag. -
The
addLabelmethod onGraphEditorInputModeis now calledstartLabelAddition. -
The
editLabelmethod onGraphEditorInputModeis now calledstartLabelEditing.
Incompatible Behavior Changes
-
Changed the default of
TextEditorInputMode#TextAreaPlacementPolicytoTextAreaPlacementPolicy#MOVE_TEXT_AREA. -
The
GraphViewerInputMode#findItemsandGraphEditorInputMode#findItemsmethods now considers the actual z-order of the hit items. -
GraphEditorInputMode'sMoveUnselectedItemsInputModenow only moves unselected items. Previously it also moved selected items despite its name. -
The
MultiSelectionRecognizerofGraphEditorInputModeandGraphViewerInputModeare not used anymore for marquee and lasso selection. Instead,MarqueeSelectionInputModeandLassoSelectionInputModehave their own modifiers for different selection policies. -
The
LabelDropInputMode#isValidLabelOwnermethod now only accepts instances ofFreeLabelModelor that thedraggedLabel's owner type matches the owner type e.g.INode,IEdge, orIPort. -
The default values of the
NodeReshapeHandleProvider#RatioReshapeRecognizerproperty andReshapeHandlerHandlehas been changed tonull. If no custom recognizer is set,ReshapeHandlerHandleuses the newHandleInputMode#isDirectionalConstrainedmethod instead if aHandleInputModeis found in theIInputModeContext. -
The default value of
EnableSnappingRecognizerinCreateEdgeInputMode,HandleInputMode, andMoveInputModehas been changed fromCTRL_UPtoALT_UP. -
The default value of
DisableSnappingRecognizerinCreateEdgeInputMode,HandleInputMode, andMoveInputModehas been changed fromCTRL_DOWNtoALT_DOWN. -
The default value of
CenterReshapeRecognizerinNodeReshapeHandleProviderandReshapeHandlerHandlehas been changed fromALT_IS_DOWNtoCTRL_IS_DOWN. -
The default value of
ReparentNodeHandler#ReparentRecognizerhas been changed fromSHIFT_IS_DOWNtoCTRL_IS_DOWN. -
GraphEditorInputMode#GroupingOperationsAllowedis now true by default. -
Refined the event sequence of
CreateEdgeInputModeto ensure consistency and symmetry between gesture cancellation and completion. -
Reorganized the sequence to include
EdgeCreationStartedonly after the start node dragging has finished and the end port candidate is determined. -
Adjusted the timing of the end port candidate update, which now occurs just before
GestureFinishing, allowing users to apply final updates to the end port. -
Ensured the following event order for gestures:
-
GestureStarting,GestureStarted. -
Cancellation path:
GestureCanceling,GestureCanceled. -
Completion path:
EdgeCreationStarted,GestureFinishing,EdgeCreated,GestureFinished.
-
-
The
EdgeCreationStartedandEdgeCreatedevents provide now arguments of typeItemEventArgs.<IEdge> -
Edges can now be reconnected to other nodes per default. The old behavior can be restored by decorating the edge
lookup with the provider returned by
IEdgeReconnectionPortCandidateProvider#fromSourceAndTarget. - During edge creation, bends are now created when pressing a mouse button instead of releasing it. This way, when starting edge creation by dragging the mouse from a node, no bend is created on the first mouse button release, which was an often unwanted behavior.
- Unselected items can be moved by default.
- Edge creation: by default, start port candidates are shown when hovering over a node.
-
GraphViewerInputMode/GraphEditorInputMode: theClickHitTestOrderdefault value has been changed toGraphItemTypes#ALLwhich means that the default order is the Z-Order but with a prioritization for elements behind labels. -
GraphViewerInputMode: TheMoveViewportInputMode's priority has been changed to 190. -
GraphEditorInputMode: The sub input mode's priorities have been changed to the following order:WaitInputMode,KeyboardInputMode,HandleInputMode,ClickInputMode,CreateEdgeInputMode,MoveSelectedItemsInputMode,MoveUnselectedItemsInputMode,CreateBendInputMode,MoveViewportInputMode,LassoSelectionInputMode,MarqueeSelectionInputMode,ItemHoverInputMode,NavigationInputMode,AbstractPopupMenuInputMode,NodeDropInputMode,LabelDropInputMode,PortDropInputMode,ToolTipInputMode,EditLabelInputMode. -
The default value of
CreateEdgeInputMode#PortCandidateResolutionRecognizerhas been changed fromSHIFT_IS_DOWNtoCTRL_IS_DOWN. -
The default value of the
CreateEdgeInputMode#EnforceBendCreationRecognizerhas been changed formCTRL_IS_DOWNtoALT_IS_DOWN. -
The default keyboard shortcuts of several commands have been changed:
-
Command#COLLAPSE_GROUPnow usesAlt+Left. -
Command#EXPAND_GROUPnow usesAlt+Right. -
Command#ENTER_GROUPnow usesAlt+Down. -
Command#EXIT_GROUPnow usesAlt+Up. -
Command#TOGGLE_EXPANSION_STATEnow usesAlt+Shift+LeftandAlt+Shift+Right. -
Command#INCREASE_ZOOMnow usesCtrl+Plus. -
Command#DECREASE_ZOOMnow usesCtrl+Minus.
-
-
The default value of
TextEditorInputMode#AutoCommittingOnFocusLostEnabledis nowtrue. This means that the text of an edited label is commited instead of discarded when the text box loses the focus e.g. by clicking on the canvas. -
The default edge lookup doesn't provide an
IPositionHandleranymore so dragging a selected edge doesn't move all its bends. -
Orthogonal edge editing now has to be enabled for each edge that should be edited orthogonally instead of enabling
it for all edges by setting the
GraphEditorInputMode#OrthogonalEdgeEditingContextproperty. This can be done by enabling thePolylineEdgeStyle#OrthogonalEditingEnabledproperties of the styles, by setting an apropriateFallbackEdgeHelperProvideron the usedOrthogonalEdgeEditingContextor by providing anIOrthogonalEdgeHelperin the edges' lookup. -
NavigationInputModenow interprets the direction of arrow keys in view coordinates by default. -
The default lookup of labels now returns an
IPositionHandlerimplementation. -
In
CreateEdgeInputModeit was previously possible to define a fallback forgetPortOwnerifIHitTesterwas removed. This option for defining a fallback is removed and always returnsnull. -
Improved the
CreateBendInputModebehavior: Previously, dragging an existing bend triggered theBendCreatedevent, causing confusion and limiting event handling for new bend creation. This has been adjusted to ensure the event only fires when a new bend is created interactively. -
CanvasComponent#updateContentBoundsnow only considers the items in theRenderTree#ContentGroupinstead of theRootGroupwhen calculating the new bounds.
Snapping
Incompatible API Changes
-
LabelSnapContexthas been removed, and label snapping is now handled byGraphSnapContext:-
The
GraphEditorInputMode#LabelSnapContextproperty and theGraphEditorInputMode#onLabelSnapContextChangedmethod have been removed. -
The
CollectLabelSnapLineEventArgsclass has been removed. -
Configuration properties of
LabelSnapContexthave been moved toGraphSnapContextand renamed. -
The
ILabelSnapContextHelperinterface and theLabelSnapContextHelperclass have been removed. Instead, theILabelSnapResultProviderinterface and the classesLabelSnapResultProviderandLabelSnapReferenceProviderhave been added. -
The
LabelDecorator#LabelSnapContextHelperDecoratorproperty has been replaced by the propertiesSnapReferenceProviderandSnapResultProvider.
-
The
-
CollectGraphSnapLinesEventArgshas been renamed toCollectSnapReferencesEventArgs. Its methodsaddFixedNodeSnapLine,addFixedSegmentSnapLine,addPortSnapLine, andaddAdditionalSnapLinehave been removed and replaced by the singleaddSnapReferencemethod. -
GraphSnapContexthas been refactored, and the following members have changed:-
The properties
SnappingNodesToSnapLinesEnabled,SnappingBendsToSnapLinesEnabled,SnappingSegmentsToSnapLinesEnabled,SnappingBendAdjacentSegmentsEnabled,SnappingPortAdjacentSegmentsEnabled,SnappingEdgeLabelsEnabled,SnappingNodeLabelsEnabled, andSnappingPortLabelsEnabledhave been replaced by the new propertiesSnappableItemsandGridSnappableItems. -
The
collectVisibleNodePairsmethod now takes theCollectSnapReferencesEventArgsthe snap references shall be added to. -
The methods
findSameWidthEntriesandfindSameHeightEntrieshave been removed. Instead, theSnapSizereferences describing to which size items can snap are provided by theSnapReferencesproperty. Similarly, theFixedNodeSnapLines,FixedSegmentSnapLines,FixedPortSnapLines, andAdditionalSnapLinesproperties have been removed. TheSnapReferencesproperty should be used instead.
-
The properties
-
The
SnapLine#ResourceKeyproperty has been removed along with most of the staticResourceKeymembers used for snapping. Instead, aVisualizationTypeproperty of the enum typeSnapReferenceVisualizationTypeis used to describe which visualization should be used for theSnapLine. -
Most subclasses of
SnapLinehave been removed as they only provided properties used for the visualization that are now available onSnapResult. -
The
SnapTypesenum used bySnapResulthas been replaced by the newSnapConstraintclass that supports finding common snap locations forSnapResultwith different constraints. -
The
snapandisSnappedmethods ofSnapResulthave been removed. Instead, aConstraintproperty of typeSnapConstrainthas been added that is used to merge possibleSnapResultand check if a location is valid for a givenSnapResult. -
The
SnapResult#getVisualCreatormethod has been removed and is replaced by the newObjectRendererproperty. -
The factory methods of
SnapResulthave been adjusted:-
createPointSnapResulthas been renamed tocreateSnapResult. -
createSnapLineSnapResulthas been renamed tocreateLineSnapResult. -
createLabelSnapResulthas been removed.
-
-
The methods of the snap result providers have been adjusted to support the new
SnapReferenceAPI. Most methods now take one instance of aSnapReferencesubclass likeSnapLineorSnapGrid. -
The class
SnapStatehas been removed. -
The type of the
SnapContextproperties of all input modes has been changed fromSnapContexttoGraphSnapContext. -
Most classes and members that had
SnapLinein their name have been renamed to includeSnapReferenceinstead. -
The
ReshapeRectangleContext#InitialBoundsproperty has been renamed toInitialLayout. -
The
GraphEditorInputMode#SnapContextproperty is now set per default and may not benull. It is disabled per default. -
Renamed the
GraphSnapContext#NodeToNodeDistanceproperty toNodeDistance. -
Renamed the
GraphSnapContext#EdgeToEdgeDistanceproperty toEdgeDistance.
Clipboard
Incompatible API Changes
-
The values
LABEL_MODEL_PARAMETERandPORT_LOCATION_MODEL_PARAMETERhave been removed from theCloneTypesenum as those parameter are typically immutable, so cloning them has no effect. -
IElementCopiedCallbackhas been renamed toIItemCopiedCallback. -
GraphViewerInputMode'sElementsCopiedevent has been renamed toItemsCopied. -
GraphEditorInputMode'sElementsCopied,ElementsCut,ElementsCopied,ElementsPastedandElementsDuplicatedevents were renamed toItemsCopied, etc. -
On
GraphClipboard, theElementsCut,-Cutting,-Copying,-Copied,-Pasting,-Pasted,-Duplicating, and-Duplicatedevents were renamed toItemsinstead ofElementsand use the newGraphClipboardEventArgs. Also, theonElementCut,-Copied-, and-Pastedmethods were renamed to start withOnItemand take an additionalClipboardOperationContextas a parameter. -
GraphClipboard#removeElementshas been renamed toremoveItems. -
GraphClipboard#isFoldingStateElementhas been renamed toisFoldingStateItem. -
GraphClipboard#createContextnow takes an additionalIInputModeContextparameter that should be returned in the new contexts lookup. -
The
GraphClipboard#ClipboardGraphproperty is now read-only. -
The parameters of
GraphClipboard'sCopymethod have been rearranged so default values for optional parameters could be added. -
The methods
createClipboardGraph,createToClipboardCopier,createFromClipboardCopier,createDuplicateCopier, andcreateDefaultClipboardIdProviderfromGraphClipboardthat were used to lazily initialize the corresponding properties have been removed. -
GraphClipboard#pastenow takes an enumerable ofIModelItemastargetOwnersparameter instead of atargetFilterpredicate. -
GraphClipboard#isFoldingStateElementis now an instance method and doesn't have an owner parameter anymore. -
The
GraphClipboard#PasteDeltaproperty has been renamed toPasteOffset. It is now modified by theGraphClipboard'scut,copy,paste, andduplicatemethods instead of the corresponding methods onGraphEditorInputMode. -
The
GraphEditorInputMode#PasteDeltaproperty has been removed and replaced by the newGraphClipboard#PasteOffsetIncrementproperty. -
IClipboardHelper's methodscut,copy, andpastehave been renamed toonCut,onCopied, andonPasted. -
IClipboardHelper's methodscutandcopydon't return anobjectanymore and theobjectparameter ofpasteandshouldPastehas been removed. Forcut/copyandpastethe sameIClipboardHelpermethod is now used so any state that should be transfered can be stored in a custom implementation. -
IClipboardHelperhas new methodsshouldDuplicateandonDuplicatedwhich have to be implemented, now. -
GraphClipboard`s methodsgetMementoandgetClipboardHelperhave been removed. -
GraphClipboard's protectedcopyandpastemethods now take the newClipboardOperationContextas parameter instead of thesourceGraphsandfilterpredicates. -
GraphClipboard'scut,copy,paste, andduplicatemethods now use anIStreamIterableinstead of a filter predicate to determine the subgraph to copy. -
GraphClipboard'sCreate*Filtermethods have been removed. -
The
GraphClipboardnow usesClipboardGraphCopierinstances for itsToClipboardCopier,FromClipboardCopier, andDuplicateCopier. -
The
graph#ParentNodeDetectionModeshas been reduced to contain only the mainly used options. The optionRoothas been renamed toNONE, and the optionsALLOW_SELFandFORCEas well as theMODE_MASKandMODIFIER_MASKhave been removed. ThegetTargetNodemethod can be overridden if the reduced modes are not suitable and may call the newfindParentByPreviousParentmethod to simulate the oldFORCEsetting. -
GraphClipboard`sgetTargetmethods now take an additionalClipboardOperationContextparameter, and thegetTargetoverload for nodes also takes apasteLocationas an additional parameter. -
GraphComponentinstances now use a sharedGraphClipboardper default. To revert to the previous behavior, a newGraphClipboardinstance can be set on eachGraphComponent.
Folding
Incompatible API Changes
-
The
FoldingLabelOwnerState#remove(FoldingLabelState)was renamed toremoveLabeland theFoldingLabelState#removeBend(FoldingBendState)was renamed toremoveBend. -
Interface
IFolderNodeConverterhas a newupdateGroupNodeStatemethod. -
Interface
IFoldingEdgeConverterhas a newupdateMasterEdgesmethod. -
FolderNodeConverternow relies onFolderNodeDefaultsto configure initialization and update of states. -
FoldingEdgeConverterandMergingFoldingEdgeConverternow rely onFoldingEdgeDefaultsto configure initialization and update of states.
Incompatible Behavior Changes
-
Tags are not automatically the same on group and folder nodes or master and folding edges (master and view states).
Instead, they have to be synchronized using the
IFolderNodeConverterandIFoldingEdgeConverterimplementations. The default implementations already synchronize the tags. -
In the graph of a folding view, the
createGroupmethod now always creates a group even if theisExpandedpredicate specified in theFoldingManager#createFoldingViewmethod specifies otherwise. Create the group on the master graph if you want the predicate to be respected.
Lookup
Incompatible API Changes
-
The methods
setLookupImplementationandgetLookuphave been removed fromGraph. Instead thelookupmethod should be overridden if the default lookup behavior should be replaced. -
The methods
setLookupandgetLookuphave been removed fromAbstractGraphWrapper. Instead, thelookupmethod should be overridden if the default lookup behavior should be replaced. -
The
nodeparameter of the methods in the interfacesIGroupPaddingProvider,INodeSizeConstraintProvider, andIGroupBoundsCalculatorhas been removed. -
The
edgeparameter of the methods in the interfacesIEdgePortHandleProvider,IBendCreator, andIOrthogonalEdgeHelperhas been removed. -
The
labelparameter of the methods in the interfacesILabelModelParameterProvider, andILabelModelParameterFinderhas been removed. -
The model item parameter in
ISnapReferenceProvider#addSnapReferenceshas been removed. -
The
ILabelModelParameterparameter ofILabelModel#getContexthas been removed andILabelModeldoesn't extendILookupanymore. Instead, the lookup returned bygetContextshould be used for all lookup calls. -
The
IPortLocationModelParameterparameter ofIPortLocationModel#getContexthas been removed andIPortLocationModeldoesn't extendILookupanymore. Instead, the lookup returned bygetContextshould be used for all lookup calls. -
The
OrthogonalEdgeEditingContext#getOrthogonalEdgeHelpermethod has been replaced by theFallbackEdgeHelperProviderandOrthogonalEdgeHelperProviderproperties. -
The
INodeInsetsProviderinterface was renamed toIGroupPaddingProvider. -
Renamed
LookupDecorator#setImplementationtoaddConstant. -
Renamed
LookupDecorator#setFactorytoaddFactory. -
Renamed
LookupDecorator#setImplementationWrappertoaddWrapperFactory. -
Renamed
LookupDecorator#hideImplementationtohide. -
Renamed lookup decorators in general by removing the
Decoratorsuffix. For example,graphDecorator.EdgeDecorator.PositionHandlerDecorator.HideImplementationis nowgraphDecorator.Edges.PositionHandler.Hide. -
Removed
LookupDecorator#NullFallback. Instead, use the predicate of theaddFactorymethod or return the original instance in theaddWrapperFactorymethod. -
Removed
LookupDecorator#DecoratingNullsEnabled. Instead, implement the desired behavior inaddWrapperFactory. -
Removed the
SimpleNode#LookupImplementationproperty,SimpleEdge,SimpleBend,SimpleLabelandSimplePort. Instead, use the newgetDecoratormethod to adjust the item's lookup. -
The
SimpleNode,SimpleEdge,SimpleBend,SimpleLabelandSimplePortclasses are now sealed, and theirlookupmethod is no longer virtual. To adjust the item's lookup, use thegetDecoratormethod. -
Removed
CanvasComponent#inputModeContextLookupandCanvasComponent#InputModeContextLookupChain. Instead, use the newgetInputModeContextDecoratorFormethod to decorate the input mode context lookup. -
The
EdgeDecorator#getDecoratorFormethod,NodeDecorator, etc. no longer has thenullIsFallbackanddecorateNullparameters.
GraphML
Incompatible API Changes
-
The methods
GraphMLIOHandler#addInputMapperFutureandGraphMLIOHandler#addInputHandlerFactoryhave been removed, together with their support classes. -
The
addRegistryInputMapperandaddRegistryOutputMappermethods have been removed fromGraphMLIOHandler, since theMapperRegistryhas been removed. To read or write additional per-item data, use theaddInputMapperoraddOutputMappermethods, instead.
View-Layout-Bridge
Incompatible API Changes
-
Renamed
ItemMapping#FunctiontoMapperFunction. -
Renamed the
LayoutUtilities#morphLayoutmethod toapplyLayoutAnimated. -
Renamed the
LayoutExecutor#Durationproperty toAnimationDuration. -
Renamed the
LayoutExecutor#createMorphAnimationmethod tocreateLayoutAnimation. -
The
LayoutGraphAdapter#PORT_DUMMY_NODE_DPKEYconstant has been renamed toPORT_HELPER_NODE_DATA_KEY. -
Boolean
LayoutExecutor#FixPortsproperty is replaced by anItemMappingPortPlacementPolicies, that allows to specify a policy for the handling of each individual port. -
LayoutExecutor#AutomaticEdgeGroupinghas been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
LayoutGraphAdapter#AutomaticEdgeGroupinghas been removed. Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly. -
Changed property
PortAdjustmentPolicyofLayoutExecutorclass to anItemMappingPortAdjustmentPolicieswhich allows for different values for each port. The default isPortAdjustmentPolicy#LENGTHEN. -
Changed property
PortAdjustmentPolicyofLayoutGraphAdapterclass to anItemMappingPortAdjustmentPolicieswhich allows for different values for each port. The default isPortAdjustmentPolicy#LENGTHEN. -
Renamed the
LayoutExecutor#Durationproperty toAnimationDuration. -
Removed the
ContextItemMappingclass. -
The properties
LayoutExecutor#SelectionModelandLayoutGraphAdapter#SelectionModelhave been removed, meaning that selected items of theIGraphare no longer automatically marked in theLayoutGraphvia keys like the formerLayoutKeys#AFFECTED_NODES_DPKEY. If the selected items should be marked for a specific key of layout algorithms, then these items can always be provided via the specificLayoutDataproperty of the layout algorithms. -
The
TableLayoutConfigurator#prepareandLayoutExecutor#prepareTableLayoutmethods now return aLayoutGridDatainstance. -
Renamed the
YGraphAdapterclass toStructureGraphAdapter.-
Renamed the
YGraphAdapter#YGraphproperty toStructureGraph. -
Renamed
YGraphAdapter#createEdgeEnumerabletocreateOriginalEdgeList. -
Renamed
YGraphAdapter#createNodeEnumerabletocreateOriginalNodeList. -
Renamed
YGraphAdapter#createEdgeListtocreateCopiedEdgeList. -
Renamed
YGraphAdapter#createNodeListtocreateCopiedNodeList. -
Renamed
YGraphAdapter#createMappertocreateCopiedToOriginalNodeWrapperandcreateCopiedToOriginalEdgeWrapper. -
Renamed
YGraphAdapter#createDataMaptocreateOriginalToCopiedNodeWrapperandcreateOriginalToCopiedEdgeWrapper.
-
Renamed the
-
Removed key
LayoutGraphAdapter#ORIGINAL_TAG_DP_KEY. Use the Tag property of the layout items instead to get the original tag associated to the originalIGraphitems.
Incompatible Behavior Changes
- Edges at the same port are now always automatically port grouped unless port groups have been defined explicitly.
-
The
LayoutGraphAdapterclass does no longer offer a method to create a layout graph several times but is now meant to create exactly one layout graph copy which can be accessed via theLayoutGraphproperty and initialized with methodLayoutGraphAdapter#initialize. After initialization, changing properties of theLayoutGraphAdapterhas no effect anymore.
Layout
Incompatible API Changes
-
The public constructors of
ItemMappingandItemCollectionhave been removed. Instead the instances returned by theLayoutDataproperties should be used to configure theLayoutData. -
The optional
ItemMappingparameter ofGenericLayoutData#addItemMappinghas been removed. -
The optional
ItemCollectionparameter ofGenericLayoutData#addItemCollectionhas been removed. -
Renamed the
SubgraphLayoutclass toSubgraphLayoutStageand renamed the respective layout data class fromSubgraphLayoutDatatoSubgraphLayoutStageData. -
Renamed
EdgeBundlingStagetoBundledEdgeRouter. -
Renamed
GivenCoordinatesStagetoGivenCoordinatesLayout. -
Renamed
GivenCoordinatesStageDatatoGivenCoordinatesLayoutData. -
The
OrientationLayoutclass has been renamed toOrientationStage.-
Furthermore, the following methods have been removed from that class:
isOrientationMirrored, Transform,prepareTransform,completeTransform,createOrientedNodeHalo,createOrientedInsetsandcreateOrientedNodeSize.
-
Furthermore, the following methods have been removed from that class:
-
Renamed
BendConvertertoBendSubstitutionStage. -
The
OrientationLayout#HorizontalOrientationproperty has been removed. To check for a horizontal orientation, check if Orientation property equalsLayoutOrientation#LEFT_TO_RIGHTorLayoutOrientation#RIGHT_TO_LEFT. -
Renamed
GraphLayoutLineWrappertoLineWrappingStage. -
Renamed
HideGroupsStagetoGroupHidingStage. -
Renamed
TemporaryGroupNodeInsertionStagetoTemporaryGroupInsertionStageand the respective data class fromTemporaryGroupNodeInsertionDatatoTemporaryGroupInsertionData. -
Renamed
BorderLineSideto Side, moved to namespace Layout and renamed its values:NorthtoSide#TOP,EasttoSide#RIGHT,SouthtoSide#BOTTOM, andWesttoSide#LEFT. -
Moved
BorderLineandBorderLineSegmentto namespace Layout. - Removed all methods and properties from the Direction class and converted it to an enum.
-
Removed the
NodeHaloclass. Halos are now specified asInsetsDand called node margins. in the correspondingLayoutData(e.g.HierarchicalLayoutData#NodeMargins).-
The properties previously named
NodeHaloshave been renamed toNodeMarginsfor the following classes:AlignmentStageData,CircularLayoutData,CompactDiskLayoutData,ComponentLayoutData,RadialGroupLayoutData,RecursiveGroupLayoutData,HierarchicalLayoutData(formerlyHierarchicLayoutData),GenericLabelingData(formerlyLabelingData),OrganicLayoutData,OrthogonalLayoutData,ClearAreaLayoutData,FillAreaLayoutData,PartialLayoutData,RadialLayoutData,CurveRoutingStageData,TabularLayoutData,EdgeRouterData,RadialTreeLayoutData(formerlyBalloonLayoutData),TreeLayoutData. -
Renamed
AsIsLayerer#NodeHalotoFromSketchLayerAssigner#NodeMargin. -
Renamed
TemporaryGroupDescriptor#Haloto Margins. -
Renamed
NodeHalo#NODE_HALO_DPKEYtoLayoutKeys#NODE_MARGIN_DATA_KEY.
-
The properties previously named
-
Renamed
LayoutExecutor#TargetBoundsInsetstoTargetBoundsPadding. -
Renamed
GroupingKeys#GROUP_NODE_INSETS_DPKEYtoGROUP_NODE_PADDING_DATA_KEYand moved the key toLayoutKeys. -
Renamed
GroupingKeys#MINIMUM_NODE_SIZE_DPKEYtoLayoutKeys#MINIMUM_GROUP_NODE_SIZE_DATA_KEY. -
Renamed
InsetsGroupBoundsCalculator#DefaultInsetstoGroupBoundsCalculator#DefaultPaddingandInsetsGroupBoundsCalculator#NodeHalosConsiderationEnabledtoGroupBoundsCalculator#NodeMarginsConsiderationEnabled. -
Renamed
TemporaryGroupDescriptor#Insetsto Padding. -
Renamed
Graph#reInsertNodeandreInsertEdgetoLayoutGraph#reinsert. -
From
LayoutGraphHider, theFiringGraphEventsEnabledandGraphproperties, and thehideEdges,hideSelfLoops,simplifyGraph, andhideMultipleEdgesmethods have been removed. Also, all methods to hide and unhide various collections of nodes or edges have been replaced byhideandunhidemethods that get anIStreamIterableofNodeorEdge. -
PortCalculator,IIntersectionCalculator, andIntersectionCalculatorKeyshave been removed. Instead, theLayoutExecutor#PortAdjustmentPolicyproperty should be set to a suitable value. -
Renamed
BorderLine#createMintocreateMinimum. -
Renamed
BorderLine#createMaxtocreateMaximum. -
GraphPartitionManageris removed,LayoutGraphHiderprovides the same functionality. -
The methods
PortCalculator#calculatePortsandPortCalculator#equalsEpshave been removed. -
The following methods have been removed from the
ReverseEdgesStage:ReverseEdgesStage#findReversedTreeEdges,ReverseEdgesStage#reverseEdgeandReverseEdgesStage#reverseEdges. -
Renamed
MirrorModestoMirroredOrientationsandOrientationLayout#MirrorModetoMirroredOrientations. -
The
AbortHandler#CheckFailedproperty has been removed. To achieve the same functionality, theLayoutAbortController(new name of theAbortHandler) can be subclassed, overriding itscheckmethod which allows to detect calls to that method. -
LayoutGraphHider: Method names have been standardized for consistency. Collection parameters and return values are now of typeIStreamIterable. Methods with non-nullable parameters will now throw an exception if passednullvalues. -
Replaced properties
XOffsetandYOffsetof thePortCandidateclass by a single propertyOffsetof typePointD. -
The
SequentialLayout#Layoutsproperty is now a read-onlyList. The<ILayoutAlgorithm>appendLayout,appendLayouts, andremoveAllmethods have been removed as their functionality is now handled by the list methods. -
PortConstraints andPortCandidates have been unified and renamed toLayoutPortCandidate. -
PortDirectionsandPortSidehave been unified asPortSides, and the enum values of the sides have been renamed. -
PortCandidateSets have been replaced byNodePortCandidates, and collections ofPortCandidates for edges have been replaced byEdgePortCandidates. -
The port-related settings in the
LayoutDataclasses have been combined into a sub-LayoutDataPorts. -
The keys in
PortConstraintKeyshave been moved toLayoutKeys. -
The port-related properties of the layout data classes (
SourcePortGroupIds,TargetPortGroupIds,SourcePortCandidates,TargetPortCandidates) have been moved to a sub-data accessible via the propertyPorts. -
The
BufferedLayoutclass has been removed. To apply a layout algorithm on a copy of aLayoutGraphinstance useLayoutGraph#createCopymethod to get a copy, then apply the layout on it and, finally, write back the result usingLayoutGraphCopyData#commitLayoutToOriginalGraph. -
The
CompositeLayoutStageclass has been removed. If a complex composition of layout stages is required, the newLayoutStageStackclass can be used instead. To get anILayoutAlgorithmthat is then applied likeCompositeLayoutStagewas before,LayoutStageStack#linkCoreLayoutsmethod must be called. -
Merged
MinimumSizeGroupBoundsCalculatorandInsetsGroupBoundsCalculatorinto the newGroupBoundsCalculatorclass. -
LayoutMultiplexerhas been removed. The features ofComponentLayout(COMPONENT_LAYOUT_DATA_KEY) orRecursiveGroupLayout(GROUP_NODE_LAYOUT_DATA_KEY) can be used instead. -
The classes
FixPortLocationStageandFixPortLocationStageDatahave been removed from the library. To correct the port locations after applying a layout use thePortPlacementStageclass. -
PortPlacementStage#PathCorrectionhas been replaced byPortPlacementStage#RouteCorrectionPolicyof enum typeRouteCorrectionPolicy. -
The
SnapOuterPortsToNodeBorderStageclass has been removed. -
Removed
NormalizeGraphElementOrderStage. UseNodeComparisonandEdgeComparisonofLayoutExecutorinstead. -
The classes
ChannelEdgeRouter,OrthogonalPatternEdgeRouterandOrthogonalSegmentDistributionStagehave been removed from the library. Their functionality is superseded by theEdgeRouterrouting algorithm.-
To configure the
EdgeRouterto generate a style that is similar to the removedChannelEdgeRouter, set theStopDurationproperty to zero and use the predefined penalty configurationEdgeRouterCosts#LOW_QUALITY. It is however not compatible with advanced features like integrated edge label placement.
-
To configure the
-
The utility
PortConstraintConfiguratorclass has been removed. -
Removed the classes
PartitionLayoutandPartitionLayoutData. -
The
FamilyTreeLayoutclass has been removed. -
Removed
SplitEdgeStage. -
The read/write properties
MinimumSizeGroupBoundsCalculator#MinimumNodeSizeDpKeyandInsetsGroupBoundsCalculator#GroupNodeInsetsDpKeyhave been removed. The bounds calculator classes now always use the values defined via the keysLayoutKeys#MINIMUM_GROUP_NODE_SIZE_DATA_KEYandLayoutKeys#GROUP_NODE_PADDING_DATA_KEY. Using theIGraphAPI, the insets and minimum sizes are registered automatically, so that this change has no effect. -
The read/write properties
SubgraphLayout#AffectedNodesDpKeyandSubgraphLayout#AffectedEdgesDpKeyhave been removed. They were replaced by static read-only keysSubgraphLayoutStage#SUBGRAPH_NODES_DATA_KEYandSubgraphLayoutStage#SUBGRAPH_EDGES_DATA_KEY. -
Removed
LayoutKeys#NODE_ID_DPKEYandLayoutKeys#EDGE_ID_DPKEY. -
The
HandleNaNCoordinatesStagehas been removed. -
The
MultiStageLayoutclass has been removed from the API. TheHierarchicalLayout(formerlyHierarchicLayout),OrganicLayout,OrthogonalLayout,TreeLayout,RadialTreeLayout(formerlyBalloonLayout),SeriesParallelLayout,RadialLayout,CompactDiskLayout, andRadialGroupLayout(formerlyCactusGroupLayout) classes now directly implementILayoutAlgorithm. These classes offer a newLayoutStagesproperty that allows to access the mutable stack ofILayoutStageinstances associated with the respective algorithm. In addition, the offer different new properties to directly access frequently used stages. -
The API names to define routing styles throughout the layout algorithms have been streamlined and made more
consistent. Properties on layout algorithms have all been renamed to
EdgeRoutingStyleand those on edge-specific classes have been renamed toRoutingStyle.-
The
polyline#EdgeRoutingStyleenum has been renamed torouter#RoutingStyle. -
The
tree#EdgeRoutingStyleenum has been renamed toSingleLayerSubtreePlacerRoutingStyle. -
The
LayeredRoutingStyleenum has been renamed toLevelAlignedSubtreePlacerRoutingStyle. -
The
radial#EdgeRoutingStrategyenum has been renamed toradial#RoutingStyle. -
The
partial#EdgeRoutingStrategyenum has been renamed topartial#RoutingStyle. -
The
hierarchic#EdgeRoutingStyleenum has been renamed tohierarchical#RoutingStylewhile the oldRoutingStyleclass has been renamed toRoutingStyleDescriptor.
-
The
-
Renamed
AbortHandlertoLayoutAbortController. -
The
MaximumDurationproperty is renamed toStopDurationin all public API usages. -
StopDurationsthat were of type long are now of typeTimeSpan. -
StopDurationsnow affect pre-and post-processing steps defined directly on the layout algorithms, as opposed to only the core algorithm. -
The
LayoutAbortController(formerlyAbortHandler) is no longer available as a property onLayoutDataclasses but only on theLayoutExecutor. -
Static methods on
LayoutAbortController(formerlyAbortHandler) likegetFromGraphhave been removed since the handler instance can easily be accessed via theLayoutGraphContextwhen working withLayoutGraph. -
The default values of properties
LayoutAbortController#StopDurationandLayoutAbortController#CancelDurationhas been changed fromDuration#ZEROtoConstants#MAX_DURATION. Previously,ZEROwas interpreted as unlimited time, which is not the case anymore. -
Removed public methods
hideGroupNodesandunhideGroupNodesofGroupHidingStage. -
The nested
Segmentclass ofBorderLineis now the unnestedBorderLineSegmentclass, and some of its members have been changed:-
Renamed
growtoenlarge,addOffsettoaddPositionOffset,mintoMinPositionandmaxtoMaxPosition. -
Removed the
BorderLine#adoptValuesmethod. -
Converted
BorderLine#FirstSegment,BorderLine#LastSegment,BorderLine#Segment#prevandBorderLine#Segment#nextfrom methods to read-only properties, and renamedprevto Previous. -
Removed
BorderLine#prevandBorderLine#next. Use methodsBorderLineSegment#PreviousandBorderLineSegment#Nextinstead.
-
Renamed
-
Removed the class
Maps. -
Layout data properties that are meant for publishing results now contain the word
Resultin their name: RenamedCircularLayoutData#CircleIdstoCircularLayoutData#CircleIdsResult,HierarchicLayoutData#LayerIndicestoHierarchicalLayoutData#LayerIndicesResult,HierarchicLayoutData#SequenceIndicestoHierarchicalLayoutData#SequenceIndicesResult,OrganicLayoutData#ZCoordinatestoOrganicLayoutData#ZCoordinatesResult,RadialLayoutData#NodeInfostoRadialLayoutData#NodePlacementsResult, andParallelEdgeRouterData#RoutedParallelEdgestoParallelEdgeRouterData#RoutedMultiEdgesResult.-
They are now all made readonly and initialized with an
IMapperinstance.
-
They are now all made readonly and initialized with an
-
Updated the constructor of
AbstractDpKeyand subclasses to accept a single string parameter 'ID' for unique identification.-
Removed properties
AbstractDpKey#DeclaringTypeandAbstractDpKey#Name. -
Made
AbstractDpKeyclass abstract.
-
Removed properties
-
The
TemporaryGroupDescriptorused byTemporaryGroupInsertionStageclass to define temporary group nodes now does not allow that propertiesYInsets,MinimumSizeandMargins(formerlyHalo) arenullanymore. Previously this was the default which is nowInsetsD#Empty,SizeD#EMPTYandInsetsD#Empty, meaning that the behavior does not change. -
The
CopiedLayoutGraphclass was removed from the API. To create a copy of a layout graph, the new factoryLayoutGraph#createCopymethod may be used. - Methods and and properties with "BoundingBox" in their name have been renamed to include "Bounds" instead.
-
Removed the
YPointPathclass. Instead of this class an array or more generally anIStreamIterableof typePointD[] is now used in API members.-
Changed value to of
HierarchicLayout#ALTERNATIVE_EDGE_PATH_DPKEY,ClearAreaLayout#EXPANDED_NODE_ORIGINAL_EDGE_PATH_DPKEYandGivenCoordinatesStage#EDGE_PATH_DPKEYtoIStreamIterable.<PointD> -
Changed
BusDescriptorpropertiesBusPointsandComputedBusPointsto typePointD[].
-
Changed value to of
-
Removed the
IDataProviderinterface and refactored the whole way data is registered with aLayoutGraphinstance. The replacement ofIDataProvideris the genericIMapperinterface. It allows setting and getting data via an indexer.-
Removed the methods
Graph#addDataProviderandremoveDataProvider. Data is now registered and removed using the methods on the newLayoutGraphContextclass (e.g.addItemData,addData,remove). -
Removed the
Graph#DataProviderKeysproperty.
-
Removed the methods
-
Removed the look-up keys
GroupingKeys#GROUP_DPKEY,GroupingKeys#NODE_ID_DPKEYandGroupingKeys#PARENT_NODE_ID_DPKEYwhich were necessary to define grouping information forLayoutGraphinstances. This can now be achieved via the helperLayoutGraphGroupingclass or directly via instance methods such asLayoutGraph#setIsGroupNode. -
The
GraphDpKeyclass was replaced byValueDataKey. -
Removed the
GraphTransformerclass; use factory methods fromLayoutTransformationsclass instead to create stages that apply transformation operations on aLayoutGraph. -
Replaced usages of the
Comparatorinterface withComparisonfunction delegates. -
Removed the
LayoutGraphUtilitiesclass. The newEdge#resetPathmethod replacesLayoutGraphUtilities#resetPathmethod. The newParallelEdgeRouter#routeEdgesParallelmethod replacesLayoutGraphUtilities#routeEdgesParallelmethod. -
Methods
LayoutGraphUtilities#getBoundingBoxwere combined to one more general, moved toLayoutGraphclass and made an instance method.
Incompatible Behavior Changes
-
Method
LayoutGraph#reverseEdgenow reverses the edge path too. To exchange only source and target of an edge useLayoutGraph#changeEdgemethod.
Layout Data
Incompatible API Changes
-
The type
SingleItemwas removed. Affected properties use<TItem>ItemCollectioninstead.<TItem> -
Properties of type
ItemMappinginLayoutDataclasses are now named using plural consistently. -
The value type of properties
HierarchicalLayoutData#LayerIndicesResult,HierarchicalLayoutData#SequenceIndicesResult,HierarchicalLayoutData#GivenLayersIndices,RadialLayoutData#LayerIdsandCircularLayoutData#CircleIdsResulthas been changed from primitives to their boxed type.Nullas value means that nothing was published for an item. -
The value type of the keys
HierarchicalLayout#LAYER_INDEX_RESULT_DATA_KEY,HierarchicalLayout#SEQUENCE_INDEX_RESULT_DATA_KEY,GivenLayersAssigner#LAYER_INDEX_DATA_KEY,RadialLayout#LAYER_ID_DATA_KEYandCircularLayout#CIRCLE_ID_RESULT_DATA_KEYhas been changed from primitives to their boxed type.Nullas value means that the nothing was published for an item.
Hierarchical Layout
Incompatible API Changes
-
The
DefaultDrawingDistanceCalculator#SwimlaneDistanceOptimizationEnabledproperty has been removed. The behavior does not change and is the same as the old default where the property was disabled. OverrideDrawingDistanceCalculator#getMinimumDistancemethod and assign zero to nodes that are in different rows/columns to get the same behavior as when previously enabling the property. -
Property
SimplexNodePlacer#SwimLaneCrossingWeighthas been renamed toLayoutGridCrossingWeight. Note that the class has been renamed toCoordinateAssigner. -
Removed
GroupCompactionStrategy. -
Renamed
SimplexNodePlacer#GroupCompactionStrategytoGroupCompactionEnabledand changed its type to boolean. -
In the sub-data
SequenceConstraintDataof theHierarchicalLayoutDataplaceBeforeandplaceAfterwere replaced byplaceInOrder. -
In the sub-data
LayerConstraintDataof theHierarchicalLayoutDataplaceAboveandplaceBelowwere replaced byplaceInOrder. -
HierarchicalLayout#GridSpacing: made grid spacing behavior consistent across all layouts by throwing an exception for negative values. -
NodeLayoutDescriptor#NodeLabelModewas removed. If node labels shall be considered by the layout algorithm, they are now considered during all phases. In particular, self-loops do not overlap node labels anymore. -
The
NodeLabelModeenum was removed. -
Renamed
LayerTypetoHierarchicalLayoutLayerType. -
Renamed
DefaultLayerSequencertoDefaultSequencer. -
Renamed all types, methods, properties, and namespaces containing "hierarchic" to "hierarchical" including
HierarchicLayout, which is renamed toHierarchicalLayout. -
Moved
HierarchicLayout#StopAfterLayeringEnabled/Sequencing toHierarchicalLayoutCore. -
Replaced
HierarchicLayoutpropertiesBackLoopRouting&BackLoopRoutingForSelfLoopsEnabledwithHierarchicalLayoutEdgeDescriptor#BackLoopRoutingEnabled, where it can now be specified per edge (HierarchicalLayoutData#EdgeDescriptors) or for all edges at once (HierarchicalLayout#DefaultEdgeDescriptor). -
Removed properties
SourcePortOptimizationEnabledandTargetPortOptimizationEnabledfromHierarchicalLayoutEdgeDescriptorclass. -
LayerConstraintDatano longer inherits fromLayoutData. -
SequenceConstraintDatano longer inherits fromLayoutData. -
Renamed
IPortAllocatortoIHierarchicalLayoutPortAssigner. -
Renamed
DefaultPortAllocatortoHierarchicalLayoutPortAssigner. -
Separated
HierarchicLayout#INCREMENTAL_HINTS_DPKEYinINCREMENTAL_NODE_HINTS_DATA_KEYandINCREMENTAL_EDGE_HINTS_DATA_KEY. -
Separated enum
IncrementalHintinIncrementalNodeHintfor nodes andIncrementalEdgeHintfor edges. -
Separated
HierarchicLayoutData#IncrementalHintsinHierarchicalLayoutData#IncrementalNodesandHierarchicalLayoutData#IncrementalEdges.IncrementalNodesnow only allows for specifying the nodes that should be inserted incrementally during the layering phase. Additional options for incremental node insertion can be specified usingGenericLayoutData. -
Renamed the
DefaultDrawingDistanceCalculator#NodeToNodeDistanceproperty toDrawingDistanceCalculator#NodeDistance. -
Renamed the
DefaultDrawingDistanceCalculator#EdgeToEdgeDistanceproperty toDrawingDistanceCalculator#EdgeDistance. -
Renamed the
HierarchicLayout#NodeToNodeDistanceproperty toNodeDistance. -
Renamed the
HierarchicLayout#EdgeToEdgeDistanceproperty toEdgeDistance. -
Renamed
EdgeLayoutDescriptortoHierarchicalLayoutEdgeDescriptor. -
Renamed
HierarchicLayout#EdgeLayoutDescriptortoDefaultEdgeDescriptor. -
Renamed and moved
HierarchicLayoutCore#EDGE_LAYOUT_DESCRIPTOR_DPKEYtoHierarchicalLayout#EDGE_DESCRIPTOR_DATA_KEY. -
Renamed
HierarchicLayoutData#EdgeLayoutDescriptorstoEdgeDescriptors. -
Renamed
NodeLayoutDescriptortoHierarchicalLayoutNodeDescriptor. -
Renamed
HierarchicLayout#NodeLayoutDescriptortoDefaultNodeDescriptor. -
Renamed and moved
HierarchicLayoutCore#NODE_LAYOUT_DESCRIPTOR_DPKEYtoHierarchicalLayout#NODE_DESCRIPTOR_DATA_KEY. -
Renamed
HierarchicLayoutData#NodeLayoutDescriptorstoNodeDescriptors. -
Renamed "Layerer" to "LayerAssigner" in the following types and members;
-
Renamed
ILayerertoILayerAssigner. -
Moved
HierarchicLayout#FixedElementsLayerertoHierarchicalLayoutCoreand renamed toFixedElementsLayerAssigner. -
Moved
HierarchicLayout#FromScratchLayerertoHierarchicalLayoutCoreand renamed toFromScratchLayerAssigner. -
Renamed
WeightedLayerertoWeightedLayerAssigner. -
Renamed
ConstraintIncrementalLayerertoConstraintIncrementalLayerAssigner. -
Renamed
MultiComponentLayerertoMultiComponentLayerAssigner. -
Renamed
MultiComponentLayerer#SingleComponentLayerertoSingleComponentLayerAssigner. -
Renamed
AspectRatioComponentLayerer#SingleComponentLayerertoSingleComponentLayerAssigner. -
Renamed
TopologicalLayerertoTopologicalLayerAssigner. -
Renamed
AspectRatioComponentLayerertoAspectRatioComponentLayerAssigner. -
Renamed
BFSLayerertoBfsLayerAssigner. -
Renamed
GivenLayersLayerertoGivenLayersAssigner. -
Renamed
HierarchicLayoutCore#createIncrementalLayerertocreateIncrementalLayerAssigner. -
Renamed
HierarchicLayoutData#BfsLayererCoreNodestoBfsLayerAssignerCoreNodes. -
Renamed
AsIsLayerertoFromSketchLayerAssigner.
-
Renamed
-
Renamed
GivenLayersLayerer#LAYER_ID_DPKEYtoLAYER_INDEX_DATA_KEY. -
Renamed
HierarchicLayoutData#GivenLayersLayererIdstoGivenLayersIndices. -
Removed
HierarchicLayoutData#ConstraintIncrementalLayererAdditionalEdgeWeights. -
Renamed
AsIsSequencertoFromSketchSequencer. -
Renamed
SimplexNodePlacer#BarycenterModeEnabledtoSymmetryOptimizationStrategyand changed its type toSymmetryOptimizationStrategy. It now supports performing strong, weak and no additional symmetry optimization. -
Refactored the enum
HierarchicLayout#LayoutModeproperty into a booleanFromSketchModeEnabledproperty and removed theLayoutModeenum. -
The
IEdgeReverserinterface and theHierarchicLayoutCore#createEdgeReversermethod have been removed. -
The
NodeLayoutDescriptorclass of theHierarchicLayoutalgorithm, which was renamed toHierarchicalLayoutNodeDescriptor, does no longer allow to specify the border-to-port gap ratios individually for each node side. TheBorderToPortGapRatioproperty now defines the value for all four node sides. -
BusDescriptoris renamed toGridComponentDescriptor. -
HierarchicLayout#BUS_DESCRIPTOR_DPKEYis renamed toGRID_COMPONENT_DESCRIPTOR_DATA_KEY. -
HierarchicLayoutData#Busesis renamed toGridComponents. -
HierarchicLayoutData#BusRootOffsetsis renamed toGridComponentRootOffsets. -
NodeDataType#BUS_STRUCTURE_DUMMYis renamed toGRID_COMPONENT_BUS_NODE. -
Replaced
INodeDatainterface withHierarchicalLayoutNodeContextclass.-
Renamed
INodeData#GroupIdtoHierarchicalLayoutNodeContext#EdgeGroupId. -
Removed the
INodeData#ParentGroupNodeproperty.
-
Renamed
-
Replaced
IEdgeDatainterface withHierarchicalLayoutEdgeContextclass.-
IEdgeData#Typeis read-only on the newHierarchicalLayoutEdgeContext. -
The following
IEdgeDataproperties now offer read and write access on the newHierarchicalLayoutEdgeContext:SourceGroup,TargetGroup,SourcePortGroup,TargetPortGroup,SourcePortCandidates,TargetPortCandidates,Thickness,CrossingCost,CriticalEdgePriority,SourcePortAlignment,TargetPortAlignment. -
Renamed
IEdgeData#SourcePortConstraintandTargetPortConstrainttoSelectedSourcePortCandidateandSelectedTargetPortCandidaterespectively. Bot properties now offer read and write access. -
Removed the
IEdgeData#Groupproperty.
-
-
Replaced
ILayerinterface withHierarchicalLayoutLayerclass. -
Replaced the
ILayer#Listproperty withHierarchicalLayoutLayer#Nodes. -
Replaced
ILayersinterface with a list ofHierarchicalLayoutLayerinstances accessible viaHierarchicalLayoutContext#Layersproperty.-
Methods
HierarchicalLayoutContext#insertLayerandremoveLayerare replacements for theILayers#insertandILayers#removemethods.
-
Methods
-
Replaced
IItemFactoryinterface withItemFactoryclass. Several of the factory methods have also been removed or renamed.-
createDummyEdgehas been renamed tocreateHelperEdge. -
CreateProxyNodehas been renamed tocreateSideProxyNodeanddestroyProxyNodetodestroySideProxyNode. -
createSameLayerProxyhas been renamed tocreateSameLayerProxyEdgeanddestroySameLayerProxytodestroySameLayerProxyEdge. -
setTemporaryEdgeGroupshas been renamed tocreateGroupedEdgeContext. -
setTemporaryCriticalEdgePriorityhas been removed. -
setTemporaryCrossingCosthas been removed. -
setTemporaryEdgeThicknesshas been removed. -
setTemporaryPortConstrainthas been removed.
-
-
EdgeDataType#REDIRECTED_GROUP_EDGEhas been removed. -
The
ILayoutDataProviderinterface is removed and its functionality is moved toHierarchicalLayoutContext. -
The
ILayersinterface is moved to theHierarchicalLayoutContext, and methods that acceptedILayersas a parameter instead acceptHierarchicalLayoutContextnow. -
The
IItemFactoryinterface is moved to theHierarchicalLayoutContext, and methods that acceptedIItemFactoryas a parameter instead acceptHierarchicalLayoutContextnow. -
Names containing
PortBorderGapwere renamed to now containBorderToPortGapRatio. -
Properties
HierarchicLayout#RecursiveGroupLayeringEnabledandHierarchicLayout#GroupCompactionEnabledare combined intoHierarchicalLayout#GroupLayeringPolicy. -
Methods
ConstraintIncrementalLayerer#checkConstraints,GivenLayersLayerer#normalizehave been removed. -
The protected callback methods
getLayerAlignmentandassignNodesToSublayerhave been removed from theCoordinateAssignerclass (formerly calledSimplexNodePlacer). Furthermore, itsgetMinDistancemethod has been renamed togetMinimumDistance. -
The
IDrawingDistanceCalculator#getMinDistancemethod has been renamed togetMinimumDistance. -
Renamed
hierarchic#NodeDataTypetoHierarchicalLayoutNodeTypeand its valueNormaltoHierarchicalLayoutNodeType#REGULAR. -
Renamed
hierarchic#EdgeDataTypetoHierarchicalLayoutEdgeTypeand its valueNormaltoHierarchicalLayoutEdgeType#REGULAR. -
Renamed
LayerType#NORMALtoHierarchicalLayoutLayerType#REGULAR. -
Renamed
MergingPolicytoLayerMergingPolicy. -
Renamed
RankingPolicytoLayerRerankingPolicyandTopologicalLayerer#RankingPolicytoRerankingPolicy. -
Renamed
WeightHeuristictoSequencerWeightHeuristic. -
The
HierarchicLayout#OrthogonalRoutingEnabledproperty has been removed. To specify orthogonal or other routing styles, the routing style on theHierarchicalLayoutEdgeDescriptormust be used instead. -
IPortConstraintOptimizerhas been renamed toIPortCandidateSelector, and its methods have been renamed fromoptimizeAfterLayeringandoptimizeAfterSequencingtoselectAfterLayeringandIPortCandidateSelector#selectAfterSequencing. -
AbstractPortConstraintOptimizerhas been removed. -
PortCandidateOptimizerhas been renamed toPortCandidateSelectorand its properties have been renamed:BackLoopPenaltytoBackLoopCost,CrossingPenaltytoCrossingCost, andOverUsagePenaltytoOverUsageCost. -
The
ICandidateMatcherinterface has been removed. For an advanced customization of the port selection consider implementing a customIPortCandidateSelector. -
The
INodePlacerinterface of the hierarchic layout has been renamed toICoordinateAssigner. Its implementation has been renamed fromSimplexNodePlacertoCoordinateAssigner. -
The
HierarchicLayout#LayerSeparationEnabledproperty has been moved toCoordinateAssigner#SeparatingLayersEnabled, since it has always only worked when using that implementation. -
The
GroupTranspositionproperty has been removed fromDefaultLayerSequencerclass. The Transposition property should now be used for groups too. -
The
TypeBasedDrawingDistanceCalculatorclass has been removed. -
The classes
ILayeredComponentsMergerandDefaultLayeredComponentsMergerhave been removed. The functionality is integrated into theMultiComponentLayerer, which now offers a newMergingPolicyproperty and protected methodmergefor the case that a custom merging approach is required. -
The
HierarchicLayoutCoreclass is not a standalone layout algorithm anymore but now offers only access to more advanced features of theHierarchicLayoutclass.-
All public data keys were moved to the
HierarchicLayoutclass. - The protected API of both classes was reduced, but still even highly advanced customization are possible.
-
All public data keys were moved to the
-
Property
HierarchicLayoutData#SelfLoopCalculatorDatawas removed. Settings like minimum lengths for self-loop edges are specified via theHierarchicalLayoutEdgeDescriptorclass like for normal edges. -
The
SelfLoopCalculatorandSelfLoopCalculatorDataclasses was removed from the API. -
The protected methods
DefaultPortAllocator#getPortBorderGap,DefaultPortAllocator#getPortBorderGapRatio, andDefaultPortAllocator#getPortDistanceDeltawere removed. -
Removed members
HierarchicLayout#createLayerConstraintFactory,HierarchicLayoutData#LayerConstraintFactory,HierarchicLayout#createSequenceConstraintFactoryandHierarchicLayoutData#SequenceConstraintFactory. The factories are no longer required to define layering and sequence constraints.-
The recommended way is to use properties
HierarchicLayoutData#LayerConstraintsandHierarchicLayoutData#SequenceConstraints. -
For expert uses cases (e.g. algorithm customization), the low-level helper classes
LayoutGraphLayerConstraintsandLayoutGraphSequenceConstraintswere added.
-
The recommended way is to use properties
-
Removed the keys
HierarchicLayout#LAYER_CONSTRAINTS_MEMENTO_DPKEYandHierarchicLayout#SEQUENCE_CONSTRAINTS_MEMENTO_DPKEY. -
Class
TopLevelGroupToSwimlaneStagehas been removed from the library. -
The obsolete extension methods
createLayerConstraintFactoryandcreateSequenceConstraintFactoryhave been removed fromHierarchicLayout. To specify layer and sequence constraints, useLayoutDatainstead.
Incompatible Behavior Changes
-
The
HierarchicalLayoutnow considers node labels by default. -
The
HierarchicalLayoutnow places edge labels by default using an integrated labeling algorithm. -
Changed the default edge routing style of the
HierarchicalLayoutclass from Polyline to Orthogonal.
Tree Layout
Incompatible API Changes
-
The
TreeLayout#graphfield has been removed. For customizations in theTreeLayoutthe graph is available whatsoever and can if required be queried from the node/edge items.-
Method
TreeLayout#layoutRootnow has an additional parameter of typeLayoutGraphas its first argument.
-
Method
-
The
GridNodePlacer#AutomaticRowAssignmentEnabledproperty (now renamed toMultiLayerSubtreePlacer) was removed. The layers are now always automatically assigned if no layer indices are defined viaTreeLayoutData#MultiLayerSubtreePlacerLayerIndices. -
Removed the
LayeredNodePlacer#Idproperty (class was also renamed toLevelAlignedSubtreePlacer). The ID can still be provided via the constructor. Reading it later should never be necessary. -
Renamed
ConnectorDirectiontoSubtreeConnectorDirection, and the valuesNorthtoSubtreeConnectorDirection#UP,EasttoSubtreeConnectorDirection#RIGHT,SouthtoSubtreeConnectorDirection#DOWN, andWesttoSubtreeConnectorDirection#LEFT. -
Renamed the values of
ParentConnectorDirection:NorthtoParentConnectorDirection#UP,EasttoParentConnectorDirection#RIGHT,SouthtoParentConnectorDirection#DOWN, andWesttoParentConnectorDirection#LEFT. -
Renamed
IProcessortoISubtreePlacerProcessor. -
DelegatingNodePlacernow implementsISubtreePlacerinstead ofIFromSketchNodePlacer. -
BusNodePlacernow implementsISubtreePlacerinstead ofIFromSketchNodePlacer. -
Replaced
tree#Matrixwith theSubtreeTransformenum and renamed constants:-
Matrix#DEFAULTtoSubtreeTransform#NONE. -
Matrix#MIR_HORtoSubtreeTransform#FLIP_Y. -
Matrix#MIR_VERTtoSubtreeTransform#FLIP_X. -
Matrix#ROT90toSubtreeTransform#ROTATE_LEFT. -
Matrix#ROT180toSubtreeTransform#ROTATE180. -
Matrix#ROT270toSubtreeTransform#ROTATE_RIGHT. -
Matrix#MIR_VERT_ROT90toSubtreeTransform#ROTATE_RIGHT_FLIP_Y. -
Matrix#MIR_HOR_ROT90toSubtreeTransform#ROTATE_LEFT_FLIP_Y.
-
-
Renamed "NodePlacer" to "SubtreePlacer" in the following types and members:
-
Renamed the
DefaultNodePlacerclass toSingleLayerSubtreePlacer. -
Renamed the
DelegatingNodePlacerclass toSingleSplitSubtreePlacer. -
Renamed the
DoubleLineNodePlacerclass toDoubleLayerSubtreePlacer. -
Renamed the
FreeNodePlacerclass toFixedSubtreePlacer. -
Renamed the
GridNodePlacerclass toMultiLayerSubtreePlacer. -
Renamed the
GroupedNodePlacerclass toMultiSplitSubtreePlacer. The class now considers port grouping (useTreeLayoutData#Ports) to define how child nodes are split. -
Renamed the
LayeredNodePlacerclass toLevelAlignedSubtreePlacer. -
Renamed the
TreeLayout#DefaultNodePlacerproperty toDefaultSubtreePlacer. -
Renamed the
TreeLayoutData#DelegatingNodePlacerPrimaryNodesproperty toSingleSplitSubtreePlacerPrimaryNodes. -
Renamed the
TreeLayoutData#GridNodePlacerRowIndicesproperty toMultiLayerSubtreePlacerLayerIndices.
-
Renamed the
-
Renamed the property
RoutingStyle.PolylinetoSingleLayerSubtreePlacerRoutingStyle#STRAIGHT_LINE_TO_CHILD_CONNECTOR,RoutingStyle#FORKproperty toSingleLayerSubtreePlacerRoutingStyle#ORTHOGONAL, andRoutingStyle#FORK_AT_ROOTproperty toSingleLayerSubtreePlacerRoutingStyle#ORTHOGONAL_AT_ROOT. -
Added
SingleLayerSubtreePlacerRoutingStyle#POLYLINEproperty which leads to a polyline routing style. -
Removed the
TreeLayout#DefaultLeafPlacerproperty as well asLeafNodePlacerclass. -
Removed the
SimpleNodePlacerclass; useDefaultSubtreePlacerclass instead. -
Replaced
DefaultNodePlacer#ChildPlacementproperty with the newSingleLayerSubtreePlacer#Transformationproperty. The formerChildPlacement#HORIZONTAL_DOWNWARDvalue now maps toSubtreeTransform#NONE,ChildPlacement#HORIZONTAL_UPWARDtoSubtreeTransform#FLIP_Y,ChildPlacement#VERTICAL_TO_LEFTtoSubtreeTransform#ROTATE_RIGHT, andChildPlacement#VERTICAL_TO_RIGHTtoSubtreeTransform#ROTATE_LEFT_FLIP_Y. -
Renamed
RootAlignment#CENTER_OVER_CHILDRENtoSubtreeRootAlignment#CENTER_OF_CHILDREN. -
Renamed
RootAlignment#LEADINGtoSubtreeRootAlignment#LEFT,RootAlignment#TRAILINGtoSubtreeRootAlignment#RIGHT,RootAlignment#LEADING_OFFSETtoSubtreeRootAlignment#LEADING, andRootAlignment#TRAILING_OFFSETtoSubtreeRootAlignment#TRAILING. -
Renamed
IPortAssignmenttoITreeLayoutPortAssigner. -
Renamed
DefaultPortAssignmenttoTreeLayoutPortAssigner. -
Renamed
TreeLayout#PORT_ASSIGNMENT_DPKEYtoPORT_ASSIGNER_DATA_KEY. -
Renamed
TreeLayoutData#PortAssignmentstoPortAssigners. -
Removed the
AbstractNodePlacerclass. ImplementISubtreePlacerinterface instead. -
Removed the method
PlaceSubtree(Node,ParentConnectorDirection) of former subclasses ofAbstractNodePlacerclass. OverrideplaceSubtreemethod(IMapper<Node,SubtreeShape>,IMapper<Node,SubtreeShape>,LayoutGraph, Node) instead. -
Removed the
determineChildConnectormethod of former subclasses ofAbstractNodePlacerclass. OverridedetermineChildConnectorsmethod instead. -
Removed the methods
getNodeShapeandgetSubtreeShapefrom former subclasses ofAbstractNodePlacerclass. - Renamed all types, methods and properties containing "NodePlacer" to "SubtreePlacer".
-
Renamed
TreeLayout#MultiParentAllowedtoMultiParentAllowed. -
Renamed
TreeReductionStage#MultiParentAllowedtoMultiParentAllowed. -
The
TreeReductionStage#NonTreeEdgeLabelingAlgorithmproperty has been renamed toNonTreeEdgeLabeling. -
Remove methods
getPortBorderGapandgetPortDistanceDeltafrom theDefaultPortAssignment(renamed toTreeLayoutPortAssigner) class. -
The
DefaultPortAssignment#BorderGapToPortGapRatioproperty was renamed toBorderToPortGapRatio. -
tree#PortAssignmentModevaluePortConstrainthas been removed. Port candidates are always considered if they are specified. -
tree#PortAssignmentModevaluesDISTRIBUTED_EAST,DISTRIBUTED_WEST,DISTRIBUTED_NORTH,DISTRIBUTED_SOUTHhave been replaced by valueDISTRIBUTED. The side can be specified by usingTreeLayoutData#Ports. -
tree#PortAssignmentMode#NONEhas been renamedtree#PortAssignmentMode#CENTER. -
TreeLayout#getPortAssignmentcan no longer be overridden. To specifyIPortAssignmentstrategies per node,TreeLayoutData#PortAssignerscan be used. -
TreeLayout#getNodePlacercan no longer be overridden. To specifyNodePlacerstrategies per node,TreeLayoutData#SubtreePlacerscan be used. -
The following methods of
TreeLayouthave been removed:-
ReverseEdges. -
getRootsArray. -
getOutEdgeComparer-TreeLayoutData#ChildOrdercan be used instead. -
createNodeShape-modifyNodeShapecan be used instead to modify the shape. -
directTree-TreeLayoutData#TreeRootcan be used to accomplish the same result.
-
-
DefaultNodePlacer#calculateParentConnectorhas been removed. Custom implementations can be inlined at the end ofplaceSubtree. -
SubtreeShape#addBoundsToShapeaccepts a singleRectDparameter instead of its deconstructed values. -
SubtreeShape#assignValuesTohas been removed -createCopycan be used instead. -
Renamed
FillStyletoAspectRatioChildAlignmentPolicyandAspectRatioNodePlacer#FillStyletoChildAlignmentPolicy. -
The API of the node placer implementations has been simplified and improved. The
INodePlacerinterface was renamed toISubtreePlacer. - The class hierarchy of the various node placer implementations has been simplified. The rotatable base class implementation has been removed from the hierarchy.
-
The properties
TreeLayout#SourcePortConstraintDataAcceptorandTreeLayout#TargetPortConstraintDataAcceptorhave been removed. -
The properties
TreeLayout#SourceGroupDataAcceptor
andTreeLayout#TargetGroupDataAcceptorhave been removed. -
The
TreeComponentLayoutclass has been removed. -
The factory
TreeReductionStage#createStraightLineRoutermethod has been removed. The standalone routerStraightLineEdgeRouterclass should be used instead when straight-line edges are required. -
The
AspectRatioTreeLayouthas been removed together withAspectRatioTreeLayoutData,RootPlacement, andSubtreeArrangement. Use theTreeLayoutwith theAspectRatioSubtreePlacerinstead. -
The
ClassicTreeLayouthas been removed together with the enumsLeafPlacement,EdgeRoutingStyle, andPortStyle. TheTreeLayoutcan be used instead. -
Renamed
TreeLayoutData#OutEdgeComparatorstoTreeLayoutData#ChildOrderand changed the types to Comparison function. -
Removed
TreeLayout#DefaultOutEdgeComparator. UseTreeLayoutData#ChildOrderinstead. Also removedNodeOrderComparatorclass. -
All layouts suitable for trees, such as
TreeLayout,RadialTreeLayout, now default to using theTreeReductionStageto temporarily remove non-tree edges from the graph during layout calculation. -
Replaced
TreeLayoutData#OutEdgeComparatorsproperty with new, more powerfulChildOrderproperty.
Incompatible Behavior Changes
-
The
TreeLayoutnow considers node labels by default. -
The
TreeLayoutnow places edge labels by default using an integrated labeling algorithm. - Port candidates are always considered if they are specified.
Orthogonal Layout
Incompatible API Changes
-
Renamed
ChainLayoutStyletoChainSubstructureStyle. -
Renamed
CycleLayoutStyletoCycleSubstructureStyle. -
Renamed
TreeLayoutStyletoTreeSubstructureStyle. -
Renamed
EdgeLayoutDescriptortoOrthogonalLayoutEdgeDescriptor. -
Renamed
OrthogonalLayout#EdgeLayoutDescriptortoDefaultEdgeDescriptor. -
Renamed
OrthogonalLayout#EDGE_LAYOUT_DESCRIPTOR_DPKEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
OrthogonalLayoutData#EdgeLayoutDescriptorstoEdgeDescriptors. -
The
LayoutStyleenum (belonging to theOrthogonalLayout) has been renamed toOrthogonalLayoutMode. Furthermore, the new values are Strict (former Default),FORCED_STRAIGHT_LINE(former Box) , and Relaxed (formerFIXED_MIXED). The former values Uniform,FIXED_BOX, and Mixed have been removed from the enum. -
The
OrthogonalLayoutproperties related to substructures have all been renamed to contain "substructure" in their name.ChainStyle,ChainSize,TreeStyle,TreeSize,TreeOrientation,CycleStyle,CycleSizeare now calledChainSubstructureStyle,ChainSubstructureSize,TreeSubstructureStyle,TreeSubstructureSize,TreeSubstructureOrientation,CycleSubstructureStyle,CycleSubstructureSize. -
The following properties have been removed from the
OrthogonalLayoutclass: Randomization,CrossingReductionEnabled,EdgeLengthReductionEnabled,PerceivedBendOptimizationEnabledandFaceMaximizationEnabled. Use the newQualityTimeRatioproperty instead. -
The
DirectedEdgesproperties ofOrthogonalLayoutDataandPartialLayoutDataare now both of typeItemMappingwith the nameEdgeOrientationand support floating-point values to also specify edges oriented against the main layout direction. -
EdgeDirectednessDpKeyon all supportingILayoutAlgorithms have been combined into a global data keyLayoutKeys#EDGE_DIRECTEDNESS_DATA_KEY. -
PartialLayout#DIRECTED_EDGES_DPKEYis renamed toEDGE_ORIENTATION_DATA_KEYand now also allows specifying edges should be routed against the main layout orientation. -
Removed the
CompactOrthogonalLayoutclass.
Incompatible Behavior Changes
-
The
OrthogonalLayoutnow considers node labels by default. -
The
OrthogonalLayoutnow places edge labels by default using an integrated labeling algorithm.
Edge Router
Incompatible API Changes
-
The
MonotonicPathRestrictionenum is now a flags enum and is calledMonotonicPathRestrictions. -
The
SelfLoopRouter#SmartSelfLoopPlacementEnabledproperty has been removed. It was enabled by default and the algorithm now always behaves like when it was enabled previously. To get all self-loops on the same node corner independently of other edges, theSelfLoopRoutercan be applied in a separate post-processing step where only self-loops are present in the graph (useSubgraphLayoutStage). -
The
ParallelEdgeRouter#AbsJoinEndDistanceproperty has been renamed toAbsoluteJoinEndDistance. -
The
ParallelEdgeRouter#RelJoinEndDistanceproperty has been renamed toRelativeJoinEndDistanceFactor, and its default value now is 0. -
The
ParallelEdgeRouter#LineDistanceproperty has been renamed toEdgeDistance. -
The
SelfLoopRouter#LineDistanceproperty has been renamed toEdgeDistance. -
The type of
IntermediateRoutingPointsproperty has been changed fromIListtoIStreamIterable. -
Renamed
ParallelEdgeRouter#ROUTED_PARALLEL_EDGES_DPKEYtoROUTED_MULTI_EDGES_RESULT_DATA_KEY. -
Renamed
ParallelEdgeRouter#findAndHideParallelEdgestofindAndHideMultiEdges. -
Renamed
ParallelEdgeRouterData#RoutedParallelEdgestoRoutedMultiEdgesResult. -
Renamed the
CurveEdgeLayoutDescriptor#MinimumEdgeToEdgeDistanceproperty toMinimumEdgeDistance. -
Renamed the
EdgeLayoutDescriptor#MinimumEdgeToEdgeDistanceproperty (EdgeRouter) toMinimumEdgeDistance. -
Renamed the
PenaltySettings#MinimumEdgeToEdgeDistancePenaltyproperty toEdgeRouterCosts#MinimumEdgeDistanceCost. -
EdgeRouter#Gridhas been replaced byEdgeRouter#GridSpacing. -
The class
polyline#Gridhas been removed. -
Renamed
EdgeLayoutDescriptortoEdgeRouterEdgeDescriptor. -
Renamed
CurveEdgeLayoutDescriptortoCurveRoutingEdgeDescriptor. -
Renamed
EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DPKEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
EdgeRouter#DefaultEdgeLayoutDescriptortoDefaultEdgeDescriptor. -
Renamed
EdgeRouter#getEdgeLayoutDescriptortogetEdgeDescriptor. -
Renamed
EdgeRouterData#EdgeLayoutDescriptorstoEdgeDescriptors. -
Renamed
PathSearchContext#CurrentEdgeLayoutDescriptortoCurrentEdgeDescriptor. -
Renamed
CurveRoutingStage#DefaultEdgeLayoutDescriptortoDefaultEdgeDescriptor. -
Renamed
CurveRoutingStage#CURVE_EDGE_LAYOUT_DESCRIPTOR_DPKEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
CurveRoutingStageData#EdgeLayoutDescriptorstoEdgeDescriptors. -
Renamed
Interval#MintoInterval#Minimum. -
Renamed
Interval#MaxtoInterval#Maximum. -
Renamed
OrthogonalInterval#MintoOrthogonalInterval#Minimum. -
Renamed
OrthogonalInterval#MaxtoOrthogonalInterval#Maximum. -
Renamed
PenaltySettingstoEdgeRouterCosts.-
Renamed the related
EdgeLayoutDescriptor#PenaltySettingsproperty toEdgeRouterCosts. -
Renamed all its properties to
XyzCostinstead ofXyzPenalty:SketchViolationPenaltytoSketchViolationCost,EdgeLengthPenaltytoEdgeLengthCost,BendPenaltytoBendCost,EdgeCrossingPenaltytoEdgeCrossingCost,AdjacentEdgeCrossingPenaltytoAdjacentEdgeCrossingCost,SelfCrossingPenaltytoSelfCrossingCost,NodeCrossingPenaltytoNodeCrossingCost,PortCrossingPenaltytoPortCrossingCost,GroupNodeCrossingPenaltytoGroupNodeCrossingCost,NodeLabelCrossingPenaltytoNodeLabelCrossingCost,EdgeLabelCrossingPenaltytoEdgeLabelCrossingCost,MinimumNodeToEdgeDistancePenaltytoMinimumNodeToEdgeDistanceCost,MinimumGroupNodeToEdgeDistancePenaltytoMinimumGroupNodeToEdgeDistanceCost,MinimumEdgeToEdgeDistancePenaltytoMinimumEdgeDistanceCost,MinimumNodeCornerDistancePenaltytoMinimumNodeCornerDistanceCost,MinimumFirstLastSegmentLengthPenaltytoMinimumFirstLastSegmentLengthCost,BendsInNodeToEdgeDistancePenaltytoBendsInNodeToEdgeDistanceCost,MonotonyViolationPenaltytoMonotonyViolationCost,PartitionGridCellReentrancePenaltytoLayoutGridCellReentranceCost,PortViolationPenaltytoPortViolationCost,InvalidEdgeGroupingPenaltytoInvalidEdgeGroupingCost, andSingleSideSelfLoopPenaltytoSingleSideSelfLoopCost.
-
Renamed the related
-
Renamed and moved data key
PartitionCellKeys#NODE_LABEL_CROSSING_COST_FACTORS_KEYtoEdgeRouter#NODE_LABEL_CROSSING_COST_FACTOR_DATA_KEY. -
Renamed and moved data key
PartitionCellKeys#EDGE_LABEL_CROSSING_COST_FACTORS_KEYtoEdgeRouter#EDGE_LABEL_CROSSING_COST_FACTOR_DATA_KEY. -
Property
EdgeRouterData#LabelCrossingPenaltyFactorshas been replaced by the two new propertiesEdgeRouterData#NodeLabelCrossingCostFactorsandEdgeRouterData#EdgeLabelCrossingCostFactors. -
The
SelfLoopRouter#layoutSelfLoopsmethod has been removed. To route the self-loop edges, theSelfLoopRouterclass should be applied to the graph. -
The
SelfLoopRouter#LayoutStyleproperty has been renamed toRoutingStyle. The respective enum type has been renamed toSelfLoopRoutingStyle. -
The
OrganicEdgeRouter#createNodeEnlargementStagemethod has been removed and is now replaced by the newMovingNodesAllowedproperty. -
The
OrganicEdgeRouter#EdgeNodeOverlapAllowedproperty has been renamed toOrganicEdgeRouter#EdgeNodeOverlapsAllowed. -
The protected
EdgeRouter#createDefaultEdgeOrderComparatormethod has been removed. UseEdgeRouterData#EdgeProcessingComparisoninstead. -
Renamed
ObstacletoRoutingObstacle. -
Renamed
PathtoPathSearchResult. -
Renamed
PathRequesttoPathSearchRequest. -
Refactored the API for customizing the
EdgeRouterclass.-
The classes/interfaces
PathSearch,PathSearchResult,CellSegmentInfo,EdgeInfo, Channel,ChannelBasedPathRouting,SegmentInfo,AbstractSegmentInfo,SegmentGroup,router#polyline#Alignment,DynamicObstacleDecomposition,IObstaclePartition,IPartition,GraphPartition,GraphPartitionExtensionAdapter,IDecompositionListener,IDynamicDecomposition,IEnterIntervalCalculatorandIGraphPartitionExtensionhave been removed. -
The
PartitionCell#createBorderIntervalmethod has been removed alongside with thePartitionCellBorderenum. -
The properties
EdgeCellInfo#EnterSegmentGroup,EdgeCellInfo#ExitSegmentGroupandEdgeCellInfo#CellSegmentInfoshave been removed. -
The properties
EdgeRouter#RegisteredPartitionExtensions,RegisteredPathSearchExtensionsand Partition have been removed, as well as methodscreateObstacleDecomposition,createPathSearch,createPathSearchContext,configurePathSearch,createPathRouting,createConfiguration,configureGraphPartitionandcleanUpGraphPartition. -
The properties
PathSearchContext#PathSearchandPathSearchContext#PathSearchResulthave been removed. -
Added new methods
EdgeRouter#addPathSearchExtensionandEdgeRouter#addPartitionExtension. -
Added
PartitionExtensionclass as replacement forIGraphPartitionExtension. -
Added new
IRouterPartitioninterface as replacement ofIObstaclePartitionandIPartition. -
The Partition property has been added to
PathSearchConfigurationclass. -
The
Path#lengthproperty has been renamed toPathSearchResult#CellEntranceCount.
-
The classes/interfaces
-
The
EdgeRouterand all its related classes have been moved from namespacecom.yworks.yfiles.layout.router.polylinetocom.yworks.yfiles.layout.router. -
The
PolylineLayoutStageclass has been renamed toOctilinearRoutingStage. ItsPreferredPolylineSegmentLengthproperty has been renamed toPreferredOctilinearSegmentLength. -
The
EdgeRouter#IgnoringInnerNodeLabelsEnabledproperty has been removed from the API. Consideration is controlled viaEdgeRouter#NodeLabelPlacement. Inner labels of non-group are only ignored when choosing valueEdgeRouterNodeLabelPlacement#IGNORE; labels of group nodes alone can be ignored when choosingEdgeRouterNodeLabelPlacement#IGNORE_GROUP_LABELS. -
The already obsolete properties
EdgeRouter#PolylineRoutingEnabled,EdgeRouter#PreferredPolylineSegmentLengthandEdgeRouter#MaximumPolylineSegmentRatiohave been removed. They are replaced by respective properties on theEdgeRouterEdgeDescriptorclass. -
Replaced
EdgeRouter#EdgeComparatorproperty of typeComparatorwithEdgeRouterData#EdgeProcessingComparisonof type Comparison function. -
Class
PenaltySettingsandEdgeLayoutDescriptor#PenaltySettingsproperty where renamed toEdgeRouterCostsandEdgeRouterEdgeDescriptor#EdgeRouterCosts. -
The
BusRouterclass and all API members related to it have been removed. For bus-style edge routing, useEdgeRouterinstead. -
Method
ParallelEdgeRouter#layoutParallelEdgeswas renamed torouteEdges.
Incompatible Behavior Changes
-
The default of
ParallelEdgeRouter#RelativeJoinEndDistanceFactorhas changed from 0.1 to 0. -
The
EdgeRouternow considers node labels by default. -
The
EdgeRouternow places edge labels by default using a generic labeling algorithm.
Labeling
Incompatible API Changes
-
Removed the
GraphModelManager#LabelLayerPolicyproperty. Use the more specific propertiesNodeLabelLayerPolicy,EdgeLabelLayerPolicyandPortLabelLayerPolicyinstead. -
The
SandwichLabelModelhas been removed. It can be emulated using aCompositeLabelModelwith the top and bottom position of anExteriorNodeLabelModel. -
Made enums
LabelAngleOnRightSideRotationsandLabelAngleReferencesnon-flags enums. -
Removed the
LabelAngleOnRightSideOffsetsenum. -
Changed the
PreferredPlacementDescriptor#AngleOffsetOnRightSideenum property to theAddingHalfRotationOnRightSideEnabledbool property. -
Removed the interfaces
INodeLabelLayoutandIEdgeLabelLayout. Labels of theLayoutGraphare instead represented by typesNodeLabelandEdgeLabel. -
Removed
LayoutGraph#getLabelLayout. Labels can instead be retrieved usingNode#LabelsandEdge#Labels. -
Removed the
ILabelLayoutFactoryclass. Labels can instead be created and removed usingLayoutGraph#addLabelandLayoutGraph#remove. -
Removed the interfaces
INodeLabelLayoutModel,IEdgeLabelLayoutModeland all implementations. To specify valid positions forGenericLabeling, the typesNodeLabelCandidatesandEdgeLabelCandidatesoffer methods for creating positions that correspond to the old model implementations. Candidates can be specified usingGenericLabelingData#NodeLabelCandidatesandGenericLabelingData#EdgeLabelCandidates. -
Summarized layout algorithm properties such as
ConsiderNodeLabels,ConsiderEdgeLabels,IntegratedNodeLabelingEnabled,IntegratedEdgeLabeling, andNodeLabelingPolicyas two propertiesNodeLabelPlacementandEdgeLabelPlacement. -
Removed
LabelLayoutTranslator,LabelLayoutData,LabelLayoutKeysand related classes. The behavior ofLabelLayoutDatacan be recreated usingNodeLabel#AbsolutePlacementandEdgeLabel#AbsolutePlacement. -
Removed properties
NodeOverlapsRemovalEnabled,EdgeOverlapsRemovalEnabledandEdgeGroupOverlapAllowedfromGenericLabeling. -
Introduced
GenericLabeling#QualityTimeRatioproperty providing the possibility of balancing runtime and quality. -
Added intersection information to
LabelCandidateclass, which provides means to compute profits and to mimic the behavior of the removed properties. -
Removed
AbstractMISLabeling#OptimizationStrategy. UseGenericLabeling#DefaultNodeLabelingCostsandGenericLabeling#DefaultEdgeLabelingCostsinstead. Additionally individual costs can now be set for each label, usingGenericLabelingData#NodeLabelingCostsandGenericLabelingData#EdgeLabelingCosts. -
Removed
AbstractLabeling#AutoFlippingEnabled. Automatically flipping labels right-side up is handled by the view, e.g.SmartEdgeLabelModel#AutoRotationEnabled. -
Removed the
IProfitModelinterface and propertiesAbstractLabeling#ProfitModelandAbstractMISLabeling#CustomProfitModelRatio. Custom weights for a label candidate can be set at creation of the candidate withNodeLabelCandidatesandEdgeLabelCandidates, or through a callback for each label usingGenericLabelingData#NodeLabelCandidateProcessorsandGenericLabelingData#EdgeLabelCandidateProcessors. -
Removed the classes
AbstractMISLabelingandAbstractLabeling. -
Removed the following protected methods from
GenericLabeling:createEdges,assignProfit,foundLabelOverlap,foundNodeOverlap,foundEdgeOverlap,foundHaloOverlap,foundPartitionGridLineOverlap,foundPartitionGridInsetOverlap,foundPartitionGridInteriorOverlap. -
Renamed
LabelSideReferences#ABSOLUTE_WITH_LEFT_IN_NORTHtoABSOLUTE_WITH_LEFT_ABOVE. -
Renamed
LabelSideReferences#ABSOLUTE_WITH_RIGHT_IN_NORTHtoABSOLUTE_WITH_RIGHT_ABOVE. -
Values of
DiscreteNodeLabelPositionsenum have been renamed.-
INTERNAL_MASKtoINSIDE. -
EIGHT_POS_MASKtoDiscreteNodeLabelPositions#OUTSIDE. -
SIDES_MASKtoSIDES. -
CORNER_MASKtoCorners. -
Removed value
SANDWICH_MASK.
-
-
Values of
DiscreteNodeLabelPositionshave been renamed:-
DiscreteNodeLabelPositions#TOP,DiscreteNodeLabelPositions#TOP_LEFT, ... have been renamed toTOP_INSIDE,TOP_LEFT_INSIDE, ... -
DiscreteNodeLabelPositions#NORTH,DiscreteNodeLabelPositions#NORTH_WEST, ... have been renamed toDiscreteNodeLabelPositions#TOP,DiscreteNodeLabelPositions#TOP_LEFT, ...
-
-
Renamed
LabelCandidate#CustomProfitto Weight. -
Renamed
SliderModetoEdgeLabelSliderMode. -
The configuration
LabelingDataclass for theGenericLabelingalgorithm has been renamed toGenericLabelingDatato be more in line with otherLayoutDataimplementations. -
Removed
DescriptorWrapperLabelModel. -
ILabelCandidateDescriptorand related interfaces have been removed. -
LayoutGraphAdapter: removedgetLabelCandidateDescriptorProviderandgetLabelCandidateDescriptor. -
AbstractMISLabeling#AmbiguityReductionEnabledis removed. Ambiguous label placements can instead be penalized usingLabelingCosts#AmbiguousPlacementCost. -
The
PreferredPlacementDescriptorclass has been renamed toEdgeLabelPreferredPlacement.-
The
IEdgeLabelLayout#PreferredPlacementDescriptorproperty has been removed. Instead, the preferred placement can be specified usingEdgeLabelPreferredPlacement#EDGE_LABEL_PREFERRED_PLACEMENT_DATA_KEY.
-
The
Organic Layout
Incompatible API Changes
-
The
OutputRestrictionclass and the associated properties have been renamed toShapeConstraint. -
OrganicConstraintDatano longer inherits fromLayoutData. -
Renamed
OrganicLayoutData#SourceGroupIdstoSubstructureSourceGroupIds.OrganicLayoutnow usesOrganicLayout#SUBSTRUCTURE_SOURCE_GROUP_ID_DATA_KEYinstead ofLayoutKeys#SOURCE_EDGE_GROUP_ID_DATA_KEY. -
Renamed
OrganicLayoutData#TargetGroupIdstoSubstructureTargetGroupIds.OrganicLayoutnow usesOrganicLayout#SUBSTRUCTURE_TARGET_GROUP_ID_DATA_KEYinstead ofLayoutKeys#TARGET_EDGE_GROUP_ID_DATA_KEY. -
Renamed the
OrganicLayout#GROUP_NODE_MODE_DPKEYproperty toGROUP_NODE_HANDLING_POLICY_DATA_KEY. -
TreeSubstructureStyle#BALLOONhas been renamed toRADIAL_TREE. -
The
OrganicLayoutnow configures theComponentLayoutby default, andSmartComponentLayoutEnabledwas removed. -
OrganicLayout#configureComponentLayoutanddisposeComponentLayoutwere removed. To configure theComponentLayout, replace the instance of theComponentLayoutin theLayoutStageStackwith a suitably configured instance. -
OrganicLayout#NodeSizeConsiderationEnabledwas removed. TheOrganicLayoutnow always considers node sizes. -
Renamed
OrganicLayout#ClusterAsGroupSubstructureAllowedtoClusterAsGroupSubstructureAllowed. -
Renamed
OrganicLayout#AvoidingNodeEdgeOverlapsEnabledtoAvoidingNodeEdgeOverlapsEnabled. -
Renamed
OrganicLayout#NodeOverlapsAllowedtoNodeOverlapsAllowed. -
Renamed
GroupNodeMode#NORMALtoGroupNodeHandlingPolicy#FREE. -
The
OrganicLayoutclass no longer offers valueClusteringPolicy#USER_DEFINED. Now, cluster IDs provided by users viaOrganicLayoutData#ClusterIdsproperty or data keyOrganicLayout#CLUSTER_ID_DATA_KEYare always considered first. If none are defined, the specifiedOrganicLayout#ClusteringPolicyis considered. -
Removed the
ClusterNodesproperty fromOrganicLayout. It is replaced byClusteringPolicyproperty. To disable the clustering, specifyClusteringPolicy#NONE. To enable it choose one of the available other policies. -
Removed the
ClusteringQualityproperty fromOrganicLayout. UseQualityTimeRatioinstead. -
The
ClassicOrganicLayoutclass has been removed. It is superseded by the more powerfulOrganicLayoutalgorithm that should be used instead. -
The classes
OrganicRemoveOverlapsStageandShuffleLayouthave been removed from the library. To solve the task of overlap removal, theRemoveOverlapsStageclass is still available and the style previously generated byOrganicRemoveOverlapsStagecan be triggered via the policyOverlapRemovalPolicy#PRESERVE_RELATIVE_LOCATIONS. -
The
RecursiveShuffleLayoutclass has been removed from the API. -
The
OrganicPartitionGridLayoutStageclass has been removed.
Incompatible Behavior Changes
-
The default style of the
OrganicLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
OrganicLayoutnow considers node labels by default. -
The
OrganicLayoutnow places edge labels by default using a generic labeling algorithm. -
The
OrganicLayoutnow always considers node sizes.
Interactive Organic Layout
Incompatible API Changes
-
The
InteractiveOrganicLayoutDataclass has been added. It handles the initial settings per node and edge. -
The classes
InteractiveOrganicNodeHandleandInteractiveOrganicEdgeHandlehave been added. They handle the settings per node and edge while the algorithm runs. -
The properties, getters, and setters on
InteractiveOrganicLayoutthat concern settings for individual items have been moved toInteractiveOrganicLayoutDataor the handles as appropriate. -
The
InteractiveOrganicLayout#addStructureUpdatemethod has been removed. -
The methods
InteractiveOrganicLayout#commitPositionsandcommitPositionsSmoothlyhave been combined as theInteractiveOrganicLayoutData#updateNodeCentersmethod. -
The
InteractiveOrganicLayout#OutputRestrictionproperty has been renamed toShapeConstraint. -
The
InteractiveOrganicLayout#PreferredEdgeLengthproperty has been renamed toDefaultPreferredEdgeLength. -
The
InteractiveOrganicLayout#syncStructuremethod has been removed.
Circular Layout
Incompatible API Changes
-
Renamed the
ExteriorEdgeLayoutDescriptor#EdgeToEdgeDistanceproperty toCircularLayoutExteriorEdgeDescriptor#EdgeDistance. -
Renamed
EdgeLayoutDescriptortoCircularLayoutEdgeDescriptor. -
Renamed
CircularLayout#DefaultEdgeLayoutDescriptortoEdgeDescriptor. -
Renamed
ExteriorEdgeLayoutDescriptortoCircularLayoutExteriorEdgeDescriptor. -
Renamed
CircularLayout#ExteriorEdgeLayoutDescriptortoExteriorEdgeDescriptor. -
The type of the
CircularLayout#MaximumDeviationAngleproperty has been changed to double. -
The
SingleCycleLayouthas been removed. TheCircularLayoutwithPartitioningPolicyset toSINGLE_CYCLEcan be used instead. -
CircularLayout#SingleCycleLayouthas been replaced byCircularLayout#PartitionDescriptor. -
CircularLayout#DefaultEdgeLayoutDescriptorhas been renamed toEdgeDescriptor. -
CircularLayout#BalloonLayouthas been renamed toBackboneLayout. -
The
CircularLayout#LayoutStyleproperty has been renamed toPartitioningPolicyto better reflect the fact that it controls how nodes are partitioned. The corresponding enum has also been renamed from toPartitioningPolicy. -
Removed the enum value
EdgeRoutingPolicy#MARKED_EXTERIOR. To manually select which edges should be routed externally, use theCircularLayoutData#ExteriorEdgesproperty instead. -
Renamed
CircularLayout#LayoutStyletoCircularLayout#PartitioningPolicy. -
Renamed
circular#LayoutStyletocircular#PartitioningPolicy. -
Removed the enum value
LayoutStyle#CUSTOM_GROUPS. If custom partitions are specified usingCircularLayoutData#Partitions, they are respected by theCircularLayoutautomatically. -
The
INodeSequencerclass has been removed from the API. Use the newCircularLayoutData#NodeComparisonproperty to specify custom node orders.
Incompatible Behavior Changes
-
PartitionDescriptor#InitialAngleis measured in degrees rather than radians. -
The default style of the
CircularLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
CircularLayoutnow considers node labels by default. -
The
CircularLayoutnow places edge labels by default using a generic labeling algorithm.
Radial Layout
Incompatible API Changes
-
Renamed the
RadialLayout#MinimumNodeToNodeDistanceproperty toMinimumNodeDistance. -
Renamed the
RadialLayout#MinimumEdgeToEdgeDistanceproperty toMinimumEdgeDistance. -
RadialLayout.NodeInfohas been renamed toNodePlacementResult. -
Renamed
radial#LayeringStrategytoRadialLayeringStrategy. -
Replaced
ItemMappingOutEdgeComparatorswithChildOrderDataChildOrder. -
Removed the enum value
radial#LayeringStrategy#USER_DEFINED. Custom layers are now always used if defined viaRadialLayoutData#LayerIdsproperty. -
Removed the enum value
CenterNodesPolicy#CUSTOM. Custom center nodes are now always used if defined viaRadialLayoutData#CenterNodesproperty. -
The read/write
CenterNodesDpKeyproperty from theRadialLayoutclass has been removed. It was replaced by the static read-only keyRadialLayout#CENTER_NODES_DATA_KEYthat must now be used instead to mark the custom center nodes.
Incompatible Behavior Changes
-
The default style of the
RadialLayout'sComponentLayoutis changed toPACKED_CIRCLE. -
The
RadialLayoutnow considers node labels by default. -
The
RadialLayoutnow places edge labels by default using a generic labeling algorithm. -
The
RadialLayout.NodePlacementResult#SectorStartproperty is now interpreted in clockwise direction. -
Custom layers are now always used if defined via
RadialLayoutData#LayerIdsproperty. -
Custom center nodes are now always used if defined via
RadialLayoutData#CenterNodesproperty.
Radial Tree Layout
Incompatible API Changes
-
Renamed
RootNodePolicytoRootSelectionPolicy. -
BalloonLayouthas been renamed toRadialTreeLayout, andBalloonLayoutDatahas been renamed toRadialTreeLayoutData. -
The following members have been removed from
BalloonLayout(nowRadialTreeLayout): The fieldgraph, theBalloonLayout.NodeInfo, the methodsgetInfo,calculateChildArrangement,calculateAngles,determineRoot, andsortChildNodes, theFromSketchModeEnabledproperty (use the new enum valueFROM_SKETCHofChildOrderingPolicyinstead), and theInterleavedModeproperty (useRadialTreeLayoutData#InterleavedNodesinstead). -
The following members of
BalloonLayout(nowRadialTreeLayout) have been renamed:PreferredChildWedgehas been renamed toPreferredChildSectorAngle,PreferredRootWedgehas been renamed toPreferredRootSectorAngle, and thegetPreferredChildWedgemethod has been renamed togetPreferredChildSectorAngle. -
The
InterleavedModeenum has been removed. -
The enum value
InterleavedMode#MARKED_NODEShas been removed. To define specific parents for interleaved placed child nodes use theRadialTreeLayoutData#InterleavedNodesproperty. -
The enum value
RootNodePolicy#SELECTED_ROOThas been removed. A custom root node is now always used if defined viaRadialTreeLayoutData#TreeRootproperty. -
The types of the following properties have been changed to double:
PreferredChildSectorAngle,PreferredRootSectorAngle,MinimumEdgeLength, andMinimumNodeDistance. -
Replaced layout data
OutEdgeComparatorproperty withChildOrderDataChildOrder. -
Removed
BalloonLayout#Comparator. UseRadialTreeLayoutData#ChildOrderinstead. -
Replaced
BalloonLayoutData#OutEdgeComparatorproperty with new, more powerfulChildOrderproperty (class is renamed toRadialTreeLayoutData).
Incompatible Behavior Changes
- The compactness factor is now interpreted differently. Larger values result in more compact drawings. Its range has been changed to [0, 1].
-
The default style of the
RadialTreeLayout's (formerlyBalloonLayout's)ComponentLayoutis changed toPACKED_CIRCLE. -
The from-sketch option of
RadialTreeLayoutsorts like before but no longer takes precedence over orders specified with theRadialTreeLayoutDatapropertiesChildOrderorNodeTypes. -
The
RadialTreeLayoutnow considers node labels by default. -
The
RadialTreeLayoutnow places edge labels by default using an integrated labeling algorithm.
Radial Group Layout
Incompatible API Changes
-
Renamed
CactusGroupLayout#GroupSizingPolicytoRadialGroupLayout#GroupSizePolicy. -
The
CactusGroupLayouthas been renamed toRadialGroupLayout, and theCactusGroupLayoutDatahas been renamed toRadialGroupLayoutData. -
Property
PreferredRootWedgehas been renamed toPreferredRootSectorAngle. -
Replaced
CactusGroupLayout#NodeComparatorproperty of typeComparatorwithRadialGroupLayoutData#ChildNodeComparatorof type Comparison function.
Incompatible Behavior Changes
-
The default style of the
RadialGroupLayout's (formerlyCactusGroupLayout's)ComponentLayoutis changed toPACKED_CIRCLE. -
The default of the
PreferredRootSectorAngleproperty has been changed from 180 to 360. -
The
RadialGroupLayoutnow places edge labels by default using a generic labeling algorithm.
Series-parallel Layout
Incompatible API Changes
-
The combinations of the enums
ForkStyleandPortAssignmentModehave been integrated into thePortAssignmentModeenum, and theForkStyleenum has been removed. -
DefaultPortAssignment#ForkStylehas been removed. -
Renamed
IPortAssignmenttoISeriesParallelLayoutPortAssigner. -
Renamed
DefaultPortAssignmenttoSeriesParallelLayoutPortAssigner. -
Renamed
SeriesParallelLayout#PORT_ASSIGNMENT_DPKEYtoPORT_ASSIGNER_DATA_KEY. -
Renamed
SeriesParallelLayoutData#PortAssignmentstoPortAssigners. -
Renamed the
SeriesParallelLayout#VerticalAlignmentproperty toParallelSubgraphAlignment. -
Renamed the
SeriesParallelLayout#MinimumNodeToNodeDistanceproperty toMinimumNodeDistance. -
Renamed the
SeriesParallelLayout#MinimumEdgeToEdgeDistanceproperty toMinimumEdgeDistance. -
Renamed
EdgeLayoutDescriptortoSeriesParallelLayoutEdgeDescriptor. -
Renamed
SeriesParallelLayout#DefaultEdgeLayoutDescriptortoDefaultEdgeDescriptor. -
Renamed
SeriesParallelLayout#EDGE_LAYOUT_DESCRIPTOR_DPKEYtoEDGE_DESCRIPTOR_DATA_KEY. -
Renamed
SeriesParallelLayoutData#EdgeLayoutDescriptorstoEdgeDescriptors. -
The
GeneralGraphHandlingproperty was removed.SeriesParallelLayoutnow handles general graphs by default. -
The
DefaultPortAssignment#BorderGapToPortGapRatioproperty was renamed toBorderToPortGapRatio. -
Remove methods
getPortBorderGapandgetPortDistanceDeltafrom theDefaultPortAssignmentclass. -
The
SeriesParallelLayout#NonSeriesParallelEdgeLabelingAlgorithmproperty has been renamed toNonSeriesParallelEdgeLabeling. -
Removed
SeriesParallelLayout#DefaultOutEdgeComparator. UseSeriesParallelLayoutData#ChildOrderinstead. Also removedDefaultOutEdgeComparatorclass. -
Replaced
SeriesParallelLayoutDataproperty .OutEdgeComparatorswith new, more powerfulChildOrderproperty.
Incompatible Behavior Changes
-
The
SeriesParallelLayoutnow considers node labels by default. -
The
SeriesParallelLayoutnow places edge labels by default using an integrated labeling algorithm. -
SeriesParallelLayoutnow handles general graphs by default.
Compact Disk Layout
Incompatible Behavior Changes
-
The
CompactDiskLayoutnow considers node labels by default. -
The
CompactDiskLayoutnow places edge labels by default using a generic labeling algorithm.
Multi-page Layout
Incompatible API Changes
-
The
MultiPageLayout#ProxyReferenceNodeCreationEnabledproperty has been renamed toUsingProxyReferenceNodesEnabled. -
The
EdgeBundleModesenum and the associated properties have been renamed toMultiEdgeConnectorPolicy. The enum values have been renamed toSEPARATE,SHARE_FOR_SAME_DIRECTIONandSHARE, respectively. The correspondingEdgeDataKeyhas been renamed toMULTI_EDGE_CONNECTOR_ID_DATA_KEY(previouslyEDGE_TYPE_DPKEY). -
Renamed
GroupingPolicytoMultiPageGroupingPolicy. -
The public API of the
MultiPageLayoutclass has been changed.-
The
ILayoutCallbackinterface has been removed. The respectiveMultiPageLayout#LayoutCallbackproperty is now an Action delegate instead. Furthermore,MultiPageLayout#calculateLayoutmethod has been removed, meaning the layout can and should only be started like all other algorithms (e.g. via theLayoutExecutororIGraph#applyLayout). -
The
IElementFactoryinterface and theDefaultElementFactoryclass have been removed. The replacement isMultiPageElementFactoryclass which can be accessed and modified usingMultiPageLayout#ElementFactoryproperty. -
The
MultiPageLayout#createElementFactorymethod has been removed. The factory can be get and set usingMultiPageLayout#ElementFactoryproperty. -
The
IElementInfoManagerinterface has been removed. -
The
LayoutContextclass of theMultiPageLayouthas been renamed toMultiPageLayoutContextand its properties Graph and Layout have been removed. -
The
INodeInfo,IEdgeInfo,INodeLabelInfo,IEdgeLabelInfointerfaces related toMultiPageLayouthave been removed. The data provided by them can now be retrieved via methods of theMultiPageLayoutContext(which is available also as property on theMultiPageLayoutResult). -
The callback methods
MultiPageLayout#removeConnectorPair,routeRestoredEdgesandapplyIncrementalLayouthave been removed.
-
The
-
MultiPageLayoutResult#getPageandpageCounthave been replaced byPageGraphs. -
MultiPageLayoutDatahandles the ID mapping automatically. Consequently, the explicit mappingsNodeIds,EdgeIds,NodeLabelIds, andEdgeLabelIdshave been removed. Original graph items can be obtained by callingMultiPageLayoutData#getOriginalItem. -
Renamed
multipage#NodeTypetoMultiPageNodeTypeand its valueNormaltoMultiPageNodeType#REGULAR. -
Renamed
multipage#EdgeTypetoMultiPageEdgeTypeand its valueNormaltoMultiPageEdgeType#REGULAR. -
The
EdgeBundleModesenum has been renamed toMultiEdgeConnectorPolicyand converted from a flags enum to a regular enum. To manually select which multi-edges should be distinguished, use theMultiPageLayoutData#MultiEdgeConnectorIdsproperty. -
The properties
MultiPageLayout#EdgeBundleModeMask,MultiPageLayout#EDGE_TYPE_DPKEY, andMultiPageLayoutData#EdgeTypeshave been renamed toMultiPageLayout#MultiEdgeConnectorPolicy,MultiPageLayout#MULTI_EDGE_CONNECTOR_ID_DATA_KEY, andMultiPageLayoutData#MultiEdgeConnectorIds.
Partial Layout
Incompatible API Changes
-
Renamed
partial#LayoutOrientationtoPartialLayoutOrientation. -
The
PartialLayout#layoutSubgraphmethod has been removed. -
The callback
configureEdgeRoutermethod has been removed from classesPartialLayoutandClearAreaLayout. The router instance can be specified via thePartialLayout#EdgeRouterandClearAreaLayout#EdgeRouterproperties so that an additional configuration callback is not necessary. -
Removed the enum value
ComponentAssignmentStrategy#CUSTOMIZED. Custom components are now always used if defined withPartialLayoutData#ComponentIds,ClearAreaLayoutData#ComponentIdsorFillAreaLayoutData#ComponentIdsrespectively.
Incompatible Behavior Changes
-
Custom components are now always used if defined with
PartialLayoutData#ComponentIds.
Tabular Layout
Incompatible API Changes
-
Renamed
NodeLayoutDescriptortoTabularLayoutNodeDescriptor. -
Renamed
TabularLayout#DefaultNodeLayoutDescriptortoDefaultNodeDescriptor. -
Renamed
TabularLayout#NODE_LAYOUT_DESCRIPTOR_DPKEYtoNODE_DESCRIPTOR_DATA_KEY. -
Renamed
TabularLayoutData#NodeLayoutDescriptorstoNodeDescriptors. -
Renamed
tabular#LayoutPolicytoTabularLayoutMode. -
Replaced
TabularLayout#NodeComparatorproperty of typeComparatorwithTabularLayoutData#FreeNodeComparisonof type Comparison function. -
The
TabularLayoutclass now features its own data key (LAYOUT_GRID_CELL_DESCRIPTOR_RESULT_DATA_KEY) where it will publish cell IDs of nodes that it explicitly assigned to the cells. Previously it reused the common data keyPartitionGrid#PARTITION_CELL_ID_DPKEY.
Incompatible Behavior Changes
-
The
TabularLayoutnow considers node labels by default. -
The
TabularLayoutnow places edge labels by default using a generic labeling algorithm.
Component Layout
Incompatible API Changes
-
The
ComponentArrangementStylesenum has been renamed toComponentArrangementStyle, as it is no longer a Flags-Enum.-
Removed
ComponentArrangementStyles#MASK. -
Replaced
ComponentArrangementStyles#MODIFIER_NO_OVERLAPwithTRY_KEEP_CENTERS. -
Replaced
ComponentArrangementStyles#MODIFIER_AS_ISwithComponentLayout#FromSketchModeEnabled.
-
Removed
-
Renamed
ComponentLayout#calculateBoundstocalculateComponentBounds. -
Renamed
ComponentLayout#setOrigintosetComponentLocation. -
The
IsolatedGroupComponentLayoutclass has been removed. -
Renamed
ComponentArrangementStyles#NONEtoComponentArrangementStyle#KEEP_CENTERS. -
Removed the
ComponentArrangementEnabledproperty fromComponentLayout; use the newComponentArrangementStyle#NONEinstead to avoid arranging components. -
Removed
ComponentLayout#arrangeFieldsmethod. -
Simplified parameter lists of methods
ComponentLayout#arrangeComponentsandComponentLayout#setOriginto now accept instances of Component class. -
If
ComponentLayoutis used as a pre-processing step to apply a layout algorithm on multiple connected components, theStopDurationof that layout is divided appropriately over all components, instead of being applied once per component.
Incompatible Behavior Changes
-
ComponentArrangementStyle#PACKED_CIRCLEandComponentArrangementStyle#PACKED_RECTANGLEnow consider the convex hulls of components to determine overlaps.
Tree Map Layout
Incompatible API Changes
-
Renamed
TilingPolicytoTilingStrategyandTreeMapLayout#TilingPolicytoTreeMapLayout#TilingStrategy. -
Replaced
TreeMapLayout#NodeComparatorproperty of typeComparatorwithTreeMapLayoutData#ChildNodeComparisonof type Comparison function. -
Removed the
NodeWeightComparatorclass.
Recursive Group Layout
Incompatible API Changes
-
RecursiveGroupLayout#NULL_LAYOUTis renamed toRecursiveGroupLayout#FIX_CONTENT_LAYOUT. -
FixGroupLayoutStageis removed and its functionality is replaced byRecursiveGroupLayoutusingRecursiveGroupLayout#FIX_GROUP_LAYOUTfor all groups. -
The
RecursiveGroupLayoutclass now ignores empty group nodes by default (seeEmptyGroupsConsiderationEnabledproperty). -
The signature of
IGroupBoundsCalculator#calculateBoundsmethod was changed. The given children are now of typeIIndexedIterable.<Node> -
The
GroupBoundsCalculatorimplementation now keeps the center of empty group nodes ifEmptyGroupsConsiderationEnabledis enabled. -
Method
GroupBoundsCalculator#calculateBoundsnow correctly considers the specified children. Previously, the given children were ignored and all graph elements were considered when calculating the group bounds.
Layout Grid
Incompatible API Changes
-
PartitionGridis renamed toLayoutGrid. This also affects the related classesPartitionGridData,GenericPartitionGridStage, andGenericPartitionGridStageData. -
Renamed
ColumnDescriptortoLayoutGrid.Column&RowDescriptortoLayoutGrid.Row. -
Renamed
PartitionCellIdtoLayoutGrid.CellDescriptor. -
Renamed inset properties on classes
LayoutGrid.Column(formerlyColumnDescriptor) andLayoutGrid.Row(formerlyRowDescriptor) to now be called padding (e.g.,LeftPaddinginstead ofLeftInset). -
Removed helper class
Swimlanesandlayout#SwimlaneRepresentative. -
Removed the
SwimlanesModeenum. -
The methods
PartitionGrid#prepareOrientationChangeandPartitionGrid#finalizeOrientationChangehave been removed. -
Removed properties
OriginalPositionandOriginalWidthfromLayoutGrid.Columnclass (formerlyColumnDescriptor). Use propertiesLayoutGrid.Column#Position(formerlyComputedPosition) orLayoutGrid.Column#Width(formerlyComputedWidth). -
Removed properties
OriginalPositionandOriginalHeightfromLayoutGrid.Rowclass (formerlyRowDescriptor). Use propertiesLayoutGrid.Row#Position(formerlyComputedPosition) orLayoutGrid.Row#Height(formerlyComputedHeight). -
The
SwimlaneDescriptorclass has been removed from the API. UseLayoutGridclass (formerly calledPartitionGrid) instead, which is able to model one-dimensional and two-dimensional grids. -
The
PartitionGridLayoutStageclass has been removed. It is not necessary to manually add this stage, sinceHierarchicalLayoutcan supportLayoutGridout-of-the-box. - Renamed all types, methods and properties containing "CellId" to "CellDescriptor".
-
Removed properties
RowOrderOptimizationEnabledandColumnOrderOptimizationEnabledfromPartitionGridDataclass. -
Removed the data key
PartitionGrid#PARTITION_GRID_DPKEY. The keyLayoutGrid#LAYOUT_GRID_CELL_DESCRIPTOR_DATA_KEYis now the only data key which can be used to specify layout grids. -
Removed data key
RecursiveGroupLayout#GROUP_NODE_PARTITION_GRID_DPKEY. The keyLayoutGrid#LAYOUT_GRID_CELL_DESCRIPTOR_DATA_KEYis now the only data key which can be used to specify layout grids.
Other Layouts
Incompatible API Changes
-
Renamed
CurveFittingLayoutStagetoCurveFittingStage. -
Renamed
FixNodeLayoutStagetoLayoutAnchoringStageandFixNodeLayoutDatatoLayoutAnchoringStageData. In addition:-
Renamed
FixPointPolicytoLayoutAnchoringPolicy. -
Renamed
FixNodeLayoutStage#FIXED_NODE_DPKEYtoNODE_ANCHORING_POLICY_DATA_KEY. -
Renamed
calculateFixPointtocalculateAnchorPoint. -
Removed
FixNodeLayoutData#FixedNodes. Graph elements to anchor the graph on can be specified by setting the respectiveAnchoringPoliciesusingLayoutAnchoringStageData.
-
Renamed
-
Removed the
InterEdgeRoutingStyleenum.
Algorithms
Incompatible API Changes
-
IntersectionInfohas been renamed toIntersectionand has become an inner class ofLayoutGraphAlgorithms. -
Renamed
ParallelEdges#findParallelEdgestoLayoutGraphAlgorithms#findMultiEdges. -
Removed the
BfsDirectionenum. UseTraversalDirectioninstead. -
Removed namespace
Algorithms#Util. The types are now in namespace Algorithms. -
The
TreeAnalyzerclass has been removed. Use the more convenient and powerfulTreeAnalysisclass instead. -
Removed the Intersections class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
IntersectionAlgorithmclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the
NetworkFlowsclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead (e.g.MaximumFlow). -
Removed the
NodeOrdersclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead (e.g.topologicalNodeOrder). -
Removed the
GraphConnectivityclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the
IndependentSetsclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. - The Triangulator algorithm class has been removed.
-
Removed the Substructures class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Trees class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Bipartitions class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Cycles class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
ParallelEdgesclass. Use corresponding methods ofLayoutGraphAlgorithmsinstead. -
Removed the Transitivity class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the Centrality class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Removed the
ShortestPathsclass. Use corresponding methods ofLayoutGraphAlgorithmsclass instead (e.g.ShortestPath). -
Removed the Groups class. Use corresponding methods of
LayoutGraphAlgorithmsinstead. -
Renamed the Dendrogram class to
HierarchicalClusteringDendrogram. -
Removed the Bfs class. Use
LayoutGraphAlgorithms#bfsinstead. -
Removed the Dfs class. Use
LayoutGraphAlgorithms#dfsinstead. -
Renamed
analysis#ComponenttoConnectedComponent. -
The
SpanningTreesclass has been removed. To compute a minimum spanning tree, useLayoutGraphAlgorithms#minimumSpanningTreemethod. -
The
RankAssignmentsclass has been removed in favor of the singleLayoutGraphAlgorithms#simplexRankAssignmentmethod that offers access to the rank assignment algorithm. -
The
GraphCheckerclass has been removed and most of its methods are now available onLayoutGraphAlgorithms. -
The
algorithms#NodeAggregationclass has been renamed toLayoutGraphNodeAggregation, emphasizing that this class is intended for users working with theLayoutGraphAPI only.-
Furthermore, its member
NODE_TYPE_DPKEYhas been removed. The replacement is keyLayoutKeys#NODE_TYPE_DATA_KEY. -
Also, its member
NODE_CENTER_DPKEYhas been removed. Node centers are now directly read from theLayoutGraphinstance which must contain the coordinates of nodes if useful results should be generated.
-
Furthermore, its member
-
Removed the enum value
EUCLIDEAN_SQUAREDfromDistanceMetricenum. Use enum value Euclidean instead which now calculates with squared values. -
Removed the
DistanceMetricenum ofKMeansClusteringclass. UseKMeansDistanceMetricenum instead. -
Removed the
AggregationPolicyenum ofNodeAggregationclass. UseAggregationPolicyenum instead. -
Removed the utility class
Sortingthat offered methods to get a sorted node array based on node degrees or another criterion. The functionality is written without this utility by first getting the array of nodes from the graph and then sorting it using standard built-in sorting utilities.
Analysis
Incompatible API Changes
-
The
NodeAggregation#NodeTypeHandlingproperty has been renamed toNodeTypePolicy. -
The
NodeTypeHandlingPolicyenum has been renamed toNodeTypePolicy. -
Renamed
AggregationInfotoNodeAggregationInfo. -
Renamed
AggregationInfo#ParentAggregationtoParentNodeAggregation. -
Renamed
NodeAggregation.AggregationPolicytoNodeAggregationPolicy. -
Renamed
NodeAggregation#AggregationtoAggregationPolicy. -
Renamed
DistanceMetrictoKMeansDistanceMetric. -
Renamed
GraphStructureAnalyzer#hasMultipleEdgestohasMultiEdges. -
Renamed
GraphStructureAnalyzer#getMultipleEdgestogetMultiEdges. -
Replaced enum
algorithms#LinkagewithHierarchicalClusteringLinkage. -
Renamed
SubstructuretoSubstructureItems. -
Renamed
analysis#ComponenttoConnectedComponent.
Collections
Incompatible API Changes
-
The
YList#elementAtmethod was removed. -
Renamed
ICursor#prevtoICursor#previous. -
Renamed
ListCell#succtoListCell#Next. -
Renamed
ListCell#predtoListCell#Previous. -
Removed the
isEmptymethod fromLinkedCellListclass. TestLinkedCellList#Countproperty for 0 instead. -
Removed the methods
succCellandpredCellfromLinkedCellListclass. Use new propertiesListCell#NextandListCell#Previousinstead. -
Removed the methods
cyclicSucc,cyclicPred,containsAllandretainAllfromLinkedCellListclass. -
Removed the methods Succ and Pred from
ListCellclass. Use new properties Next and Previous instead. -
Removed the Peek method from
LinkedCellListclass. Use First property instead.
Geometry
Incompatible API Changes
-
The
GeomUtilitiesclass has been renamed toGeometryUtilities. -
All
intersectsmethods of theGeneralPathclass are now calledpathIntersects. -
The
mayIntersectClipmethod of theGeneralPathclass is now calledpathMayIntersectClip. -
All
areaContainsmethods of theGeneralPathclass now have an optionalflatteningToleranceparameter. -
The
isEmptymethod of theGeneralPathclass was removed. Use theisVisiblemethod or theCountproperty, instead. -
The
getBoundsoverload of theGeneralPathclass that returns the approximate bounds for Bรฉzier segments is now calledgetApproximateBounds. -
The copy constructors on the
RectD,PointD, andSizeDclasses were removed. Use thetoRectD,toPointD, ortoSizeDmethods respectively instead. -
Renamed the
GeomUtilities#findRayIntersectionmethod togetSegmentRayIntersection. -
Renamed the
GeomUtilities#findEllipseLineIntersectionmethod togetEllipseLineIntersection. -
Moved
Geom#collinearmethod toGeometryUtilitiesclass and renamed toareCollinear. -
Moved
Geom#calcConvexHullmethod toGeometryUtilitiesclass and renamed togetConvexHull. -
Moved the
Geom#calcIntersectionmethod toGeometryUtilitiesclass and renamed togetLineLineIntersection. -
Removed the
Geom#projectionmethod. UsePointD#getProjectionOnSegmentmethod instead. -
Removed the methods
distanceToLineSegmentof Geom class. UsePointD#distanceToSegmentmethod instead. -
The
IRectangleinterface no longer implementsIPoint. You can get the top-left corner of a rectangle with itsgetTopLeftmethod. For usages of the dynamic behavior ofIPoint, like in a customIPositionHandler, we recommend to let theIPositionHandlerimplementIPoint, too. -
The
IMutableRectangleinterface no longer implementsIMutablePoint. When working with theMutableRectangleclass, use itsLocationproperty to get a dynamic point of the location. -
Moved
IPlaneObjectandLineSegmentto packagecom.yworks.yfiles.geometry. -
Renamed the
LineSegment#XOffsetproperty toYIntercept. -
Made
LineSegmentclass sealed. -
Renamed the
LineSegment#isInXIntervallmethod toLineSegment#isInXIntervalandLineSegment#isInYIntervallmethod toLineSegment#isInYInterval. -
The
getBottom,getLeft,getRight, andgetTopofInsetsDhave been removed. Use the read-only fieldsbottom,left,right, andtopinstead.
yFiles for Java (Swing) 3.6.0.1
Bug Fixes
Cactus Group Layout
-
The
CactusGroupLayoutclass no longer places node labels whenIntegratedNodeLabelingEnabledis false.
View
-
Fixed cleanup of
CanvasComponentthat prevented the component from being garbage collected after removing it from the component hierarchy.
GraphML
- Fixed deserialization of string arrays that contain empty strings.
Hierarchic Layout
-
The
HierarchicLayoutclass no longer assigns superfluous space to group nodes if there are grouped edges. -
The
HierarchicLayoutclass no longer produces an error when using a non-zero grid distance in combination with incremental mode's exact coordinate hints. -
The
HierarchicLayoutclass no longer produces superfluous crossings between backloops or same-layer edges in the first or last layer. -
The
HierarchicLayoutclass no longer produces superfluous crossings for tabular group nodes with fixed children order. -
The
HierarchicLayoutnow properly handles self-loop edges when the edge is at a group node and furthermore edge/port grouped with the same ID on both sides. Previously, it was not routed correctly or that it was removed from theLayoutGraphinstance when running the layout algorithm directly on the graph instance without using a copy. -
The
HierarchicLayoutclass no longer swaps the position of fixed nodes in incremental layout mode with user-specified sequence constraints. -
Rare combinations of
PortCandidatesinPortCandidateSetsno longer result in exceptions.
Tree Layout
-
The
AspectRatioNodePlacerclass no longer ignores the specifiedAspectRatioNodePlacer#FillStylefor some specific setups (e.g., if all children are leaves and have the same size).
Orthogonal Layout
-
The
OrthogonalLayoutclass no longer throws an exception for some input graphs with tree substructures when theTreeStyleis set to a value different fromTreeLayoutStyle#NONE.
Edge Router
- When routing edges to and from fixed ports in the interior of group nodes, other nodes in the group are not ignored anymore, so that the edge does not overlap them if possible.
-
The
EdgeRouterclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
EdgeRouterclass no longer produces self-crossing routes of edges with labels ifIntegratedEdgeLabelingEnabledproperty istrue.
Partial Layout
-
The
PartialLayoutclass does no longer yield different results in rare cases when the same instance is applied twice to the same input graph. -
The
PartialLayoutclass now correctly places disconnected components for cases where a layout orientation is specified, and theComponentAssignmentStrategyproperty is notComponentAssignmentStrategy#SINGLE. Previously, such components were sometimes placed far away from the remaining graph elements.
Algorithms
-
The
Intersectionsclass does not disposeFilteredGraphWrapperinstances that it is given with no subgraph nodes or edges specified anymore. Previously, this caused the graph instance to become defunct resulting in all kinds of functionality running intonullfields and properties.
Analysis
-
The
ShortestPathsclass now correctly calculates the k-shortest paths of graphs (see methodsShortestPaths#KShortestPathsandShortestPaths#KShortestPathsCursor). Previously, in rare cases, the algorithm sometimes produces wrong results, i.e., returns paths that are not the shortest.
yFiles for Java (Swing) 3.6
This release brings exciting new major features, and many other minor new features, improvements, and bugfixes to all parts of the library. As always, there are new and improved demos demonstrating these features and improvements.
If you are updating from an older version of yFiles for Java (Swing), have a look at the list of incompatible changes.
Major new features
- New styles for graph items
-
The
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
CanvasComponent#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 click events. The
handleClickmethod has been added to theIHandleinterface and is called whenHandleInputMode#ClickedRecognizerwas 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 aCanvasComponent. -
GraphModelManager: the propertiesNodeManager,EdgeManager,PortManager,EdgeLabelManager,NodeLabelManager,PortLabelManager, andProvideUserObjectOnMainCanvasObjecthave been made public.
Interaction
-
The
MoveViewportInputMode#uninstallmethod is now virtual and can be overridden in derived classes. -
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.
- 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
PopupMenuInputMode#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. -
CanvasComponentnow has aCursorChangedevent that can be used to react to cursor changes (which happen primarily when input modes change it).
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
CanvasComponent#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
GraphComponent#GraphModelManagerproperty no longer leaks memory in certain situations. -
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
-
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 theCanvasComponent#ContentRectproperty once per call. Previously there have been circumstances where the property would have been updated twice unnecessarily. -
The
TableEditorInputModeclass no longer changes theGraphComponent#Selectionproperty unnecessarily when theGraphComponent#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
GraphComponent#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 pointer has stopped before being released. -
Starting a
CanvasComponent/GraphComponentviewport 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. -
GroupNodeStyle's collapse/expand icon can now be reliably hit in all cases. In rare cases, changing the value of one the properties that affect the icon's location were not taken into account for hit tests. -
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
GeneralPathNodeStyleandShapeNodeStyle. -
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
CanvasComponentconstructor parameter has been removed. Instead, you can call the newinstallmethod with theCanvasComponentas parameter. Similarly, theCanvasComponentconstructor 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. -
The
Pen#DashStyleproperty 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 theDraggedRecognizeris triggered. When pressed, the mutex is already acquired, which discards other concurrent input modes. This can be turned off by setting theRequestMutexOnPressproperty tofalse. -
ResizeStripeInputModenow always uses theN_RESIZE_CURSORfor resizing rows and theW_RESIZE_CURSORfor resizing columns instead of usingN_RESIZE_CURSOR,S_RESIZE_CURSOR,W_RESIZE_CURSORorE_RESIZE_CURSORdepending on the dragged side. The old behavior was inconsistent when dragging the border between two stripes and had no visual difference on most platforms. New cursor properties have been added that can be used to set a custom cursor for different usecases. -
The lists returned by the
GraphPartition#getCells,DynamicObstacleDecomposition#getCellsandDynamicObstacleDecomposition#getObstaclesmethods are no longer unmodifiable. -
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.
- The Layout Without View Demo shows shows how to create a graph, run a graph analysis algorithm, and calculate a layout without using a view or the IGraph API.
yFiles for Java (Swing) 3.5
Major New Features
Smooth animations
-
Many viewport transitions are now smoothly animated. This prominently includes scrolling and
zooming with the mouse wheel, but also the various commands, such as zooming via a toolbar button, fitting the graph
into the viewport, interacting with the overview, and many others. This can be turned off for individual
interactions via the new
CanvasComponent#AnimatedViewportChangesproperty, and customized with the new protected methodCanvasComponent#getViewportAnimationDuration.
Node Types
-
The
CircularLayoutclass is now able to separate nodes that are on the same cycle with respect to their node type. For this, the newNodeTypeAwareSequencerclass can be set asNodeSequenceron theCircularLayout#SingleCycleLayout. Node types are specified via theCircularLayoutData#NodeTypesproperty. -
The
ComponentLayoutclass now supports node types. The types influence the arrangement and ordering of the components such that components consisting mostly of nodes of the same type are put close to other components consisting of nodes of that type. Use theComponentLayoutData#NodeTypesproperty to define types. -
The
TreeLayoutandClassicTreeLayoutclasses now support node types. The types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are a weak criterion, i.e., if the ordering and placement is determined by other constraints, these are prioritized. Types can be defined via theTreeLayoutData#NodeTypesproperty. -
The
HierarchicLayoutclass now supports node types. The types influence the ordering of nodes within their layers as a subordinate optimization criteria. More precisely, nodes of the same type are more likely to be placed next to each other if this does not violate other constraints. -
The
OrganicLayoutclass now allows defining node types via the newOrganicLayoutData#NodeTypesproperty. The types control the detection of substructures (e.g. stars, parallel structures). When types are defined, only nodes of the same type can form a substructure. For star-like and parallel substructures, it is also possible to have a single substructure with nodes of different types, see properties#ParallelSubstructureTypeSeparationEnabledand#StarSubstructureTypeSeparationEnabled. The algorithm still tries to highlight the different types by choosing a suitable layout for these components (e.g., placing nodes of the same type closer together or on the same circle). -
The
OrthogonalLayoutclass now allows defining node types via the newOrthogonalLayoutData#NodeTypesproperty. The types control the detection of substructures, i.e., chains, cycles and trees. When types are defined, only nodes of the same type can form a substructure. -
The node types feature is shown in the new
NodeTypesDemoand the newOrganicSubstructuresDemo.
Edge routing only if needed
-
Added the new penalty property
PenaltySettings#SketchViolationPenaltysupported by theEdgeRouterclass. It defines the cost for a deviation from the original edge path if the new routing policy property is set to#SEGMENTS_AS_NEEDED. -
Optionally, the
EdgeRouter,ChannelEdgeRouterandBusRouterclasses now automatically determine whether a new path should be calculated for a certain edge. This is controlled via the new propertiesEdgeLayoutDescriptor#RoutingPolicy,ChannelEdgeRouter#RoutingPolicyandBusDescriptor#RoutingPolicy, respectively. The decision is based on the quality of the existing routes - edges with strict violations of the routing style or that intersect other elements will be selected for routing. Available options:RoutingPolicy#ALWAYS: A new route is calculated in any case. This was the previous behavior and remains the default.RoutingPolicy#PATH_AS_NEEDED: The algorithm determines whether a new route is needed. If an edge is selected, its current path is not considered when computing a new route.RoutingPolicy#SEGMENTS_AS_NEEDED: The algorithm determines whether a new route is needed. If an edge is selected, its current path is preserved as much as possible. Only the required segments are changed. This is only supported by theEdgeRouterclass.
New Features
Graph, and View
-
The graph and tree builders now support bindings for bend locations. This is implemented by new
bend-related members of the
EdgeCreatorclass. -
The new
EdgePathPortLocationModelfor ports owned by edges can be used to define port locations as a ratio of the edge path length. This keeps the port location stable when bends are added onto the edge path, for example during orthogonal edge editing.
Layout and Algorithms
-
The new
TreeAnalysisalgorithm offers a convenient way of analyzing tree structures and querying tree-related properties (e.g. leaf nodes, parent-child relations and more). -
The new
ParallelEdges#findParallelEdgesmethod allows to find all sets of parallel edges contained in a given graph or incident to a specific node. -
The new
GenericLayoutDataclass is a generic implementation ofLayoutDatathat allows to pass arbitrary data to layout stages. As a consequence, theLayoutData#apply,ItemCollection#provideMapperandItemMapping#provideMappermethods were removed. -
The new
SelfLoopRouterDataclass specifies custom data for theSelfLoopRouterclass. In more details, it allows defining which self-loop edges should be routed and which should keep their current path. -
The new
PortPlacementStageDataclass specifies custom data for thePortPlacementStageclass. In more details, it allows defining port candidates, port constraints, and node port candidate sets which are then considered by that layout stage. -
The
SubgraphLayoutclass now allows defining which edges must be included or excluded in the subgraph. Previously, only nodes could be specified. The newSubgraphLayoutDataclass offers the#SubgraphNodesand#SubgraphEdgesproperties to conveniently define the nodes and edges that should form the subgraph the core layout runs on. -
The
OrganicLayoutclass offers the new#ClusteringPolicyproperty, which allows to specify the clustering algorithm that is applied to the input graph. Three clustering algorithms are available: Louvain modularity, edge betweenness, and label propagation. Previously, the node clustering was always based on edge betweenness. By default, clustering is disabled. -
The
PartialLayoutclass offers a new property#MovingFixedElementsAllowedto allow moving fixed elements. This often yields a better layout quality even though the preservation of the mental map declines because the fixed elements may change their position. -
The
OrganicLayoutandClassicOrganicLayoutclasses support the new scopeMAINLY_SUBSET_GEOMETRIC. In addition to the actual affected nodes, this scope may to some degree move nodes that are geometrically close to an affected node. The existing scopeMAINLY_SUBSETis similar, but it does determine the closeness of other nodes by using the graph structure instead of the current geometry (i.e. location).
Improvements
Interaction
-
The new
HandleInputMode#QueryClosestHandleevent can be used to provide the closest handle for a certain query location. -
Tooltip contents can now be provided asynchronously. As an alternative to setting the tooltip
content directly, the
ToolTipQueryEventArgsclass also accepts aCompletionStagethat provides the tooltip content asynchronously. -
The
HandleInputMode#beginDraggingmethod now returns aCompletionStagewhich indicates whether the drag of a handle has been finished or canceled. -
Validation of the text of edited labels can now be provided asynchronously. The new
LabelTextValidatingEventArgs#ValidatedTextproperty accepts aCompletionStagethat provides the validated text asynchronously. -
The
CanvasComponent#zoomToAnimatedmethod now returns aCompletionStagethat is completed when the animation has finished. The parameter of typeIEventListener<AnimationEventArgs>has been removed. -
The
CreateEdgeInputMode#doStartEdgeCreationmethod now returns aCompletionStagethat completes when the edge creation gestures has been finished or cancelled. - The methods
GraphEditorInputMode#createLabel,#createLabelCore,#editLabel,#editLabelCore, and#addLabelnow return aCompletionStagethat completes when the label creation, editing or adding has been finished. -
The methods
TableEditorInputMode#createLabel,#editLabel, and#addLabelnow return aCompletionStagethat completes when the label has been created, edited or added. -
The
MoveInputMode#doStartDragmethod now returns aCompletionStagethat completes when the move gestures has been finished or cancelled. - Changing the selection state of a large number of elements is now faster.
-
The
OrthogonalEdgeEditingContext#createOrthogonalEdgeDragHandlermethod now accepts anIPortOwnerinstead of only anINodeas dragged item. This can be used for custom edge drag handling that should support orthogonal edge editing. -
The
ItemCopiedEventArgsclass now guarantees that its#Originaland#Copyproperties are notnull.
Graph
-
The
DefaultFolderNodeConverterandAbstractFoldingEdgeConverterclasses now have#PortLabelStyleand#PortLabelLayoutParameterproperties to control the style and label layout parameter of copied port labels. -
The new
NodeInsetsProviderclass is anINodeInsetsProviderthat returns the same insets for each node. -
The
GraphBuilder,TreeBuilder, andAdjacencyGraphBuilderclasses no longer throw Exceptions during calls to#updateGraphwhen the graph was modified.
Organic Layout
-
For the substructures in the
OrganicLayoutit is now possible to explicitly specify whether structures are allowed to be nested or not. Previously, substructures were allowed to be nested by default. New styles were added while the old styles now will not generated nested structures anymore.- Star structures offer the new styles
StarSubstructureStyle#RADIAL_NESTEDandStarSubstructureStyle#CIRCULAR_NESTED. ChainSubstructureStyle#RECTANGULAR_NESTEDandChainSubstructureStyle#STRAIGHT_LINE_NESTEDare the new styles for nested chains.CycleSubstructureStyle#CIRCULAR_NESTEDis the new style for nested cycles.
- Star structures offer the new styles
-
The
OrganicLayoutclass now offers the possibility to define the minimum sizes of substructures (stars, chains, cycles, and parallel structures). Structures of smaller size are not handled as a substructure. For each type of structure a new property was added:OrganicLayout#StarSubstructureSize,OrganicLayout#ChainSubstructureSize,OrganicLayout#CycleSubstructureSizeandOrganicLayout#ParallelSubstructureSize. -
With substructures, the
OrganicLayoutclass now often produces more compact results and comes with an improved placement of degree-one nodes. -
When specified for the
OrganicLayoutclass, the scopeMAINLY_SUBSETnow works together with more of its other features and constraints, and has a larger impact. For example, it previously had very little or no effect when a partition grid or an output restriction was defined.
Edge Routing
-
When the
EdgeRouterclass runs with a highly restricted maximum duration or is aborted via theAbortHandlerclass, i.e., the router operates in the fastest possible mode, the calculated edge routes now are of higher quality. The quality improvements mainly affect cases with fixed port locations. -
The
EdgeRouterclass now allows to explicitly define the costs for different types of edge crossings. The new propertiesPenaltySettings#AdjacentEdgeCrossingPenaltyandPenaltySettings#SelfCrossingPenaltyrelate to crossings between two adjacent edges and crossings between two line segments that belong to the same edge, respectively. Previously, all types of crossings were covered by the existingEdgeCrossingPenaltyproperty.- By default, now, crossings of adjacent edges are more expensive than normal ones and self-crossings are the most expensive.
- Furthermore, the default values of the
EdgeLengthPenaltyandGroupNodeCrossingPenaltyproperties were increased to obtain more balanced results.
-
The
EdgeRouterclass now produces more suitable routes for edges with octilinear routing style. Previously, the diagonal segments where often omitted after/before an edge's first/last segment.
Hierarchic Layout
-
The
HierarchicLayoutclass now generates shorter paths for edges that cross borders ofPartitionGridcolumns in cases where there are no other obvious constraints that require the edge to be longer. This holds for the default vertical layout orientation; for a horizontal orientation, edges that cross borders of rows are affected by this improvement. -
The
HierarchicLayoutclass now considers the edge direction when choosing a port candidate for edges with multiple candidates. This new strategy often leads to fewer bends.
Layout
-
LayoutExecutor#start,GraphComponent#morphLayoutandLayoutUtilities#morphLayoutnow return aCompletionStageinstead ofnull. -
The new
BalloonLayoutData#OutEdgeComparatorproperty specifies a comparison function used to sort a nodes' outgoing edges. -
The new
LayoutGraphAdapter#ORIGINAL_TAG_DP_KEYdata provider key provides access to the object stored in thetagproperty of the original graph item from within custom layout code. -
The quality of the curved edge routing was improved with respect to various aspects and such that
it yields aesthetically nicer curves. To further configure the curve routing, the following settings were added.
CurveShortcutsAllowed: if shortcuts are allowed, curves can become smoother and more direct but may violate other constraints (e.g. edge-edge distance). Available forHierarchicLayout(RoutingStyle#CurveShortcutsAllowed),EdgeRouter(EdgeLayoutDescriptor#CurveShortcutsAllowed) andCurveRoutingStage(CurveEdgeLayoutDescriptor#CurveShortcutsAllowed).CurveUTurnSymmetry: allows to specify the symmetry preference for u-turns (180 degree turns) of curved routes. The default is zero so that results are equal to previous results. Available forHierarchicLayout(RoutingStyle#CurveUTurnSymmetry),EdgeRouter(EdgeLayoutDescriptor#CurveUTurnSymmetry) andCurveRoutingStage(CurveEdgeLayoutDescriptor#CurveUTurnSymmetry).
-
The
HierarchicLayout,EdgeRouter, andCurveRoutingStageclasses now avoid unnecessary, consecutive Bezier segments for modeling larger straight-line parts of an edge path. The resulting reduced bend count improves the user experience when working with theBezierEdgeStyle. -
The
ClassicTreeLayoutclass now features properties#MinimumFirstSegmentLengthand#MinimumLastSegmentLengththat allow to specify the minimum first and last segment length for the orthogonal routing style. -
The new
ParallelEdgeRouterData#RoutedParallelEdgesproperty returns which edges theParallelEdgeRouterclass routed and thus were hidden during the core layout. This can be useful if parallel, non-leading edges need further handling, e.g., for placing their labels.
View
-
The
CanvasComponent#makeVisible,CanvasComponent#fitContent, andGraphComponent#fitGraphBoundsmethods now return aCompletionStagethat completes when the view port adjustment has been finished. -
The
Animator#animatemethod now returns aCompletionStagethat is completed when the animation has finished. The parameter of typeIEventListener<AnimationEventArgs>has been removed together with theAnimationEventArgsclass. -
The new
#installand#uninstallmethods of theGraphModelManagerclass simplify exchanging the manager used by aGraphComponent. They are called when setting/removing aGraphModelManagerasGraphComponent#GraphModelManagerand should also be called when combining aGraphModelManagerwith aCanvasComponent. -
The new
IAnimation#createDelaymethod creates an animation that does nothing. This is especially useful in combination with other animations that run in parallel or in sequence to create complex multi-sequence animations. The accompanying method#createDelayedAnimationfor theIAnimationinterface delays the provided animation. -
The new
IAnimation#fromCallbackmethod creates an animation for a given animation callback and duration. -
The
CanvasComponent#makeVisiblemethod now respects margins defined by theCanvasComponent#ContentMarginsproperty. Ensure visible is called for example by keyboard navigation,. -
The
ZOOMcommand now respects margins defined by theCanvasComponent#ContentMarginsproperty when executed with a rectangle as parameter. -
The
ZOOM_TO_CURRENT_ITEMcommand now respects the margins defined in theCanvasComponent#ContentMarginsproperty. -
Setting the various descriptor properties of the
GraphModelManagerclass no longer causes updates for every installed item if the descriptor hasn't actually changed. -
The
OverviewInputModenow renders its handle on top of the viewport rectangle instead of below it. -
The
ViewportLimiter#limitViewportmethod now has an overload with a parameter that enforces theViewportLimitingPolicy#STRICTpolicy. -
The
CanvasComponent#makeVisiblemethod now has an overload with a parameter to specify insets to keep around what to make visible in the viewport. -
The
CanvasComponent#makeVisiblemethod now has an additional overload to make a set of points visible in the viewport. This is mainly useful when using a Projection and trying to make something visible that is not a rectangle in world coordinates. -
All the following features no longer block user interaction: the viewport animations for
CanvasComponent#makeVisible, executing scroll commands when theCanvasComponent#ScrollCommandAnimationEnabledproperty is enabled, and executingICommand#ZOOM_TO_CURRENT_ITEM. -
The
CanvasComponent#fitContentandGraphComponent#fitGraphBoundsmethods now have an overload with a parameter that allows changing the viewport in an animated fashion. -
GraphComponent#openFilenow auto-completes the chosen filename with the file extension chosen in theFileDialogif missing.
Styles
-
Edge cropping now works as expected when using
BezierEdgeStyleand the terminating nodes have styles that don't provide an outline in theirIShapeGeometryimplementation.
Bugfixes
Interaction
-
When expanding a closed group, the parent groups of the expanded group no longer become
unnecessarily large. The incorrect behavior could be observed only under certain conditions and was caused by a bug
in the
NavigationInputModeclass. - Auto dragging was not stopped in certain cases.
-
The text area shown by the
TextEditorInputModeclass is now correctly placed if theTextAreaPlacementPolicy#MOVE_TEXT_AREAis set and a projection is used. -
Fixed editing self-loops with
PolylineEdgeStyleand orthogonal edge editing enabled. -
HandleInputModeis no longer canceled if a handle is removed during its ownDragFinishedcall. This fixes some very rare exceptions under complicated circumstances. -
Fixed a bug in
CreateEdgeInputModewhich prevented toggling the direction of an orthogonal edge segment when the mouse was over a potential target.
Graph
-
The
ITable#StripeChangedevent now reports the correct parent when re-parenting will be undone or redone. -
A label with
EdgeSegmentLabelModelorEdgePathLabelModelnow moves steadily when the segment to which it belongs moves. -
The
FilteredGraphWrapperclass now dispatchesParentChangedevents in the correct order after predicate changes. -
All
#setFactorymethods of theNode-,Edge-,Label-,Port-, andBendDecoratorclasses now respect the#nullIsFallbackproperty. -
FilteredGraphWrappernow fires the correct events when filtering out port labels. Previously, the events contained incorrect owner information. -
Fixed
CompositeUndoUnit#UndoNamesetting theRedoNameinstead.
Styles
-
The parameter of type
IShapeGeometryof theDefaultEdgePathCropper#isInsideand#getIntersectionmethods is now nullable. - Built-in styles with rounded corners now have the correct outline shape for certain calculations.
- Edges with Bezier paths can now also be animated to non-Bezier paths.
Geometry
-
The
#Areaproperty of an emptyRectDinstance (includingRectD#EMPTY) is now always zero, and no longer a negative value.
Hierarchic Layout
-
The
HierarchicLayoutclass now correctly processes input graphs with sub-components (HierarchicLayoutData#SubComponents) and curved edge routing style. Previously, such setups may have a caused an exception. -
The
HierarchicLayoutclass now correctly handles grouped input graphs if the node compaction is enabled (see propertySimplexNodePlacer#NodeCompactionEnabled). Previously, the algorithm sometimes produced less compact results for such inputs. -
The
HierarchicLayoutclass now correctly considers the specified port groups for edges (seeHierarchicLayoutData#SourcePortGroupIds). Previously, such groups were not always considered properly if there are either critical edges or propertySimplexNodePlacer#EdgeStraighteningEnabledistrue. -
The
HierarchicLayoutclass now correctly considers the specified critical edge priorities (seeHierarchicLayoutData#CriticalEdgePriorities) if the input graph contains grouped edges. -
The
HierarchicLayoutclass now adheres more closely to its maximum duration and itsAbortHandler. -
The
HierarchicLayoutnow considers thePortCandidatedirections correctly for layout orientations other thanTOP_TO_BOTTOM. This also improves the optimization results withPortCandidateSetsthat allow multiple directions to connect to nodes. -
The
HierarchicLayoutclass now correctly considers input graphs with group nodes and aPartitionGrid. Previously, in some rare cases, such inputs may have caused overlapping group nodes. -
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 correctly routes grouped edges where in some rare cases it could previously lead to node-edge overlaps. -
The
HierarchicLayoutclass not properly satisfiesPortCandidatesdefined for same-layer edges at nodes where additionally other edges with (rather large) source/target port labels 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 produces superfluous port overlaps if there are edges with strong port constraints. -
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
HierarchicLayoutno longer throws an Exception when the edge directedness feature (HierchicLayoutData#EdgeDirectedness) is used in conjunction with enabled backloop-routing (HierarchicLayout#BackLoopRoutingEnabled). -
The
HierarchicLayoutclass no longer creates unnecessary spacing between sub-components (seeHierarchicLayoutData#SubComponents) and other elements, which previously happened in some cases due to edge/node labels being present. In consequence, these cases are now more compact. -
The
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.
Organic Layout
-
The
OrganicLayoutclass no longer throws an exception when running it on a graph with a partition grid, group nodes and such that the IDs of the group nodes (see provider keyGroupingKeys#NODE_ID_DPKEY) are defined using a provider that cannot handlenullas argument to its get method. -
The
OrganicLayoutandClassicOrganicLayoutclasses no longer cause undesired layout side effects when a mapper is registered with keyRecursiveGroupLayout#GROUP_NODE_LAYOUT_DPKEYor when data is provided via theRecursiveGroupLayoutData#GroupNodeLayoutsproperty. Previously, the layout algorithms registered there could be applied to nodes that should actually be kept fix by the organic layout. -
The
OrganicLayoutclass now produces correct results if auto-clustering is enabled (i.e., propertyClusteringPolicyis notNONE) and theGroupNodeModeis set toFIX_BOUNDSorFIX_CONTENTS. -
The
OrganicLayoutclass now correctly considers fix-contents and fix-bounds groups (see enumGroupNodeMode) if the substructure detection is enabled. -
The
OrganicLayoutclass now correctly handles nodes with several degree-one neighbors. Previously, such inputs could cause arrangement artifacts if theStarSubstructureStyleisNONE. -
The
OrganicLayoutclass now correctly detects chain substructures if there are nodes of different types (OrganicLayoutData#NodeTypes).
Circular Layout
-
The
CircularLayoutclass no longer crashes when enabling edge bundling, defining node types (CircularLayoutData#NodeTypes) and applying it on a graph that contains parallel edges. -
The
CircularLayoutclass no longer produces node overlaps if propertySingleCycleLayout#MinimumNodeDistanceis set to 0.
Partial Layout
-
The
PartialLayoutclass now correctly routes the edges if propertyMovingFixedElementsAllowedis enabled. Previously, in some rare cases, this setting could cause broken edge routes.
Clear Area Layout
-
The
ClearAreaLayoutclass now correctly routes the edges if propertyEdgeRoutingStrategyis set toSTRAIGHTLINE. Previously, in some rare cases, this setting could cause broken edge routes.
Edge Routing
-
The
EdgeRouterclass no longer generates unnecessary detours in the routes when it is configured withMonotonicPathRestriction#BOTH. -
The
CurveRoutingStageclass now correctly considers the minimum distance to nodes specified as value of theCurveEdgeLayoutDescriptor#MinimumNodeToEdgeDistanceproperty. Previously, the curves could violate the distance and get too close to nodes. -
The
EdgeRouterclass no longer has a problem that occasionally resulted in bad edge routing artifacts if edge grouping is enabled and non-affected edges are grouped at both end points. -
The
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges (defined viaBusDescriptor). -
The
OrganicEdgeRouter#KeepingExistingBendsEnabledproperty now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends. -
The
EdgeRouterclass no longer produces artifacts if there are edges with curved routing style and labels, and the integrated edge labeling is disabled (see propertyEdgeRouter#IntegratedEdgeLabelingEnabled).
Layout
-
The comparison delegates defined in
TreeLayoutData#OutEdgeComparatorsandSeriesParallelLayoutData#OutEdgeComparatorsno longer receivenullelements during runtime. -
The
SimpleProfitModelclass now computes meaningful different profits based on thePreferredPlacementDescriptorfor candidates that belong to aSliderEdgeLabelLayoutModelor aDiscreteEdgeLabelLayoutModel. Previously, the computed profit was equal for all candidates. -
Fixed a bug in
LayoutExecutorwhich caused port labels not to be placed in their calculated position after a layout animation. -
The
LayoutExecutorclass now uses the correct target bounds when a projection is set on theGraphComponent. -
The
CircularLayoutclass no longer produces node label overlaps when itsPlacingChildrenOnCommonRadiusEnabledproperty is disabled. -
The
ClearAreaLayoutclass now correctly considers node labels. Previously, there could be results where node labels intersected with the specified area to be cleared. -
The
ParallelEdgeRouterclass now produces correct parallel routes if itsJoiningEndsEnabledproperty is enabled. -
Curved edge routes generated by
HierarchicLayout,EdgeRouterandCurveRoutingStageno longer contain a self-crossing for edges that connect to a group node and where the connection styleCurveConnectionStyle#ORGANICis specified. -
Fixed a bug in
TableLayoutConfiguratorthat resulted in wrongOriginalPositionsof theRowDescriptorsandColumnDescriptorswhen table insets were used. - Fixed a bug that caused errors in shear transformations.
-
Fixed the
UndoEnginegetting corrupted after a layout exception has been catched. -
The
TabularLayoutclass now correctly handles the case that the input graph contains only a single node. Previously, the node was not properly assigned to a partition cell and the partition cell row/column did not get correct values for its computed width, height and position.
View
- The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
-
The clipboard now doesn't copy labels or ports if they are not selected and their owner's
IClipboardHelperforbids copying the owner. -
The
ZOOM_TO_CURRENT_ITEMcommand no longer moves the current item outside the visible area in rare cases. This was caused by a problem in theViewportLimiterclass. -
Callbacks registered for removed visuals on the
CanvasObjecttree now reliably run after the visual is indeed no longer visible. -
Callbacks registered with the
IRenderContext#setDisposeCallbackmethod now are reliably called, even when a canvas object has been explicitly removed. -
The
CanvasComponent#makeVisiblemethod no longer ignores the limited viewport size in certain cases. -
CanvasComponent's orGraphComponent's scrollbars now respect the component'sViewPortLimiter. - Fixed a bug that didn't reset the cursor when exiting the canvas and hovering over the scrollbars.
-
Fixed a potential memory leak that could occur when changing the
GraphComponent#GraphModelManager. -
The
CanvasComponent#ZoomToAnimatedmethod now works correctly when aProjectionis used. This has previously been reported as fixed, but was not.
Incompatible Changes
-
The protected method
HandleInputMode#isHoveringhas been removed. To customize what handle should be used for a certain query location, the newHandleInputMode#QueryClosestHandleevent can be used. -
The
HandleInputMode#beginDraggingmethod now returns aCompletionStage. -
The
CanvasComponent#Projectionproperty no longer accepts transforms with a non-zero translation component. -
The
CanvasComponent#ContentViewMarginsproperty has been renamed to#ContentMargins. Accordingly, the#onFitContentViewMarginsChangedmethod and the#FitContentViewMarginsChangedevent have been renamed to#onContentMarginsChangedand#ContentMarginsChanged, respectively. -
The
CanvasComponent#zoomToAnimatedmethod now returns aCompletionStagethat is completed when the animation has finished. The parameter of typeIEventListener<AnimationEventArgs>has been removed. -
The
CreateEdgeInputMode#doStartEdgeCreationmethod now returns aCompletionStagethat completes when the edge creation gestures has been finished or cancelled. -
The
GraphEditorInputMode#onLabelTextEditedmethod now returns aCompletionStagethat completes when the text validation is done and provides whether the validation succeeded or was canceled. - The methods
GraphEditorInputMode#createLabel,#createLabelCore,#editLabel,#editLabelCore, and#addLabelnow return aCompletionStagethat completes when the label creation, editing or adding has been finished. -
The methods
TableEditorInputMode#createLabel,#editLabel, and#addLabelnow return aCompletionStagethat completes when the label has been created, edited or added. -
The
MoveInputMode#doStartDragmethod now returns aCompletionStagethat completes when the move gestures has been finished or cancelled. -
LayoutExecutor#start,GraphComponent#morphLayoutandLayoutUtilities#morphLayoutnow return aCompletionStageinstead ofnull. -
The
Animator#animatemethod now returns aCompletionStagethat is completed when the animation has finished. The parameter of typeIEventListener<AnimationEventArgs>has been removed together with theAnimationEventArgsclass. -
Animator#animateAndWaithas been removed as the waiting didn't work correctly. -
The
TextEditorInputMode#getTextBoxBoundsmethod has been removed. -
The new
GenericLayoutDataclass is a generic implementation ofLayoutDatathat allows to pass arbitrary data to layout stages. As a consequence, theLayoutData#apply,ItemCollection#provideMapperandItemMapping#provideMappermethods were removed. -
The
PolylineEdgeRouterDataclass has been renamed toEdgeRouterDatato match the name of the layout algorithm it supports. -
The overload of
Centrality#pageRanktaking just aGraphparameter has been removed as it only returned the sum of all pageRanks. Use the overload taking aGraphand anINodeMapinstead.
Behavior
-
The provider returned by
IEdgeReconnectionPortCandidateProvider#ALL_NODE_AND_EDGE_CANDIDATESnow doesn't return port candidates of the reconnected edge itself anymore as this lead to an unstable reconnection behavior. -
The
FIT_CONTENTandFIT_GRAPH_BOUNDScommands now change the viewport in an animated fashion. -
Zooming with the mouse wheel to the center of the viewport by using
CanvasComponent'sCenterZoomEventRecognizerno longer uses theINCREASE_ZOOMandDECREASE_ZOOMcommands. - During animated viewport transitions, for performance reasons, mouse events are not redispatched, anymore, except for the last frame of the animation.
-
LayoutExecutor#startdoesn't throw an exception anymore if an error occurred during the layout that wasn't handled in the#LayoutFinishedevent. Instead theCompletionStagereturned by#startis completed exceptionally. -
The
OrganicLayoutsubstructure stylesStarSubstructureStyle#RADIAL,StarSubstructureStyle#CIRCULAR,ChainSubstructureStyle#RECTANGULAR,ChainSubstructureStyle#STRAIGHT_LINEandCycleSubstructureStyle#CIRCULARdo no longer allow that the detected substructures are nested inside other substructures. To get the old behavior and allow nesting, new style values were added (e.g.StarSubstructureStyle#RADIAL_NESTED). -
The following behavior change applies to class
HierarchicLayoutwith polyline edge routing style: the default value of propertyEdgeLayoutDescriptor#MinimumSlopewas changed from0.3to0.2which makes the sloped segments less steep and the overall results more compact. -
In organic layout, the way edge grouping influences the layout of certain substructures has
changed. Structures are not split-up anymore into several ones when edges of nodes in the structure have different
group IDs. Now, the new node types can be used to split-up structures (see
OrganicLayoutData#NodeTypes). If a structure contains different edge groups, the grouping is properly considered and may influence the sorting of elements within the structure. Affected substructure styles areStarSubstructureStyle#SEPARATED_RADIAL,ParallelSubstructureStyle#RADIAL,ParallelSubstructureStyle#STRAIGHT_LINEandParallelSubstructureStyle#RECTANGULAR. -
The
OrganicEdgeRouter#KeepingExistingBendsEnabledproperty now correctly obeys its definition and actually keeps the absolute coordinates of the existing bends. Therefore, the new propertyOrganicEdgeRouter#ExistingBendsConsiderationEnabledwas introduced to get the old behavior. Existing bends are considered, but their absolute coordinates are not kept. -
The default value of the
ClassicTreeLayout#MinimumLayerDistanceproperty was changed from40.0to20.0and the default value of theClassicTreeLayout#BusAlignmentproperty was changed from0.3to0.5. In addition, the new#MinimumFirstSegmentLengthand#MinimumLastSegmentLengthproperties may lead to different results compared to previous versions. Setting both properties to zero will neutralize their influence on the result. -
For the
DefaultNodePlacerclass that is used by theTreeLayout, the default values of the#HorizontalDistanceand#VerticalDistanceproperties were changed from40.0to20.0, and the default values of the#MinimumFirstSegmentLengthandMinimumLastSegmentLengthproperties were changed from0.0to20.0. -
For the
CompactNodePlacerclass that is used by theTreeLayout, the default values of the#HorizontalDistanceand#VerticalDistanceproperties were changed from40.0to20.0, and the default values of the#MinimumFirstSegmentLengthand#MinimumLastSegmentLengthproperties were changed from10.0to20.0. -
The default value of the
LayeredNodePlacer#BusAlignmentproperty was changed from0.3to0.5.
Deprecations
-
The
CanvasComponent#ScrollCommandAnimationEnabledproperty has been deprecated in favor of the newAnimatedViewportChangesproperty, which offers more control over viewport animations, not just the scroll commands. -
The
OrganicLayout#NodeClusteringEnabledproperty is now deprecated. It is replaced by the newOrganicLayout#ClusteringPolicyproperty. To disable clustering specifyClusteringPolicy#NONE. To enable it and use the same algorithm as before, specifyClusteringPolicy#EDGE_BETWEENNESS. -
The class
com.yworks.yfiles.analysis.TreeAnalyzerhas been deprecated. The more powerful classTreeAnalysisshould be used instead.
New Demos
-
The new
LensInputModedemo shows how to create anInputModeto show a magnifying glass effect on the canvas. -
The new
OrganicSubstructuresDemoshows you how substructures are supported by theOrganicLayoutalgorithm. -
The new
NodeTypesDemoshows you how the new node types feature is supported by several layout algorithms. -
The new
ReshapeHandleProviderConfigurationDemoshows you how to use a customIReshapeHandleProviderimplementation. TheReshapeHandleProviderDemohas been re-written to show how to use the built-in providers. -
CompositeNodeStyledemo shows how to combine multiple styles into one. -
The
NetworkFlowsDemohas been added that shows how to use different network flow algorithms using a network of water pipes. -
The new
MavenDemoshows how to set up a basic yFiles for Java (Swing) project using Apache Maven. -
The new
GradleDemoshows how to set up a basic yFiles for Java (Swing) project using Gradle.
Demo Improvements
-
More sample graphs and configuration options have been added to the
LayoutStyledemo.
yFiles for Java (Swing) 3.4.0.1
Improvements
View
-
The
ViewportLimiterclass now always centers the viewport if itsHonoringBothDimensionsEnabledproperty is disabled.
Layout
-
The
HierarchicLayoutclass now has an improved strategy for choosing the port candidates for same-layer edges with multiple available candidates. Previously, the chosen candidate may have led to superfluous back-loops.
Algorithms
-
The
LabelPropagationClusteringalgorithm now produces normalized, continuous clustering IDs. In other words, for example, if it finds 5 clusters, they get IDs from 0 to 4. Previously, the range of IDs may have contained holes. If initial label values are provided, this normalization is omitted.
GraphML
-
The
ValueSerializerfor well-known color names now supports screaming snake case in addition to camel case and lower case names.
Bugfixes
View
-
The clipboard now doesn't copy labels or ports if they are not selected and their owner's
IClipboardHelperforbids copying the owner. -
The
CanvasComponent#ZoomToAnimatedmethod now works correctly when a Projection is used. -
The
ZOOM_TO_CURRENT_ITEMcommand no longer moves the current item outside the visible area in rare cases. This was caused by a problem in theViewportLimiterclass. -
Fixed a bug in
CanvasComponent#FitContentandGraphComponent#FitGraphBoundswhich causedFitContentViewMarginsbeing incorrectly applied in case aProjectionhas been set. -
The following issues of the
ZOOM_TO_CURRENT_ITEMcommand have been corrected:- The item is now longer placed slightly out of center if scrollbars appear during the operation.
- If the current item is too large to fit the viewport at zoom 1, the command now zooms out.
-
Fixed incorrect margins on an
GraphOverviewComponentwith aProjectionset. -
Fixed a bug which caused the
ZOOMcommand to disrespect theViewportLimiterif executed with a rectangle as parameter. - The mouse event coordinates are no longer quantized to very large steps if a projection is used and the viewport is zoomed in afterwards.
-
Fixed
Animator#animateAndWaitto update the canvas during the animation. -
GraphOverviewComponentnow considers its border thickness correctly when calculating the visible area of aGraphComponentusing a projection.
Graph
-
The
DefaultFolderNodeConverterandAbstractFoldingEdgeConverterclasses (and thus, also theDefaultFoldingEdgeConverterandMergingFoldingEdgeConverterclasses) no longer ignore port labels. -
A label with
EdgeSegmentLabelModelorEdgePathLabelModelnow moves steadily when the segment to which it belongs moves.
Input
-
The
CreateEdgeInputModeclass no longer has an error which prevented the removal of port candidate visualizations after another input mode claimed to be active.
GraphML
- Labels at ports of collapsed nodes are no longer lost during GraphML serialization.
Styles
-
HtmlLabelStyle: Fixed text placement when the render size of the label text exceeds the size reserved for the label.
Layout
-
The
TabularLayoutclass no longer throws an exception about a missingPartitionGridwhen used withinRecursiveGroupLayoutandRecursiveGroupLayoutDataandTabularLayoutDataare used without an explicit cell-id mapping. -
The
LayoutExecutorclass now uses the correct target bounds when a projection is set on theGraphComponent. -
When the
MaximumDurationof theEdgeRouterclass is exceeded, it now still uses the same port for edges that are grouped. Previously, edge grouping constraints were mostly ignored when the time was up. -
Improved the reaction time of the
EdgeRouterclass when theMaximumDurationis exceeded or the algorithm should stop due toAbortHandlerfor some cases where previously the search for a path kept on running for a long time. -
The
RadialLayoutclass is now much faster if the input graph is a very large tree structure. -
The
OrganicLayoutandClassicOrganicLayoutclasses no longer produce an internal integer overflow that may lead to an early exit and, thus, poor layout results for very large input graphs. -
The
ClearAreaLayoutclass no longer throws an exception for some scenarios where the same algorithm instance was first applied to a graph withPartitionGridand later to a graph without grid. -
The
EdgeRouterandPolylineLayoutStageclasses no longer produce broken routes for edges with polyline segments. Previously, such broken routes may have appeared in rare cases. -
The
HierarchicLayoutclass now correctly considers the back-loop routing style (HierarchicLayout#BackLoopRoutingEnabled) for graphs with critical edges (seeHierarchicLayoutData#CriticalEdgePriorities). -
The
ClearAreaLayoutandFillAreaLayoutclasses no longer throw an exception for some input graphs with edge labels if propertyEdgeLabelConsiderationEnabledis enabled. -
The
GenericLabelingclass no longer throws an exception for edge labels with preferred placement descriptor if propertyEdgeLabelPlacementEnabledis disabled. -
The
TreeLayoutclass now correctly handles trees with group nodes. Previously, it sometimes produced overlapping elements and halo violations for such inputs. -
The curved edge routes produced by
HierarchicLayout,EdgeRouterorCurveRoutingStageno longer violate the minimum node-edge distance or intersect the node. Intersections could previously happen especially when the specified node-edge distance was zero. -
The
RecursiveGroupLayoutclass now correctly handles setups that use both recursive and non-recursive group nodes. Previously, such use-cases may have led to invisible/ignored edges and, thus, broken edge routes. -
The
PartialLayoutclass now transfers the value of itsPartialLayout#MaximumDurationproperty to the internally used edge routing algorithm. This means that when the partial layout has a restricted running time, the routing part will be restricted, too. Previously, the duration of the edge routing was unrestricted. Note that if the router instance is user-specified, this instance will not get a maximum duration. -
The
HierarchicLayout,EdgeRouterandCurveRoutingStageclasses no longer occasionally throw an exception when the curved routing style is used for graphs that have self-loop edges. -
The
ClearAreaLayoutclass now produces correct orthogonal routes for edges if itsClearAreaStrategyproperty is set to a local strategy. Previously, some of the edges may have received a non-orthogonal route. -
The
EdgeRouterclass no longer throws an exception if the input contains a bus defined viaBusDescriptorwhere all the associated edges are actually fixed.
Hierarchic Layout
-
The
HierarchicLayoutclass no longer produces an infinite looping issue in the incremental layout mode for some input graphs with layer constraints that specify that a node should be placed in the topmost/bottommost layer. -
The
HierarchicLayoutclass no longer produces unnecessary edge crossings between self-loop edges at the same node in cases where a larger number of self-loops exist at a node. -
The
HierarchicLayoutclass no longer ignores edges connected to group nodes when the group node contains a bus structure (seeHierarchicLayoutData#Buses) and no other elements. Such edges were previously actually removed from the layout graph such that other stages (e.g. theComponentLayout) could have failed with an exception. -
The
HierarchicLayoutclass no longer occasionally throws an exception when enablingHierarchicLayout#GroupCompactionEnabledand in conjunction with layering constraints and/or a group node marked as incremental. -
The
HierarchicLayoutclass does no longer violate the specified minimum length for edges incident to group nodes. -
The sequencing phase of the
HierarchicLayoutclass is now faster for large graphs with sequence constraints and non-incremental layout mode.
Edge Routing
-
The
BusRouterclass now produces more suitable edge routes for rare cases that were caused by an unsuitable bus placement. -
The
EdgeRouterclass now uses the given ports for edges of a bus with fixed edges. -
The
EdgeRouterclass now correctly considers edges incident to a fixed inner port of a group node when the routing algorithm has restricted maximum duration. Previously, this setup sometimes led to strange edge routes with many superfluous bends. -
The
EdgeRouterclass no longer contains edges with self-crossings in some rare cases where it previously failed to eliminate them. -
The
EdgeRouterandCurveRoutingStageclasses no longer change the path of unaffected (fixed) edges when theControlPointCreationEnabledproperty of their associatedEdgeLayoutDescriptorinstance (CurveEdgeLayoutDescriptorrespectively) is enabled. -
The
EdgeRouterclass now correctly supports the use case that a subset of edges is routed with the curved routing style while another subset is routed with another routing style and different settings on the associated individualEdgeLayoutDescriptorinstances. Previously, with some edges being curved, the settings of the other edges got lost and the default settings were used. -
The
OrthogonalSegmentDistributionStageclass does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that theChannelEdgeRouterclass is affected too, as the stage is by default called from within the router.
Analysis
-
The
Cycles#FindCycleEdgesalgorithm no longer crashes when the given input graph contains self-loops.
yFiles for Java (Swing) 3.4
This release contains many new major features and lots of other new features, improvements, and bugfixes for all parts of the library. In addition to the new demos, there are some notable demo improvements, too.
If you are updating from an older version of yFiles for Java, have a look at the list of incompatible changes.
Major New Features
- Isometric Drawing and Other Projections
-
CanvasComponent(and thusGraphComponent) now has an additionalProjectionproperty that can be used to transform the viewport into a different parallel projection, e.g. isometric or cabinet projection. Predefined useful projections are provided as constants on the newProjectionsclass. Interaction, including graph editing, snapping, orthogonal edge editing, etc. still work as expected, just within the new projection. That is, orthogonal edge editing becomes isometric edge editing with an isometric projection. There is a corresponding chapter in the Developer's Guide that goes into further detail what has changed and which customization options exist.The
IsometricDrawingDemodisplays graphs in an isometric fashion to create an impression of a 3-dimensional view. - Fill Area Layout and Clear Area Layout
-
The new
ClearAreaLayoutalgorithm clears a user-specified area in an existing layout by moving elements. It is suitable if the rest of the layout should not change much but some free space is required, e.g., because new elements need to be inserted into the drawing or have been resized.The new
The following two new demos showcase the new layout algorithms:FillAreaLayoutalgorithm fills a user-specified area in an existing layout by moving elements into or towards it. It can make layouts around the specified area more compact and is suitable if, e.g., elements were removed from the graph or their size has changed substantially.-
The new
MarqueeClearAreaLayoutDemoshows how to make space in a diagram by dragging a marquee rectangle. -
The new
FillAreaAfterDeletionDemoshows how to fill free space after deleting nodes using theFillAreaLayoutalgorithm.
-
The new
- Aggregation and Analysis of (Large) Graphs
-
Many new algorithms for analyzing graphs are now included, for example to detect components and clusters, to aggregate sub-graphs, and to calculate centrality values. In addition, the analysis algorithms now have the option to define a subset of the graph to work on. In detail, the new classes are:
-
The new
NodeAggregationclass provides an algorithm that intelligently aggregates nodes of (large) input graphs. It does not require complex configuration and can be used without knowledge of specific clustering or aggregation techniques. -
The
KCoreComponentsclass provides a component detection algorithm that finds k-cores. -
The classes
LouvainModularityClusteringandLabelPropagationClusteringprovide two new algorithms for cluster detection. -
The
EigenvectorCentralityclass offers a centrality algorithm that measures the influence of a node in a network based on the Eigenvector score. -
The
PageRankclass provides a centrality algorithm that calculates the so-called page rank for the nodes. -
The classes
ChainSubstructures,CliqueSubstructures,CycleSubstructures,StarSubstructures, andSubtreeSubstructuresprovide new algorithms that detect isolated substructures like chains, cliques, cycles, stars, or subtrees. This can be used as an input to other (layout) algorithms. -
The class
GraphStructureAnalyzernow offers additional methods to calculate the average degree, the average weighted degree, the diameter, and the density of a given graph.
-
The new
- Support for Curved Edges
-
The new
BezierEdgeStylerenders edges with smooth Bezier-curve paths.In addition, the new edge label models
BezierEdgePathLabelModelandBezierEdgeSegmentLabelModelplace labels optimally on curved edges rendered with this style.Support for curved edges has been added to the layout and edge routing algorithms
EdgeRouterand theCurveRoutingStage, andHierarchicLayout. - Interactive Node Resizing
-
Resizing nodes using their handles now supports two new behaviors:
- Center resizing keeps the center fixed and scales the node in all directions. It is active when the
NodeReshapeHandleProvider#CenterReshapeRecognizeris triggered which defaults to theAltkey held down. - Aspect ratio resizing maintains the aspect ratio of a node. It is active when the
NodeReshapeHandleProvider#RatioReshapeRecognizeris triggered which defaults theShiftkey held down. - The
NodeReshapeHandleProvider#ReshapePolicyproperty determines how the mouse location is interpreted when aspect ratio resizing is active.
The
ReshapeHandleProviderDemoshowcases these different resizing behaviors. - Center resizing keeps the center fixed and scales the node in all directions. It is active when the
- Graph Builder
-
The new
GraphBuilder,TreeBuilder,AdjacencyGraphBuilderhave been added. These new classes facilitate building graphs from arbitrary data:GraphBuildercan be used when the data consists of one or more collections of nodes, edges, and optionally, groups.TreeBuildercan be used when the data consists of one or more collections of nodes, each of which knows its child nodes, and optionally, groups.AdjacencyGraphBuildercan be used when the data consists of one or more collections of nodes, each of which knows its neighbors, and optionally, groups.
New Features
Graph
-
The new
NodeLabelModelStripeLabelModelAdapterclass allows using node label model parameters for the positioning of the row and column labels of a table.
Algorithms
-
New methods of the
GraphCheckerandGroupsclasses compute several additional network statistics, namelyGraphChecker#getAverageDegree,GraphChecker#getAverageWeightedDegree,GraphChecker#getDiameter,GraphChecker#getDensity, andGroups#getModularity. -
The new
NodeAggregationclass provides an algorithm that intelligently aggregates nodes of (large) input graphs. It does not require complex configuration and can be used without knowledge of specific clustering or aggregation techniques. -
The new
Transitivity#TransitiveEdgesmethod creates the transitive edges that connect the visible nodes in an input graph. -
The new
GraphConnectivity#kCoreoverloaded methods compute the so-called k-cores of an undirected input graph. -
The new
Centrality#eigenvectorCentralitymethod computes the eigenvector centrality for each node in an undirected graph. -
The new
Centrality#pageRankmethod provides an implementation of the page rank algorithm that computes a rank for each node. -
The new
Groups#labelPropagationmethod implements the label propagation algorithm which detects communities in the input graph. -
The new
Groups#louvainModularitymethod detects the communities of an input graph by applying the well-known Louvain method for community detection. -
The new
Groups#getClusteringCoefficientmethod computes the local clustering coefficient for each node as well as the average clustering coefficient. -
The new
Substructuresclass offers methods to detect the following graph structures: Chains, Cliques, Cycles, Stars, and Trees.
Layout
-
The new routing style
EdgeRoutingStyle#CURVEDof theHierarchicLayoutclass results in edge paths that consist of smooth curves that are constructed using cubic bezier splines. -
The new property
EdgeLayoutDescriptor#RoutingStyleallows specifying the routing style individually for each edge routed by theEdgeRouterclass. Furthermore, the new propertiesMaximumOctilinearSegmentRatioandPreferredOctilinearSegmentLengthon the descriptor provide means to configure the octilinear routing style. -
The
EdgeRouterclass now supports a new routing style that generates curved edge paths. It can be specified for each edge individually using theEdgeRoutingStyle#CURVEDenum value. -
The new layout stage
CurveRoutingStagereplaces polyline edge paths with curved segments using cubic bezier splines and provides a generic way to produce layouts with curved edges. -
The
CircularLayoutclass now supports exterior edges that are routed around the exterior of the circle as smooth arcs. This can be specified with the newCircularLayout#EdgeRoutingPolicyproperty. -
The new
EdgeBundlingStageclass offers edge bundling for general undirected graphs. Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes. -
The
RadialLayoutclass now supports a user-defined layer/circle assignment strategy. This can be specified with theLayeringStrategy#USER_DEFINEDenum value and the layout data propertyRadialLayoutData#LayerIds.
Improvements
-
IListEnumerable#createcan now be called with any Iterable instead of only with Lists. -
The license mechanism now only logs license messages when no valid license has been found.
Previously it was also logged to
System#errthat a license is valid. -
Added property
LicensePathto classLicenseConfigto support license files in places other than the classpath root.
Graph
-
The
ITable#addLabelmethod no longer accepts label model parameters that do not supportIStripeinstances. Previously node label models could be used, but did not work properly at runtime. -
The default method
getPathPointswas added for theIEdgeinterface. The returnedIListEnumerablecontains a snapshot of the source port location, followed by the bend locations, followed by the target port location of an edge. -
The
FilteredGraphWrapperclass now has a new overload without the edge predicate, which often just returnstrueanyway. -
GraphMLIOHandlerhas been improved to prevent external entity injection attacks by default. To prevent these attacks,GraphMLIOHandlerdisallowsDTDdeclarations in readXMLdocuments. -
Added new method
setDisposeCallbackto classesAbstractJComponentLabelStyle,AbstractJComponentNodeStyle,AbstractJComponentPortStyle, andAbstractJComponentStripeStyle. This method enables client code to register a callback for freeing resources that have been allocated in methodcreateComponentonce the created component is no longer used.
View
-
The
CanvasComponent#updateContentRectmethod now throws anIllegalStateExceptionif an element on the canvas provided invalid bounds, e.g. one with infinite values. -
The
CanvasComponent#fitContentmethod now respects theLimitedFitContentZoomproperty if aViewportLimiteris enabled. -
A new policy has been added to the
ViewportLimiterclass which allows for zooming and panning towards the limits but not away from them. This prevents the viewport from "jumping" from out-of-limit coordinates into the limited bounds. -
The methods
raise,lower,toFrontandtoBackon classGraphModelManagerare not final anymore, thus, can now be overridden. -
The new
GraphModelManager#ProvideUserObjectOnMainCanvasObjectproperty can be set so that a model is accessible as its main canvas object's user object. -
The classes
DefaultFolderNodeConverterandAbstractFoldingEdgeConverterprovide a new protected methodcreatePreferredLabelSizeto allow for overriding the default implementations. -
The classes
NodeStyleLabelStyleAdapter,NodeStylePortStyleAdapter, andNodeStyleStripeStyleAdapternow propagate the tags of labels, ports, and stripes to the node that's rendered with the node style. -
The
GridVisualCreatorclass can now draw only horizontal lines or only vertical lines when itsGridStyleproperty is set to one of the new enum valuesGridStyle#HORIZONTAL_LINESorGridStyle#VERTICAL_LINES. -
The property
GridVisualCreator#GridRenderPolicyhas been added and can be used to switch between a high-quality and a fast-performing rendering. -
OverviewInputModenow has a protected methodupdateVisibleAreawhich is the callback that fits the client canvas' content rectangle into the overview again after it has changed. -
An
Animationcan now be paused and unpaused by setting thePausedproperty on theAnimatorclass after the animation has started.
Projections Feature
-
The image export and printing classes (
ContextConfigurator,PixelImageExporter,XpsExporter,CanvasPrintDocument,CanvasComponent#Print) have been improved to work better with the new Projections feature by being able to define an arbitrary list of points as well as the projection that should be used for export/printing. The export chooses the exported area in a way that all these points are enclosed in a rectangular area which is axis-parallel to the output coordinates under the given projection. -
The property
CanvasPrintable#PrintPointswas added and contains the points in world coordinates which determine the region to print. The propertyPrintRectanglethat was previously used to determine the world bounds to print now delegates toPrintPoints. -
The
CanvasComponentclass has additional methods to convert between the world, the new intermediate, and the view coordinate system. -
The
MarqueeSelectionInputMode,NavigationInputMode, andHandleInputModeclasses now have a propertyUseViewCoordinates, which controls whether the input mode draws its decorations and processes input in view coordinates. -
When the
MarqueeSelectionInputModeclass uses view coordinates, the resulting shape of the marquee in world coordinates may not be a rectangle. Therefore theMarqueeSelectionEventArgsclass now has aPathproperty of typeGeneralPathto describe the marquee shape and aUsePathproperty that determines whether thePathproperty or theRectangleproperty shall be used. -
MarqueeSelectionInputModenow has a propertySelectionPaththat returns aGeneralPathrepresenting the current or last selection rectangle in world coordinates. This is necessary for projections where the marquee selection rectangle is not a rectangle in world coordinates. -
The
EdgeDecorationInstaller,RectangleIndicatorInstaller,PointSelectionIndicatorInstaller, andDefaultPortCandidateDescriptorclasses now have a propertyUseViewCoordinatesthat controls whether the decoration is rendered in view coordinates. -
The
CreateEdgeInputMode#measureDistancemethod now has to return the distance in view coordinates if and only ifCanvasComponent'sProjectionis used. -
The
IRenderContextinterface now has the following additional members that are useful with the new projections feature:getProjection,getToIntermediateTransform,worldToIntermediateCoordinates, andintermediateToViewCoordinates.
Input
-
It is now easier to customize the
GroupingNodePositionHandlerclass. The boolean propertiesAdjustingParentNodeLayoutEnabled,MovingChildNodesEnabledandReparentingEnabledhave been added to control whether an ancestors' node layout should be adjusted when a node is moved, to not move the contents of a group node when a group node is moved or forbid any interactive reparenting. -
The
GraphEditorInputMode#requeryHandlesmethod has been made public and can now be used to refresh the displayed handles, ifIHandleProviderimplementations return different handles over time. -
The
GraphClipboardandGraphEditorInputModeclasses now provide the newElementsDuplicatedevent that occurs when a duplicate operation finished successfully. -
The
undoandredomethods of theUndoEngineclass now throw anIllegalStateExceptionif the current state does not allow performingundoorredo. Previously eitherUnsupportedOperationExceptionorRuntimeExceptionhave been thrown. - The default position handler for edges now creates fewer additional bends when the edge is dragged while orthogonal edge editing is enabled.
-
A
MaximumBoundingAreacan now be set on the classesAbstractReshapeHandleProvider,ReshapeHandlerHandle,RectangleHandle, andReshapeRectangleContextto restrict reshaping to stay inside the given bounds. -
The
ReshapeHandlerHandleclass has new getters for theIReshapeHandlerand theHandlePositions. -
The new
NodeDecorator#ReshapeHandlerDecoratorproperty simplifies using customIReshapeHandlerimplementations for nodes. -
The new
ReshapeRectangleContext#Ratioproperty specifies the width/height ratio that is kept for aspect ratio resizing. -
The new classes
NodeReshapeHandleProviderandNodeReshapeHandlerHandleare used as default implementation for node resize handles. -
With the new
ReshapeRectangleContext#ReshapePolicyproperty,INodeReshapeSnapResultProviderimplementations can respect the node aspect ratio for according resize gestures. -
The new
NavigationInputMode#fitContentmethod is called after collapse, expand, enter, and exit operations if theFitContentAfterGroupActionsproperty is enabled. -
The
NavigationInputModeclass doesn't fit the content anymore after expand and collapse operations if anAutoGroupNodeAlignmentPolicyother thenNONEis used. -
An optional parameter
preferredSnapTypehas been added to theSnapLineSnapResultconstructor and theSnapResults#createSnapLineSnapResultfactory method. -
The new factory method
OrthogonalEdgeEditingContext#createOrthogonalEdgeDragHandlercan be used for custom node position handler and reshape handler to keep orthogonal edges attached to a node orthogonal during the drag/reshape gesture. -
The properties
GridSnapDistanceandGridSnapTypeof theGraphSnapContextclass have been pulled up to theSnapContextclass. -
The zoom-invariant
GridSnapDistanceproperty has been added to theCollectSnapResultsEventArgsclass. -
The
SnapResults#createResizeSnapResultmethod now takes aPointDas delta parameter instead of a double so it is possible to create resize snap results where the orientation of the mouse delta differs from the orientation of the snapped size. -
Class
ResizeStripeInputModenow has anIsDraggingproperty, indicating whether a drag currently is in progress. -
Class
DropInputModenow has anIsDraggingproperty, indicating whether a drag on the canvas currently is in progress. -
Class
HandleInputModenow has anIsDraggingproperty, indicating whether a drag currently is in progress. -
The
CompositeLabelModelclass now supports label snapping. -
The default data flavor for
LabelDropInputMode,NodeDropInputMode,PortDropInputMode, andStripeDropInputModenow uses the class loader associated toILabel,INode,IPort, andIStriperespectively instead of the system class loader. -
The new
ClickListenerDecoratorproperty of Bend-, Edge-, Label-, Node- andPortDecoratorsimplifies using customIClickListenerimplementations.
Geometry
-
The new method
PointD#interpolatecalculates the linear interpolation between two points. -
GeneralPathhas a few new helper methods, mostly related to cubic Bรฉzier curves:findCurveIntersectionfinds the intersection between a cubic Bรฉzier curve and the path.getCubicSplitPointsdetermines new control points for splitting a cubic Bรฉzier curve.getProjectioncalculates the projection of a point onto a specific segment of the path.
Analysis
-
Most of the algorithms in namespace
Analysisprovide propertiesSubgraphNodesandSubgraphEdgeswhich facilitate to analyze only a subset of the given graph. -
The
GraphStructureAnalyzerclass has now methods to determine whether there are multiple edges between the same pair of nodes. -
The
GraphCentralityandClosenessCentralityanalysis algorithms now calculate the centrality individually per component instead of returning a centrality value of 0.0 for nodes in graphs that are not connected. -
In a single node graph, the single node's closeness centrality and graph centrality value is now
1.0. (Previously, it was infinity.) This also affects derived values such as minimum, maximum, and normalized
centrality. The backing algorithms in the
Centralityclass are unchanged. -
When
EdgeBetweennessClusteringandFeedbackEdgeSetare executed, the specified edge weights are checked and in case they are not positive or finite, anIllegalStateExceptionis thrown.
Layout
- Frequently used types of the layout part have now nullability annotations.
-
The
DefaultPortAllocatorclass has a new propertyConsiderFixedPortsthat allows to specify whether edges with strong port constraints or fixed port candidates should be considered during the port assignment. Previously, such edges were ignored which could lead to intersections with the ports of the other edges. This new feature is enabled by default. -
The
EdgeRouterclass now provides an improved support for early exits. The routing algorithm now often reacts more sensibly to the case that the specifiedMaximumDurationis reached. -
If the
EdgeRouteralgorithm runs with highly restricted time (seeEdgeRouter#MaximumDuration) or when it gets stopped by means ofAbortHandler, it now keeps the minimum edge to edge distance better. -
The
PartialLayoutclass now produces more stable results if it is multiple times applied to the same input graph and propertySubgraphPlacementis set toSubgraphPlacement#FROM_SKETCH. -
The
HideGroupStageclass now offers a new propertyResetEdgePathsthat allows to specify whether or not the stage resets the path of edges incident to group nodes. -
The
ComponentLayoutclass now correctly considers node and edge labels when using the packed layout styles, e.g.,ComponentArrangementStyles#PACKED_RECTANGLEorComponentArrangementStyles#PackedCircle. Previously, labels could overlap other elements when using these component arrangement styles. -
Constructor overloads have been added to classes
SingleItem,ItemCollection,ItemMapping, andContextItemMappingthat initialize one of their properties on construction. -
The
LayoutExecutorclass now generates more specific port constraints with theFixPortsproperty enabled, resulting in better edge paths. -
If the
Mapperproperty of classHierarchicLayoutData#EdgeDirectednessis directly accessed (not explicitly set) its default for unset values is 1.0 (directed edge). -
If the
Mapperproperty of classOrganicLayoutData#GroupNodeModesis directly accessed (not explicitly set) its default for unset values isGroupNodeMode#NORMAL. This doesn't change the result of the layout. -
For the
RootPlacements,SubtreeRoutingPolicies, andSubtreeAspectRatioproperties of theAspectRatioTreeLayoutDataclass, the type of the mapped values has been made nullable. Fornullor unset values, the settings on theAspectRatioTreeLayoutwill now be taken. -
Relaxed the strict type requirements for
IncrementalHintItemMapping'ssetIncrementalSequencingItems(Iterable)overload to accept specificIModelItemsub-types as well. -
Relaxed the strict type requirements for
LayoutDatasetter overloads that take mappings of one kind or the other to accept sub-types of the required value type. This also applies toLayoutExecutor#setPortLabelPoliciesandLayoutGraphAdapter#setPortLabelPolicies.
Bugfixes
View
- Layout animations for graphs with ports that are owned by edges no longer throw an exception.
-
An animation created with the
Animations#createGraphAnimationmethod no longer throws an exception if the providedIMapperwith new bend locations doesn't provide bend locations for all edges. -
The
ViewportAnimationno longer throws an Exception when applied on a zero-sizeGraphComponent. -
Fixed a bug which caused the
ZOOM_TO_CURRENT_ITEMcommand to ignore theViewportLimiterof the correspondingCanvasComponent. -
The
CanvasComponent#zoomTomethod no longer triggers twoViewportChangedevents. - Scrolling the viewport with the mouse wheel no longer scrolls in the wrong direction if the mouse wheel is set to scroll one page at a time (instead of several lines).
-
The
GraphModelManager#getMainCanvasObjectmethod no longer throws aNullPointerExceptionwhen overriding itsgetCanvasObjectmethods for items in an unexpected way. -
Due to better
nullchecks, several styles and input modes no longer throw an exception in the rare case that anIRenderContextdoesn't provide aCanvasComponentinstance. -
Fixed a bug in
FoldingManagerwhere a predicate change in aFilteredGraphWrapperwhich serves asMasterGraphcould trigger an Exception if a child of a folder node has been hidden. -
The methods
ICanvasObject#aboveandbelowdon't unnecessarily triggerIRenderContext#ChildVisualanymore. -
Callbacks registered via
IRenderContext#setDisposeCallbackare now always called when the visual was disposed. Previously there have been some cases, such as creating visuals outside of rendering (e.g. for measuring), where the callback would never be called. - Edges between deeper nested nodes are now displayed correctly in front of a common ancestor after that ancestor has been added or removed.
-
Fixed a bug in the
GraphCopierclass which caused theLabelCopiedevent to be dispatched twice for port labels on folder nodes. - Fixed a bug in the visualization of the snapping of resized nodes. Due to the bug the arrows indicating that the width or height of the node equals the width or height of other nodes were only rendered at the resized node but not at the other nodes with same width or height.
-
The file chooser dialogs shown from
GraphComponent'sopenFileandsaveFileAsmethods now respect the filter values specified forCanvasResources'GraphComponent#OpenFileDialog#FilterandGraphComponent#SaveFileDialog#Filterresource keys.
Input
-
Calling the
GraphInputMode#findItemsandGraphInputMode#HitTester#enumerateHitsmethods with a customIInputModeContextwill now always pass that context to theIHitTestableimplementations of the items being hit-tested. Previously, the main input mode's ownIInputModeContextwas used in certain cases. -
The paste and duplicate operations now honor the
GraphEditorInputMode#shouldSelectpredicate. -
The
NodeDropInputModeclass now correctly considers port labels, both for creating the new node and for the preview. -
The
ICommand#SET_CURRENT_ITEMcommand can now also be used to โresetโ the current item tonullby passingnullas the command parameter. This also fixes that theNavigationInputMode#SetCurrentItemandGraphInputMode#SetCurrentItemmethods did nothing whennullwas passed as an argument. -
The
TextEditorInputModeclass now correctly queries theViewportLimiterifTextBoxPlacementPolicy#SCROLL_CANVASis used. If the text box is still not visible because it's outside the limited viewport, the text box will be moved as well. - Undo and redo of additions and removals of bends on folding edges now correctly restores the bends at the location they had at the time of removal.
-
The
NavigationInputMode#FitContentAfterGroupActionsproperty is no longer ignored when theNavigationInputModeclass is used as a child input mode of theGraphEditorInputModeclass. -
The
NavigationInputModeclass now also updates theCanvasComponent#ContentRectproperty when it is not used as a child input mode of theGraphEditorInputModeclass. -
The
SnapContext#GridSnapDistanceandSnapContext#SnapDistanceproperties are no longer incorrectly interpreted in world coordinates when calculatingSnapResults. -
MouseWheelEventArgsare now set toHandled = truewhenCanvasComponentscrolls or zooms to avoid those events from bubbling to parent controls. - Orthogonal edge editing does not add bends anymore to edges that are marked as not orthogonal.
- Input modes are no longer left in an undefined state if another input mode has been activated in an event handler of the first input mode. This usually resulted in the wrong cursor being displayed.
Geometry
-
Fixed the
MaxXandMaxYproperties ofRectD#INFINITEwhich now returnDouble#POSITIVE_INIFINITYinstead ofNaN. In turn,RectD#INFINITE'sTopRight,BottomRight, andBottomLeftcorners were fixed, too.
Analysis
-
The
EdgeBetweennessClustering#runmethod no longer throws an exception with its default setting for theMaximumClusterCountproperty. -
The Manhattan distance metric for
HierarchicalClusteringno longer ignores the vertical distance component. -
The
HierarchicalClusteringclass no longer throws an exception when applied to an empty graph. -
The results of the
Chainsclass are now correct for undirected cycles, too. If such cycles are not connected to other parts of the graph, theNodescollection of a resultingPathcould have been in an incorrect order. -
The
ClosenessCentralityclass no longer calculatesNaNas result of theNormalizedNodeCentralityproperty if the graph consists of one single node. Instead, the value of theNormalizedNodeCentralityproperty is now positive infinity. -
The
ClosenessCentrality#runmethod no longer throws an exception for unconnected graphs. Instead, all values of theNodeCentralityandNormalizedNodeCentralityproperties will be0.0as the documentation states. -
A number of spurious
NullPointerExceptions in various graph analysis algorithms do no longer happen when configuring them with aMapperthat doesn't have an explicit value for every node/edge in the graph.
Layout
-
The
morphLayoutandLayoutExecutor#startmethods no longer throw an exception when applied on a zero-sizeGraphComponent. -
Fixed a bug in
ItemCollectionMappingthat could result in aNullPointerExceptionfor addedItemCollectionswhere no items were specified. -
The
HierarchicLayoutclass now correctly handles inputs that have both bus structures and edges with recursive style. Previously, an exception could be triggered when an edge was marked as recursive and belonged to a bus at the same time. -
The
HierarchicLayoutclass no longer throws an exception that was previously triggered in some cases with bus structures (see propertyHierarchicLayoutData#Buses) and in conjunction with layering constraints. -
Fixed a bug in the
HierarchicLayoutclass that in some cases caused a violation of the minimum first or last segment length (EdgeLayoutDescriptor#MinimumFirstSegmentLengthandEdgeLayoutDescriptor#MinimumLastSegmentLength). The bug was only triggered when the minimum length values were relatively large. -
The
OrganicLayoutclass no longer throws an exception when having aPartitionGridand at the same time the scope set toSUBSETorMAINLY_SUBSETwhere all nodes of the graph are marked as affected (could have used scopeALLinstead). -
The
EdgeRouterclass no longer produces unnecessary overlaps for cases where the source or target node is overlapped by (several) label elements. This generally improves the ability of the router to deal with input that contains source/target nodes that are overlapped by other elements and are required to be crossed by an edge route. -
The
EdgeRouterclass no longer throws an exception whenEdgeLayoutDescriptor#IntermediateRoutingPointsare too close together. -
The
EdgeRouterclass no longer has a problem that appeared with a bus containing affected as well as non-affected (fixed) edges at the same time. Previously, this could trigger an exception or lead to the incorrect behavior that an actually affected other edge was not routed. -
The
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges defined viaBusDescriptor. -
The
EdgeRouterclass no longer has a problem that occasionally resulted in bad edge routing artifacts if edge grouping is enabled and non-affected edges are grouped at both end points. -
The
EdgeRouterclass no longer yields edge labels that overlap with unrelated group nodes when using the integrated label placement feature. -
Resolved a bug in the
EdgeRouterclass which caused that grouped edges were sometimes actually not grouped together. This mainly appeared in conjunction with a large value of either the minimum first or last segment length. -
The
EdgeRouterclass no longer produces an exception for some rare cases with fixed grouped edges and octilinear paths. -
The
EdgeRouterclass now correctly observes inputs where the user specifies buses with both fixed and non-fixed edges at the same time. -
The
EdgeRouterclass now properly considers ports provided by aPortCandidateSetwhen the set contains multiple candidates with single capacities and where the candidates are on the same node side. Previously, it could happen that only one of several edges connecting to the node correctly considered the ports. -
The
EdgeRouterclass does no longer use the same fixedPortCandidateout of a specifiedPortCandidateSetif another non-saturated candidate can be chosen. Thus, overlapping edge segments are avoided. -
The
EdgeRouterclass no longer occasionally throws an exception if the input contains bus edges (defined viaBusDescriptor). -
The
BusRouterclass no longer fails to generate connected buses for cases with fixed and incremental edges on the same bus. Previously it sometimes generated a disjoint bus even though the bus IDs were equal. -
The
BusRouterclass no longer ignores edges that should be routed when a they are on a bus with fixed edges (seeBusDescriptor#Fixedproperty) and when they share both source and target port with a fixed edge. -
The element processing order in the
BendConverterlayout stage is now deterministic. The previous non-deterministic order of inserting and removing elements could lead to non-deterministic behavior for consecutive layout calculations. -
The
ParallelEdgeRouterclass no longer throws an exception if the input has both a large number of parallel edges and a leading edge with ports on the node border. -
The
OrthogonalLayoutclass now correctly handles input graphs with parallel edges if thePreferParallelRoutesproperty is enabled. Previously, such inputs have caused exceptions in some rare cases. -
The
FamilyTreeLayoutclass now properly handles the case that the family tree contains cycles, e.g., due to a family founded by parent and (step-)child. Previously, it sometimes produced a stack overflow or non-orthogonal routes for such an input. -
The
AspectRatioTreeLayoutclass no longer crashes, causing a stack overflow, when applied to a large chain graph. -
The
AbstractNodePlacer#placeSubtreemethod now clears its internal caches, especially the graph cached in fieldAbstractNodePlacer#graph. Previously, holding onto a node placer instance could lead to subtle memory leaks. -
The
OrthogonalSegmentDistributionStageno longer produces degenerated (very large or small) coordinates for edges that contain zero-length segments, that is, duplicate edge path points. -
The
ChannelEdgeRouterclass no longer yields degenerated routing results (very large or small coordinates) when using theOrthogonalPatternEdgeRouteras path finder strategy and setting its minimum distance to zero. TheOrthogonalPatternEdgeRouterclass now avoids duplicate points when theMinimumDistanceproperty is set to zero. -
The
RecursiveGroupLayoutclass now correctly moves child nodes along with their group also in case theRecursiveGroupLayout#CoreLayoutisnull. Previously, if additionally a group node had a specific layout algorithm associated to it, the content was not correctly moved along. If the core layout was notnull, the issue did not occur.
Incompatible Changes
API
-
The
GraphBuilder,TreeBuilder, andAdjacentNodesGraphBuilderin thecom.yworks.yfiles.graphpackage have been replaced with incompatible, new implementations in thecom.yworks.yfiles.graph.builderpackage. API-compatible adapters to the old API can be found in thebuilder.compatibilitydemo. -
The return type of
ContextConfigurator'screateClipmethod has been changed fromRectDtoShape. The return value of this method is intended to be passed toGraphics2D#clip(Shape)to constrain the painting area. -
The method
CanvasComponent#createInputModeContextis protected again, after having been made public accidentally previously. -
The
GraphEditorInputMode#requeryHandlesmethod is now public. -
The optional
IPortLocationModelParameterandIPortStyleparameters of theIGraph#addPortandGraphExtensions#addPortmethods can now benull. -
The
ModelManager#unInstallmethod has been renamed to the canonical nameuninstall. -
The
NodeReshapeSnapResultProvider#getSnapLinesmethod now takesCollectSnapResultsEventArgsas additional parameter. -
Several methods related to snapping now take a
PointDinstead of adoubleasdeltaparameter. In detail, these areSnapResults#createResizeSnapResult,NodeReshapeSnapResultProvider#addSnaplineSnapResult,NodeReshapeSnapResultProvider#addGridLineSnapResult, andNodeReshapeSnapResultProvider#addSameSizeSnapResult. -
The following methods now require an
IRenderContextinstance as first parameter:AbstractLabelStyle#createLayoutTransformandJComponentLabelStyleRenderer#createLayoutTransform. -
All overloads of
YGraphAdapter#createMappernow require an additional parameter specifying theClassof the type argument. This is required for correct fallback values if an item is not explicitly mapped. -
CanvasPrintable#getWorldBoundsnow returns an Iterable ofPointDinstead of aRectDto suit the new projection feature. -
IGraphmethodsgetBends,getEdgeLabels,getNodeLabels, andgetPortLabelshave been changed to return a "live" view of corresponding objects in the graph. Previously, these methods returned a cached view. This change necessitated changing the return type of these methods fromIListEnumerabletoIEnumerable. -
The
HierarchicalClustering#Result#DendrogramRootproperty can now returnnullif the result has been obtained from an empty graph.
Behavior
- The view coordinate system now includes the projection. For customers who do not use a projection, nothing will change. However, when the (old) view coordinate system has been used to render parts of the visualization in a zoom-invariant manner, the equivalent now is called the intermediate coordinate system. The view coordinate system is still necessary when coordinates relative to the control are needed, e.g. for tooltips or a context menu.
-
When using the new projections feature, the
CanvasComponent#ContentRectproperty no longer has an effect on scrollbars or theGraphComponent#fitGraphBoundsmethod. -
The
CanvasComponentclass ignores itsViewportLimiterwhen projections are used. -
The
ViewportLimiterno longer jumps to the limited viewports if the current viewport is outside the limited area. This behavior can be restored by setting theViewportLimiter#LimitingPolicyproperty toLimitingPolicy#STRICT. - Visuals that are rendered in view coordinates relative to the viewport may appear in a different location when exporting an image.
-
The
NavigationInputMode#adjustContentRectmethod doesn't fit the graph bounds in the viewport anymore. -
NavigationInputMode#FittingContentAfterGroupActionsEnablednow isfalseby default. -
The
NavigationInputModeclass doesn't fit the content after expand and collapse operations anymore. This can be re-enabled by setting theAutoGroupNodeAlignmentPolicyto a value other thanNONEandFittingContentAfterGroupActionsEnabledtotrue. -
For the
RootPlacements,SubtreeRoutingPolicies, andSubtreeAspectRatioproperties of theAspectRatioTreeLayoutDataclass, the type of the mapped values has been made nullable. Fornullor unset values, the settings on theAspectRatioTreeLayoutwill now be taken. This is the documented behavior, though. -
GraphMLIOHandlerhas been improved to prevent external entity injection attacks by default. To prevent these attacks,GraphMLIOHandlerdisallowsDTDdeclarations in readXMLdocuments. -
Added file filters for
XMLfiles and all files to the file chooser dialogs shown fromGraphComponent'sopenFileandsaveFileAsmethods. -
IGraphmethodsgetBends,getEdgeLabels,getNodeLabels, andgetPortLabelshave been changed to return a "live" view of corresponding objects in the graph. Previously, these methods returned a cached view. This change necessitated changing the return type of these methods fromIListEnumerabletoIEnumerable. -
The following places now throw a
ConcurrentModificationExceptioninstead of anIllegalStateException:IGraph: changing graph items while iterating those using theIListEnumerablereturned byIGraph#getNodesorIGraph#getEdges.IGraph: changing the bends, labels, or ports at an edge while iterating those using theIListEnumerablereturned by the respectivegetBends,getLabels, orgetPortsmethod.IGraph: changing the labels or ports at a node while iterating those items using theIListEnumerablereturned by the respectivegetLabelsorgetPortsmethod.IGraph: changing nodes while iterating those using theIListEnumerablereturned byIGraph#getChildren.
-
The
GraphCentralityandClosenessCentralityanalysis algorithms now calculate the centrality individually per component instead of returning a centrality value of 0.0 for nodes in graphs that are not connected. -
HierarchicLayoutData#EdgeDirectedness: If theMapperproperty is directly accessed (not explicitly set), its default for unset values is now 1.0 instead of 0.0. These means that such edges are now treated as directed instead of undirected. -
The value of the read-only property
EdgeRouter#Partitionis nownullafter applying the routing algorithm. It is only intended to be used during the execution. Previously, it was cached, even though the documentation stated otherwise.
Deprecations
-
The properties
EdgeRouter#PolylineRouting,EdgeRouter#PreferredPolylineSegmentLengthandEdgeRouter#MaximumPolylineSegmentRatioare now deprecated. To enable polyline routing, specifyEdgeRoutingStyle#OCTILINEARas routing style viaEdgeLayoutDescriptor#RoutingStyle. The other two properties are also replaced by respective properties on theEdgeLayoutDescriptorclass.
New Demos
-
The
GanttChartDemoshows how to create a project schedule visualization. -
The
ZoomInvariantLabelStyleDemodemonstrates zoom-invariant label rendering. -
The
MarqueeClearAreaLayoutDemoshows how to make space in a diagram by dragging a marquee rectangle. -
The
FillAreaAfterDeletionDemoshows how to fill free space after deleting nodes using theFillAreaLayoutalgorithm.
Demo Improvements
-
The
IsometricDrawingDemohas been reworked to use the new projections functionality (see also the Major New Features section). -
The
LayoutStylesdemo has been enhanced to include new layout features:- Exterior edge routing for
CircularLayout. - Curved edge routing style for
HierarchicLayoutand PolylineEdgeRouter. - Bus routing for
HierarchicLayoutand PolylineEdgeRouter. - Integrated Edge Labeling for Polyline
EdgeRouter.
- Exterior edge routing for
-
Improved support for parsing the
BPMNDiagram Interchanged format. -
The
BPMNnode styles now support setting colors. -
The
BPMNdemo has been improved to provide more flexibility. Its code now can easier be used in custom projects. -
BpmnDiParserhas been improved to prevent external entity injection attacks by default. To prevent these attacks,BpmnDiParserdisallowsDTDdeclarations in readXMLdocuments.
yFiles for Java (Swing) 3.3.0.1
Bugfixes
-
IFoldingView#Collapseand#Expandnow throw anIllegalArgumentExceptionwhen called with a node not belonging to the graph (instead of aNullPointerException). -
CollapsibleNodeStyleDecorator: When the wrapped style has its ownIClickListenerdefined in its lookup, theIClickListenerfor the collapse/expand button has precedence but the other one is used when the button is not hit. -
FoldingManager#hasFoldingEdgeStatenow returnsfalsefor non-dummy edges instead of throwing an exception. -
FilteredGraphWrapper: Fixed a possibleIllegalArgumentException("Node not in this graph") which could occur when the parent of a node which is not visible in the filtered graph has been changed in the wrapped graph. -
FoldingManager#getFoldingEdgeStatenow throws anIllegalArgumentExceptionwith a meaningful message instead of aNullPointerExceptionif the state is queried for a master edge (both source and target node are expanded). -
Fixed a bug in
TableLayoutConfiguratorwhich in rare cases could cause exceptions in additional layout stages. -
ILabelCandidateDescriptor's#getProfitnow is considered properly by the labeling algorithms. -
FoldingManager: Invoking#hasFoldingEdgeStatefor a master edge (both source and target are expanded) yields now anIllegalArgumentExceptionwith an explaining message text instead of throwing a simpleNullPointerException. -
Fixed an issue where
NavigationInputMode's#AutoGroupNodeAlignmentPolicywould sometimes not work when the expanded and collapsed group node sizes differ. -
The
FilteredGraphWrapperclass now correctly handles port labels of filtered items. -
The
GeneralPath#prependmethod no longer loses a part of the combined path in certain circumstances. -
GraphMLIOHandler: Fixed an error that prevented parsingnullvalues by input handlers added via#createMapperInputHandler.
Layout
-
Fixed a bug in the
HierarchicLayoutclass that could cause unnecessary (double) edge crossings when the algorithm was executed in incremental layout mode with edge grouping and alternative group bounds. -
The
EdgeRouterclass now correctly observes fixed ports for some cases where it previously ignored them due to incorrect path cost calculations. -
The
EdgeRouterclass now considers the correct shape of non-affected, fixed edges. Previously, it sometimes incorrectly parsed their shape which could lead to undesired effects like incorrect path cost calculation of affected edges. -
The
BalloonLayoutclass now longer crashes due to a stack overflow for inputs containing very long chain graphs. -
The
HierarchicLayoutclass now produces better results for input graphs with grouped edges and aPartitionGrid. Previously, such inputs may have produced edge routes with superfluous bends. -
The
HierarchicLayoutclass now correctly considers the propertiesMaximumNodesAfterBusandMaximumNodesBeforeBusof theBusDescriptorfor single line (layer) buses. In addition, for multiple layer buses, the specified minimum node to edge distance is now considered for the distance between nodes and the vertical bus segment. -
The
OrganicLayoutclass now correctly removes node overlaps if itsScopeis set toand itsNodeOverlapsAllowedproperty is disabled. Previously, the layout sometimes produced superfluous overlaps for such cases. -
The
TreeMapLayoutclass no longer produces results that may have infinite coordinates. -
The
HierarchicLayoutclass no longer throws an exception that was previously triggered in some cases with bus structures (see propertyHierarchicLayoutData#Buses) and in conjunction with undirected edges (seeHierarchicLayoutData#EdgeDirectedness). -
The constants
EdgeLabelLayoutDpKeyandNodeLabelLayoutDpKeyof theLabelLayoutKeysclass now specify correctly that their generic type parameter isLabelLayoutData[] and not justLabelLayoutData.
Input
-
Fixed that
NavigationInputModeignores the#shouldSelectItemand#shouldFocuspredicate methods ofGraphEditorInputModeandGraphViewerInputMode. -
Fixed a bug that executed commands on keypress although the
KeyboardInputModeis not enabled.
Incompatible Changes
-
FoldingManager#getFoldingEdgeStatenow throws anIllegalArgumentExceptioninstead of aNullPointerExceptionif the state is queried for a master edge (both source and target node are expanded). -
FoldingManager#hasFoldingEdgeStatenow throws anIllegalArgumentExceptioninstead of aNullPointerExceptionif the state is queried for a master edge (both source and target node are expanded). -
FoldingManager#hasFoldingEdgeStatenow returnsfalsefor non-dummy edges instead of throwing an exception.
Demos and Tutorials
The Getting Started and Custom Styles tutorial
trails have been moved into the demos directory to simplify
project setup for yFiles for Java (Swing)'s programming samples in IDEs.
New Demos
-
The
LabelHandlerProviderDemoshows how to implement custom handles for interactive rotation and resizing of labels. -
The
SplitEdgesDemoshows how to align edges at group nodes usingRecursiveGroupLayouttogether withHierarchicLayout. -
The
EdgeGroupingDemoshows the effects of edge and port grouping when arranging graphs withHierachicLayout. -
The
PartialLayoutDemoshows how to arrange some elements in a graph while keeping other elements fixed. -
The
CriticalPathsDemoshows how to emphazise important paths with hierarchic and tree layout algorithms. -
The
CustomLabelModelDemoshows how to create and use a custom label model. -
The
SmartClickNavigationDemoshows how to navigate in a large graph, especially when only a part of the graph is visible in the viewport. -
The
ToolTipDemoshows how to add tooltips to graph items. -
The
GridSnappingDemoshows how to enable grid snapping during interactive changes. -
The
SnappingDemoshows how to enable snapping (guide lines) for interactive changes. -
The
LevelOfDetailDemoshows how to display different levels of detail depending on the current zoom factor. -
The
FamilyTreeDemousesFamilyTreeLayoutto arrange genealogical graphs. -
The
TreeMapDemousesTreeMapLayoutto arrange file system nodes. -
The
TreeLayoutDemoshows the tree layout style and the different ways in which this algorithm can arrange a node and its children. -
The
ClickableStyleDecoratorDemoshows how to handle mouse clicks in specific areas of a node's visualization. -
The
BackgroundImageDemoshows how to add background visualizations to a graph component. -
The
FilteringAndFoldingDemoshows how to configure filtering and folding in the same application. -
The
FoldingDemoshows how to enable collapsing and expanding of group nodes. -
The
FilteringDemoshows how to temporarily remove nodes or edges from the graph with filtering. -
The
GraphCopyDemoshows how to copy a graph or part of it to another graph.
yFiles for Java (Swing) 3.3
Major New Features
- A large number of code examples has been added to the API Documentation.
-
The
HierarchicLayoutclass is now able to arrange children of a specific root node in a compact bus-like way. These bus substructures are defined by theHierarchicLayoutData#Busesproperty, and the newBusDescriptorclass provides more individual settings for the buses. -
The
EdgeRouterclass now features integrated edge label placement. Labels are automatically placed when the new propertyIntegratedEdgeLabelingEnabledis enabled. The placement considers the optionalPreferredPlacementDescriptorof a label. -
The
EdgeRouterclass now supports port grouping of edges at their source and target. To specify the port group IDs, see the associated properties in thePolylineEdgeRouterDataclass. -
The
EdgeRouterclass now supports orthogonal bus routing. The newBusDescriptorclass specifies the settings for a single bus. - The powerful analysis algorithms got a new API that is based on the
IGraphinterface and streamlines working with the results. In particular, it makes working with a special analysis graph class obsolete. The algorithms that are available with the new API include centrality measures, clustering, flow calculation, rank assignment, spanning tree, shortest path, and more. This is accompanied by the newGraphStructureAnalyzerclass that provides methods to check structural properties of a given graph.
New Features
Layout
-
The
HierarchicLayoutclass is now able to consider individual costs for crossing a group node border. These costs are defined with theHierarchicLayoutData#GroupBorderCrossingCostsproperty. -
The
HierarchicLayoutclass is now able to consider individual crossing costs for edges. They can be defined with theHierarchicLayoutData#EdgeCrossingCostsproperty. -
The new callback method
DefaultLayerSequencer#getCrossingCostallows for defining an individual crossing cost value for a specific pair of edges when using the said sequencer implementation for theHierarchicLayoutalgorithm. -
In order to easily retrieve the original edge instance when customizing the hierarchic layout
algorithm, the
HierarchicLayout#getOriginalEdgemethod was added. -
The
HierarchicLayoutclass is now able to uniformly distribute ports at group nodes - with a few restrictions. The new propertyHierarchicLayoutData#UniformPortAssignmentGroups. defines the groups for which the feature should be enabled. -
The
OrganicLayoutclass is now able to produce 3D layout results. -
The
OrganicLayoutclass is now able to consider user-specified inertia and stress values for nodes. -
The new property
InteractiveOrganicLayout#CompactnessFactorspecifies the compactness of the result. If the graph contains several components, this feature can prevent that the components drift apart. -
The
LeftRightNodePlacerclass now supports layouts with multiple branches. With this feature, subtrees can not only be placed left/right of a single vertical bus, but left/right of multiple vertical buses (the branches). The new propertyBranchCountallows to configure the number of branches. -
The tree node placer
GridNodePlaceroffers the following new features:- The placement of the bus for routes to its children can now be configured using the new enumeration
BusPlacement. Available placements areLEADING,TRAILINGandCENTER. - Child sub-trees can be assigned to rows automatically using the new property
GridNodePlacer#AutomaticRowAssignmentEnabled. - The new alignment policy
GridNodePlacer#BUS_ALIGNEDaligns the root node with the bus.
- The placement of the bus for routes to its children can now be configured using the new enumeration
-
The
OrthogonalLayoutclass is now able to consider custom crossing and bend costs for edges. They can be specified using the new propertiesOrthogonalLayoutData#EdgeCrossingCostsandOrthogonalLayoutData#EdgeBendCostsrespectively. -
The new class
GivenCoordinatesStagechanges node locations and edge paths to user-specified values before invoking the core layout algorithm. To specify locations and paths, use the newGivenCoordinatesStageDataclass. -
The new
GenericPartitionGridStageclass offers generic support for partition grid structures.
Viewer
-
The
GraphEditorInputModeclass provides the new methodsraiseSelection,lowerSelection,selectionToFrontandselectionToBackthat change the z-order of all selectedIModelItems. -
The
GraphModelManagerclass has the new methodsraise,lower,toFrontandtoBackthat allow for changing the z-order ofIModelItems. All these z-order-related methods can also be triggered by the new commandsRAISE,LOWER,TO_FRONTandTO_BACK. -
CreateEdgeInputModecan now create edges in reversed direction, i.e. starting from target port.- The new
EdgeDirectionPolicysupports starting creation at source, target, in the last direction, or depending on the port candidate. - A configurable
ToggleDirectionRecognizerallows for changing the edge direction during creation.
- The new
-
The method
CreateEdgeInputMode#doStartEdgeCreationthat is used to programmatically start an interactive edge creation gesture now returns aFuturewith the newly created edge as result. -
The method
MoveInputMode#doStartDragthat is used to programmatically start an interactive drag gesture now returns aFuturewith the affected items as result. -
The new property
MoveLabelInputMode#MovingUnselectedLabelsAllowedenables moving labels without having to select them first.
New Demos
-
The
GraphAnalysisDemoshows how to use the new interfaces for the graph analysis algorithms and how to visualize their results. -
The
LogicGateDemoshows how yFiles can be used for the visualization of a digital system consisted of logic gates. -
The
Neo4jDemoshows how to integrate a Neo4j graph data base in your application.
Improvements
Algorithms
-
The new
GraphStructureAnalyzerclass provides methods to check structural properties of a given graph.
Layout
-
Added convenience overloads for
ItemCollectionandItemMappingproperty setters toLayoutDataclasses with properties of typeItemCollectionorItemMapping. E.g.hierarchicLayoutData#getEdgeLayoutDescriptors().setConstant(newDescriptor)can now be abbreviated tohierarchicLayoutData#setEdgeLayoutDescriptors(newDescriptor). -
The
HierarchicLayoutclass now correctly calculates the group node bounds. Previously, the groups' insets were slightly too large (up to one pixel). -
The
HierarchicLayoutclass now always places a port in the middle of a node side, if it is the only port on that side. Previously the port was only centered if the label was additionally placed on the edge. -
The
HierarchicLayoutclass now also considers critical edge priorities for grouped edges. -
The
HierarchicLayoutclass now requires less memory for graphs with sequence constraints. -
The
HierarchicLayoutclass now uses the specified layer alignment (seeNodeLayoutDescriptor#LayerAlignment) to align sub-components (seeHierarchicLayoutData#SubComponents). -
The
HierarchicLayoutclass no longer inserts superfluous bends for edges between group nodes if the input graph contains grouped edges. -
With
HierarchicLayout, the number of edges crossing through group nodes without starting or ending in them when using the default algorithm settings was reduced. Furthermore, the behavior can be customized using the new group node border crossing costs (see propertyHierarchicLayoutData#GroupBorderCrossingCosts). -
The
HierarchicLayoutclass now also considers sequence constraints for grouped edges. -
The layering of
HierarchicLayoutwas improved with respect to the resulting edge lengths if the recursive group layering is enabled. -
The
HierarchicLayoutclass now produces less overlapping elements for graphs with fixed coordinate hints. -
The new property
OrthogonalLayout#ParallelRoutesPreferenceEnabledallows for controlling how parallel edges (multi-edges) are routed. -
The
RecursiveGroupLayoutclass now allows to define a localPartitionGridstructure for each recursively handled group node. See the new propertyRecursiveGroupLayoutData#GroupNodePartitionGridsfor details. -
The
EdgeRouterclass now generates less edge-edge overlaps and a better distribution of edge segments when theEdgeRouter#MaximumDurationis strongly restricted or set to zero, or when the algorithm is stopped via theAbortHandler#stopmethod. -
The
EdgeRouterclass now avoids superfluous bends that were in some cases caused by group nodes with (small) inset values. -
The path search performance of the
EdgeRouterclass has been improved for cases where an edge has a strong, externalPortConstraintor a fixed, externalPortCandidate. -
The
EdgeRouternow supports edge grouping on both endpoints. Previously, an edge could only be part of either a source or a target group. -
The
EdgeRouterclass now generates a proper routing from a group node border to a port location inside this group node defined by a strongPortConstraintor a fixedPortCandidate. Previously, the route was only calculated to the border and then the last segment was extended without consideration of obstacles and other elements. -
The performance of the
GenericLabelingalgorithm and the quality of the label placements were improved. -
The quality of edge label placement of the
GenericLabelingclass was improved in case that there are multiple labels with a source or target preference near the same node. They may now be placed further away but avoid undesired overlaps. -
The
PortCalculatorclass now considers edge label positions such that they are not affected by whether this stage is applied or not. Previously, label positions could be changed if the label position was stored relative to the first/last segment or the port. -
If the master edge is clipped on the bounds of its source or target, the
ParallelEdgeRouterclass now always clips the associated parallel edges on that bounds, too. -
The
RemoveCollinearBendsStage.Scaleproperty now also allows zero and negative numbers as its value. This makes it possible to internally round coordinates to full integer values for the comparison of bend points and, thus, the stage can be made more fuzzy. -
The
TreeReductionStagenow marks non-tree edges if anIDataAcceptoris registered with the input graph with keyTreeReductionStage#NonTreeEdgeSelectionKey. This way a user is able to query which edges the algorithm determined to be the non-tree edges. -
New options on class
PlaceNodesAtBarycenterStageallow for specifying the size of affected nodes, considering the grouping structure when calculating the barycenter of nodes as well as removing the bends of edges incident to affected nodes. -
The properties
RowsandColumnsof classPartitionGridare now of typeIEnumerable<RowDescriptor>andIEnumerable<ColumnDescriptor>instead of an un-typedYList. -
The
PartitionGridDataclass has new propertiesRowOrderOptimizationEnabledandColumnOrderOptimizationEnabledto indicate whether or not the order of the rows respectively columns should be chosen automatically to minimize edge lengths. -
The new
ChannelRoutingToolclass brings back the features of theChannelRouterclass that was removed in version 3.0. -
Combining multiple
LayoutDataclasses is now easier:- The base class
LayoutDataoffers a new methodcombineWiththat combines the current instance with anotherLayoutDatainstance. - The class
CompositeLayoutDatahas an additional constructor that takes a variable number ofLayoutDatainstances.
- The base class
-
The new properties
AbortHandler,SourcePortConstraints,TargetPortConstraints,SourcePortCandidates, andTargetPortCandidatesofChannelEdgeRouterDatafacilitate using these features withChannelEdgeRouter. -
The
RowIndicesandColumnIndicesproperties of thePartitionGridDataclass can now also be used in combination with theGridproperty. -
The
ImprovingPortAssignmentboolean property ofLayoutExecutorandLayoutGraphAdapterwas replaced by thePortAdjustmentPolicyproperty that offers more options how port locations should be adjusted after a layout calculation.
Viewer
- The parameter of the scroll command, that can be used to specify an additional scroll factor, can now be any numeric value of type Number.
-
CanvasComponent: AddedzoomToAnimatedoverloads which take an optional event listener that is notified of the animation's end. -
IMapperRegistry#createDelegateMapperhas been renamed tocreateFunctionMapper. -
The property
ItemMapping#Delegatehas been renamed to Function. -
The property
ContextItemMapping#ContextDelegatehas been renamed toContextBiFunction. -
The property
ItemCollection#Delegatehas been renamed to Predicate. -
The default methods
toListandtoArrayhave been added toIEnumerable. -
Added convenience methods to convert view geometry classes (
PointD,RectD,SizeD,InsetsD,OrientedRectangle) to layout classes (YPoint,YRectangle,YDimension,YInsets,YOrientedRectangle) and vice versa. -
Added convenience methods for easy conversion between yFiles geometry classes and Java geometry
classes:
IPoint#toPoint2DandPointD#fromPoint2D.IRectangle#toRectangle2DandRectD#fromRectangle2D.
-
HandleInputModenow clears theAffectedItemsafter theCanceledevent has been raised instead of before. -
DefaultEdgePathCropper's methodscropEdgePathandcropEdgePathAtArroware no longer final. -
The viewport animation of the
LayoutExecutorclass considers now the value of theLimitingFitContentZoomEnabledproperty of the correspondingGraphComponent. -
NodeStylePortStyleAdapterandAbstractJComponentPortStylenow have anOffsetproperty that allows to shift the port visualization so that it no longer is centered over the port. -
The
GraphModelManagerclass has new factory methods for creating theItemModelManagerof each item group. -
The
GraphModelManager#getModelItemmethod now always returns theIModelItemfor anICanvasObjectretrieved for it viagetMainCanvasObject. Previously this only worked in all cases for theICanvasObjectretrieved viagetCanvasObject. - Mouse move and drag events now correctly report the changed modifier keys.
- Reduced number of cases where a new label was created by interactive editing instead of editing an existing one.
-
The methods
addLabel,createLabelandeditLabelofGraphEditorInputModeandTableEditorInputModethat are used to start the respective interactive label editing gesture programmatically return now aFuturewith the edited or newly created label as result. -
GraphEditorInputModeprovides new protected methodscreateLabelCoreandeditLabelCoreto allow for overriding the default implementations. -
GraphEditorInputModeprovides aTextEditorInputModeConfiguratorto allow for configuring theTextEditorInputModebefore each label editing. -
The
GraphEditorInputMode#DeletedItemevent provides now context information about the state before the item has been deleted. For example, if a label has been deleted you now can get its old owner. -
The method
GraphEditorInputMode#onDeletedItemis no longer final. -
Added the
GraphClipboard#getIdmethod to facilitate retrieving the original item from which an item to be pasted has been copied from. -
The new property
GraphClipboard#ClipboardContextprovides access to the currentIGraphClipboardContextduring a clipboard operation. -
The new property
CreateEdgeInputMode#ShowingTargetHighlightEnabledspecifies whether to enable or disable highlighting of potential targets for edge creation. Also, the methodupdateTargetHighlighthas been added to allow for further customization of the highlight. -
NavigationInputMode: Added a propertyScrollingToSelectionEnabledthat controls whether a node that is focused or selected with a keyboard gesture is automatically scrolled into the viewport if necessary. -
The new properties
PortRelocationHandle#ShowingTargetHighlightEnabledandPortRelocationHandleProvider#ShowingTargetHighlightEnabledspecify whether to enable or disable highlighting of potential targets for edge creation. Also, the methodupdateHighlighthas been added to thePortRelocationHandleclass to allow for further customization of the highlight. -
The new properties
PortRelocationHandle#ShowingPortCandidatesEnabledandPortRelocationHandleProvider#ShowingPortCandidatesEnabledspecify whether to enable or disable showing port candidates during edge relocation. -
The new
PortStyleDecorationInstallerclass allows the use of anIPortStyleto render the selection, highlight, or focus indicator of ports. -
The properties
RectangleIndicatorInstaller#TemplateandOrientedRectangleIndicatorInstaller#Templatenow return always the value that has been set by client code and are not modified by internal code anymore. - Snaplines are now infinitely long by default.
-
The performance of
EdgePathLabelModel#getGeometryandEdgeSegmentLabelModel#getGeometryhas been strongly increased. -
The
GraphMLIOHandlerclass now supports reading and writing arbitrary objects at graph level. -
GraphML deserialization now supports the symbolic names "Zero" and "Infinite" for reading
SizeDvalues. -
GraphML deserialization now supports the symbolic name "Infinite" for reading
RectDvalues. -
GraphML deserialization now supports the symbolic name "Origin" for reading
PointDvalues. -
The type of property
GraphBuilder#EdgeLabelProviderwas generalized fromFunction<TEdge,String>toFunction<TEdge,Object>.
Bugfixes
Algorithms
-
The
Paths#findAllChainsmethod now correctly calculates the chains of input graphs with cycles. -
The
GraphChecker#isMultipleEdgeFreemethod now returns the correct result for input graphs with self-loops. -
The
Bfs#getLayersmethod now correctly stores the layer indices in the specifiedINodeMap. Previously, the maximum layer index stored in the map exceeded the number of returned layers.
Layout
-
The
EdgeRouterclass no longer produces bad, non-orthogonal edge segments in cases where a selected edge is grouped together with an un-selected edge and where both edges have strongPortConstraintsat their common source/target node. -
The
PortPlacementStageclass no longer destroys the grouping information for the core layout algorithm. -
The
EdgeRouterclass now correctly considers strong port constraints of edges that belong to a bus structure. -
The
HierarchicLayoutclass no longer throws an exception if the component arrangement policy is set toComponentArrangementPolicy#COMPACTand bus routing is enabled (see propertyHierarchicLayoutData#Buses). -
The
OrganicLayoutclass now correctly considers input graphs where substructure handling is enabled and all nodes are located at coordinate(0,0). Previously, such inputs may have triggered anArgumentException. -
Class
EdgeRouterno longer throws an exception if all fixed edges of a bus are non orthogonal/octilinear. -
The
GenericLabelingclass no longer throws anArgumentExceptionfor some input graphs containing labeled edges with zero length. -
The
HierarchicLayoutclass no longer throws an exception if it is wrapped by an instance ofRecursiveGroupLayoutand the input graph contains layering constraints between elements of different groups. -
The
HierarchicLayoutclass now correctly considers the group insets for input graphs with nested group nodes. Previously, it sometimes produced too large insets for inner groups. -
The
HierarchicLayoutclass no longer throws anIllegalArgumentExceptionfor some rare cases in incremental layout mode. -
The
HierarchicLayoutclass now produces shorter, more direct edge routes for edges connecting at a group node and leaving on the the left/right group side. This only affects cases where the relevant group node also contains direct-content edges (seeEdgeLayoutDescriptor#DirectGroupContentEdgeRoutingEnabled). -
Self-loop segments generated by the
HierarchicLayoutclass are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments. -
The
HierarchicLayoutclass now produces less superfluous crossings if there are same-layer edges withPortConstraintsorPortCandidates. -
The
HierarchicLayoutclass now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes. -
The
HierarchicLayoutclass sometimes threw anIllegalArgumentExceptionfor input graphs that contained incremental elements in combination with groups. -
The
HierarchicLayoutclass sometimes threw anIllegalArgumentExceptionfor input graphs that contained fixed elements in combination with both swimlanes and groups. -
The
HierarchicLayoutclass now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other. -
The
HierarchicLayoutclass no longer causes non-orthogonal segments when the input contained port labels in conjunction with edge grouping. -
The
HierarchicLayoutclass now correctly considers fixed nodes with layering constraints. In previous versions there were some rare cases where such inputs caused infinite looping issues. -
The
HierarchicLayoutclass no longer produces intersections between edges and elements of a sub-component (seeHierarchicLayoutData#SubComponents). Note that this fix may sometimes cause less compact results within a layer. -
Improved the path search performance of the
EdgeRouterclass for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios. -
The
EdgeRouterclass now correctly groups edges associated with equal group IDs that have a different object ID. -
The
EdgeRouterclass now avoids unnecessary bends in cases that containPortCandidateswith fixed offsets (or strongPortConstraints) where the fixed port locations have a very similar x- or y-coordinate such that the path must consist of three segments with a single, very short middle segment. Previously, five segments in total were generated. -
A rare exception that was triggered by the
EdgeRouterclass during routing when aGridis defined on which edges need to be routed is now fixed. -
The
EdgeRouterclass now correctly handles edges with external ports. Previously, such inputs may have caused an exception. -
The
EdgeRouterclass now correctly routes direct content edges with strong port constraints at the group nodes. Previously, the algorithm sometimes produced weird routes for such edges. -
Fixed a bug in the
EdgeRouterclass that sometimes caused a non-deterministic behavior. -
Fixed two issues in the
EdgeRouterclass that resulted in the violation of aPortCandidatewith fixed offsets or a strongPortConstraint. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node). -
The
EdgeRouterclass no longer throws an exception if itsPolylineRoutingEnabledproperty is enabled and the input contains fixed, grouped edges. -
The
EdgeRouterclass now considers the correctNodeHaloassociated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments. -
The
EdgeRouterclass now correctly considers intersections between edges and labels of fixed edges if propertyEdgeLabelConsiderationEnabledis enabled. -
The
EdgeRouterclass no longer throws an exception during routing in cases where the source or target node is covered by obstacles (i.e. by other nodes or labels). -
The
EdgeRouterclass now correctly considers intermediate routing points when using the polyline routing style (EdgeRouter#PolylineRoutingEnabled). Previously, it could happen that intermediate points were not part of the final polyline edge path. -
The
EdgeRouterclass no longer throws an exception during the routing of some graphs with grouped edges. -
The
EdgeRouterclass no longer considers allPortCandidateswith multiple directions as fixedPortCandidates. -
The
EdgeRouterclass now correctly handles cases where the maximum duration is exceeded and where previously an exception was triggered. -
Fixed a
StackOverflowErrorinEdgeRouter. -
The
OrganicLayoutclass no longer throws an exception when usingCycleSubstructureStyle#CIRCULARand arranging a cycle structure where at least one cycle node is also connected to a group node outside the cycle. -
The
OrganicLayoutclass now produces deterministic results for group nodes if its propertyDeterministicModeEnabledis enabled. -
The
OrthogonalLayoutclass no longer causes an exception for some input graphs when propertyFaceMaximizationEnabledis enabled. -
The
OrthogonalLayoutclass no longer runs into an infinite loop for some input graphs that are tree structures with mixed edge directedness (see propertyOrthogonalLayout#EdgeDirectednessDpKey). Note that the problem only occurred if propertyOrthogonalLayout#TreeStyleis not set toTreeLayoutStyle#NONE. -
The
OrthogonalLayoutclass no longer throws an exception when its propertyUniformPortAssignmentEnabledis enabled and the input contains parallel edges. -
When using
RecursiveGroupLayout, the values of the propertiesComputedWidth,ComputedHeightandComputedPositionof the classesColumnDescriptorandRowDescriptorare now correctly set after the layout ifEdgeRouteris the correspondingInterEdgeRouter. -
The
CompactNodePlacerclass no longer throws an exception for input graphs with specified memento strategies (seeTreeLayoutData#CompactNodePlacerStrategyMementosorCompactNodePlacer#STRATEGY_MEMENTO_DPKEY). -
The
CompactNodePlacerclass now correctly considers the specified values of theVerticalDistanceandHorizontalDistanceproperties. -
The
CompactNodePlacerclass no longer throws an exception for some inputs with specified strategy memento information (either via propertyTreeLayoutData#CompactNodePlacerStrategyMementosor with a mapper registered with keyCompactNodePlacer#STRATEGY_MEMENTO_DPKEY). -
The
SimpleNodePlacerclass no longer produces very long horizontal edge segments for inputs where it isn't required. -
The
GenericLabelingclass now correctly places labels of direct content edges (edges that directly connect a group node with a descendant, without leaving the group) with a free edge label model. -
The
GenericLabelingclass no longer calculates wrong label profit values (AbstractLabeling#getProfit) for some edge labels. Previously, edges that had aPreferredPlacementDescriptorwere sometimes affected. -
The
GenericLabelingclass now produces valid results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor#DistanceToEdge) and at the same time multipleSideOfEdgepreferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it. -
The
GenericLabelingclass now always prefersLabelCandidateswith higher profit values over others with lower profit (seeAbstractLabeling#getProfit). Previously, this sometimes happened even though both candidates did not intersect with other elements. -
The
GenericLabelingclass does no longer assume that allLabelCandidatesassociated to a label have the same size. Previously, this caused unexpected labeling results if custom candidates with different sizes were given. -
Fixed a rare bug in the
GenericLabelingthat may have caused anIllegalArgumentExceptionfor some input graphs that contain edges with zero length segments and labels associated with a free edge label model. -
The
SeriesParallelLayoutclass now correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception. -
The
PartialLayoutclass now correctly considers the specifiedPortCandidatesduring orthogonal or octilinear routing of edges. -
The
PartialLayoutclass does no longer reduce the size of fixed group nodes if the optionPartialLayout#ResizeFixedGroupsis disabled. -
The
ComponentLayoutclass now correctly handles input graphs with user-specified components that contain nodes withnullas their component ID (see propertyComponentLayoutData#ComponentIds). Previously, such inputs may have caused an exception. -
The
PolylineLayoutStagedoes no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes). -
The
OrganicRemoveOverlapsStageno longer produces infinite loops in some rare cases. -
Fixed a bug in
YGraphAdapterthat could trigger aNullPointerExceptionwhen boolean, integer or double values were requested from registeredIMapperbut no value had been set beforehand.
Viewer
-
Fixed a bug in
GraphEditorInputModewhere changing the value ofShowHandleItemswhile handles were already displayed resulted in duplicate handles. -
Fixed a bug in
EdgePathLabelModelwhich could return an invalid geometry for parameters with a ratio < 0 and zero length edge segments. -
A bug in
CanvasComponent#fitContenthas been fixed that sometimes resulted in a short flickering. -
Mapper: Fixed default value handling for the
nullkey. -
Mapper: Ensured that mappings for the
nullkey are taking into account by methodgetEntries. -
Changed
CommandBindingAction'sactionPerformedbehavior to always pass the action's target to the associatedKeyboardInputMode#ExecuteCommandHandlerandKeyboardInputMode#CanExecuteCommandHandlerinstances instead of the action event's source. -
GeneralPath#flatten(): Fixed unexpected behavior if a curve follows after a close operation. - Zooming the viewport during interaction no longer synthesizes mouse-move events in the wrong locations.
-
Labels at folder nodes and their adjacent edges are no longer lost during GraphML deserialization
if the
DefaultFolderNodeConverter#CopyFirstLabelproperty is enabled. -
Fixed a bug in
PortRelocationHandleProviderwhere the settingsShowPortCandidatesandShowTargetHighlightwere ignored. -
Fixed a bug in
CreateEdgeInputMode#getPortOwnerwhich could return edges even ifEdgeToEdgeConnectionsAllowedwas set to false. This could result in the edge'sIPortCandidateProviderbeing queried for candidates erroneously. - Fixed a bug in the graph implementation that sometimes lead to a runtime that was quadratic in the number of nodes when creating large graphs.
- Reparenting an expanded group node into a collapsed group node no longer throws an exception.
-
Fixed an exception which could occur in
CanvasComponent's methodcompareRenderOrderand when usingGraphModelManager'sComparatorproperty. -
GraphClipboard's methodsonElementCutandonElementCopiedare no longer called for graph items which are not copied themselves but are owners of copied items. -
When an edge is duplicated using
GraphClipboardand a port is newly created during this operation, the new port now gets the old port's style and tag. -
Fixed a memory leak in the
UndoEngineclass if the tokens returned bygetTokenwere not disposed when theUndoEnginegot cleared. -
The
CreateEdgeInputModeclass now considers the value of theCanvasComponent#HitTestRadiusproperty when itsStartingOverCandidateOnlyEnabledproperty is enabled. -
The visualization of source port candidates by the
CreateEdgeInputModeclass does not flicker, anymore. -
With
SmartEdgeLabelModel, it was impossible to move a label from the left side of an edge to the right side. Instead, the label stopped at the edge. -
The
nullcheck for theGridVisualCreator#Penproperty works correctly now. -
The type
IGridConstraintProvidercannot be used in lookup methods since it has a generic type parameter. Therefore, new specific interfaces have been added for each item type (for exampleINodeGridConstraintProvider). -
The
EdgeStyleDecorationInstallerclass no longer causes an exception when used on edges that are attached to other edges. - Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
- In rare cases, saving a graph with folding to GraphML threw an exception.
Incompatible Changes
Layout
-
The
ImprovingPortAssignmentboolean property ofLayoutExecutorandLayoutGraphAdapterhas been replaced by thePortAdjustmentPolicyproperty. -
SingleItemCollection'sItemproperty has been pulled up toItemCollection. ClassSingleItemCollectionhas been removed, its usages have been replaced byItemCollection. -
The property
HierarchicLayoutData#AlternativeEdgePathhas been renamed toHierarchicLayoutData#AlternativeEdgePaths. -
The property
HierarchicLayoutData#AlternativeEdgePathsnow expectsIterable<IPoint>instead ofYPointPathas mapped values. -
The property
HierarchicLayoutData#AlternativeGroupBoundsnow expectsIRectangleinstead ofYRectangleas mapped values. -
The type of the properties
BalloonLayoutData#TreeRootandTreeLayoutData#TreeRoothas been changed toSingleItem<INode>. -
The property
TreeLayoutData#LeftRightPlacersLeftNodeshas been renamed toTreeLayoutData#LeftRightNodePlacerLeftNodes. -
The property
TreeLayoutData#DelegatingNodePlacersPrimaryNodeshas been renamed toTreeLayoutData#DelegatingNodePlacerPrimaryNodes. -
The properties
SourceGroupsandTargetGroupsofRadialLayoutDatahave been removed since edge grouping is not supported by theRadialLayoutclass. -
The properties
RowsandColumnsof classPartitionGridare now of typeIEnumerable<RowDescriptor>andIEnumerable<ColumnDescriptor>instead of an un-typedYList. -
The
PenaltySettings#InvalidEdgeGroupingPenaltyproperty has been removed. If edge groups are defined, theEdgeRouterclass now always considers them. Therefore, this setting no longer applies. -
The following changes regarding the expert API related to the
EdgeRouterclass were made:- The first parameter of the constructors in class
AbstractSegmentInfois now of typeObjectinstead ofEdge. The provided type should be eitherPathRequestfor affected edges orEdgefor non-affected, fixed ones. Furthermore, the propertyAbstractSegmentInfo#Edgehas been removed as the info is not necessarily associated with an edge anymore. - Simialrly, the first parameter of the constructor in class
EdgeCellInfois now of typeObjectinstead ofEdge. The provided type should be eitherPathRequestfor affected edges orEdgefor non-affected, fixed ones. - The constructor of class
EdgeInfonow additionally takes a parameter of typeEdge. - The parameter of type
Edgefrom the constructor ofPathas well as the respective property were removed. A path is now not necessarily associated with an edge but only with the newly introducedPathRequest. - The method
PathSearchResult#getEdgeInfo(Path)was removed.
- The first parameter of the constructors in class
Viewer
-
The property
CanvasComponent#Editableand the associated eventeditableChangedare not necessary and have been removed. -
IMapperRegistry#createDelegateMapperhas been renamed tocreateFunctionMapper. -
The property
ItemMapping#Delegatehas been renamed toFunction. -
The property
ContextItemMapping#ContextDelegatehas been renamed toContextBiFunction. -
The property
ItemCollection#Delegatehas been renamed toPredicate. -
Changed
CommandBindingAction'sactionPerformedbehavior to always pass the action's target to the associatedKeyboardInputMode#ExecuteCommandHandlerandKeyboardInputMode#CanExecuteCommandHandlerinstances instead of the action event's source. -
GraphClipboard's methodsonElementCutandonElementCopiedare no longer called for graph items which are not copied themselves but are owners of copied items. As a consequence, the methodscutandcopyof theIClipboardHelperimplementations of these elements are no longer called, either. -
The classes
GeneralPathandGeneralPath.PathCursorare now final.
Changes of Default Behavior
Layout
-
Renamed property
PartialLayout#ResizeFixedGroupstoFixedGroupResizingEnabled. -
The
HierarchicLayoutclass now uses a higher crossing cost for group node borders. To specify custom values, use the propertyHierarchicLayoutData#GroupBorderCrossingCosts. -
The
GroupingSupportclass no longer throws anIllegalArgumentExceptionif there is a node without associated ID (seeGroupingKeys#NODE_ID_DPKEY). Instead the class uses the node itself as ID. -
The
SimplexNodePlacer#BarycenterModeproperty is now enabled by default. Thus, theHierarchicLayoutclass with default settings now produces different (usually more symmetric) layouts. -
The default value of the property
GridNodePlacer#RootAlignmentwas changed toGridNodePlacer#BUS_ALIGNEDfromAbstractRotatableNodePlacer#RootAlignment#TRAILING. -
If the master edge is clipped on the bounds of its source or target, the
ParallelEdgeRouterclass now always clips the associated parallel edges on that bounds, too.
Viewer
-
The following places now throw a
ConcurrentModificationExceptioninstead of anIllegalStateException:-
FilteredGraphWrapper: Changing graph items while iterating those using theIListEnumerablereturned byFilteredGraphWrapper#getNodes,FilteredGraphWrapper#getEdges,FilteredGraphWrapper#getLabelsorFilteredGraphWrapper#getPorts. -
FilteredGraphWrapper: Changing the edges at a port or node while iterating those edges using theIListEnumerablereturned byedgesAt. -
GeneralPath: Changing the path's structure while iterating the path using aPathCursorreturned byGeneralPath#createCursor.
-
-
The default tooltip in the class
ToolTipQueryEventArgsis now set tonull. Thus, the tooltip is not displayed when the event is handled without setting the tooltip content. -
The properties
RectangleIndicatorInstaller#TemplateandOrientedRectangleIndicatorInstaller#Templatenow return always the value that has been set by client code and are not modified by internal code anymore.
yFiles for Java (Swing) 3.2.0.3
Bugfixes
Viewer
- With
SmartEdgeLabelModel, it was impossible to move a label from the left side of an edge to the right side. Instead, the label stopped at the edge. - Fixed an exception which could occur in
CanvasComponent's method#compareRenderOrderand when usingGraphModelManager's#Comparatorproperty. - Parsing a GraphML file with a folding edge state with a label without a preferred size no longer throws an exception.
- In rare cases, saving a graph with folding to GraphML threw an exception.
- The
NodeAlignmentPolicyvaluesCENTER_LEFT,CENTER_RIGHT,TOP_CENTER,BOTTOM_CENTER, andBOTTOM_LEFTnow work correctly. - Reparenting an expanded group node into a collapsed group node no longer throws an exception.
DefaultLabelStyle: Fixed insets calculation.
Layout
- Fixed a potential exception in
LayoutExecutorwhich could occur when a layout is applied to a graph which contains table nodes which are not group nodes.
yFiles for Java (Swing) 3.2.0.2
New Demos
- Added
RotatableNodesDemothat shows how support for rotated node visualizations can be implemented on top of the yFiles library. - Added
PartitionGridDemothat shows how aPartitionGridcan be used in layout calculations to restrict the node positions to grid cells. - Added
RenderingOrderDemothat shows the effect of different render policies on the z-order of nodes, edges, labels and ports. - Added
EdgeToEdgeDemothat demonstrates the use of edge-to-edge connections.
Improvements
Layout
- Slightly improved the performance of the
GenericLabelingalgorithm and improved the quality of the label placements for some cases.
Bugfixes
View
- Fixed null check for
GridVisualCreator#Penproperty. - Fixed an issue where
EdgeStyleDecorationInstallerwould cause an exception when used on edges that connect to other edges. - Fixed a bug, which might occur in very rare cases in the undo/redo processing of several consecutive reparent actions.
- Fixed a bug in the graph implementation that sometimes led to a runtime that was quadratic in the number of nodes when creating large graphs.
CreateEdgeInputMode: Fixed a bug that caused the visualization of source port candidates to flicker.- The
EdgeStyleDecorationsInstallerclass now properly displays decorations for edges between group nodes and their descendants when displayed in view coordinates. CollapsibleNodeStyleDecorator: Although the wrapped style has its ownIClickListenerdefined in its lookup, it was not always used by theCollapsibleNodeStyleDecorator.- Fixed a bug in the
UndoEnginethat could lead to memory leaks if the tokens returned bygetTokenwere not disposed of when theUndoEnginegot cleared. - Fixed a bug that rendered labels or ports neither in a separate layer nor at their owner when
exactly one of
LabelLayerPolicy#AT_OWNERorPortLayerPolicy#AT_OWNERwas used. - Fixed a bug in
GridVisualCreatorthat rendered the grid at the wrong location when the viewport contained negative coordinates. CollapsibleNodeStyleDecorator:IsHitrespects buttons outside the node bounds.
Algorithms
- Method
Paths#findAllChainsnow correctly calculates the chains of input graphs with cycles.
Layout
- Fixed a bug in class
EdgeRouterthat sometimes caused a non-deterministic behavior. - The
PolylineLayoutStagedoes no longer generate overlaps between sloped, polyline segments created by the stage and unrelated other obstacles (e.g. nodes). - Fixed a rare exception that was triggered by the
EdgeRouterclass during routing in cases where the input contained grouped edges. - The
GenericLabelingclass now produces better results for edge labels that have a preferred distance to the edge (PreferredPlacementDescriptor#DistanceToEdge) and at the same time multipleSideOfEdgepreferences (e.g. left of edge and on the edge). Previously, the algorithm sometimes violated the preferred distance even though it would have been possible to keep it. - Fixed two issues that induced the violation of a
PortCandidatewith fixed offsets (or a strongPortConstraint) by theEdgeRouterclass. The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from a group to a child node). - The
EdgeRouterclass no longer throws an exception for inputs (rare) containing fixed, grouped edges and whenEdgeRouter#PolylineRoutingEnabledis enabled. - The
EdgeRouternow considers the correctNodeHaloassociated with the target node when handling the minimum last segment length setting. Previously it incorrectly considered the halo of the source node which could lead to unnecessarily long or too short last segments. - Class
EdgeRouternow correctly considers intersections between edges and labels of fixed edges if propertyEdgeLabelConsiderationEnabledis enabled. - Fixed a very rare exception that was triggered by the
EdgeRouterclass during routing in cases where the source/target node is covered by obstacles (i.e. other nodes, labels). - The
EdgeRouterclass now correctly considers intermediate routing points when using the polyline routing style (EdgeRouter#PolylineRoutingEnabled). Previously, it could happen that intermediate points were not part of the final polyline edge path. - Class
PartialLayoutnow correctly considers the specifiedPortCandidatesduring the orthogonal/octilinear routing of edges. - Class
EdgeRouterno longer considers allPortCandidateswith multiple directions as fixedPortCandidates. - The
OrthogonalLayoutclass no longer throws an exception when propertyOrthogonalLayout#UniformPortAssignmentEnabledis enabled and the input contains parallel edges. - The
CompactNodePlacerclass now correctly considers the specified values of theVerticalDistanceandHorizontalDistanceproperties. - Class
OrganicRemoveOverlapsStageno longer produces infinite loops for some rare cases. - The
CompactNodePlacerclass no longer throws an exception for some inputs with specified strategy memento information (either via propertyTreeLayoutData#CompactNodePlacerStrategyMementosor with a mapper registered with keyCompactNodePlacer#STRATEGY_MEMENTO_DPKEY). - Self-loop segments generated by the
HierarchicLayoutclass are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments. - When using
RecursiveGroupLayout, the values of the propertiesComputedWidth,ComputedHeightandComputedPositionof the classesColumnDescriptorandRowDescriptorare now correctly set after the layout ifEdgeRouteris the correspondingInterEdgeRouter. - The
HierarchicLayoutclass now produces less superfluous crossings if there are same-layer edges withPortConstraintsorPortCandidates. - Improved the path search performance of the
EdgeRouterclass for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios. - The
HierarchicLayoutclass now correctly handles port labels with zero height/width. Previously, such labels may have caused very large distances between some nodes. - The
HierarchicLayoutclass sometimes threw anArgumentExceptionfor input graphs that contained incremental elements in combination with groups. - The
HierarchicLayoutclass now prevents intersections between labels and the horizontal grid lines of aPartitionGrid. - The
EdgeRouterclass no longer throws an exception for some inputs containing edges with intermediate routing points. - The
HierarchicLayoutclass now places sloped segments of grouped octilinear edges such that they are perfectly overlapping each other. Previously, it could happen that segments were slightly displaced with respect to each other. - Class
SeriesParallelLayoutnow correctly handles input graphs with groups that only contain disconnected nodes. Previously, such inputs caused an exception. - Fixed a bug in the
HierarchicLayoutthat could cause non-orthogonal segments when the input contained port labels in conjunction with edge grouping. - The
OrganicLayoutclass now produces deterministic results for group nodes (if propertyDeterministicModeEnabledis enabled). - Fixed a
StackOverflowErrorinEdgeRouter.
yFiles for Java (Swing) 3.2.0.1
Improvements
Styles
-
PolylineEdgeStyleandArcEdgeStylenow consider property changes of their source and target arrows. Previously the source or target arrow properties had to be changed to instantly see the effect.
Layout
-
OrganicLayoutData: The new propertiesSourceGroupIdsandTargetGroupIdscan be used to group edges when some preconditions are met.
Bugfixes
Viewer
-
Scrolling with
CanvasComponent#ScrollCommandAnimationEnabledenabled no longer changes the zoom level. - Fixed a bug in
RectangleIndicatorInstaller,OrientedRectangleIndicatorInstaller,HandleInputModeand inSnapResultProviderandSnapResultimplementations, that has caused aNullPointerExceptionwhen the corresponding template is null. DefaultLabelStyleRenderer: Fixed vanishing text when using a shared renderer instance between labels with non-empty text and label with empty text.
Input
PortDropInputMode: The labels of dragged ports were not displayed correctly.
Graph Model
- Fixed an exception which might occur upon user interactions in a folded graph which contains labels at ports.
- Fixed a bug which might have caused an edge in a folded view to lose its bends and labels after repeatedly reversing the edge.
Layout
-
HierarchicLayout: Fixed a problem that sometimes caused too long straight-line same-layer edges. Note that the additional length was equal to the value ofHierarchicLayout#NodeToEdgeDistance -
HierarchicLayout: Fixed endless loop issue causing aStackOverflowErrorif a sub-component with a nested layout algorithm that again applied an instance ofHierarchicLayoutwas defined. -
HierarchicLayout: Fixed possibleNullPointerExceptionfor input graphs with source/target port labels (seeLabelPlacements#AT_SOURCE_PORTandLabelPlacements.AT_TARGET_PORT) and with a subset of nodes associated with halos (seeNodeHalo). -
HierarchicLayout: Fixed a bug that sometimes caused a wrong placement of source/target edge labels when integrated edge labeling was enabled and if there were either critical edges (seeHierarchicLayout.CRITICAL_EDGE_DPKEY) or propertySimplexNodePlacer.EdgeStraighteningEnabledwas enabled. -
HierarchicLayoutandSimplexNodePlacer: Fixed a very rareIllegalArgumentExceptionthat was caused by some input graphs that contain both swimlanes and groups as well as fixed elements. -
HierarchicLayout: Fixed bug that could cause the violation of fixed port candidates if there were critical edges (seeHierarchicLayout.CRITICAL_EDGE_DPKEY) and edges connecting to group nodes. -
OrganicLayout: Fixed bug that caused that movable nodes kept their initial location if the scope is set toSUBSETorMAINLY_SUBSETand if there are output restrictions (seeOrganicLayout#OutputRestriction). -
TreeLayout: Fixed bug that caused less compact results when using theCompactNodePlacer. -
TreeLayout: Fixed bug that caused that the layout algorithm sometimes did not pass on exceptions that occurred during the layout calculation but caught them without proper handling. -
CompactNodePlacer: FixedNullPointerExceptionthat was triggered when the tree root was marked as assistant node, seeAssistantNodePlacer#ASSISTANT_DPKEY. -
CompactNodePlacer: FixedIllegalStateExceptionthat could occur for input graphs that contain assistant nodes (seeAssistantNodePlacer#ASSISTANT_DPKEY) and given placement strategies (seeCompactNodePlacer#STRATEGY_MEMENTO_DPKEY). -
OrthogonalLayout: FixedNullPointerExceptionthat occurred when the subtree layout styleTreeLayoutStyle#INTEGRATEDwas specified, the subtree orientation was fixed and the graph was almost a tree graph with the exception that the root node contained additional self-loop edges. -
SeriesParallelLayout: Fixed a rare bug that triggered aNullPointerExceptionwhen the input location of a node was set to a very large value (e.g. largest possible floating-point value). This applies if the algorithm is not in from-sketch mode. For the from-sketch mode, an exception can still occur - this case is considered to be bad input. -
RadialLayout: FixedNullPointerExceptionthat was triggered when there was aDataProviderregistered with the graph with keyHierarchicalLayout.SUB_COMPONENT_ID_DPKEY. -
ComponentLayout: Fixed anIllegalArgumentExceptionthat was triggered for some input graphs with user-defined components (seeCOMPONENT_ID_DPKEY) where at least one node hadnullas its component id. -
RecursiveGroupLayout: Fixed a bug that caused violation of PortConstraints or PortCandidates for self-loops where both endpoints were restricted to the same node side. -
Polyline.EdgeRouter: Fixed a rareNullPointerExceptionthat was triggered for some input graphs when the maximum duration was exceeded. -
Polyline.EdgeRouter: Fixed bug that could cause unnecessary bends for edges that need to cross group node borders. -
Polyline.EdgeRouter: Fixed an issue that caused edge-to-edge distance violations (for segments directly connecting at a node) even if a cheaper route that e.g., introduces a bend - which costs less by default - was available. -
PolylineLayoutStage: Fixed a bug that caused collinear bends to be removed from fixed edges. Now, such fixed edges are not changed anymore. -
GenericLabeling: Fixed a very rareIllegalArgumentExceptionthat was caused by some input graphs that contain edges with zero length segments and labels associated with a free edge label model (i.e.,SmartEdgeLabelModelorFreeEdgeLabelModel).
yFiles for Java (Swing) 3.2
Major New Features
- The new
LabelDropInputModeandPortDropInputModeclasses implement drag and drop for labels and ports, respectively. The API of these classes is similar toNodeDropInputModefor nodes. - Labels can now be added to ports and the new label models
FreePortLabelModelandInsideOutsideLabelModelcan be used to place such labels. On the technical side,IPortnow extends theILabelOwnerinterface and the enum constantGraphItemTypes#PORT_LABELwas added. - The new
LassoSelectionInputModeselects 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#LassoSelectionInputModeandGraphViewerInputMode#LassoSelectionInputModeproperties and a corresponding factory method.LassoSelectionInputModeis disabled per default. - The new
GraphEditorInputMode#lassoSelectandGraphViewerInputMode#lassoSelectmethods programmatically selects all items in the providedGeneralPath. - The new
ILassoTestableinterface specifies whether the item is considered to be inside the lasso path. This is analog to theIMarqueeTestableinterface for marquee selection. - Any model item can be decorated with an instance of
ILassoTestableor provide one in its lookup. For this, theNode/Edge/Port/Label/BendDecoratorclasses got the newLassoTestableDecoratorproperty for decorating an item with a customILassoTestable. - The new
#isInPathmethod ofAbstractNode/Edge/Port/LabelStylecan be overridden to customize the lasso testing behavior.
- Added the
- 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
LabelLayerPolicyandPortLayerPolicyofGraphModelManagertoLabelLayerPolicy#AT_OWNERandPortLayerPolicy#AT_OWNER.
New Features
- The new
GraphBuilder,TreeBuilder, andAdjacentNodesGraphBuilderclasses can be used to build a graph from custom data. - The nesting options of
GraphModelManagerfor the visualizations of nodes and edges have been improved and clearified.- The properties
HierarchicNodeNestingEnabledandHierarchicEdgeNestingEnabledare superseded by the newHierarchicNestingPolicyproperty. This property has the enum typeHierarchicNestingPolicy. - The new option
HierarchicNestingPolicy#GROUP_NODESconfiguresGraphModelManagerto visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth.
- The properties
- The mouse wheel behavior of the overview can now be switched between
ZOOM,SCROLL, andNONE, and optionally, the action can be performed only when the control is focused. This can be configured with the newOverviewInputMode#MouseWheelBehaviorproperty. TableEditorInputMode: Double clicking a stripe or stripe label now edits the label in the same way as for other graph items.-
RectDandInsetsD: Added methods toreducethe size of anRectDandInsetsDinstance, respectively. - The new static methods
IPositionHandler#combinecombine multiple position handler instances into a single instance. - Added the events
ElementsCopied,ElementsCut, andElementsPastedtoGraphEditorInputMode, and the eventElementsCopiedtoGraphViewerInputMode. - The new static
IAnimation#createSequentialAnimationmethod 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#getDecoratorwith theRowDecorator,ColumnDecoratorandStripeLabelDecoratorproperties. - If the new
CanvasComponent#QuantizingInputCoordinatesEnabledproperty 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 propertyMaximumDuration, which enables to control the preferred time limit of the layout algorithms. -
OrthogonalLayout: Added propertyUniformPortAssignmentEnabledthat allows to obtain results with a more uniform port assignment. -
Added convenience layout stage
TemporaryGroupNodesInsertionStagethat 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 ofRecursiveGroupLayoutwithout 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
TemporaryGroupNodeInsertionDataconfiguration class for the newTemporaryGroupNodeInsertionStagelayout stage. -
TreeLayout: Added node placerCompactNodePlacerthat 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 propertyCompactNodePlacer#PreferredAspectRatio. - The new
TreeLayoutData#CompactNodePlacerStrategyMementosproperty can be used to to maintain similar layout styles over subsequent runs of compact tree layout. -
Added the new layout algorithm
TabularLayoutthat 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
TabularLayoutDataconfiguration class for the newTabularLayoutalgorithm. -
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 propertiesOrthogonalLayout#TreeStyle,OrthogonalLayout#ChainStyleandOrthogonalLayout#CycleStyle. In addition to the style, the new feature offers more settings, like, for example, the desired tree layout orientation (seeOrthogonalLayout#TreeOrientation). The orthogonal layout styleLayoutStyle#NORMAL_TREEhas been removed as the new tree style feature allows more settings for the arrangement of tree-like graphs. -
Added the new layout algorithm
TreeMapLayoutthat 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
TreeMapLayoutDataconfiguration class for the newTreeMapLayoutalgorithm. -
Polyline.EdgeRouternow supports routing through user-specified intermediate points. All specified points will lie on the edge route in the given order. See new propertyEdgeLayoutDescriptor#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 propertyEdgeLayoutDescriptor#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 keyHierarchicLayout.SUB_COMPONENT_ID_DPKEYor with the newHierarchicLayoutData#SubComponentsproperty . -
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
NaNvalue. Previously, this resulted not in an immediate error but broke subsequent code like an automatic layout or a content rectangle calculation. - The performance of
FilteredGraphWrapperhas 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 usingFilteredGraphWrapper. - For
ITable's default methodsfindRow,findColumn,findStripeandfindStripes, overloads without thePredicateparameter have been added. -
DefaultGraphhas new factory methods to customize undo unit creation. -
DefaultGraphnow fills the undo engine and triggers events in a consistent manner for all graph element factory methods. - Many label model
createParametermethods now have overloads without those parameters that are not needed every time. InteriorStretchLabelModel: Added new parametersCENTER_HORIZONTALandCENTER_VERTICALfor horizontal or vertical centered one-line labels.- The factory method
IMapper#fromMaphas been added which returns an implementation ofIMapperthat delegates to ajava.util.Map.
View
- The new method
GraphModelManager#getMainCanvasObjectreturns the canvas object that should be used when changing the visibility or z-order of a model item. - Assigning a new graph instance to
GraphOverviewComponentnow keeps configuration changes made to the overview'sGraphVisualCreatorinstance. - 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#LimitingFitContentZoomEnabledproperty which controls whether the maximum zoom level for theCanvasComponent#fitContentmethod as well as theFitContentcommand is restricted to1or the value of theMaximumZoomproperty. - Akin to the two
CanvasComponent#zoomTomethods, there are now twoCanvasComponent#zoomToAnimatedmethods that animate the viewport change. ICanvasObjectGroup#addChild: A default method without theICanvasObjectDescriptorparameter was added as overload which uses theICanvasObjectDescriptor#ALWAYS_DIRTY_INSTANCE.-
GraphModelManagernow avoids unnecessary re-installation of items if they keep theirICanvasObjectGroup. 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#createLayoutAnimationhas been added which delegates toLayoutUtilities#createLayoutAnimationas the method is easier to find inIAnimation. - The factory methods
IAnimation#createParallelAnimationnow takes covariant Iterables, i.e.Iterable<T extends IAnimation>instead ofIterable<IAnimation>. - Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time and we fixed several problems that caused erratic behavior.
- The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. Therefore, the visualizations no longer extend into the node bounds.
Input
- Don't run unneccessary hit tests when a mode is canceled.
- The
INodeparameter of theNavigationInputMode#enterGroupmethod is now optional. If it isnullthe whole graph will be revealed. - The
CanvasComponent#createInputModeContextmethod is now public instead of protected. -
ItemClickedEventArgsnow extendsClickEventArgsand therefore provides additional information like theInputModeContext. - The new overload of the
CreateEdgeInputMode#doStartEdgeCreationmethod taking aninitialTargetLocationparameter can be used to define the initial location that shall be used to find a target node. -
CreateEdgeInputModenow removes coinciding bends if orthogonal edge creation is enabled. -
CreateEdgeInputModeprovides access to a dummy target node which is used during the interactive edge creation. This allows making the node visible during creation by setting a style and size. -
CreateEdgeInputModenow supports edges ending without a valid target port candidate. This allows for creating new target nodes together with newly created edges. - The new property
CreateEdgeInputMode#PrematureEndHitTestableallows for considering any location as valid target point for an edge. - The new
CreateEdgeInputMode#DragCursorproperty specifies the cursor that is used during edge creation when no bend may be created at the current location. -
CreateEdgeInputModenow supports showing port candidates at potential sources for edge creation, too. -
CreateEdgeInputModenow 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#StartingOverCandidateOnlyEnabledproperty can be used to restrict the start of an edge creation gesture to directly hovered port candidates. - The new protected
CreateEdgeInputMode#getSourcePortCandidatesmethod makes determining source port candidates more flexible. -
GraphEditorInputModeandTableEditorInputMode: MethodeditLabelnow also returns aFuture, similar toaddLabelandcreateLabel. -
ClickInputModenow dispatches the clicked events in the same order asGraphEditorInputModeandGraphViewerInputMode, i.e. the more specific eventsLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClickedare now dispatched beforeClickedandDoubleClicked. Hence,ClickedandDoubleClickedwill only be triggered if the event wasn't handled before. -
TableEditorInputModenow handles clicks similar toGraphEditorInputMode:- New
ItemClicked,ItemLeftClicked,ItemRightClicked,ItemDoubleClicked,ItemLeftDoubleClicked,ItemRightDoubleClickedevents are raised. - If an event is handled, its default behavior is prevented.
- The new properties
ClickableItemsandClickableRegionsdetermine for which items and regions a click event will be raised.
- New
- The properties
MaximumSnapDistance,ShowingHitPortOwnerCandidatesOnlyEnabledandVisualizationhave been added toPortRelocationHandleProviderand are applied to eachPortRelocationHandlecreated by this provider. - The default value of
DefaultPortCandidate#LocationParameteris nowFreeNodePortLocationModel#NODE_CENTER_ANCHOREDfor nodes andBendAnchoredPortLocationModel#FIRST_BENDfor 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
MoveInputModefor unselected nodes now moves the bends of adjacent self-loops, too. - Added overridable methods to
PortRelocationHandleto allow customization of the port candidates. - The new
TextEditorInputMode#TextAreaPlacementPolicyproperty provides finer control of what happens when theTextAreais (partially) outside of the viewport. - The new
TextEditorInputMode#TextAreaPaddingproperty controls the padding between theTextAreaand the border of the canvas. - The
CanvasComponent#Mouse2DClickedevent 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#Visualizationproperty 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 propertyVisualizationallows 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:
-
CreateEdgeInputModenow releases the mutex before dispatching theEdgeCreatedevent. -
MoveInputModenow releases the mutex before dispatching theDragFinishedevent. -
ResizeStripeInputModenow releases the mutex before dispatching theDragFinishedevent.
-
- The new methods
findNextItemandfindNearestItemofNavigationInputModecan be used to configure the determination of the "next" item. - The type parameter
Tof classItemDropInputMode<T> is no longer restricted toIModelItem. - Overloads of the methods
GraphCopier#copyandGraphClipboard#duplicatewithout theIElementCopiedCallbackparameter have been added. - The new
GraphEditorInputMode#MoveUnselectedInputModeproperty provides a child input mode for moving unselected items. It supersedes the previous#createMoveUnselectedInputModemethod. This input mode is disabled by default. - The static constants
SELECTED_MOVABLES_POSITION_HANDLERandSELECTED_MOVABLES_HIT_TESTABLEhave been added toGraphEditorInputMode. These are used as defaultPositionHandlerandHitTestableproperties ofGraphEditorInputMode#MoveInputModeand can be reused for other input modes.
Layout
-
HierarchicLayout: Reduced required memory for graphs with sequence constraints. -
Polyline.EdgeRouter: Improved routing quality for edges between group nodes and their descendants in the case that the routing is aborted viaAbortHandleror 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, seeHierarchicLayout#SUB_COMPONENT_ID_DPKEYorHierarchicLayoutData#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 (seeBusDescriptor#isFixed) or transforms them into orthogonal edges if they are octilinear. In previous versions, the layout algorithm simply throws anIllegalArgumentExceptionin such cases. -
OrthogonalLayout: Improved compactness of the layout results. -
OrthogonalLayout: Improved result of the perceived bends optimization (seeOrthogonalLayout#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#CoreLayoutis either an instance of classTreeLayoutorClassicTreeLayout. Furthermore, propertyMultiPageLayout#AdditionalParentCountallows 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#ProxyReferenceNodeCreationEnabledthat allows for disabling the creation of proxy reference nodes as well as property#MultipleComponentsOnSinglePagePlacementEnabledthat allows to prevent that elements of different connected components are placed on the same page. -
PortPlacementStagenow 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, seePortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEYandPortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY. -
TreeComponentLayout: Added propertyUndirectedTreeConsiderationEnabledthat 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, seeOrthogonalLayout#PerceivedBendsOptimizationEnabled. -
HierarchicLayout: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers. -
Added new stage
PlaceNodesAtBarycenterStagethat places a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these node are hidden. -
DefaultNodePlacerandSimpleNodePlacernow 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 methodDefaultNodePlacer#MinimumChannelSegmentDistanceandSimpleNodePlacer#MinimumChannelSegmentDistancerespectively. -
ClassicTreeLayoutnow allows for specifying a minimum vertical distance for the horizontal edge segments of the bus, seeClassicTreeLayout#MinimumBusSegmentDistance. -
Major performance improvement for
Polyline.EdgeRouterand 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.EdgeRouterthat affect the path search phase as well as the segment location assignment phase. - The new
TreeLayoutData#CriticalEdgePrioritiesproperty can be used to specify critical edges. - The new
LayoutExecutor#createLayoutGraphAdaptercallback method makes it possible to configure theLayoutGraphAdapterthat is used for the layout calculation. -
SmartEdgeLabelModelnow is properly handled by labeling algorithms, resulting in better label placements. - The new
ImprovingPortAssignmentEnabledproperty ofLayoutExecutorandLayoutGraphAdapterenablesPortCalculatorto improve the port assignment. - The combination of
PartitionGridDataandTableLayoutConfiguratorhas been improved:-
PartitionGridDatanow reuses thePartitionGridcreated by theTableLayoutConfigurator. - Several methods have been added to
TableLayoutConfiguratorwhich provide access to thePartitionCellIdassignment of the configurator as well as the mappings betweenIRow/IColumnandRowDescriptor/ColumnDescriptor.
-
- The new properties
LayerConstraintsandSequenceConstraintsofHierarchicLayoutDatacan be used to configure layer and sequence constraints for theHierarchicLayout. These supersede the previousLayerConstraintFactoryandSequenceConstraintFactoryproperties. - The property
ItemMapping#Maphas been added that allows you to use ajava.util.Mapfor the mapping from items to values.
Demos
- A new
LargeGraphsDemohas been added that shows some strategies how to keep a smoothUIwhen large graphs shall be visualized. - The new
GraphBuilderDemoandInteractiveNodesGraphBuilderDemohave been added that demonstrate basic usage of yFiles' newGraphBuilderclasses. - A new
CustomPortModelDemohas been added that shows how to create and use a customIPortLocationModel.
Further improvements
- The
PointD#toMutablePointandRectD#toMutableRectanglemethods now return aMutablePointinstead ofIMutablePointand aMutableRectangleinstead of aIMutableRectangle, respectively. - The new method
GeneralPath#intersects(GeneralPath)determines whether the path intersects with anotherGeneralPath. - The
GeneralPath#createSmoothedPathmethod 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
IgnoreXamlDeserializationErrorsenabled, invalid property content is now skipped instead of discarding the whole object with such content. - Added a
removemethod toNodeDecorator,LabelDecorator,EdgeDecorator,PortDecorator, andBendDecoratorfor easy removal of decorations. -
PolylineEdgeStylerenders better looking paths for self loop edges whose ports are near the node border. - The performance of the
DefaultLabelStylehas been improved. Using anotherVisualCachingPolicythenVisualCachingPolicy#Nevernow also speeds up theDefaultLabelStyle. - The class
CanvasResourceBundlehas been added which can be used to replace the default command binding key strokes and command names viaResourceBundles. - The new class
LicenseConfighas been added whose staticINSTANCEcan be optionally used to configure the license resolving:- If the content of the license file is set as
LicenseStringproperty, it is used directly instead of trying to load a license file. - Otherwise if the
LicenseClassLoaderproperty is set, thisClassLoaderis used to load the license file.
- If the content of the license file is set as
- The
PlatformClassloaderintroduced withJDK 9is now recognized per default when writing GraphML. ForJDKclasses ofJDK 9that are no longer known to the bootstrap classloader but only to the platform classloader no explicitXamlNamespaceMappinghas to be added toGraphMLIOHandler.
Bugfixes
Graph Model
- The
SmartEdgeLabelModel#findBestParametermethod 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
IFoldingViewnow raises theNodeCreated,EdgeCreated,PortAdded,LabelAdded, andBendAddedevents 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 methodssetLabelText,remove,setLabelPreferredSizeandsetLabelLayoutParameternow throw anIllegalArgumentExceptioninstead of anInvalidStateException.-
DefaultGraphnow calls theonRemovingEdgeandonRemovingPortmethods before their incident items are removed. - When a stripe is removed,
ITable#LabelRemovedevents for the implicitly removed associated labels are now raised, too. - The implementations of
IStripeHitTestHelperandIBoundsProviderin the lookup of anIStripecould neither be decorated nor overridden by the context lookup provided by a stripe style. - The
INodeInsetsProviderimplementations which can be retrieved fromInteriorLabelModelandInteriorStretchLabelModelnow correctly sum up the space required by overlapping labels.
View
- The methods
getBoundsandisVisibledescribing theRectangleIndicatorInstallerreturned 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: FixedNullPointerExceptionthat occured when any of the Descriptor properties were set while theGraphModelManagerinstance was not yet associated to anIGraph.- 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, orSelectionIndicatorManagerno longer results in aNullPointerException. - Selected stripe labels no longer remain selected after their owning stripe is deleted.
- Selected stripe labels no longer cause exceptions when hovering over them.
- The selection indicator for selected stripe labels is now shown correctly.
- The methods
GraphClipboard#copyandGraphClipboard#cutdon't copy items anymore which depend on items that are selected but not included inGraphClipboard#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, andDUPLICATEare 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#fitContentnow 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
-
PortRelocationHandleProvidernow can handlenullasgraphconstructor parameter. -
PortRelocationHandle#GHOST_VISUALIZATION_PEN_KEYnow is excluded from obfuscation. - Fixed
IHitTestableimplementation ofDefaultPortCandidateDescriptorwhich used incorrect coordinates. - The
ParentInputModeproperty of theInputModeEventArgsnow is the input mode which has raised the event. Previously, some input modes erroneously set theParentInputModeto the containingGraphEditorInputModeorGraphViewerInputMode. - Switching the input mode in an event handler of the current input mode no longer throws an exception.
-
ItemHoverInputModeupdates the hovered item upon mouse drag events, too. This is the documented behavior. Previously, the hovered item was only updated on mouse move events. -
ItemHoverInputModeremoves the hovered item uponcancel. 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.
-
ClickInputModeprovided wrong click locations in theClickedevent if aMouse2DEventTypes#CLICKEDevent without precedingMouse2DEventTypes#PRESSEDevent was processed. -
CreateEdgeInputModeandCreateBendInputModenow cancel onMOUSE_LOST_CAPTURE_DURING_DRAGevent. -
CreateEdgeInputModedid not show port candidates after re-installation of the input mode. - Moving an edge label with
SmartEdgeLabelModelthat is owned by an edge without visible path no longer throws an exception. -
ItemHoverInputModenow resets the hovered item when moving the mouse out of the component. -
GraphEditorInputModeandGraphViewerInputModeno longer ignore changes to their sub-input modes after having been installed once. - The
HitTestRadiusproperty of the following implementations ofICanvasContextnow correctly contain the value in world coordinates instead of view coordinates:- The context created by
ICanvasContext#createwhen passing aCanvasComponentbut no hit test radius. - The context passed to
IDisposeVisualCallback. - The context passed to
IPositionHandlersbyMoveInputMode. - The context passed to adjacent handles when moving a bend handle.
- The context created by
- Disabling
MarqueeSelectionInputModeduring the gesture via code left the marquee visible on the screen. - When a selected stripe label is edited its
TextAreanow is correctly placed. - While relocating edges, dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
- The
ClickedandDoubleClickedevents ofClickInputModewere 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#NodeToEdgeDistanceproperty is set to-1.0. - The
LabelEditingEventArgs#Context#ParentInputModeproperty provided in the eventsGraphEditorInputMode#LabelAdding,GraphEditorInputMode#LabelEditing,TableEditorInputMode#LabelAddingandTableEditorInputMode#LabelEditingnow contains the correspondingGraphEditorInputModeorTableEditorInputModeinstance. - The default implementation of
IPortSnapResultProvidernever returned any snap results. CreateEdgeInputMode: TheValidBeginCursoris now correctly hidden during edge creation when bend creation isn't allowed.-
CreateEdgeInputModedidn't always update the highlight of possible source port candidates when itsShowPortCandidatesproperty 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 theGraphComponentif 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 theGraphComponent.ReparentStripePositionHandler: The source and target ghost visualization was not always updated correctly when custom ghosts were used.- Changing the values of the
CreateEdgeInputMode#DummyEdgeGraph#EdgeDefaultsproperty 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
NullPointerExceptionwhich could occur in customizedLabelDropInputModeandPortDropInputModeclasses. - The
CreateEdgeInputModedoesn't show port candidates anymore if bend creation is enforced (by pressingCTRLkey during edge creation). - The indicators for bend grid snapping were not always drawn at the correct position for bends which were implicitly moved with a selected edge.
Layout
-
HierarchicLayout: Fixed problem where edges between group nodes contained superfluous bends if there were grouped edges in the input graph. -
Polyline.EdgeRouter: Fixed issue that sometimes caused weird edge routes if there are edges with intermediate routing points. -
Polyline.EdgeRouter: FixedNullPointerExceptionthat was triggered when the list of intermediate points for an edge consisted of exactly two equal points. -
OrganicLayout: FixedIllegalArgumentExceptionthat could appear if cycle substructure detection is enabled, seeOrganicLayout#CycleSubstructureStyle. -
HierarchicLayout: Fixed an issue that caused non-symmetric results for grouped edges even though propertySimplexNodePlacer#BaryCenterModeEnabledwas enabled. -
OrthogonalLayout: Fixed rare infinite loop issue for grouped graphs. -
Polyline.EdgeRouter: Fixed rareNullPointerException. -
Polyline.EdgeRouter: FixedNullPointerExceptionthat occurred when there were intermediate routing points and the path search got aborted (e.g. because of maximum duration time limit). -
ShortestPaths: Fixed possibleNullPointerExceptionthat occurred when the a-star algorithm was applied to a graph with non-monotonic heuristic costs. -
HierarchicLayout: FixedUnsupportedOperationExceptionthat was triggered when aDataProviderAdapterthat does not implementIDataProvider#getwas registered with keyGivenLayersLayerer#LAYER_ID_DPKEY. The issue only appeared in conjunction with sub-components, seeHierarchicLayout#SUB_COMPONENT_ID_DPKEY. -
FamilyTreeLayout: Fixed bug that caused that the preferred family member order wasn't considered, seeFamilyTreeLayout#FamilyMembersSortingPolicy. -
GenericLabeling: Fixed bug that could cause that a label candidate with a lower profit (seeAbstractLabeling#Profit) was preferred over another candidate with higher profit even though both candidates did not overlap with any other elements. -
GenericLabeling: Fixed unexpected labeling results that occurred if a label had label candidates with different sizes. The labeling algorithm previously calculated profits of candidates under the assumption that all candidates have equal size. -
HierarchicLayout: Fixed rare infinite looping issue for input graphs with fixed (i.e., non-incremental) nodes and layering constraints. -
Polyline.EdgeRouter: Fixed a rare bug that caused port candidate failures for edges grouped with fixed edges. -
Polyline.EdgeRouter: Fixed a bug that caused collinear bends and self-crossings to be removed from fixed edges. Now, such fixed edges are not changed anymore. -
HierarchicLayout: Fixed bug that sometimes caused aNullPointerExceptionif the input graph contains port groups, seePortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEYandPortConstraintKeys#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 propertyNodeLayoutDescriptor#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 (seeEdgeBundleDescriptor#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. -
OrthogonalLayoutnow considers edge grouping also if there are no directed edges specified.
Further Bugfixes
-
GenericLabelModelserialization: Fixed cyclic reference in GraphML which could happen while serializing aGenericLabelModelwith a parameter with associated descriptor. -
PolylineEdgeStylenow takes arrow heads into account for visibility checks. - The default method
IOrientedRectangle#getCenterdidn't return the correct center if the width or height of the rectangle was equal to 0. - Sometimes the
GroupNodeDefaults#LabelDefaults#AutoAdjustingPreferredSizeEnabledproperty and theGroupNodeDefaults#PortDefaults#AutoCleanupEnabledproperty were not considered for labels and ports of groups. - The
GroupingSupport#hasGroupNodesmethod 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
NullPointerExceptioninTableNodeStyleRendererwhen aTableNodeStyleis rendered with#Tableset tonull. - The
clonemethod now is overridable in all style implementations.
Incompatible Changes
ReparentStripePositionHandler: All callback methods dealing with ghost objects have been renamed consistently:UpdateXyzVisualizationtoUpdateXyzGhost.UpdateTargetVisualizationBoundstoUpdateTargetGhostBounds.
- The method
Arrow#getAsFrozenwas removed as there was no benefit in converting the Arrow instance in an immutable instance. - The protected factory method
MoveLabelInputMode#createLabelHitTestablehas been removed. Developers who want to set a custom instance need to set it directly to theHitTestableproperty. - The
#CanvasClickedevent ofGraphEditorInputMode/GraphViewerInputModenow provides theGraphEditorInputMode/GraphViewerInputModeas parent input mode in theContextproperty of itsClickEventArgs. - The
ITable#RelativeLocationproperty has been removed. UseITable#Insetswith correspondingLeftandTopvalues instead. - Renamed all occurrences of
CleanuptoCleanUpin API names. -
ItemClickedEventArgsnow extendsClickEventArgs. CreateEdgeInputMode'sEdgeCreatormight receivenullastargetPortCandidateparameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returningnull.- The
StripeSubregion#TargetTableNodeproperty is now read-only. - Renamed the enumeration value
ShowFocusPolicy#WHEN_FOCUSEDtoONLY_WHEN_FOCUSED. - Renamed the
Animator#destroymethod tostop. - The
GraphEditorInputMode#createMoveUnselectedInputModemethod has been removed. Use the propertyMoveUnselectedInputModeinstead. - The
booleanCreateEdgeInputMode#PortCandidateShowingEnabledproperty has been replaced by theCreateEdgeInputMode#ShowPortCandidatesproperty which has the enum typeShowPortCandidates. - The
booleanOverviewInputMode#AutoMouseWheelZoomEnabledproperty has been replaced by theOverviewInputMode#MouseWheelBehaviorproperty which has the enum typeMouseWheelBehaviors. - Classes
PropertyInfo,TypedKey,XamlHelperandXmlNamewere removed from the layout distribution where they were not used. CanvasComponent: Removed the eventsMouseWheelZoomFactorChanged,MouseWheelScrollFactorChanged,AutoDragChangedandHitTestRadiusChanged. These events are unneeded since the corresponding properties are not changed by library code.- The method
Pen#adopthas been renamed to#committo better reflect what it really does. DpKeyBasehas been renamed toAbstractDpKeyand made an abstract class.AbstractDpKeyand all subclasses now take the value type as additional constructor parameter. This value type may be retrieved through read-only propertyValueType.IMapperRegistry: The value type parameter was removed from all default methods takingNodeDpKey,EdgeDpKeyorILabelLayoutDpKey.MoveViewportInputMode: The properties that controlled the inertia behavior have been removed since they no longer apply to the new algorithm. Instead, the new propertyInertiaDurationcan be used to specify the duration of the inertia scrolling.-
GraphModelManager#HierarchicNodeNestingEnabledhas been removed. Set the newHierarchicNestingPolicyproperty toHierarchicNestingPolicy#NONEto disable node nesting or to eitherHierarchicNestingPolicy#NODESorHierarchicNestingPolicy#NODES_AND_EDGESto use nesting. Similarly,GraphModelManager#HierarchicEdgeNestingEnabledhas been removed. Use eitherHierarchicNestingPolicy#NODES_AND_EDGESto enable edge nesting or any other policy to disable it. - The method
CanvasComponent#animateScrollTohas been removed and is superseded by the new#zoomToAnimatedmethods. -
The property
SliderEdgeLabelLayoutModel#AutoFlippinghas been renamed to#AutoFlippingEnabled. -
The property
TableLayoutConfigurator#Compactionhas been renamed to#CompactionEnabled. -
The property
GraphPartitionManager#FiringGraphEventsEnabledhas been removed. -
The overloads of
ValueSerializer#getSerializerFortaking no context have been removed. -
The class
com.yworks.yfiles.layout.hierarchic.GroupingSupporthas been removed.
Changes of Default Behavior
- The
IGraph#setNodeLayoutmethod and the various methods to create a node now throw anIllegalArgumentExceptionif the layout rectangle contains one or moreNaNvalues. Similarly, theIGraph#setBendLocationand the various methods to add a bend to an edge now throw anIllegalArgumentExceptionif the location point contains one or twoNaNvalues. - 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#DummyEdgeproperty is now always reset after the edge creation was finished or canceled. -
RectD#isFiniteandSizeD#isFinitenow also consider empty instances as not finite. MoveLabelInputMode: The moved label now is visualized as a preview instead of a symbolic rectangle. Set theVisualizationproperty toVisualization#GHOSTto restore the old mode.- The
LayoutExecutor#ContentRectUpdatingEnabledproperty is now enabled by default. CreateEdgeInputMode: The determination whether the mouse hovers over a valid end has changed. IfForcingSnapToCandidateEnabledis disabled, theEndHitTestablenow is queried first and a target port candidate is only searched if the hit testable returnstrue. Previously, the hit testable was only queried if no target port candidate was found at the current location.- Previously, even if the
GraphModelManager#UsingHierarchicEdgeNestingEnabledproperty was set totrue, canvas objects for edges were added to theGraphModelManager#EdgeGroupas long as no group nodes were part of the graph. The corresponding newHierarchicNestingPolicyNODES_AND_EDGEShas no such behavior and thus,EdgeGroupis empty by default. Use one of the other polices if canvas objects for edges should be part ofEdgeGroup. -
PolylineEdgeStyledefaults to an improved smoothing algorithm when using theSmoothingLengthproperty. This is especially apparent when using large values forSmoothingLength. - The method
CollapsibleNodeStyleDecorator#createSelectionInstallerhas been removed. -
ClickInputModenow dispatches the more specific eventsLeftClicked,RightClicked,LeftDoubleClickedandRightDoubleClickedbefore the generalClickedandDoubleClickedevents. Hence,ClickedandDoubleClickedwill only be triggered if the event wasn't handled before.
Deprecated
- The properties
LayerConstraintFactoryandSequenceConstraintFactoryofHierarchicLayoutDatahave been marked as deprecated. The new propertiesLayerConstraintsandSequenceConstraintsshould be used instead. Similarly, the factory methodsLayoutUtilities#createLayerConstraintFactory(IGraph)andLayoutUtilities#createSequenceConstraintFactory(IGraph)have been marked as@Deprecated. -
PartitionGrid#hasAtLeastTwoNonEmptyRowshas been marked as@Deprecatedand may be removed in future releases.
yFiles for Java (Swing) 3.1.0.1
Improvements
Demos
-
Added new demos:
-
The
GraphEventsdemo can be used to explore the different kinds of events dispatched by yFiles for Java. -
The
IsometricDrawingdemo displays graphs in an isometric fashion to create an impression of a 3-dimensional view. -
The
EdgeBundlingdemo shows how to reduce visual clutter through edge bundling. -
The
Umldemo shows interactive creation and editing of UML class diagrams.
-
The
-
PDFImageExportDemo,SVGImageExportDemoandSVGNodeStyleDemo: Made the build scripts Java 9 ready.
Viewer
- Improved general rendering performance, which especially affects large graphs dramatically.
-
GridVisualCreatornow respects the clip of the render context passed to its#createVisualand#updateVisualmethods. -
IArrow#CIRCLEnow uses a real circle for rendering. -
Removed unusable
SnapLineresource keys fromCanvasComponent's client properties.
Bugfixes
Viewer
-
GraphEditorInputModeandGraphViewerInputModeno longer ignore changes to the sub-input modes exposed as properties after having been installed once. -
Fixed a bug in
CanvasComponentthat moved the viewpoint too much when changing the zoom property. -
Fixed a bug in GraphML serialization that always looked for singletons on classes that were annotated with
@GraphMLeven if theGraphML#singletonContainersproperty was not set. -
TextEditorInputMode: The size calculation for the editing#TextAreawas fixed to respect all properties of the#TextArea. -
TextEditorInputMode: UsingENTERas#LineBreakRecognizerno longer results in two new lines each timeENTERis pressed. -
Fixed a bug that might occur when changing wrapped styles in
CollapsibleNodeStyleDecorator,ShadowNodeStyleDecorator,FixedShapeShadowNodeStyleDecoratorandNodeStylePortStyleAdapter. -
DefaultLabelStyle: Fixed line breaks when text wrapping is enabled. -
Added missing Obfuscation annotation for
DashStyleconstants. - Fixed serialization of shared collection resources.
- Fixed parsing of font style constants of GraphML files written with yFiles for Java 3.0.
-
DefaultLabelStyle: Fixed#updateVisualto take all style properties into account when determining whether or not the visualization has to be re-created. -
AbstractJComponentStyle: Fixed a bug that prevented serialization of the#ContextLookupproperty after obfuscating the library. -
XmlWriter: Fixed JDK 9 only additional, undesired whitespace when writingCDatanodes. -
Several context implementations throughout the library now use the correct value in world coordinates for the
HitTestRadiusproperty instead of view coordinates:- The context created by
ICanvasContext.createCanvasContextwhen passing aCanvasComponent, but no hit test radius. - The
IRenderContextpassed toIDisposeVisualCallback. - The
IInputModeContextpassed toIPositionHandlersbyMoveInputMode. - The
IInputModeContextpassed to adjacent handles when moving a bend handle.
- The context created by
-
InteriorStretchLabelModel#getMinimumNodeSizenow uses the correct insets for width calculation. Previously the top insets were erroneously used for the width. -
The
NodeStyleStripeStyleAdapter#updateVisualmethod always created a new visual by delegating to the#createVisualmethod. - Mouse wheel zoom during an input gesture no longer results in incorrect coordinates for the subsequently dispatched mouse event.
-
Switching the
GraphComponent's#InputModein a key event handler no longer throws an exception. -
MapperRegistry#addMapperno longer throws an exception when trying to replace a mapper for an existing key. -
Labels with
NinePositionsEdgeLabelModelnow disappear when the owner edge has no visible edge path. This can happen for example when nodes are moved onto each other. Previously they appeared at unexpected locations, including the origin (0,0) and the upper left corner of the source node. -
GeneralPath#getTangentnow returnsnullif there is no tangent at the requested position. Previously, it returned a bogus tangent. -
FreeLabelModel#INSTANCE,FreeEdgeLabelModel#INSTANCE, andFreeNodeLabelModel#INSTANCEare now serialized correctly to GraphML when not used as part of their parameters (e.g. withinCompositeLabelModel). -
Fixed an unnecessary exception in
IGraph#calculateLabelPreferredSizewhich was thrown when the label owner was not part of the graph, but all optional parameters have been passed anyway. In that case there was no need to fetch the appropriateLabelDefaultsand thus the question of whether the owner is in the graph or not is irrelevant. - During reparenting, the edges at reparenting nodes were drawn below the group(s) and thus they were not visible. If reparenting was canceled, these edges stayed behind the group(s) and remained invisible.
-
CreateEdgeInputModedid not always start correctly for quick gestures on slow devices. -
CreateEdgeInputModedid not trigger the#EdgeCreationStartedevent for programmatic initialization of the edge creation gesture. -
HandleInputMode's#CurrentHandleproperty could not always be obtained during the#DragFinished,#DragFinishing,#DragCanceling, and#DragCanceledevents ofHandleInputMode. -
Setting
CreateEdgeInputMode's#CancelRecognizercould potentially get the input mode into a broken state. -
The
ICommand#COPYcommand is no longer executed twice. -
Fixed a bug in
ViewportAnimationthat sometimes moved the viewport a bit before the animation started. -
Fixed an exception in
DropInputModewhich occurred if a drag enter was recognized while another drag action was still running. -
CreateEdgeInputModeno longer fires gesture cancel events if it has not been started before. -
StripeDropInputModeno longer calls#ItemCreatortwice. -
The
StripeDropInputMode#ItemCreatedevent was not raised. -
GeneralPath#isVisibleoften returned true for invisible paths. -
UndoEnginenow uses the end time of the previous undo unit for automatic bracketing instead of the start time. This improves auto-bracketing to work as intended for undo units spanning a time greater than#AutoMergeTime.
Layout
-
Corrected an error in the
Rectangle2D#contains(Rectangle2D)method. As a consequence, the results of various algorithms and automatic layouts could have been wrong. -
PortPlacementStage: Fixed bug that causedNullPointerExceptionwhen the ports of edges in the input graph were outside the node bounds. -
BusRouter: Fixed rareNullPointerExceptionthat could be triggered if there are buses with both fixed and movable edges at the same time. -
AbstractLabelLayout: Fixed bug that the box returned byAbstractLabelLayout#BoundingBoxwas not consistent with the bounding box of the oriented box (AbstractLabelLayout#OrientedBox). This was the case when the mutable oriented box instance was changed. -
LayeredNodePlacer: Fixed bug that caused node-edge overlaps for some configurations. -
MultiPageLayout: Fixed bug that edge typeEdgeType#PROXYwas never used. -
Setting
PartialLayout#EdgeRoutingStrategytoStraightLineerroneously rerouted all edges in the graph instead of just the ones that were required. -
polyline.EdgeRouter: FixedRuntimeExceptionthat could be triggered when the graph contained fixed edges (seeEdgeRouter#SphereOfAction) with very short segments. -
HierarchicLayout: FixedIllegalArgumentExceptionthat could be triggered when the user specified both edge directedness (seeHierarchicLayout#EDGE_DIRECTEDNESS_DPKEY) and layering constraints. -
OrthogonalLayout: Fixed rare bug that caused node-edge overlaps. -
HierarchicLayoutandSimplexNodePlacer: Fixed rareIllegalArgumentExceptionthat could be triggered when the input graph had a partition grid andPortCandidates orPortConstraints. -
OrganicRemoveOverlapsStage: Improved adherence to the specified maximum duration. -
HierarchicLayout: Improved port assignment for edges incident to group nodes that are routed directly (seeEdgeLayoutDescriptor#DirectGroupContentEdgeRouting). Previously, such edges were often reversed. -
HierarchicLayout: Fixed bug that caused violation of specifiedPortCandidates of edges with labels with preferred placement specifierLabelPlacements#AT_SOURCE_PORTorLabelPlacements#AT_TARGET_PORTwhen using an orientation other than top-to-bottom. -
SeriesParallelLayout: Fixed bug that caused misplaced edge labels for graphs containing only a single edge. -
HierarchicLayout: Improved adherence to the specified maximum duration by applying a suitable runtime restriction to classPortCandidateOptimizer. Previously, this class didn't have any runtime restrictions. -
OrthogonalLayout: Fixed rare bug that caused overlapping nodes. -
OrthogonalLayout: Improved from-sketch mode (seeUseSketchDrawing) in conjunction with node labels or node halos. Previously, in the presence of the mentioned elements, the layout results did not always correctly resemble the sketch drawing, even if it was a good sketch. -
HierarchicLayout: Fixed bug that caused that propertyHierarchicLayout#ComponentArrangementPolicywas not correctly considered when there are undirected edges (seeHierarchicLayout#EDGE_DIRECTEDNESS_DPKEY). -
HierarchicLayout: Fixed bug that lead to edge ports lying outside the node boundaries when using the edge thickness feature (i.e. edges with thickness greater than zero, seeHierarchicLayout#EDGE_THICKNESS_DPKEY) together with a (rather large) grid spacing value and the default port assignmentPortAssignmentMode#DEFAULT. -
HierarchicLayout: Fixed bug that caused unnecessarily large layer distances in case that there exist empty partition grid rows with a minimum row height. -
HierarchicLayoutwith partition grid: Fixed bug that in some cases caused anIllegalArgumentExceptionwhen the layout algorithm was configured to stop after the layering or sequencing phase (seeHierarchicLayout#StopAfterLayeringEnabledandHierarchicLayout#StopAfterSequencingEnabled). -
DefaultNodePlacer: Fixed bug inDefaultNodePlacer#MinimumLastSegmentLengththat caused that the value ofDefaultNodePlacer#MinimumFirstSegmentLengthwas returned. -
TreeLayout: Fixed bug inDefaultPortAssignmentthat caused a memory leak. -
TreeLayout: Fixed bug in the integrated edge labeling feature that caused that multiple edge labels were not always ordered correctly along the edge with respect to their preferred placement setting (i.e., place at source, center or target preference). For example, a source label should always come before a target label in the direction of the actual edge flow. -
polyline.EdgeRouter: Fixed bug that sometimes caused a violation of the minimum first or last segment length if they were set to relatively large values. -
OrthogonalLayout: Fixed rare bug that caused non-orthogonal line segments and bad edge end points.
Incompatible Changes
View
-
CreateEdgeInputModenow triggers theEdgeCreationStartedevent for programmatic edge creation with thedoStartEdgeCreationmethod.
yFiles for Java (Swing) 3.1
General Improvements
- The naming of classes, members and parameters has been reviewed and now uses more consistent and intuitive names. Please consult the Developer's Guide for a complete list of renamings.
- Some functionality has been removed from the API to reduce its complexity and some of the functionality has been moved to different classes or packages. Again, see the Developer's Guide to get a full list of moved/removed functionality.
Features
Layout
-
HierarchicLayout: Added support for port grouping, seePortConstraintKeys#SOURCE_GROUP_ID_DPKEYandPortConstraintKeys#TARGET_GROUP_ID_DPKEY. Edges are bundled at their ports, but routed independently. -
HierarchicLayoutnow allows to specify the directedness of edges, seeHierarchicLayout#EDGE_DIRECTEDNESS_DPKEY. This new feature enables to, for example, support mixed graphs that contain both directed and undirected edges: While for directed edges the layering step tries to find a solution where the source of an edge is placed above the target (with respect to the main layout direction), for undirected edges the direction doesn't matter and the edge may also be inserted as same-layer edge. This feature also enables to force some edges to specifically point against the main layout direction. -
HierarchicLayout: Added support for edges with a specific thickness. Minimum distances in the layout will consider these thicknesses, seeHierarchicLayout#EDGE_THICKNESS_DPKEY. -
LabelPlacements: Added preferred placement specifiers#AT_SOURCE_PORTand#AT_TARGET_PORTfor edge labels which express that the label should be placed directly at the source/target port of the edge. Currently, the specifiers are only considered by the integrated labeling of theHierarchicLayoutand can be specified with propertyPreferredPlacementDescriptor#PlaceAlongEdge. -
OrganicLayoutnow supports the detection of regular substructures in the graph (see methods#setChainSubstructureStyle(ChainSubstructureStyle),#setStarSubstructureStyle(StarSubstructureStyle),#setCycleSubstructureStyle(CycleSubstructureStyle), and#setParallelSubstructureStyle(ParallelSubstructureStyle)and applies a specific layout style to them such that they can be better recognized. -
TreeReductionStage: Added possibility to specify a custom labeling algorithm that places labels of non-tree edges. Now, users do not need to take care of such edge labels themselves after using a tree layout algorithm on a non-tree input graph in conjunction with the reduction stage. See properties#NonTreeEdgeLabelingAlgorithmand#NonTreeEdgeLabelSelectionKey. -
SeriesParallelLayout: Added possibility to specify a custom labeling algorithm that places labels of non-series-parallel edges. Such labels are now automatically handled. Users do not need to handle them after running the algorithm with a non-series-parallel input graph. See properties#NonSeriesParallelEdgeLabelingAlgorithmand#NonSeriesParallelEdgeLabelSelectionKey.
Improvements
Viewer
-
IGraph: The default methods#applyLayout(ILayoutAlgorithm)and#applyLayout(ILayoutAlgorithm, LayoutData)have been added. -
FilteredGraphWrappernow no longer queries the node and edge predicates as often. -
IMapperRegistry: Several overloads for the#create*Mappermethods have been added that take more specific tags but allow to omit the keyType parameter. -
GraphComponent: Four#morphLayoutconvenience methods have been added that run a layout on the graph of the component and animate the results. -
The property
GraphComponent#GraphMLIOHandlerhas been added to set a customGraphMLIOHandlerto be used by the IO commands and convenience IO methods. Previously the lookup of the class needed to be decorated. -
GraphComponent: The overloads#importFromGraphML(java.io.Reader),#importFromGraphML(java.io.InputStream),#exportToGraphML(java.io.OutputStream, java.net.URI)and#exportToGraphML(java.io.Writer, java.net.URI)have been added. -
Animator: A getter for theCanvasComponent, which had been passed to the constructor, was added. -
The types of the static
#INSTANCEfields ofVoidNodeStyle,VoidEdgeStyle,VoidLabelStyle,VoidPortStyle,VoidStripeStyleandVoidStripeStyleRendererhave been changed to the concrete types instead of the interface types (e.g.INodeStyle). -
IconLabelStyle: A constructor has been added that only takes a custom renderer as argument. -
Class
DefaultPortCandidateDescriptor, which is used to visualizeIPortCandidates, now provides staticResourceKeyfields that are used to lookupIVisualTemplates for the different states ofIPortCandidates. CustomIVisualTemplates can be used by either registering them viaCanvasComponent#putClientPropertyor by the new convenience methodDefaultPortCandidateDescriptor#setTemplate. -
Resizing a table row or column now respects the
GraphEditorInputMode#AdjustContentRectPolicy. -
CreateEdgeInputModenow respects the settings#SnappingBendsToSnapLinesEnabledand#SnappingBendAdjacentSegmentsEnabledonGraphSnapContext. It also handles grid snapping according to the configuration for snapping. - Nodes now show their target grouping hierarchy z-order during a reparenting gesture.
-
GraphMLIOHandlernow has#addXamlNamespaceMappingmethods for easier control of the XML namespace for certain types. -
GraphMLIOHandlerhas two new events,#QueryTypeand#QueryNamethat allow for fine-grained control over XML namespace writing and parsing for certain types. -
GraphMLIOHandler: The overloads#read(IGraph,java.io.Reader),#read(IGraph, java.io.InputStream),#write(IGraph, java.io.OutputStream, java.nio.charset.Charset, java.net.URI)and#write(IGraph, java.io.Writer, java.net.URI)have been added. -
GraphMLParser: The overloads#parse(IGraph,Reader,IGraphElementFactory)and#parse(IGraph, InputStream, IGraphElementFactory)have been added. -
GraphML: The performance for parsing java enums andFlagsEnumshas been improved. -
GraphML: Parsing java enums andFlagsEnumshas been refactored and now respectsSerializationProperties#IGNORE_PROPERTY_CASE.
Layout
-
HierarchicLayout: Slightly reduced the number of bends when integrated edge labeling is enabled. -
HierarchicLayout: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to orientationsLayoutOrientation#LEFT_TO_RIGHT,LayoutOrientation#RIGHT_TO_LEFTandLayoutOrientation#BOTTOM_TO_TOP. Geometry information registered with data providers with keysHierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEYandHierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEYis now automatically rotated according to the specified layout orientation. -
HierarchicLayout: Improved support forPortCandidates at group nodes. Previously, they were only obeyed if there was just a single candidate defined, which also applied to the opposite node (not necessarily a group node). Now, out of the given candidates, one is selected and considered for the routing. Still, fixed candidates are treated like free ones and are not supported at the side of group nodes. -
HierarchicLayout: Routing of grouped edges that connect to nodes of different groups now assures that the whole bus segment remains outside the different group nodes. This avoids that group nodes get unnecessarily large and potentially makes drawings more symmetric. -
HierarchicLayout: Improved edge grouping such that it is now possible to group incoming/outgoing edges as well as same-layer/backloop edges with common edges. -
HierarchicLayout: Can now take the original edge route into account to determine the route of a self-loop. -
MultiPageLayout: Added new option#StrictClusterSeparationEnabledthat allows to specify whether or not nodes with different cluster IDs may be placed onto the same page. -
The tree algorithms
BalloonLayout,TreeLayoutandAspectRatioTreeLayoutnow support custom selection of the root node of the tree. -
BalloonLayout: Interleaved child placement now works in conjunction with from sketch-mode and custom child order comparators. This means that the settings#FromSketchModeEnabledand#Comparatorare no longer ignored when enabling the interleaved placement mode (see#InterleavedMode). -
TreeLayout: Now take into consideration the minimum group node size specified by the user with aIDataProviderregistered with the graph with keyGroupingKeys#MINIMUM_NODE_SIZE_DPKEY. -
SeriesParallelLayout: Now takes into consideration the minimum node size specified by the user with aIDataProviderregistered with the graph with keyGroupingKeys#MINIMUM_NODE_SIZE_DPKEY. -
Improved the runtime of
EdgeRouterwhen routing edges that havePortConstraints orPortCandidates. -
Improved the performance of
OrthogonalSegmentDistributionStageand thus alsoChannelEdgeRouterwhich by default uses the mentioned stage as edge distribution strategy. -
ChannelRouter: Improved order of segments to avoid edge crossings when there are multiple segments that have one common end point. -
Improved the performance of
PartialLayoutfor input graphs that feature a high number of large subgraph components. Does not apply for component assignment strategyComponentAssignmentStrategy#SINGLE. -
LayoutUtilities#applyLayoutnow supports layout of tables. -
ItemMapping: The property#Mapperis now automatically set on first read-access to the property, enabling more convenient use of the mapper without first having to instantiate a matching instance. -
PartitionGridData: It is now sufficient to specify one of a row mapping or the column mapping. The unspecified one will automatically be set to 0, resulting in a single row or column being used. -
BalloonLayoutData,HierarchicLayoutData,LabelingData,OrthogonalLayoutData,SeriesParallelLayoutDataandTreeLayoutDatanow have anEdgeLabelPreferredPlacementproperty which supports anItemMappingfor edge labels to provide aPrefererredPlacementDescriptor. Can be used as alternative to mappers registered withLayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEY. -
PlanarEmbeddinghas been added and allows to calculate and query an embedding of a planar graph.
Bugfixes
Viewer
Model
-
Fixed a bug in
IGraph#addLabelthat ignored an explicitly specified preferred size if folding is enabled. -
FilteredGraphWrapper: The fail-fast mechanism to detect concurrent modification changes in the#Nodes,#Edges,#Labelsand#PortsIListEnumerablesdidn't detect all modifications correctly. -
Folding:
- Fixed a bug that sometimes ignored the view state for a port on a folder node when a folding edge was created.
- Fixed a potential exception when using folding on a filtered graph when either nodes with labels or ports, or edges with bends or labels are shown for the first time after being hidden before.
- Fixed a bug that treated group nodes with no children als non-group nodes after they have been expanded.
- Fixed a bug that creates folders with empty size when manually creating groups and the folding view is configured to collapse group nodes by default.
-
SandwichLabelModel: Fixed incorrectDefaultValueannotation for some created parameters. -
SmartEdgeLabelModel: An exception was thrown if the path of the corresponding edge contained bends that were close together or at the same location. -
NinePositionsEdgeLabelModel: Fixed the placement for the positions#SOURCE_BELOWand#TARGET_BELOW.
Geometry
-
GeneralPath#equalsdoes no longer check for path equivalence (same coordinates etc.), but simply checks reference equality. This makes it consistent with the#hashCodemethod. To check for path value equivalence, use the new method#isEquivalentToinstead.
View
-
Fixed
GraphComponent's#importFromGraphML(java.io.File)method to respect theGraphMLIOHandler's#ClearingGraphBeforeReadEnabledproperty. (All the other#importFromGraphMLmethods already did so.) -
Label text isn't mirrored anymore if
ComponentOrientation#RIGHT_TO_LEFTis set on theGraphComponent. -
GraphOverviewComponent: Setting a new#OverviewInputModeupdates now the#InputModeproperty accordingly. -
Fixed a bug that might occur when changing wrapped styles in
CollapsibleNodeStyleDecorator,ShadowNodeStyleDecorator,NodeStyleLabelStyleAdapterandNodeStylePortStyleAdapter. -
Fixed a bug in
GraphModelManagerthat didn't update the child groups if a new#ContentGroupis set. -
Fixed a bug in
GraphModelManagerwhere#HierarchicEdgeNestingEnabledset tofalsewas not respected when the graph changed or a group node was created first on a yet ungrouped graph. -
Fixed some styles to call
IRenderContext#childVisualRemovedafter theIVisualactually has been removed instead of just before the removal. -
Fixed a possible
NullPointerExceptionin the graph rendering code when items were removed from the graph during their style's#updateVisualmethod. This could happen when removing graph items from a different thread (which is still not supported, but at least this particular case won't crash anymore). -
Fixed the maximum y-coordinate for horizontal grid lines produced
by
GridVisualCreatorwith grid styleLINES.
Input
-
All shortcuts have been adapted to the operation system conventions, e.g. shortcuts on Mac do not use the
Controlkey anymore but theCommandkey as modifier instead. -
CreateEdgeInputMode: Fixed a bug that didn't show the edge preview when the edge would be created between a node and one of its ancestors or vice versa. -
CreateEdgeInputMode: The#EdgeCreatedevent triggered before the corresponding undoable edit was committed. This could result in a broken undo queue, if e.g. an animated layout was started during in the event listener. The event now triggers after the edit has been committed. With automatic undo unit merging, this should not make a difference for the end user, however from the perspective of the code there will be two subsequent edits, rather than one compound, if the code in the listener actually modifies the edge. -
CreateEdgeInputMode: Fixed a bug that broke the edge preview after the input mode was uninstalled and reinstalled again. - Fixed a bug in bend creation for orthogonal edges when grid snapping was enabled.
- A bug in orthogonal edge editing was fixed where an edge could become non-orthogonal when a non-selected bend was moved.
- Fixed an issue with orthogonal edge editing where canceling moving a port or node would add bends to otherwise straight edge segments.
- Self-loops with same source and target location are now treated as orthogonal.
-
When dragging an unselected bend and canceling the gesture by pressing
ESC, the dragged bend was removed. - Fixed a bug that prevented individually disabling certain grouping commands.
-
OverviewInputMode: Fixed a bug that could break the overview visualization if the overview has a specific very small width or height. -
StripeDropInputMode: Fixed a bug that could result in nodes being moved to a wrong stripe when a new stripe was created or an existing one relocated. -
NodeDropInputMode: Fixed a possible exception when snapping is enabled, but preview disabled. -
When a node and its parent group node were both selected and moved with the
SHIFTkey held down the node was erroneously reparented to the root. - Fixed reparent highlighting when multiple nodes are reparented together.
-
Fixed an issue where the parameter finder for
FreeEdgeLabelModelcannot place the label correctly for self-loops. Labels previously always appeared at the port location in this case. -
Hiding
INodeSnapResultProviderorIBendSnapResultProviderfrom the lookup no longer leads to a crash when nodes or bends are moved. -
Fixed an issue where
ICommand#EDIT_LABELwould not work directly on labels when aTableEditorInputModeis active.
Styles
-
DefaultLabelStyle: Fixed vertical text alignment for instances with non-empty insets. -
IconLabelStyle: Fixed aNullPointerExceptionthat occurred when rendering the style while the#Iconproperty is set tonull
GraphML
-
Fixed a bug in GraphML parsing that prevented finding the annotated
@GraphML#contentPropertyof a class. - Fixed a bug in GraphML parsing that could result in an exception when parsing an empty text element.
-
Fixed a bug in GraphML serialization that ignored
@GraphMLannotations for static fields. -
Fixed structured GraphML serialization of
DashStyle,PenandURLinstances. -
The
ValueSerializerused for predefinedPens andIArrows now also respects theSerializationProperty#IGNORE_PROPERTY_CASE. -
Methods
GraphMLIOHandler#addRegistryOutputMapper(String,Object)and#addRegistryOutputMapper(String, String, Object, IEventListener)created multiple GraphML key definitions for the same mapper instance -
Arrow: Added@Obfuscationannotation to exclude the class from obfuscation. ExcludingArrowfrom obfuscation is necessary for properly reading (and writing) GraphML files. -
Fixed the
@DefaultValueannotations for the#Penand#Paintproperties inArcEdgeStyle,PolylineEdgeStyle,GeneralPathNodeStyleandShapeNodeStyle. -
Fixed GraphML (de-)serialization of ports using
SegmentRatioPortLocationModeland corresponding port location parameter instances.
Layout
-
HierarchicLayout: Fixed bug that caused a violation of the specified minimum distance or edge overlaps in the case of same-layer edges. -
HierarchicLayout: Fixed rare bug that caused same-layer edge to cross through their source or target node, e.g., the port was at the top of the source node but the edge crossed through the source node to leave it at the bottom. -
HierarchicLayout: Fixed bug that sometimes caused the route of back-loop edges with at least one endpoint incident to a group node to unnecessarily enter this group node. -
HierarchicLayout: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled. -
HierarchicLayout: Fixed bug that caused that the directedness of edges incident to groups wasn't considered correctly (seeHierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY). -
HierarchicLayout: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications. -
RecursiveGroupLayoutwhen used withHierarchicLayoutas core layout algorithm: FixedIllegalStateExceptionthat could be triggered when group nodes of the input graph havePortCandidates. -
RecursiveGroupLayout: Fixed bug that caused edges to share the same port even though they should be assigned to different ports. Note that this problem only appeared if the core layout algorithm (seeCoreLayout) is an instance of classHierarchicLayout. -
SimplexNodePlacer: Fixed bug that caused overlaps between edges and nodes when enabling node compaction (see#NodeCompaction) and having edges with either strongPortConstraints orPortCandidates. -
OrganicLayout: Fixed bug that caused group nodes with zero height/width in the layout result. The bug appeared when having empty groups, group node insets smaller than one (defined viaGroupingKeys#GROUP_NODE_INSETS_DPKEY) and no minimum group node size specified (GroupingKeys#MINIMUM_NODE_SIZE_DPKEY). -
OrganicLayoutandClassicOrganicLayout: Fixed bug that caused the algorithm to not consider the specified customIGroupBoundsCalculator(seeClassicOrganicLayout#GroupBoundsCalculator). -
Fixed
OrganicLayoutignoring theGroupNodeModesettings. -
OrganicLayout,ClassicOrganicLayoutandInteractiveOrganicLayout: FixedIllegalArgumentExceptionthat was triggered due toNaNvalues that could occur in case the input graph has a very large number of nodes. -
CircularLayoutandRadialLayout: Fixed bug that caused that always all edges are bundled if bundling is enabled for at least one single edge. More precisely, propertyEdgeBundleDescriptor#Bundledwasn't considered correctly. -
CircularLayout: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled. -
SingleCycleLayout: Fixed bug that may lead to aClassCastExceptionif edge bundling is enabled and a custom node sequencer is specified (seeSingleCycleLayout#NodeSequencer). -
AspectRatioTreeLayout#ROOT_PLACEMENT_DPKEYis now of typeNodeDpKey<RootPlacement>. -
AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DPKEYis now of typeNodeDpKey<SubtreeArrangement>. -
AspectRatioTreeLayoutDatadid not register the correct values with the graph for the root placement and the subtree routing policy. -
MultiPageLayout: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes. -
IsolatedGroupComponentLayout: Fixed bug that caused edge labels that intersect with group nodes even though optionComponentLayout#LabelConsiderationEnabledis enabled. -
EdgeRouter: Fixed rareRuntimeExceptionthat appeared if there were fixed (see#Scope) and grouped edges at the same time. -
EdgeRouter: Fixed rareIllegalArgumentExceptionthat was triggered when having multiple target port candidates, where at least one must be fixed. Furthermore, to trigger the exception it is necessary that the path search algorithm tries to perform an early exit due to maximum duration restrictions or a stop request viaAbortHandler. -
EdgeRouter: Fixed bug that caused violations of minimum first/last segment lengths of grouped edges when using different edge layout descriptors and, second, made the layout algorithm remove a user-registeredIDataProviderwith keyEdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DPKEY. -
EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions (seeEdgeLayoutDescriptor.MonotonicPathRestriction). -
ChannelEdgeRouter: Fixed routing of self-loops that have both source and target end point at the same side of the node. Previously, when multiple such self-loops were present at the same node, the routing produced bad end points located outside of the node. -
Groups#hierarchicalClustering(Graph,int,INodeMap,INodeDistanceProvider,Linkage): FixedNullPointerExceptionthat occurred when the given maximum number of clusters was0or1. -
Fixed
NullPointerExceptions in someLayoutDataimplementations that could happen if some of the mappings where accessed but were never really used in client code. -
Fixed a bug in
TableLayoutConfiguratorwhich altered the size of a column or row if an edge routing algorithm has been applied. -
Fixed a bug in
TableLayoutConfiguratorwhich sometimes used the wrong table insets. -
LayoutGraphAdapter/CopiedLayoutIGraph:IMapperswhich useILabelsas key andboolean,intordoubleas value are now correctly translated into data providers for layout algorithms. -
Fixed a bug that a dataprovider with key
LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEYthat has been filled by aLayoutDatahas been ignored.
Incompatible Changes
Viewer
Model
-
IGraph: The signature of method#addBend(IEdge, int, PointD)has been changed to#addBend(IEdge, PointD, int). -
IMapperRegistry: Renamed the methods#add*to#create*. The type of property#MapperMetadatahas been changed fromIMapperMetadatatoMapperMetadata. -
DefaultGraphandAbstractGraphWrapper: The signature of method#addBend(IEdge, int, PointD)has been changed to#addBend(IEdge, PointD, int). -
FoldingEdgeState: The signature of method#addBend(int, PointD)has been changed to#addBend(PointD, int).
Geometry
-
GeneralPath: The return value type of methodcreatePathhas been changed fromPath3D.DoubletoPath3D.
View
-
Most implementations and some usages of
IAnimationhave been removed and are now available as factory methods inIAnimation. This included the classesLayoutMorpher,EasedAnimation,GeneralPathAnimation,ParallelAnimation,LabelAnimation,NodeAnimation,PortAnimation,EdgeAnimation. -
GraphModelManager: Signature of method#typedHitElementsAt(IInputModeContext, Class<T>, PointD, ICanvasObjectGroup)has been changed to#typedHitElementsAt(Class<T>, IInputModeContext, PointD, ICanvasObjectGroup). -
CanvasComponent: The property#Editablehas been removed. It had no effect on almost all input modes anyway. To no longer allow editing aCanvasComponentuse a different input mode instead, e.g.GraphViewerInputMode, or configure the current input mode in a way that it no longer allows changes. -
GraphComponent: Decorating the lookup ofGraphComponentorIGraphto set theGraphMLIOHandlerused by the IO commands and convenience IO methods onGraphComponentis no longer supported. Use the#GraphMLIOHandlerproperty onGraphComponentinstead. -
The interface
IRectanglePainterhas been replaced by the more powerful interfaceIVisualTemplate. Implementations have been adjusted accordingly and members and classes with name*Painteror*RectanglePainterhave been renamed to*Templateor*VisualTemplate. -
EdgeDecorationInstaller: The method#getBendVisual(IRenderContext,IBend)returning anIVisualwas replaced by the method#getBendDrawing(CanvasComponent,IEdge)returning anIVisualTemplatethat is used for all bends of the passed edge.
The subclassesEdgeFocusIndicatorInstaller,EdgeHighlightIndicatorInstallerandEdgeSelectionIndicatorInstallernow contain staticResourceKeyfields#BEND_TEMPLATE_KEYthat can be used to register customIVisualTemplates for bends on theGraphComponent.
Input
-
The command mechanism has been refactored:
-
ICommand,CommandAction,CommandBindingActionhave been moved to packagecom.yworks.yfiles.view.input. ClassesCommand,CommandBinding,CommandManager,CanExecuteRoutedEventArgs,ExecutedRoutedEventArgsas well as the related properties onCanvasComponenthave been removed.KeyboardInputModeoffers new methods#addCommandBindingand#addKeyBindingfor binding commands to actions and keyboard gestures to commands. -
Class
KeyboardInputModehas been refactored. New interfacesCanExecuteCommandHandlerandExecuteCommandHandlerfor handling commands have been introduced. All methods for binding commands toIEventListenerimplementations have been retrofitted to the aforementioned handlers. All methods for removing command or key bindings have been removed. Methods for adding such bindings now return aKeyboardInputModeBindinginstance that offers a#removemethod for this purpose.
-
-
OverviewInputModenow allows to zoom out further. -
OrthogonalEdgeEditingContext: Changed return value of methods#getMovementInfos(IEdge)and#getSegmentOrientations(IEdge)toIListEnumerable. -
HandleInputMode: For allHandleTypes a correspondingResourceKeywas added as static field that can be used to register a customIVisualTemplatefor this handle type. Per default the#createVisual(IRenderContext,IHandle)method now looks up theIVisualTemplatefor theResourceKeymatching theHandleTypefor the passedIHandle. The#updateVisualmethod is no longer used and was removed. -
An initially collapsed group node as a result of
ICommand#GROUP_SELECTIONnow has a reasonable size. -
IClipboardIdProvider: Signature of method#getId(IModelItem, IGraphClipboardContext)has been changed to#getId(IGraphClipboardContext, IModelItem). -
GraphCopier: Changed signature of method#addBend(IGraph, IGraph, IEdge, IBend, int, PointD)to#addBend(IGraph, IGraph, IEdge, IBend, PointD, int).
Styles
-
AbstractEdgeStyleandAbstractStripeStyle: The return type of method#clone()has been changed fromAbstractEdgeStyle<TVisual>toAbstractEdgeStyle. Furthermore, the return type of methods#createVisual(IRenderContext, IEdge)and#updateVisual(IRenderContext, IVisual, IEdge)has been changed fromTVisual extends IVisualtoIVisual. -
IconLabelStyle:-
The type of property
#Urlhas been changed fromStringtojava.net.URL. -
The constructors have been changed and now take the
URLof the icon instead of itsImage.
-
The type of property
-
MemoryIconLabelStyle: Simplified constructors that now only allow to specify the image of the icon as well as a custom renderer. -
The type of
ArcEdgeStyle#Rendererhas been changed fromIEdgeStyleRenderertoArcEdgeStyleRenderer. -
The type of
PolylineEdgeStyle#Rendererhas been changed fromIEdgeStyleRenderertoPolylineEdgeStyleRenderer. -
TableNodeStyle: The type of property#Rendererhas been changed fromINodeStyleRenderertoTableNodeStyleRenderer. Furthermore, the parameter type of methods#addPropertyChangedListener(IEventListener<PropertyChangedEventArgs>)and#removePropertyChangedListener(IEventListener<PropertyChangedEventArgs>)has been changed fromIEventListenertoIEventListener<PropertyChangedEventArgs>. -
The type of
VoidStripeStyle#Rendererhas been changed fromIStripeStyleRenderertoVoidStripeStyleRenderer.
GraphML
-
GraphML annotations:
SerializationVisibilityTypeandGraphMLSerializationModehave been merged toGraphMLMemberVisibility. -
Property: The properties#Valueand#OwnerInstancehave been removed. The new methodsgetValueandsetValuenow take the owner instance as parameter. -
HandleSerializationEventArgs: The property#SourceTypeis now of typejava.lang.reflect.Typeinstead ofjava.lang.Class. -
IWriteContextandIParseContext: A parameter of typeClass<T>that describes the target type has been added to the#getCurrentmethods. -
XamlSerializer: Signature of method#serialize(Type, IWriteContext, Object)has been changed to#serialize(IWriteContext, Object). -
IXamlNameMapper: The return type of methodgetName(IWriteContext, Type)has been changed fromStringtoXmlName. -
QueryOutputHandlersEventArgs: ConstructorQueryOutputHandlersEventArgs(IWriteContext, KeyScope, Map<Object, IOutputHandler>)has been changed toQueryOutputHandlersEventArgs(IWriteContext, KeyScope). -
GraphMLWriter: Return type of method#getOutputHandlers(IWriteContext, KeyScope)has been changed fromMap<Object, IOutputHandler>toIterable<IOutputHandler>. -
AbstractInputHandler: The return type of method#initializeFromKeyDefinition(IParseContext, Element)has been changed frombooleantovoid.
Algorithms
-
The following classes have been deprecated:
GraphEvent,IGraphListener,Maps.HighPerformanceIntMapandMaps.HighPerformanceDoubleMap. -
YList: The constructorYList(Collection<Object>)has been changed toYList(Collection<Iterable>). Method#remove(int)has been deprecated. -
Comparators: Method#compare(int, int)has been deprecated. -
Graph: Methods#addGraphListener(IGraphListener),#edgeObjects(),#getSource(Object),#getTarget(Object),#nodeObjects(),#removeGraphListener(IGraphListener),#firePostEvent()and#firePreEvent()have been deprecated.
Layout
-
ClassicOrganicLayout: The return type of method property#PreferredEdgeLengthhas been changed frominttodouble. Note that this also induces a corresponding change in classOrganicLayoutData. -
OrganicLayoutandClassicOrganicLayout: The type of constant#PREFERRED_EDGE_LENGTH_DPKEYhas been changed fromEdgeDpKey<Integer>toEdgeDpKey<Double>. -
LayoutGraph: Methods#getEdgeLabelLayout(Object),#getEdgeLayout(Object),#getNodeLabelLayout(Object)and#getNodeLayout(Object)have been deprecated. -
HierarchicLayoutCore.IncrementalHinthas been deprecated. MethodINodeData#getIncrementalHint()now returnsObject. -
LayoutGraphAdapter: The type of the provided data provider keys have been changed fromObjectto a more specific type. -
PartitionCellId: The return type of property#Cellshas been changed fromCollection<Object>toIterable<Cell>. -
HierarchicLayout:- The edge grouping now supports to group incoming and outgoing edges of a node. In previous versions incoming and outgoing edges always defined separate groups even though the user specified the same group IDs for such edges.
-
Method
#isIntegratedEdgeLabelingEnableddoes now always returnfalseif the labeling algorithm is disabled (seeMultiStageLayout#isLabelingEnabled. In previous versions it was only required that an appropriate labeling algorithm was specified, but it was not necessary that it is enabled. Therefore, the integrated labeling state queried from the property might not have corresponded to what the layout algorithm actually did. The same behavior change applies for the following methods:HierarchicLayout#isNodeLabelConsiderationEnabledOrthogonalLayout#isIntegratedEdgeLabelingEnabledOrthogonalLayout#isNodeLabelConsiderationEnabled
-
HierarchicLayoutmay now place source/target labels in layers that contain common nodes. In previous versions such labels were always placed in separate layers which often led to less compact drawings with superfluous bends. -
Geometry information registered with data providers with keys
#ALTERNATIVE_GROUP_BOUNDS_DP_KEYand#ALTERNATIVE_EDGE_PATH_DP_KEYis now automatically rotated according to the specified layout orientation. This fixes unstable from-sketch behavior in incremental layout mode when using an orientation other than top-to-bottom. User that
-
OrganicLayoutdoes no longer resize empty group nodes, possible ignoring a minimum group node size for them (seeGroupingKeys#MINIMUM_NODE_SIZE_DPKEY). The behavior with respect to empty group nodes is now in line with the behavior of other common layout algorithms. -
Method
Centrality#closenessCentralitynow sets the closeness of a node toInfinityif the sum of the shortest path distances is0. Before, it was set toNaNin such cases. -
Groups.Dendrogramdoes no longer extend classGraph. To enable convenient iteration of a dendrogram, method#getChildren(Node)was added. -
SingleCycleLayout: Property#NodeSequencernow allows to specifynullto return to the default sequencer. In previous versions, specifyingnullleads to anIllegalStateException.
Demo Improvements
- The package structure of the source code demos has been changed to a more intuitive structure.
- The Viewer distribution now provides several source code demos.
- The layout code in the BPMN demo was simplified and is now easier to adjust
- A new demo application that shows how to configure hierarchic layout for arranging Sankey diagrams was added.
-
The new
GraphMLCompatibilityDemothat shows how to load GraphML files created by yFiles for Java 3.0.x was added.
yFiles for Java (Swing) 3.0.0.4
Improvements
Demos
-
BPMNEditorDemo: The classBpmnLayoutDatawas added and is now used instead of theBpmnLayoutConfigurator. -
BPMNEditorDemo: Fixed the initialization of snapping and of the default group node style. -
LayoutStylesDemo: The bound restrictions of the Organic layout can now be specified explicitly. -
LayoutStylesDemo: Fixed the configuration for the minimum node distance of the Organic layout that was not editable before.
Bugfixes
Viewer
-
Folding: Fixed a bug in the folding mechanism that could lead to an endless loop when loading a GraphML file containingFoldingEdgeStateinformation. -
PathBasedEdgeStyleRenderer: Fixed bug that could leave visual artifacts when switching to an arrow that returned anullvisual. -
CanvasComponent: Fixed a bug in the mouse wheel scroll behavior that moved the viewport in the wrong direction when scrolling page-wise vertically.
Layout
-
Fixed
java.lang.IllegalArgumentException: Comparison method violates its general contract!problems caused by callingjava.util.Arrays.sortforjava.util.Comparatorimplementations that do not imply a total order. -
HierarchicLayout: Fixed bug that caused a violation of the minimum first/last segment length for reversed/backloop edges which connect to group nodes. -
HierarchicLayout: Fixed rare bug that may cause overlaps between labels and segments of edges with octilinear routes. -
HierarchicLayout: Fixed possible infinite loop if there are critical edges (seeCRITICAL_EDGE_DP_KEY). -
TreeLayout: Fixed possible group node overlaps in conjunction with some node placers, for exampleAssistantNodePlacer. -
TreeLayout: Fixed bug that caused less compact layout results when using node halos (seeNodeHalo). -
OrganicLayout: The type of the dataprovider keyGROUP_NODE_MODE_DPKEYwas fixed fromNodeDpKey<Object>toNodeDpKey<GroupNodeMode>. -
OrganicLayoutData: The type of the propertyGroupNodeModeswas fixed fromItemMapping<Node, GroupNodeMode>toItemMapping<INode, GroupNodeMode>.
yFiles for Java (Swing) 3.0.0.3
Bugfixes
Viewer
-
Folding: when using a
MergingFoldingEdgeConvertertheFoldingEdgeStaterepresenting multiple edges could become inconsistent after removing or reconnecting some of the edges. - Path Cropping: fixed a certain case where inaccurate numeric results with ports on node shape outlines would result in the first or last edge segment being completely removed.
-
DefaultEdgePathCropper: fixed an issue wheregetIntersectionwould not be called when cropping an edge at the source end. -
IInputModeContext: fixed a bug ingetGraphthat could cause a stack overflow. - Edge Creation: fixed bug that could cause a 'Node not in this graph' exception during interactive edge creation.
-
PopupMenuInputMode: moved the default popup menu location one pixel to the right and one pixel down to prevent the mouse cursor from being positioned directly on the popup menu's border. (Mouse clicks on the popup menu's border do neither close the popup menu nor trigger any of the popup menu's entries.)
Layout
-
HierarchicLayout: fixed rareNullPointerExceptiontriggered inAsIsSequencerfor edges incident to group nodes that have a sketch without bend points as well as port constraints. -
HierarchicLayout: fixed bug that may cause non-orthogonal segments of grouped edges even though orthogonal edge routing is enabled. -
HierarchicLayout: improved compactness of layouts that feature group nodes with insets and (group) nodes with halos (NodeHalo). Previously, the specification of halos could enlarge the insets of group nodes by an unnecessary large amount. -
HierarchicLayout: fixed an exception that sometimes got triggered when sequence constraints were used. -
PartialLayout: fixedNullPointerExceptionthat appeared if noDataProviderwith keyPARTIAL_NODES_DP_KEYis registered with the input graph.
yFiles for Java (Swing) 3.0.0.2
Improvements
Documentation
- The Developer's Guide has been completely revised. Now it consists of two parts: The first part covers the basics of yFiles for Java, while the second part describes in detail how the behavior of the library can be adapted to the customer's requirements.
Viewer
-
Events defined on
DropInputModenow carry additional event argumentsDropTargetEventArgswhich hold the original Java Swing drag and drop events.
Bugfixes
Viewer
-
Fixed shortcut
Ctrl+Ofor the command to open a document. -
Methods
GraphMLIOHandler.addRegistryOutputMapper(String,Object)andaddRegistryOutputMapper(String, String, Object, IEventListener)wrongly created multiple GraphML key definitions for the same mapper instance. -
Some GraphML annotations have been added to properties of label models and enums to increase the cross-product
compatibility of generated GraphML files. The following properties have been annotated:
SmartEdgeLabelModel.AutoRotationEnabledis now annotatedAutoRotationHorizontalAlignment'sCENTER,LEFTandRIGHTvalues are now annotatedCenter,LeftandRightTextTrimming'sNONE,CHARACTER_ELLIPSISandWORD_ELLIPSISvalues are now annotatedNone,CharacterEllipsisandWordEllipsisTextWrapping'sWRAP_WITH_OVERFLOW,NO_WRAPandWRAPvalues are now annotatedWrapWithOverflow,NoWrapandWrapEdgePathLabelModel.AutoRotationEnabledis now annotatedAutoRotationEdgeSegmentLabelModel.AutoRotationEnabledis now annotatedAutoRotationFreeEdgeLabelModel.RelativeAngleEnabledis now annotatedEdgeRelativeAngleAbstractJComponentLabelStyle.AutoFlippingEnabledis now annotatedAutoFlipArcEdgeStyle.FixedHeightEnabledis now annotatedFixedHeightHtmlLabelStyle.AutoFlippingEnabledis now annotatedAutoFlipNodeStyleLabelStyleAdapter.AutoFlippingEnabledis now annotatedAutoFlip
-
The default value for GraphML serialization of
PanelNodeStyle.Coloris nowBlack.
Layout
-
HierarchicLayout: FixedNullPointerExceptionthat could happen inAsIsSequencerwhen incremental group hints are defined (seeIncrementalHintsFactory.createIncrementalGroupHint) along with specific port constraints on edges incident to an incremental group node. -
HierarchicLayout: Improved result if compact label placement is enabled (which is the default), seeSimplexNodePlacer.LabelCompaction. In previous versions the labels may have been placed in a stacked style even if this did not make the result more compact (e.g. if all labels are placed to the right of the edges). -
GraphPartitionManager: Fixed functionality to hide edges when using methodsGraphPartitionManager.hide. Previously, edges were actually not hidden from the graph. -
HierarchicLayout: Fixed distance between vertical (in a top-to-bottom layout) segments of same layer edges that connect to group nodes. This also applies to self-loops that connect to the top or bottom of a group node with both ends as well as same layer parts of other edges like back-loops. -
HierarchicLayout: Fixed bug that caused the minimum edge-to-edge distance to be violated by edges with strong port constraints that cross each other.
Demos
- BPMNEditorDemo: Fixed positioning of the dynamic substate button of activity and choreography nodes.
- Fixed invalid HTML structure of demo readmes.
yFiles for Java (Swing) 3.0.0.1
Demos and Tutorials
-
Added new demo
layout.LayoutStylesDemothat presents all major layout algorithms in an easily explorable and configurable manner. -
Added new demo
viewer.svgimageexport.SVGImageExportDemothat shows how to export the contents of aGraphComponentto SVG. -
Added new demo
viewer.pdfimageexport.PDFImageExportDemothat shows how to export the contents of aGraphComponentto PDF, EPS and EMF. -
Added new
demo viewer.svgnodestyle.SVGNodeStyleDemothat shows how to use SVG for node visualization. -
Added new demo
bpmn.editor.BPMNEditorDemowith corresponding graph element styles and a customized layout algorithm that demonstrates how to use yFiles for BPMN applications - GraphViewerDemo: Shift click on a node in the movie graph opens now a related link in the default browser (as already stated by the graph's description).
Improvements
Viewer
-
CanvasComponent: Added an eventFitContentViewMarginsChangedthat gets invoked when the propery#FitContentViewMarginshas been changed.
Documentation Viewer
- Method parameters are shown in search results and quick navigation popups.
- Default properties are listed in a separate member section.
- The documentation viewer can be used offline by running
bower installand openingindex-offline.html. - Fixed links to package documentation pages.
Bugfixes
Viewer
-
Property
CanvasComponent#FitContentViewMarginsis now initialized to (10,10,10,10) as mentioned in its documentation. -
The
SerializationVisibilityannotation as well as theSerializationVisibilityTypeenum that are used to customize the serialization behavior of properties are now public to work properly. -
Renaming
FlagsEnummembers withGraphMLannotations did not work. -
CollapsibleNodeStyleDecoratordidn't handle the hit testing correctly when different button sizes for the collapsed and expanded state were used. -
NodeStyleLabelStyleAdaptersometimes produced aNullPointerExceptionduring rendering. -
NodeStylePortStyleAdapterdidn't work well together withAbstractComponentNodeStyleas inner style. -
The
AutoCleanupEnabledproperty ofPortDefaultswasn't serialized correctly as 'AutoCleanup' due to a missing GraphML rename. -
Port location model parameters created with
GenericPortLocationModelweren't serialized correctly. -
ITable#setStyle(ILabel, ILabelStyle)andITable#setLabelModelParameterignored the provided style resp. label model parameter.
Layout
-
SeriesParallelLayout: Fixed possibleNullPointerExceptionwhen handling graphs with group nodes. -
ParallelEdgeLayout: Fixed bug that caused wrong edge port coordinates. -
SeriesParallelLayout: Fixed violations of the minimum first and last segment length and self-crossings of octilinear edges. -
SeriesParallelLayout: Fixed bug that caused node-to-node or node-to-edge overlaps in the case where the graph contained group nodes and node/edge labels. -
HierarchicLayout: Fixed bug that caused critical edges to not be aligned (seeCRITICAL_EDGE_PRIORITY_DPKEY). -
BusRouter: Fixed rareIllegalStateExceptioncaused by non-orthogonal edge segments. -
TreeLayout: Fixed bug that occurs when edges with single port constraints are reversed during the layout. -
Polyline.EdgeRouter: Fixed possibleNullPointerExceptionthat may appear if a specifiedPortCandidatehas multiple directions. -
OrganicLayout: Fixed a bug that may occur when usingOrganicLayoutwithRecursiveGroupLayoutandLayoutMultiplexer.
Incompatible Changes
Changes in Default Behavior
Viewer
-
FlagsEnummembers now respectGraphMLannotations for renaming. Such members can't be read back in prior versions of the library. Reading older files with the current version still works.
yFiles for Java (Swing) 3.0
This is the initial release of the 3.0 series that brings a modernized API, many new or improved library features and support for current Java language features.
Please see the Developer's Guide for migration instructions from yFiles for Java 2.x