yFiles for JavaFX Change Log

yFiles for JavaFX 3.1 - Changes Since 3.0

Improvements

Performance

Major performance improvements of the viewer part and new performance-related configuration options:
  • Improved general render performance especially for large graphs dramatically.
  • PolylineEdgeStyle has a new property #PathRenderPolicy that allows to choose how the path of the edge is transformed to javafx.scene.Node. Choosing PathRenderPolicy#LINES boosts the render performance a lot but reduces the render quality at bends.
  • PolylineEdgeStyle: Rendering of straight-line edges was sped up as they are always rendered with PathRenderPolicy#LINES without the reduced render quality at bends.
  • PolylineEdgeStyle has a new property #PathClippingPolicy that allows to choose if the path of the edge should be clipped at the viewport before transforming it to a javafx.scene.Node. This especially boosts the performance if non-solid pens are used.
  • EdgeDecorationInstaller has the new properties #PathRenderingPolicy and #PathClippingPolicy and uses PathRenderPolicy#LINES and PathClippingPolicy#ROUGH per default which results in a great render performance improvement for edge selection, focus and highlight indication.
  • The property GraphModelManager#VirtualizationZoomThreshold has been added that allows to switch of the virtualization of all model items below the specified zoom value. This is useful for large graphs where removing elements outside the viewport from the visual tree is more expensive then updating them.

Eclipse E4 RCP Demo

The Eclipse RCP demo has been completely redesigned and adapted for the e4 framework. The demo shows in detail how to integrate yFiles for JavaFX into an Eclipse e4 application. The following features have been implemented:
  • menu and toolbar using the Eclipse framework with commands for
    • changing the language at runtime
    • printing and image export
    • loading and saving graphs in GraphML format
    • undo, redo and clipboard support
    • zooming
    • performing layout calculation
    • grouping and folding
  • perspectives for editing and for viewing and navigating the graph
  • many parts providing
    • palettes for different node and edge styles
    • various layout algorithms with extensive configuration options
    • a graph overview
    • a panel for changing the properties of nodes and edges
    • a structure view showing the hierarchical structure of the graph
    • context views showing neighbors, predecessors and successors of selected nodes or the content of a selected folder

General

  • 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.

Viewer

  • Some methods that threw a NullPointException if one of their parameters were null now throw an IllegalArgumentException instead.

Styles

  • DefaultLabelStyle: A new property #TextOverrun specifies the behavior to use if the text of the label exceeds the available space for rendering the text.
  • The types of the #INSTANCE fields of VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, VoidPortStyle, and VoidStripeStyle have been changed to the concrete types instead of the interface types (e.g. INodeStyle).
  • TemplateNodeStyle, TemplateLabelStyle, TemplatePortStyle and TemplateStripeStyle throw now RuntimeExceptions when the control could not be loaded from a specified FXML file.
  • TemplateLabelStyle, TemplateNodeStyle, TemplatePortStyle, and TemplateStripeStyle now support URLs referencing FXML files in addition to the existing lookup approach using style resource keys.

Input Modes

  • Nodes will now show their target grouping hierarchy z-order during a reparenting gesture.
  • MouseHoverInputMode: The OwnerNode of a Tooltip is now set to the CanvasControl on which the Tooltip is displayed.

GraphML

  • GraphMLIOHandler now has #addXamlNamespaceMapping methods for easier control of the XML namespace for certain types.
  • GraphMLIOHandler has two new events, #QueryType and #QueryName that allow for fine-grained control over XML namespace writing and parsing for certain types.

Model

  • An initially collapsed group node as a result of a ICommand#GROUP_SELECTION command now has a reasonable size.

Layout

  • LayoutUtilities#applyLayout now supports layout of tables.
  • HierarchicLayout: Slightly reduced the number of bends when integrated edge labeling is enabled.
  • HierarchicLayout: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to orientations LayoutOrientation#LEFT_TO_RIGHT, LayoutOrientation#RIGHT_TO_LEFT and LayoutOrientation#BOTTOM_TO_TOP. Geometry information registered with data providers with keys HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY and HierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEY is now automatically rotated according to the specified layout orientation.
  • AspectRatioTreeLayout#RootPlacementDpKey is now of type NodeDpKey<RootPlacement>.
  • AspectRatioTreeLayout#SubtreeRoutingPolicyDpKey is now of type NodeDpKey<SubtreeArrangement>.

Demos

  • The new GraphML compatibility demo that shows how to load GraphML files created by yFiles for JavaFX 2.0.x and 3.0.x was added.
  • Polished and simplified BPMN Editor demo.
  • SWTDemo and SVGImageExportDemo : Made the build script Java 9 ready.

Bugfixes

Viewer

  • Fixed a bug that slowed down the render performance of the CanvasControl especially for larger graphs.
  • Switching the GraphControl's #InputMode in a key event handler no longer throws an exception.
  • UndoEngine now uses the end time of the previous undo unit for automatic bracketing instead of the start time. This improves auto-bracketing to work as intended for undo units spanning a time greater than #AutoMergeDuration.
  • 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.
  • Fixed a bug in GraphModelManager that didn't update the child groups if a new #ContentGroup is set.
  • Fixed right-to-left orientation handling for:
    • image export and printing,
    • moving focus,
    • mouse scrolling and scroll commands,
    • resize cursors,
    • drop shadow of BevelNodeStyle, PanelNodeStyle, and ShinyPlateNodeStyle.
  • Mouse2DEvent#ChangedModifiers sometimes provided wrong values.
  • Fixed a bug that prevents to free resources which are occupied by a visual when the visual leaves the viewport.
  • Fixed an issue where Touch2DEvents of type Touch2DEvent#EXITED were never raised.
  • The shortcut for command Toggle Item Selection has been replaced by Control+Space for Macintosh. The former shortcut Command+Space was reserved by the operation system.
  • Fixed the maximum y-coordinate for horizontal grid lines produced by GridVisualCreator with grid style LINES.
  • CanvasControl: Re-enabled mouse wheel scrolling for Linux and Mac OS.
  • CanvasControl: Fixed a bug that prevented slow mouse wheel zooming and scrolling with some devices.

Styles

  • Fixed a bug that might occur when changing wrapped styles in CollapsibleNodeStyleDecorator, ShadowNodeStyleDecorator, NodeStyleLabelStyleAdapter and NodeStylePortStyleAdapter.
  • TemplateStripeStyle: Implemented method #createControl(IRenderContext, IStripe).
  • Fixed an exception that occurred when using MemoryIconLabelStyle.
  • Fixed some styles to call IRenderContext#childVisualRemoved after the Visual actually has been removed instead of just before the removal.
  • Arrow now considers all properties of its Arrow#Pen instead of only its Paint and can handle null as Pen.
  • Fixed a bug that prevented TemplateNodeStyleRenderer to use implementations of IShapeGeometry, IMarqueeTestable, IBoundsProvider or IHitTestable provided by the TemplateNodeStyle.
  • Fixed NodeStyleLabelStyleAdapter which neither showed the label text nor did it move with its owner.
  • DefaultLabelStyle: Fixed #updateVisual to take all style properties into account when determining whether or not the visualization has to be re-created.
  • DefaultLabelStyle: Fixed a bug that placed the text incorrectly when the width or height of the label was very small.
  • AbstractTemplateStyle: Fixed a bug that prevented serialization of the #ContextLookup property after obfuscating the library.

Input Modes

  • During reparenting, the edges at reparenting nodes were drawn below the group(s) and thus they were not visible. If reparenting was canceled, these edges stayed behind the group(s) and remained invisible.
  • CreateEdgeInputMode did not always start correctly for quick gestures on slow devices.
  • CreateEdgeInputMode did not trigger the #EdgeCreationStarted event for programmatic initialization of the edge creation gesture.
  • Fixed a bug in CreateEdgeInputMode that didn't show the edge preview when the edge would be created between a node and one of its ancestors or vice versa.
  • Setting CreateEdgeInputMode's #CancelRecognizer could potentially get the input mode into a broken state.
  • Fixed a bug in CreateEdgeInputMode that broke the edge preview after the input mode was uninstalled and reinstalled again.
  • CreateEdgeInputMode fired gesture cancel events even if it was not started before.
  • Fixed a bug in bend creation for orthogonal edges when grid snapping was enabled.
  • HandleInputMode's #CurrentHandle property could not always be obtained during the #DragFinished, #DragFinishing, #DragCanceling, and #DragCanceled events of HandleInputMode
  • Fixed a possible exception in NodeDropInputMode when snapping is enabled, but preview disabled.
  • Fixed a bug in StripeDropInputMode that could result in nodes being moved to a wrong stripe when a new stripe was created or an exising one relocated.
  • StripeDropInputMode no longer calls ItemCreator twice.
  • Fixed an exception in DropInputMode which occurred if a drag enter was recognized while another drag action was still running.
  • Setting a new OverviewInputMode for GraphOverviewControl now updates the #InputMode property accordingly.
  • Fixed reparent highlighting when multiple nodes are reparented together.
  • Fixed a bug in MoveInputMode that sometimes prevented the input mode from starting the move gesture so that other input modes like CreateEdgeInputMode could jump in.
  • TextEditorInputMode: Fixed a bug that inserts a linebreak after a label has been edited.
  • TextEditorInputMode: Fixed a bug that prevents the usage of the properties #CancelRecognizer, #StopRecognizer and #LineBreakRecognizer.
  • Stopped TextEditorInputMode from firing #EditingCanceled events if text editing has not been cancelled.

GraphML

  • Fixed shared reference handling in GraphML for java.util.Collection and java.util.Map instances. Collections and maps are only shared if the same instances are used.
  • Fixed a bug that could result in an exception when parsing a GraphML file with empty text elements.
  • GraphML serialization now uses the correct schema location http://www.yworks.com/xml/schema/graphml.java.fx/3.0/ygraphml.xsd.
  • Fixed GraphML deserialization of IconLabelStyle instances.
  • Fixed a bug in GraphMLIOHandler that prevented that packages with a predefined xml namespace could be mapped to another xml namespace.
  • Fixed structured GraphML serialization of URL instances.
  • Fixed structured GraphML deserialization of label model position enum values.
  • Fixed GraphML (de-)serialization of ports using SegmentRatioPortLocationModel and corresponding port location parameter instances.
  • Fixed a bug in GraphML serialization that always always looked for singletons on classes that were annotated with @GraphML even if the @GraphML#singletonContainers property was not set.

Model

  • Fixed an unnecessary exception in IGraph#calculateLabelPreferredSize which was thrown when the label owner was not part of the graph, but all optional parameters have been passed anyway. In that case there was no need to fetch the appropriate LabelDefaults and thus the question of whether the owner is in the graph or not is irrelevant.
  • Fixed a bug in IGraph#addLabel that ignored an explicitly specified preferred size if folding is enabled.
  • Fixed some incorrect usages of exceptions in IGraph.
  • MapperRegistry#addMapper no longer throws an exception when trying to replace a mapper for an existing key.

Labels

  • Labels with NinePositionsEdgeLabelModel now disappear when the owner edge has no visible edge path. This can happen for example when nodes are moved onto each other. Previously they appeared at unexpected locations, including the origin (0,0) and the upper left corner of the source node.
  • FreeLabelModel#INSTANCE, FreeEdgeLabelModel#INSTANCE, and FreeNodeLabelModel#INSTANCE are now serialized correctly to GraphML when not used as part of their parameters (e.g. within CompositeLabelModel).
  • Fixed incorrect default value attribute for SandwichLabelModel parameters.
  • Fixed an issue where the parameter finder for FreeEdgeLabelModel cannot place the label correctly for self-loops. Labels previously always appeared at the port location in this case.

Geometry

  • GeneralPath#getTangent now returns null if there is no tangent at the requested position. Previously, it returned a bogus tangent.
  • Fixed GeneralPath#isVisible to no longer return true for invisible paths.

Layout

  • HierarchicLayout: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications.
  • HierarchicLayout: Fixed bug that may lead to too large group nodes if there are grouped edges.
  • HierarchicLayout: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled.
  • HierarchicLayout: Fixed bug that caused that the directedness of edges incident to groups wasn't considered correctly (see HierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY).
  • OrganicLayout and ClassicOrganicLayout: Fixed bug that caused the algorithm to not consider the specified custom GroupBoundsCalculator (see ClassicOrganicLayout#GroupBoundsCalculator).
  • OrganicLayout, ClassicOrganicLayout and InteractiveOrganicLayout: Fixed IllegalArgumentException that was triggered due to NaN values that could occur in case the input graph has a very large number of nodes.
  • RecursiveGroupLayout: Fixed bug that caused edges to share the same port even though they should be assigned to different ports. Note that this problem only appeared if the core layout algorithm (see CoreLayout) is an instance of class HierarchicLayout.
  • Polyline.EdgeRouter: Fixed bug that caused violations of minimum first/last segment lengths of grouped edges when using different edge layout descriptors and, second, made the layout algorithm remove a user-registered DataProvider with key EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DP_KEY.
  • Polyline.EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions (see EdgeLayoutDescriptor#MonotonicPathRestriction).
  • MultiPageLayout: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes.
  • CircularLayout and RadialLayout: Fixed bug that caused that always all edges are bundled if bundling is enabled for at least one single edge. More precisely, property EdgeBundleDescriptor#isBundled wasn't considered correctly.
  • SingleCycleLayout: Fixed bug that may lead to a ClassCastException if edge bundling is enabled and a custom node sequencer is specified (see SingleCycleLayout#NodeSequencer).
  • CircularLayout: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled.
  • Polyline.EdgeRouter: Fixed rare IllegalArgumentException that was triggered when having multiple target port candidates, where at least one must be fixed. Furthermore, to trigger the exception it is necessary that the path search algorithm tries to perform an early exit due to maximum duration restrictions or a stop request via AbortHandler.
  • IsolatedGroupComponentLayout: Fixed bug that caused edge labels that intersect with group nodes even though option ComponentLayout#isLabelAwareness is enabled.
  • Fixed OrganicLayout ignoring the GroupNodeMode settings
  • AspectRatioTreeLayoutData did not register the correct values with the graph for the root placement and the subtree routing policy.
  • Fixed NullPointerExceptions in some LayoutData implementations that could happen if some of the mappings where accessed but were never really used in client code.

Incompatible Changes

Viewer

  • GraphControl's protected method #getGraphMLIOHandler has been replaced with public property #GraphMLIOHandler.
  • The shortcut for command Toggle Item Selection has been replaced by Control+Space for Macintosh. The former shortcut Command+Space is reserved by the operating system.
  • The #Editable property has been removed from CanvasControl. It had no effect on almost all input modes anyway. To no longer allow editing a GraphControl use a different input mode instead, e.g. GraphViewerInputMode, or configure the current input mode in a way that it no longer allows changes.
  • CompoundKeyEvent as well as all related methods have been removed. The native KeyEvent should be used instead.
  • ModifierKeys#Windows has been renamed to #Meta to correspond to the native modifier names.
  • The constructor of GeneralPath that takes a JavaFX Path has been removed.
  • The property FlowDirection of DefaultLabelStyle is not necessary for changing the NodeOrientation and has therefore been removed.
  • The unused constant XamlNamespaceConstants#YFILES_JAVA_FX_WPF_BRIDGE_NS was removed.
  • The Paint and Pen parameters of GeneralPath#CreatePath and GeneralPath#UpdatePath have been removed. A Paint can still be applied as Path#Fill property while a Pen can be applied via Pen#styleShape.

Styles

  • TemplateLabelStyle: Changed TemplateLabelStyle(String, TemplateLabelStyleRenderer) to TemplateLabelStyle(TemplateLabelStyleRenderer).
    TemplateNodeStyle: Changed TemplateNodeStyle(String, TemplateNodeStyleRenderer) to TemplateNodeStyle(TemplateNodeStyleRenderer).
    TemplatePortStyle: Changed TemplatePortStyle(String, TemplatePortStyleRenderer) to TemplatePortStyle(TemplatePortStyleRenderer).
    TemplateStripeStyle: Changed TemplateStripeStyle(String, TemplateStripeStyleRenderer) to TemplateStripeStyle(TemplateStripeStyleRenderer).
    If a custom renderer has to be used, the style resource or the style resource key has to be set using the corresponding property.
  • AbstractTemplateStyle: Changed type of static property #ClassLoader from DelegatingClassLoader to ClassLoader.
  • TemplateStripeStyle: Changed return value type of method #getStyle(IRenderContext,IModelItem) from java.lang.Object to java.net.URL.
  • IconLabelStyleRenderer#Style is now of type ILabelStyle instead of IconLabelStyle as it is also used as renderer of the MemoryIconLabelStyle.

Input Modes

  • CreateEdgeInputMode now triggers the #EdgeCreationStarted event for programmatic edge creation with the #doStartEdgeCreation method.
  • KeyboardInputMode: The methods #addHandler(IEventRecognizer,ExecuteCommandHandler), #addRecognizerBinding and #getRecognizerBindings as well as the class KeyboardInputModeRecognizerBinding has been removed.
  • DropInputMode has been redesigned to take a javafx.scene.input.DataFormat instead of an expected type to retrieve transfer data from a drag operation. Checking for expected (model item) types has been moved to ItemDropInputMode. As part of this redesign, the following API changes were made:
    3.0 3.1
    DropInputMode#DropInputMode(Class) DropInputMode#DropInputMode(DataFormat)
    DropInputMode#getDropData(Dragboard) DropInputMode#getDropData(Dragboard, DataFormat)
    DropInputMode#adjustTransferMode(DragEvent) DropInputMode#acceptDrag(DragEvent)
    DropInputMode#onDragEntered(InputModeEventArgs) DropInputMode#onDragEntered(DragEvent)
    DropInputMode#onDraggedOver(InputModeEventArgs) DropInputMode#onDraggedOver(DragEvent)
    DropInputMode#onDragDropped(InputModeEventArgs) DropInputMode#onDragDropped(DragEvent)
    DropInputMode#onDragExited(InputModeEventArgs) DropInputMode#onDragExited(DragEvent)
    DropInputMode#createInputModeEventArgs() DropInputMode#createInputModeEventArgs(DragEvent)
    ItemDropInputMode#ItemDropInputMode(Class<T>, Class) ItemDropInputMode#ItemDropInputMode(Class<T>, DataFormat)
    NodeDropInputMode#NodeDropInputMode(Class) NodeDropInputMode#NodeDropInputMode(DataFormat)
    Additionally, the DropDataMap property has been changed to accept null values. If the DropDataMap is null, the DropInputMode classes will process the transfer data from the drag operation instead of querying the DropDataMap for data.
    Finally, the generic InputModeEventArgs event type for drag entered, drag over, drag dropped, and drag left events has been replaced with the new event type DragEventArgs.

GraphML

  • GraphML reading is now more strict with regards to GraphML-renamings. When reading a member of a serialized type with a corresponding @GraphML(name = "NewName") annotation, the GraphML reader previously accepted both the actual member name and NewName. Now the GraphML reader will no longer accept the actual member name but only the annotated NewName.
  • Added parameter of type Class<T> describing the target type to methods IWriteContext#getCurrent and IParseContext#getCurrent.

Model

  • IGraph and its implementations now always throw an IllegalArgumentException for operations on elements which are not in the graph. (Previously, some of those methods threw an IllegalStateException.)

Geometry

  • GeneralPath no longer overwrites #equals. To compare two GeneralPath instances as if they were values, use the #isEquivalentTo method.

Layout

  • HierarchicLayout may now place source/target labels in layers that contain common nodes. In previous versions such labels were always placed in separate layers which often led to less compact drawings with superfluous bends.
  • SingleCycleLayout: Method NodeSequencer now allows to specify null to return to the default sequencer. In previous versions, specifying null leads to an IllegalStateException.
  • HierarchicLayout: Geometry information registered with data providers with keys HierarchicLayout#ALTERNATIVE_GROUP_BOUNDS_DP_KEY and HierarchicLayout#ALTERNATIVE_EDGE_PATH_DP_KEY is now automatically rotated according to the specified layout orientation. This fixes unstable from-sketch behavior in incremental layout mode when using an orientation other than top-to-bottom. User that

Changes in Default Behavior

Viewer

  • Decorating the lookup of GraphControl or IGraph to set the GraphMLIOHandler used by the IO commands and convenience IO methods on GraphControl is no longer supported. Use the GraphMLIOHandler property on GraphControl instead.
  • CreateEdgeInputMode now respects the settings #SnappingBendsToSnapLinesEnabled and #SnappingBendAdjacentSegmentsEnabled on GraphSnapContext. It also handles grid snapping according to the configuration for snapping.
  • CreateEdgeInputMode will no longer cancel edge creation when using touch and trying to create a bend where #ValidBendHitTestable returns false.

yFiles for JavaFX 3.0 - Changes Since 2.0.0.1

General

Package structure

All classes have been reorganized into a new package hierarchy.

  • Generally all classes that relate to the graph structure can be found in com.yworks.yfiles.graph now, styles, including the void styles, are in com.yworks.yfiles.graph.styles, label layout models are in com.yworks.yfiles.graph.labelmodels, port location models are in com.yworks.yfiles.graph.portlocationmodels.

  • All classes related to GraphControl can now be found in com.yworks.yfiles.view. The animation and export related classes have been moved to this package as well. Input-related classes (e.g. input modes and supporting types) can be found in com.yworks.yfiles.view.input.

  • Layout classes can be found in com.yworks.yfiles.layout and its respective sub-packages.

Functionality moved to interfaces or base classes

  • ICanvasContext: factory methods replace the removed class CanvasContext.

  • IInputModeContext: factory methods replace the removed class SimpleInputModeContext.

  • ILookup, IContextLookup and IContextLookupChainLink: factory methods were moved from the removed class Lookups.

  • IContextLookupChainLink: factory methods replace the removed properties HidingLookupChainLink, FactoryLookupChainLink and AddingLookupChainLink.

  • IEnumerable (previously Enumerable): factory methods replace the removed classes EmptyEnumerable, CompositeEnumerable and CompositeEnumerator.

  • IListEnumerable: factory methods replace the removed classes EmptyListEnumerable, ListEnumerable and ListEnumerableExtensions.

  • IEventRecognizer: factory methods replace the removed classes EventRecognizers, EventRecognizerExtensions, EventRecognizerCallback, Mouse2DEvents, Touch2DEvents and KeyEvents.

  • IArrow: contains static members of the class Arrow.

  • IAnimation: factory methods replace the removed classes EasedAnimation and ParallelAnimation.

    • Animations: factory methods replace the removed classes GeneralPathAnimation.

    • GraphAnimations: factory methods replace the removed classes LayoutMorpher, LayoutMorpherWrapper, EdgeAnimation, LabelAnimation, NodeAnimation and PortAnimation.

  • ICommand: contains members of the removed classes GraphCommands, ApplicationCommands, ComponentCommands and NavigationCommands.

  • IPortCandidateProvider: factory methods replace all existing implementations except AbstractPortCandidateProvider.

  • IEdgeReconnectionPortCandidateProvider: factory methods replace all implementations.

  • IHitTestable: contain members of removed class HitTestable.

  • IMarqueeTestable: contain members of removed class MarqueeTestable.

  • IVisibilityTest: contain members of removed class VisibilityTest.

  • ICanvasObjectDescriptor: contains members of the removed class CanvasObjectDescriptor.

  • IMapper: contains members of removed class Mappers.

  • IBoundsProvider: contains members of removed class BoundsProvider.

  • The following classes have been removed: OrientedRectangleExtensions, PointExtensions, RectangleExtensions, SizeExtensions, FoldingViewExtensions, GeomExtensions, GraphDecoratorExtensions, GraphExtensions, GroupedGraphExtensions, MapperRegistryExtensions, StripeExtensions, LookupExtensions, TableExtensions, ParseContextExtensions, WriteContextExtensions, RenderContextExtensions, RenderContextExtensions and XmlWriterExtensions. All methods of these classes are available on related interfaces as default methods.

  • GraphItemTypes: contains members of removed class GraphItemType.

  • Pen: contains members of removed class Pens.

  • DashStyle: contains members of removed class DashStyles.

Further general improvements

  • The naming of classes, members and parameters has been reviewed and now uses more consistent and intuitive names.

  • All methods that take a context parameter of type ICanvasContext, IRenderContext, IInputModeContext, IParseContext, IWriteContext, SnapContext, GraphSnapContext, or LabelSnapContext now have that parameter as their first parameter.

  • Some classes are now usable in try-with-resources statements since IDisposable now extends the AutoClosable interface.

  • Replaced many reference parameters with actual return values. Methods that returned a boolean value to indicate the validity of the reference parameter now return either a proper value or null if they could not provide one. Most prominent example of this change are the various #getTangent methods in IPathGeometry and GeneralPath that now return a Tangent object.

  • The return type of several methods has been changed from IEnumerator<T> to IEnumerable<T>, which has the benefit that those can now be consumed as streams.

Documentation

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

Model

IGraph

  • Support for grouped graphs has been simplified to a large extent:

    • IGraph now supports grouping by default. The #GroupingSupported property has been removed from DefaultGraph. Grouping is now always enabled for graphs.

    • The new property #GroupingOperationsAllowed on GraphEditorInputMode allows for switching interactive grouping operations on or off. Grouping operations are disabled by default and have to be enabled explicitly if the input mode should support them.

    • The grouping support interfaces IGroupedGraph and IHierarchy<T> have been removed and folded with IGraph.

    • The property IHierarchy<T>#Root is no longer available. The root of a grouping hierarchy is now represented by null.

  • #createNode, #createEdge, #addLabel, #addPort: Ambiguous overloads were removed, missing overloads were added and parameters were ordered to be consistent throughout all overloads.

  • #Nodes, #Edges, #Labels and #Ports: The type of these properties has been changed from ICollectionModel to IListEnumerable. To be notified of created or removed items, the corresponding IGraph events should be used instead.

  • #NodeLabels and #EdgeLabels: These properties have been replaced by default methods that delegate to the merged #Labels property.

  • #CollectionModel and #Bends have been removed together with the classes BendList and ListLabelCollection. Use ListEnumerable<IBend> and ListEnumerable<ILabel> instead.

  • IGraph now provides events for property changes on model items, e.g. #NodeStyleChanged and #NodeLayoutChanged. Those events replace the dedicated change reporters available previously (e.g. INodeBoundsChangeReporter, ILabelTextChangeReporter) which have been removed.

  • The signatures of event handlers throughout the IGraph API have been unified by using EventHander with appropriate EventArgs. Exceptions are a few events that are raised very often which retain an argument list.

  • #isLeaf, #setLeaf and related properties and events have been replaced by #isGroupNode and #setIsGroupNode which have the exact opposite meaning from the old ones.

  • #addBend: The signature has changed. The index parameter has been moved to the end.

  • IGraphStructure and its implementation have been removed, as well as the constructor of DefaultGraph that accepted an IGraphStructure.

  • IGraph now extends the ITagOwner interface. Thus graphs now have a #Tag property.

  • DefaultGraph now raises removal events for labels, ports and bends which are implicitly removed when their owner is removed.

  • Various protected factory methods of DefaultGraph have been removed: #createNodeDefaults, #createEdgeDefaults and #createMapperRegistry, amongst others.

  • DefaultGraph#getBounds has been removed.

  • #UsingPortCandidateProvidersEnabled has been removed from both DefaultGraph and GraphSettings. Creating an edge using port candidate providers has to be done by manually querying the provider and calling #createEdge(IPort, IPort).

  • Added convenience methods #applyLayout for arranging graph elements.

Folding

  • The #expand, #collapse and #isExpanded methods on IFoldingView (previousely IFoldedGraph) now also work with nodes that belong to the master graph instead of the view graph. Thus the collapsed/expanded state can be set or queried for items that are currently not in the view graph.

  • IFoldingView#isInitiallyExpanded has been removed.

  • FoldingManager: #isInitiallyExpanded, #setInitiallyExpanded and #DefaultExpandedPredicate have been removed.

  • The interfaces IChangeDummyNodeAppearanceCallback, IChangeDummyEdgeAppearanceCallback and IChangeLabeledItemAppearanceCallback as well as FoldingManager#getChangeDummyAppearanceCallback have been removed. The view state properties can now be changed directly on the view state implementations returned by FoldingManager#getFolderNodeState and FoldingManager#getFoldingEdgeState, respectively.

  • Lots of other small changes around folding.

Labels

  • The property ILabel#Layout has been replaced by the new default method #getLayout.

  • The order of the parameters of ILabelModel#getGeometry has been changed to ILabelModel#getGeometry(ILabel, ILabelModelParameter).

  • The factory methods FreeNodeLabelModel#createNodeCenterAnchored and FreeNodeLabelModel#createNodeLayoutAnchored have been removed.

  • FreeNodeLabelModel#createDefaultParameter now uses the label’s center as its anchor point.

  • The new edge label models EdgeSegmentLabelModel and EdgePathLabelModel have been added and replace RotatingEdgeLabelModel, SliderEdgeLabelModel, SideSliderEdgeLabelModel, RotatedSliderEdgeLabelModel and RotatedSideSliderEdgeLabelModel.

    • EdgeSegmentLabelModel allows to create parameters for a segment index and segment ratio.

    • EdgePathLabelModel creates parameters using a ratio of the edge path.

    • The label model parameter of the edge label defaults now uses the EdgeSegmentLabelModel.

Ports

  • The property IPort#Location was removed since it was only a convenience method to access the location from the IPortLocationModelParameter.

    • To retrieve a live view of the location of a port, use the new default method IPort#getDynamicLocation.

    • To retrieve a simple snapshot of the current location instead, use IPort#getLocation.

  • NodeScaledPortLocationModel has been replaced by FreeNodePortLocationModel that allows to specify the port location by a ratio of the node layout’s size and an additional offset.

  • AnchoredPortLocationModel has been removed.

Table

  • ITable:

    • The signature of #createRow and #createColumn has changed. The index parameter has been moved to the end.

    • The events #StripeChanged and #StripeRemoved use StripeEventArgs now.

    • The event #LabelRemoved uses LabelEventArgs now.

    • The default methods: #findColumn, #findRow and #getCellBounds have been added.

  • Table:

    • The table’s lookup decorator can now decorate stripe labels, too.

    • The factory methods for the individual properties of RowDefaults and ColumnsDefaults have been removed.

    • The methods #removeUndoSupport as well as some overloads of #createRow, #createColumn and #addLabel have been removed.

    • The new properties #DefaultStripeLookup, #DefaultColumnLookup and #DefaultRowLookup replace the removed classes with the same same.

  • TableExtensions: method #getElementsToMove has been removed

  • IStripeDefaults: the three argument constructor has been removed.

  • IStripeSelection#SelectedStripes has been removed. Use the individual properties for #SelectedRows and #SelectedColumns instead.

  • StripeSelection: the surplus overloads of #isSelected and #setSelected taking an IRow or IColumn have been removed.

  • The default method #placeNodeInCell has been added to IGraph to easily move a node into a specific table cell.

Undo support

  • IGraph: default methods to enable or disable Undo support have been added.

  • Setting the #Tag property on model items and the graph now works with Undo.

  • Undo operations for the removal of graph elements now keep the proper item order. This improves the consistency especially for layouts between undo operations.

  • IGraph#beginEdit:

    • Overloads that work with IMementoSupport (either via ILookup or an IMementoSupportProvider) have been added.

    • The overload that accepted an IEnumerable of IModelItems has been removed.

  • IUndoSupport, MementoUndoUnit, MementoUndoableEdit and MementoStateStruct have been removed.

  • IUndoUnit: the methods #canUndo and #canRedo have been removed.

  • AbstractUndoUnit: the methods #undoImpl and #redoImpl have been removed. Implementations should use #undo and #redo from the IUndoUnit interface instead.

  • UndoEndgine: the properties #UndoText and #RedoText have been removed.

  • IGraphUndoUnitSupport has been removed. Its methods #create…​UndoUnit have been moved to DefaultGraph as overridable methods. Developers who have created a custom implementation have to derive from DefaultGraph and override the corresponding method(s).

Geometry

Package com.yworks.yfiles.geometry was purified:

  • The basic geometry types PointD, SizeD, RectD and InsetsD have been made immutable.

  • ImmutablePoint, ImmutableSize, ImmutableRectangle and ImmutableOrientedRectangle have been removed. The immutable types PointD, SizeD and RectD as well as the immutable instance provided by the new static method OrientedRectangle#createImmutable can be used instead.

  • IPointSetter and ISizeSetter have been removed. Instead their prior sub interfaces IMutablePoint and IMutableSize are used.

  • IReshapeable has been removed. The various overloads of the #reshape method have been implemented as default methods on IMutableRectangle instead.

  • IMovable has been removed as well. Instead an IPositionHandler can be used.

  • PointD#fromPoint, SizeD#fromSize and RectD#fromRectangle have been replaced by the default methods IPoint#toPointD, ISize#toSizeD and IRectangle#toRectD.

  • Various other geometry-related classes and interfaces have been removed.

  • IOrientedRectangle: the default method #getTopLeftLocation has been added.

  • The OrientedRectangle.EMPTY constant has been moved to the IOrientedRectangle interface.

  • ImmutableSize: The static fields #UNBOUND, #EMPTY and #ZERO have been added.

  • Most of the static convenience methods in the geometry classes have been removed. Only a few basic methods such as the union operation on RectD and the vector arithmetic on PointD remain.

View

Styles

  • Styles no longer implement IModelItemInstaller which simplifies certain custom style implementations.

  • The style and style renderer hierarchies have been flattened:

    • IModelItemStyle, ITaggedModelItemStyle with subinterfaces as well as all subinterfaces of INodeStyle, IEdgeStyle, ILabelStyle and IPortStyle have been removed.

    • AbstractEdgeStyle, AbstractStyleRenderer, AbstractNodeStyleRenderer, AbstractEdgeStyleRenderer, AbstractLabelStyleRenderer, AbstractShapedNodeStyleRenderer, AbstractShapedLabelStyleRenderer, VoidVisualStyle and VoidStyleRenderer have been removed.

    • Abstract base class AbstractTableNodeStyle and class DynamicTableNodeStyle have been removed and the funtionality has been merged with class TableNodeStyle.

    • ITableProvider as well as its implementations have been removed and method AbstractTableNodeStyle#getTable has been moved to class TableNodeStyleRenderer.

  • UserTagProvider and all implementations have been removed.

  • SimplePortStyle has been removed. You can use NodeStylePortStyleAdapter together with a ShapeNodeStyle instead.

  • Removed superfluous constructors from all style implementations.

  • The generics of the classes AbstractNode/Edge/Port/LabelStyle (former SimpleAbstractNode/Edge/Port/LabelStyle) have been removed. For example the class parameter from the constructor and the generic type parameter TVisual extends IVisual of the classes themselves have been removed. This means that the signature of the method #updateVisual changed as well and overrides of this method have to cast the Node parameter to the concrete type manually.

  • All IStyleRenderer implementations: the public #Style property has been reduced in accessibility to protected.

  • All IStyleRenderer implementations: the public #Item property has been reduced in accessibility to protected and named #Node, #Label, #Edge or #Port depending on the handled model item.

  • ILabelStyleRenderer implementations: the protected field #layout has been removed and the accessibility of the public property #Layout has been reduced to protected.

  • Columns and rows don’t use node styles anylonger but got their own style classes:

    • The new interface IStripeStyle is used for styles visualizing IColumns and IRows.

    • IStripeStyle, IStripeStyleRenderer and the implementors AbstractStripeStyle, NodeStyleStripeStyleAdapter, and AbstractJComponentStripeStyle have been added.

  • The class TextFormat and the corresponding property DefaultLabelStyle#TextFormat have been removed. The properties of Textformat have been added on DefaultLabelStyle instead and the enum TextWrapping has been added.

  • DefaultLabelStyle#Insets has been added that can be used to define a distance between the label border and the label content via insets. Per default the style now uses insets with thickness 2 instead of 0.

  • PathBasedEdgeStyleRenderer: The scope of the factory methods #createRectangleSelfLoop and #createRoundSelfLoop has been reduced from public to protected.

  • CSS support for visualizations of non-graph elements like indicators and decorations has been added. Those elements can be styled by inserting a style sheet into the scene that has definitions for certain style classes that address these decorations. For a detailed description, read the relating chapter in the Developer’s Guide.

  • Customizing the visualization via data templating has been refactored:

    • The new interface IDataTemplate replaced the abstract class DataTemplate and is used to create and update a javafx.scene.Node very similar to the IVisualCreator interface. In contrast to IVisualCreator it takes the data object to visualize as well as its bounds as additional parameter information.

    • The DataTemplate class with its context-free #creatInstance method as well as its subclasses have been removed.

  • GraphModelManager: The protected factory methods that supplied the initial value for the #*Installer properties (#EdgeStyleInstaller, #NodeStyleInstaller, etc.) have been removed.

  • GraphModelManager#invalidate has been removed.

  • Added a mechanism to support disposing and caching the Node which is created by IVisualCreator#createVisual:

    • IRenderContext: #setDisposeCallback, #childVisualRemoved and #registerForChildrenIfNecessary have been added to support the registration of a callback for disposal.

    • Added the interface IDisposeVisualCallback for this purpose.

  • VisualGroup is now managed and autosizes its children. This allows to add arbitrary JavaFX controls without the need to layout them manually.

  • IRenderContext#getCanvas has been pulled up to ICanvasContext and renamed to #getCanvasControl.

  • IInputModeContext now extends ICanvasContext so its #getCanvasControl was removed.

  • IRenderContext#Transform has been removed

  • Class RenderContext was replaced by the factory method ContextConfigurator#createRenderContext.

  • DefaultEdgePathCropper now uses the new method #handleEmptyPath if cropping the edge would result in an empty path. Per default this method only crops at the ports.

  • DefaultEdgeIntersectionCalculator: the callback method #getNodeGeometry has been added.

  • ModelManager#CanvasObjectGroupProviderCallback has been replaced with #getCanvasObjectGroup. ItemModelManager#CanvasObjectGroupProviderCallback has been replaced by #CanvasObjectGroup and the virtual method #getCanvasObjectGroup. The default implementation just defers to the property, just like #getDescriptor.

  • ItemModelManager#invalidate has been removed.

  • IGroupAction as well as ICanvasObjectGroup#getGroupAction have been removed as they had hardly any use.

  • ICanvasGroupProvider and the delegate CanvasObjectGroupProviderCallback have been removed. Accessing the individual canvas object groups can be done via the properties of CanvasControl instead.

  • ICanvasObjectTreeEventSource as well as the corresponding classes CanvasObjectAddEventArgs, CanvasObjectRemoveEventArgs, CanvasObjectMoveEventArgs and CanvasObjectInvalidateEventArgs have been removed.

  • ScrollBarVisibility has been replaced by the JavaFX enum ScrollPane.ScrollBarPolicy.

Input Modes (General)

  • The type hierarchy for input modes has been simplified considerably:

    • All input modes except OverviewInputMode, GraphViewerInputMode and GraphEditorInputMode now directly implement IInputMode without any abstract base classes in between.

    • IConcurrentInputMode has been merged into IInputMode. The property #Enabled has been removed but is still present on all concrete implementations.

    • All abstract input mode base classes except AbstractInputMode have been removed. AbstractConcurrentInputMode has been merged into AbstractInputMode.

    • AbstractInputMode: #requestMouse, #requestTouch, #releaseMouse and #releaseTouch have been combined in #requestPointer and #releasePointer

    • StateMachineInputMode as well as all state machine related classes has been removed. Input modes now no longer have protected methods for state machine transitions but instead those methods are mostly parameterless now.

  • Input mutex handling has been refactored considerably:

    • IInputMode#ConcurrencyController has been removed. Input modes now get a ConcurrencyController as parameter of their #install method.

    • The ConcurrencyController has been refactored and is now only responsible for a single input mode. Its property #Active indicates if it currently has or may request the mutex.

    • InputMutex has been removed.

    • The property PreferredCursor has been moved from IInputMode to ConcurrencyController.

    • The input mutex should be requested and released using the according methods on ConcurrencyController. Most input modes don’t provide the methods #hasMutex, #canRequestMutex, #requestMutex and #releaseMutex anymore.

    • The property IInputMode#Enabled is not set to false anymore if another input mode acquires the mutex. Instead their ConcurrencyController is deactivated. This provides a clear separation between suppressing input modes (while another mode holds the mutex) and explicitly disabling a mode from code (via the #Enabled property).

    • As a consequence most input modes don’t provide the event #EnabledChanged and the protected methods #onEnabled and #onDisabled anymore, but #onConcurrencyControllerActivated and #onConcurrencyControllerDeactivated instead.

  • IInputMode#Priority has been added which defines the installation priority of the input mode. It replaces the corresponding properties on GraphViewerInputMode, GraphEditorInputMode and TableEditorInputMode which previously defined the installation order.

  • All input modes no longer raise #Stopped and #Canceled events. Developers who want to get notified when an input mode gets stopped or canceled have to override the methods #onStopped and #onCanceled. The events #Initializing and #Initialized have been removed as well. Input modes that need to perform one-time initialization on first #install can keep track of that themselves.

  • MultiplexingInputMode:

    • #addConcurrent as well as the overload of #add that takes an additional priority parameter have been removed. There is only the #add method left that takes an input mode as its only parameter.

    • Priority is now determined by the input mode’s #Priority property.

    • Whether an input mode runs exclusive or always active alongside other input modes is determined by the input mode’s ConcurrencyController which has an #Exclusive property controlling that.

    • The mode is now aware of changes to the priority of already installed input modes and will update the installation order accordingly when an input mode’s priority is changed.

  • IInputMode implementations:

    • The setter for properties #Graph and #GraphSelection, if present, and its associated #set* methods have been removed. Both are now always retrieved from the input mode context.

    • The read-only property #InputModeContext has been introduced to expose the IInputModeContext the mode is installed in.

  • The Command mechanism has been refactored:

    • Classes Command, CommandBinding, CommandManager and related as well as the related properties on CanvasControl have been removed from public API. All commands are now handled by interface ICommand and the KeyboardInputMode using the new methods #addCommandBinding, #addKeyBinding and #addRecognizerBinding.

    • KeyboardInputMode has been refactored: interaction with keys recognized by this input mode are now handled by commands solely.

GraphEditorInputMode and GraphViewerInputMode

  • GraphViewerInputMode and GraphEditorInputMode have been made more similar regarding customization in the capabilities they both provide:

    • GraphViewerInputMode now supports the same click and selection behavior as GraphEditorInputMode. This includes detail selection (Shift+Click) and cyclic selection (Alt+Click) as well as finer control over behavior like the property #ClickSelectableItems and the method #shouldClickSelect.

    • The methods #click and #doubleClick now take an IModelItem and ClickEventArgs as arguments and have no return value. Instead of returning a boolean, the property #Handled on the ClickEventArgs should be set.

    • Their #ClickInputMode now delivers both left and right clicks.

    • The default click actions that change the selection and create new nodes are now only triggered on left mouse clicks.

    • The new property #DoubleClickHitTestOrder provides an explicit hit test order for double clicks. By default, this hit test order prefers labels over other graph elements.

    • GraphViewerInputMode now also has the property #AvailableCommands already known from GraphEditorInputMode or NavigationInputMode.

    • Several child input mode priorities in GraphViewerInputMode have been changed and most of them now have the same priorities as in GraphEditorInputMode.

    • The new event #CanvasClicked reports clicks on an empty canvas location.

    • The new property #SelectablePredicate allows finer control over what particular items should be selectable without the need to create a custom subclass.

    • The new method #createSelectionEventArgs creates SelectionEventArgs using the #GraphSelection.

    • The events #MultiSelectionStarted and #MultiSelectionFinished now use SelectionEventArgs<IModelItem>.

    • By default, graph items styled with a void style (VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle and VoidPortStyle) are not selected or focused anymore. The new property #VoidStylesIgnored specifies whether this feature is enabled.

    • GraphViewerInputMode now has improved support for marquee selection. Marquee selection is no longer turned on or off via #MarqueeSelectableItems but instead directly on the MarqueeSelectionInputMode. The recognizer for marquee selection is Shift+Drag and the child input mode priorities have been adjusted accordingly so that marquee selection and viewport movement can co-exist. The sub-input mode still defaults to being disabled, though.

    • GraphViewerInputMode now also has a KeyboardInputMode.

    • GraphViewerInputMode now allows copying items (including the convenience methods) and handles the commands appropriately.

  • Improved functionality of GraphEditorInputMode

    • Changing the property #ShowHandleItems will now immediately update the currently visible handles.

    • The new property #DeletablePredicate allows finer control over what particular items should be deletable without the need to create a custom subclass.

    • The new property #OrthogonalBendRemovalEnabled toggles the new support for deleting bends in a way that an orthogonal edge remains orthogonal after removing the bends.

    • A new default action for duplicating single graph items or whole subgraphs is provided. This also works with incomplete subgraphs, for example in a tree, it is possible to duplicate a subtree and the tree will never be disconnected. In addition, the new command ICommand#DUPLICATE (shortcut: Ctrl-D) and the new method GraphClipboard#duplicate can be used to duplicate selected items without altering the clipboard contents. GraphClipboard#adjustGroupNodeBounds adjusts the bounds of parent nodes of pasted or duplicated nodes.

    • A new default action for reversing edges is provided. To this end, the methods #reverseEdge, #reverseEdges and #reverseSelectedEdges have been added to GraphEditorInputMode and the command #REVERSE_EDGE (shortcut: Ctrl-R) to ICommand.

    • Support for cyclic click selection was added. This helps in conveniently selecting items that are hidden behind other items. By default, this features is bound to the Alt key being pressed. It can be disabled by setting the #CyclicSelectionRecognizer property to IEventRecognizer#NEVER.

    • The property #ReparentToLeavesAllowed was added. When enabled, leaf nodes can be the target of a reparenting gesture in which case they are converted into group nodes.

    • The new protected method #shouldSelect can be overridden to determine whether an item can be selected in general.

    • The new events #LabelAdding and #LabelEditing were added. Those allow fine-grained control over adding or editing labels and tie into the existing functionality provided by IEditLabelHelper.

  • Cleanup of the old GraphEditorInputMode API:

    • The type of the property #OrthogonalBendRemoval has been changed from boolean to OrthogonalEdgeEditingPolicy.

    • The events #DeletingSelection and #DeletedSelection now use SelectionEventArgs<IModelItem>.

    • The constructor that take additional IGraph and IGraphSelection arguments have been removed, as well as the protected methods #setGraph, #setGraphControl, #onGraphChanged and the protected setter for the property #GraphSelection. Instead, the IGraph instance is now always taken from the #InputModeContext and can’t be changed after the mode is installed.

    • The method #createDefaultLabelConfiguration has been removed

    • The method #marqueeSelect<T>(RectD,IEnumerable<T>) has been removed.

    • The property #SelectionModel has been removed. Instead the property #GraphSelection is used.

    • The properties #CollectionModel and #GraphInputModeController have been removed.

    • The method #findItem has been removed. An additional overload of #findItems without the context parameter has been added. To replicate the previous behavior of #findItem, #findItems can be called and the first element taken from the resulting enumeration.

    • The method #shouldBeMovableForMoveInputMode has been removed.

  • Improved GraphViewerInputMode API:

    • Added support for the ICommand#COPY.

    • Added support for multi-selection via Ctrl+Click and marquee selection. The latter is disabled by default.

    • The click hit test order can now be configured by property #ClickHitTestOrder.

    • By default, clipboard commands are now disabled. This can be controlled with the new property #ClipboardOperationsAllowed.

    • The event #ItemSelected has been removed.

CreateEdgeInputMode

  • CreateEdgeInputMode was refactored and streamlined:

    • Orthogonal edge creation will be automatically enabled if orthogonal edge editing is enabled on the containing GraphEditorInputMode.

    • Property #ConnectingToCandidatesOnlyEnabled was removed. Now edge creation always uses port candidates.

    • The creation callbacks #NodeBasedEdgeCreationCallback and #PortBasedEdgeCreationCallback have been replaced by the new #EdgeCreator which is port-based.

    • The methods #getSourcePortOwner, #getTargetPortOwner, #getSourceNode and #getTargetNode have been replaced by #getSource and #getTarget.

    • The properties #SourcePortCandidate and #TargetPortCandidate now have public setter.

    • The methods #determineEdgeStyle, #assignSourcePortPosition, #assignEdgeStyle as well as the property #EdgeStyle have been removed. Instead the new #EdgeDefaults property can be used to customize the new edge.

    • Property #UsingHitNodeTargetCandidatesOnlyEnabled was replaced by the new property #UsingHitItemsCandidatesOnlyEnabled.

    • The type of the property #OrthogonalEdgeCreationEnabled has been changed from boolean to OrthogonalEdgeEditingPolicy.

    • The new property #DummyEdgeGraph is used to create the dummy edge that visualizes the edge during creation.

    • The preview edge which is displayed during edge creation now shows the edge as it will be created, i.e. the preview edge has the same style, port visualization, and labels as the created edge will have.

    • The property #SnapToTargetCandidateOwner has been removed. The preview edge now is always being cropped at the candidate owner’s borders.

    • A new property #CancelGestureOnInvalidTarget has been added that makes it possible to cancel the gesture immediately if ended on an invalid target.

    • #assignBends has been removed and its functionality folded into the default #EdgeCreator implementation.

    • The methods #isPortCandidateResolutionEnabled, #isValidEnd, #isValidBegin, #isCancelGesture, #isBendCreationEnforced, #isValidBend, #isSourceNodeDraggingFinished, #isRemoveBendEvent have been removed. The corresponding event recognizer can be used instead to customize the behavior.

    • #createBend(PointD), #startCreateEdge, #onTargetLocationChanged, #getNodes, #NodeComparer and #PortOwnerComparer have been removed.

Other InputModes

  • AbstractContextMenuInputMode: Support for different context menu trigger events has been added. Currently only mouse (right-click) and keyboard (Shift+F10, application / context menu key) are distinguished, more may be added in the future. The source can be queried from the property #EventSource in PopulateMenuEventArgs and PopulateItemContextMenuEventArgs.

  • An additional eventSource parameter has been added as well to the constructors of PopulatePopupMenuEventArgs and PopulateItemPopupMenuEventArgs as to the overload of AbstractContextMenuInputMode#onPopulateMenu which takes a context menu.

  • ClickInputMode:

    • The property #ValidClickHitCursor has been added. This cursor is used when hovering over a valid hit region.

    • The new method #preventNextDoubleClick can be used in event handlers for single clicks to prevent that this click can become part of a double click event.

    • If #ActiveButtons includes MouseButtons#RIGHT and ClickInputMode 's event handlers mark the corresponding click event as handled, the original right click event is marked as handled as well. Especially, no context menu will be shown if the right click is handled by ClickInputMode itself.

  • CreateBendInputMode#CancelEventRecognizer has been removed.

  • HandleInputMode#Active has been removed. The mode can be manually deactivated using the property #Enabled instead.

  • HandleInputMode#arm now has a handle parameter for the handle that is under the mouse cursor.

  • The class ItemDropInputMode is a new DropInputMode that facilitates subclasses that support preview and snapping of the dragged item as well as highlighting potential drop targets.

    • NodeDropInputMode and StripeDropInputMode have been refactored to use ItemDropInputMode as base class.

    • In NodeDropInputMode, callback #NodeCreator, event #NodeCreated and method #getDraggedNode have been removed. The callback #ItemCreator, event #ItemCreated and property #DraggedItem from superclass ItemDropInputMode should be used instead.

  • NodeDropInputMode can now optionally drop nodes onto leaf nodes and thus convert the leaves into group nodes. It is also possible to drop nodes into collapsed folder nodes. For both use-cases, an opt-in property has been added and a predicate property allows for fine-grained control over this feature.

  • ItemHoverInputMode is a new IInputMode that fires events when the mouse enters or leaves the visualization of a graph item.

  • OverviewInputMode:

    • The mode now extends MultiplexingInputMode.

    • It can be customized more easily. Minor modes can be replaced and adjusted, as well as the list of available default command bindings can be modified.

    • The new property #Margins specifies margins for the visible area of the bound GraphOverviewControl. The new protected method #updateVisibleArea provides further means for customizing the visible area.

  • MarqueeSelectionInputMode:

    • The events #DragStarting, #DragStarted, #Dragging, #Dragged, #DragFinishing, #DragFinished, #DragCanceling and DragCanceled now use MarqueeSelectionEventArgs that provide the current selection rectangle.

    • The event #MarqueeSelected has been removed. The event #DragFinished can be used instead.

    • Property #LastModifierState has been removed.

  • MoveInputMode:

    • The new event #QueryPositionHandler queries an IPositionHandler each time a drag is started.

    • The property #AffectedItems has been added which can be used to get a collection of items currently being moved.

    • Mouse hovers with the Shift key held down again are now accepted.

  • MoveViewportInputMode: Mouse cursor handling is now also done by protected methods #arm and #disarm, similar to other input modes.

  • MultiplexingInputMode: #ChildController and #createChildConcurrencyController have been removed.

  • TableEditorInputMode:

    • The new events #LabelAdding and #LabelEditing allow fine-grained control over adding or editing labels and tie into the existing functionality provided by IEditLabelHelper.

    • The events #DeletingSelection and #DeletedSelection now use SelectionEventArgs<IStripe>.

    • The property #AllowMixedSelection has been moved here from the removed class CompositeStripeSelection.

  • WaitInputMode#getMultiplexingInputMode has been removed.

  • TextEditorInputMode: The events #EditingStarted, #EditingCanceled and #TextEdited now use TextEventArgs.

  • TextEditorInputMode: The properties #StopRecognizer, #CancelRecognizer and #LineBreakRecognizer have been added which allow for easy customization of the key gestures used to add new line breaks and to cancel or stop the text editing.

Label Editing

  • IEditLabelHelper was refactored:

    • #addLabel and #editLabel were replaced by the methods #onLabelAdding and #onLabelEditing which take the new LabelEditingEventArgs as only argument.

    • Adding labels now can, depending on event handlers for LabelAdding or IEditLabelHelper implementations, optionally edit existing labels instead. This is similar to how editing labels can also add labels, e.g. if no labels are present on an item.

    • The method IEditLabelHelper#configureTextEditorInputMode has been removed. It has been replaced by the property LabelEditingEventArgs#TextEditorInputModeConfigurator.

    • The customizations possible from IEditLabelHelper are the same as those from the #LabelAdding and #LabelEditing events on GraphEditorInputMode and TableEditorInputMode. IEditLabelHelper is conceptually used as another event handler for those events.

    • The property #Owner of the implementing class EditLabelHelper has been removed, along with the respective constructor. The label owner can usually be queried from the LabelEditingEventArgs. Custom subclasses can of course still opt to store the item they were created for and use that field.

  • The label that is edited respectively the label owner for which a label is added is now determined in the following order:

    • If a label is explicitly provided as a command parameter or through a convenience method or is the only selected element, it is edited if the condition mentioned above is satisfied. No other candidates are tried in that case.

    • If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, the first label that satisfies the condition above is edited. If no such label exists, a new label is added, provided that the owner allows adding. In either case, no other candidates are tried.

    • If there are multiple selected labels, the first selected label for which the previous condition is satisfied is edited.

    • If multiple label owners are selected, the first owner that has a label for which the previous condition is satisfied is chosen and that label is edited.

    • If IEditLabelHelper#editLabel for either an editable label or its owner provides a different label instance, this instance is edited instead.

    • Otherwise, a label is added if an eligible owner can be found.

  • If an IEditLabelHelper implementation is present in an ILabeledItem 's lookup, its #addLabel method is called to determine whether a label may be added and provide a suitable label instance. Additionally, the predicate method GraphEditorInputMode#shouldLabelBeAdded always has to return true, whether edit helpers are present or not. If the new label should be edited interactively after it’s creation (the default behavior), it also must be editable, following the rules above. Therefore an IEditLabelHelper implementation usually should allow editing of label instances that it has created itself in #addLabel.

  • Interactive label editing and creation has the following new features:

    • The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is enabled by default and can be controlled through the property GraphEditorInputMode#HidingLabelDuringEditingEnabled.

    • GraphEditorInputMode and TableEditorInputMode provide new events #LabelTextEditingStarted and #LabelTextEditingCanceled that are raised directly before the label text editor is shown and after the label editing has been canceled, respectively.

    • Double clicking nodes and edges now opens the label editor. An existing label can be double clicked to edit the label text. This feature can be disabled with the property GraphEditorInputMode#EditLabelOnDoubleClickAllowed.

    • IEditLabelHelper implementations provided by the ILabel 's lookup can now be used to forbid or customize the editing of individual labels. Class LabelDecorator provides a new property #EditLabelHelperDecorator to customize this feature.

    • GraphEditorInputMode#editLabel and TableEditorInputMode#editLabel can now be used with SimpleLabel instances. This provides editing capabilities for dummy elements such as legends, page headers or other textual elements.

Snapping

  • Node and edge labels can now snap to particular locations while moving them interactively. Both types of labels can be aligned horizontally or vertically to their original location. In addition, a node label can be aligned with the borders or the center of its owner, and during resizing of that owner, smartly keeps its relative location to the snapped position. An edge label can be snapped on the path of its owner, or at particular distances of it. This feature can be enabled and configured with a LabelSnapContext and is available for labels with one of these label models: SmartEdgeLabelModel, FreeEdgeLabelModel, FreeNodeLabelModel and FreeLabelModel.

  • SnapContext:

    • A boolean parameter snappingDisabled has been added to the methods #handleMove and #dragFinished. This parameter has to be set to true to handle moves or finish a drag when snapping is temporarily disabled. This replaces the call to SnapContext#disableSnapping.

    • The events #Initializing, #Initialized and #CleanedUp as well as associated methods now use InputModeEventArgs.

    • #VoidInstance has been removed.

  • GraphSnapContext:

    • The return type of #getMovementInfos has been changed to IListEnumerable<MovementInfo> and the classes NodeMovementInfo, PortMovementInfo, BendMovementInfo and EdgeEndMovementInfo have been removed.

    • The info parameter’s type of #addEdgeEndToBeMoved has been changed to the more general MovementInfo. A boolean parameter atSource has been added.

    • The methods #addSameWidthEntries and #addSameHeightEntries now return an IListEnumerable<RectD> containing the rectangles whose widths respectively heights are closest to the given size. The parameters resultingSize and rects have been removed.

  • IEdgeSnapResultProvider:

    • The methods #initializeSnapping and #cleanupSnapping have been removed.

    • The info parameter’s type of #CollectSnapResults has been changed to IListEnumerable<MovementInfo>.

  • SnapResult now has more factory methods. The class SnapLineSnapResult has been replaced by a factory method as well.

  • The Classes SnapLineContainer, SingleLineSnapLineContainer, EdgeSegmentSnapLineContainer, FixedDistanceSnapLineContainer and InBetweenSnapLineContainer have been removed.

Clipboard

  • GraphClipboard has been improved:

    • GraphClipboard can be customized easier now. The filter factory #createDefaultCopyFilter takes the graph the copy filter is for. For the duplicate actions the new #createDefaultDuplicateFilter method and the property #DuplicateCopier can be used. Copied labels now use the model parameter returned by the callback #getLabelModelParameter.

    • The new properties #CopyItems, #IndependentCopyItems and #DependentCopyItems allow for restricting the types of items that can be copied at all, independently from their owners, or implicitly through their owners, respectively.

    • The various protected #adjustPosition methods have been removed, as applying the #PasteDelta is now done by GraphCopier.

    • The property #ClipboardContext has been removed.

  • The #copy methods in GraphCopier now have a new PointD offset parameter that shifts nodes and bends by a given amount upon copying them.

  • The signature of IClipboardIdProvider#getId has changed. The context parameter has been moved to the front.

  • Events

    • The properties #LastMouse2DEventArgs and #LastEventLocation have been removed from all input modes. Instead, the properties #LastMouse2DEventArgs and #LastEventLocation on CanvasControl can be used.

    • EdgeEventArgs now also contains the owner of the source and target port.

    • ItemClickedEventArgs now also contains the location of the click.

    • StripeEventArgs now also contains the ITable for this event .

    • OrthogonalEdgeEditingContext: The events #Initializing, #Initialized and #CleanedUp as well as associated methods now use InputModeEventArgs.

  • Keyboard Shortcuts have been changed:

    • Ctrl+O is now bound to ICommand#OPEN.

    • Ctrl+S is now bound to ICommand#SAVE.

    • Ctrl+Ins is now bound to ICommand#COPY.

    • Shift+Ins is now bound to ICommand#PASTE.

    • Shift+Del is now bound to ICommand#CUT.

    • Ctrl+PageDown is now bound to ICommand#MOVE_FOCUS_PAGE_DOWN.

    • Ctrl+PageUp is now bound to ICommand#MOVE_FOCUS_PAGE_UP.

    • Shift+PageDown is now bound to ICommand#SELECT_TO_PAGE_DOWN.

    • Shift+PageUp is now bound to ICommand#SELECT_TO_PAGE_UP.

    • ICommand#ADJUST_GROUP_NODE_SIZE now always processes the nodes in bottom to top order instead of using the order in which the nodes were selected

    • The default keyboard shortcut for deselecting elements (ICommand#DESELECT_ALL) has been changed to Ctrl+Shift+A. Ctrl+D is now the default shortcut for duplicating selected elements (ICommand#DUPLICATE). Duplicating elements can be disabled via GraphEditorInputMode#DuplicateAllowed.

  • For MacOS, shortscuts using the CTRL key now work with the COMMAND key instead.

    • ModifierKey: the enum value #SHORTCUT has been added.

    • KeyEventArgs: the property #ShortcutDown has been added.

    • IEventRecognizer: the static fields #SHORTCUT_DOWN, #SHORTCUT_UP and #SHORTCUT_PRESSED have been added.

  • Touch2DEvent: The modifier keys that are pressed during a touch event are now provided by the #Modifiers and #ChangedModifiers properties.

  • All hit-testing methods as well as the methods in IPortSelectionTester and IBendSelectionTester now take an IInputModeContext instead of ICanvasContext as their context parameter

  • IPositionHandler and IHandle implementations no longer also implement IPoint.

  • IPositionHandler#setPosition has been removed. The interface is now used as flagging interface only.

  • The classes DefaultPositionHandler and PointHandle have been removed

  • INodeCreationCallback#createNode now has a parent parameter which can be used as the parent node for creating a new node. GraphEditorInputMode tries to find a group node at the click location to pass as parent to the #NodeCreator.

  • Opening a context menu from the keyboard no longer uses the last known mouse pointer location for opening the context menu. Instead, the current selection or the current item are used.

  • IPortCandidateProvider: The two method overloads #getSourcePortCandidates and #getTargetPortCandidates that had an IEdge parameter have been removed.

  • The property AbstractPortCandidateProvider#PortOwner has been removed, along with the methods that made use of it.

  • AbstractPortCandidateProvider: create overloads of #createCandidate taking an IPort and optionally an IPortLocationModel have been removed.

  • DefaultPortCandidate: a constructor overload taking the PortCandidateValidity additionally has been added.

  • OrthogonalEdgeEditingContext#addMovedEdgeEnd: The type of the parameter movementInfo has been changed to the more general MovementInfo. A boolean parameter atSource has been added.

  • PortRelocationHandle: The method #configureDummyEdge has been folded into #createDummyEdge.

  • The methods IDragHandler#handleMove and IReshapeHandler#handleReshape don’t return anymore whether they had a visual effect.

  • The classes InputModeController and GraphInputModeController have been removed.

  • The abstract class EdgeEndMoveHandle has been removed.

  • The StateMachine class as well as the delegates StateHandler and TransitionHandler have been removed.

  • When the command ICommand#DELETE is executed when editing a table and some graph items are selected together with a stripe all selected items (including the stripe) will be deleted (was: only the stripe was deleted).

  • The classes FilteredCollectionModel and CancelEventArgs have been removed.

CanvasControl and GraphControl

  • CanvasControl:

    • The new property #LastEventLocation always contains the location of the last mouse event.

    • The property #MouseWheelBehavior taking a value of type MouseWheelBehaviors replaces the previous property #AutoMouseWheelZoomEnabled.

    • The scroll bars now scroll 5 view units per unit scroll (was 1 world unit) and 90 % of the visible width/height per block scroll (was 50 %).

    • The methods #add, #addCreator, #addGroup and #addGroupToGroup have been removed as the new methods #addChild and #addGroup of ICanvasObjectGroup provide a more intuitive way to add child elements to e.g. the GraphControl#getBackgroundGroup.

    • The property #InputModes has been removed. Developers who want to install multiple input modes on a CanvasControl have to set a MultiplexingInputMode as CanvasControl#InputMode and add their input modes to that mode.

    • The properties #AllMouseInputCapturingEnabled and #AllTouchInputCapturingEnabled have been combined in property #AllPointerInputCapturingEnabled.

    • The properties #OnCompoundKeyReleased, #onCompoundKeyTyped and #onCompoundKeyPressed have been added.

    • The property #collectCanvasObjects has been removed.

    • The method #renderContent was removed. Despite its name this method wasn't used to render the content.

  • GraphControl:

    • The #ContentRect will now also be updated when creating edges, adding, editing or moving labels or deleting all graph item types.

    • The methods #openFile, #saveFile and #saveFileAs have been reduced in accessibility to protected. The respective commands should be used instead of calling those methods.

    • The commands ICommand#CUT, ICommand#COPY and ICommand#PASTE are no longer handled and the respective convenience methods have been removed as well. Command bindings for #COPY are still supplied by GraphViewerInputMode and GraphEditorInputMode. Command bindings for #CUT and #PASTE are still supplied by GraphEditorInputMode.

    • The commands ICommand#UNDO and ICommand#REDO are no longer handled and the respective convenience methods have been removed as well. Command bindings for #UNDO and #REDO are still supplied by GraphEditorInputMode. Furthermore, the respective methods can still be called on the UndoEngine directly.

    • Property #UndoabilityEnabled has been removed. The commands ICommand#UNDO and ICommand#REDO can be enabled on the GraphEditorInputMode.

    • Property #ClipboardEnabled has been removed. The clipboard commands can be enabled on the GraphEditorInputMode.

    • Method #getUndoEngine has been removed. The current UndoEngine can be retrieved from the GraphControl#Graph.

    • Event #SelectionChanged has been removed.

    • Added convenience methods #morphLayout for arranging graph elements in an animated fashion.

    • Added a convenient way to set a custom GraphMLIOHandler to a GraphControl. Previously the lookup of the class needed to be decorated.

  • Most of the properties of the classes CanvasControl, GraphControl and GraphOverviewControl now have correspondent JavaFX properties for databinding and events previously reporting their changes have been removed.

GraphML

The XML namespaces and GraphML naming conventions have been updated. The mapping from yfiles classes to the corresponding XML namespaces has been changed, as well as some of the naming conventions:

  • All platform independent model classes are now mapped to http://www.yworks.com/xml/yfiles-common/3.0. This includes the following packages:

    • com.yworks.yfiles.graph

    • com.yworks.yfiles.graph.labelmodels

    • com.yworks.yfiles.graph.portlocationmodels

    • com.yworks.yfiles.graph.styles.common

    • com.yworks.yfiles.markup.common

  • All platform independent graphml support classes are now mapped to http://www.yworks.com/xml/yfiles-common/markup/3.0. This includes the following packages:

    • com.yworks.yfiles.markup.system

  • All platform independent framework classes are now mapped to http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0. This includes the following classes:

    • primitive types (int, double, boolean, char)

    • java.lang.String

  • All types and members in these namespaces use the WPF naming convention in GraphML files:

    • WPF type and property names (if applicable)

    • UpperCamelCase for properties, fields, constants and enum members

  • All platform dependent library classes are now mapped to http://www.yworks.com/xml/yfiles-java-fx/3.0/xaml. This includes the following packages:

    • com.yworks.yfiles.styles

    • com.yworks.yfiles.markup.platform.java

  • All types and members in this namespace use the native naming convention in GraphML files:

    • actual type and property names (if applicable)

    • UpperCamelCase for properties

    • UPPERCASE_UNDERSCORE for fields, constants and enum members

  • The performance of parsing GraphML files has been improved. The speed-up is especially notable for large graphs with several thousands of nodes.

  • The following events have been added to signal the end of the write or parse process, respectively: GraphMLIOHandler#Parsed, GraphMLParser#Parsed, GraphMLIOHandler#Written, GraphMLWriter#Written, together with the corresponding event raiser methods.

  • SerializationProperties:

    • The new property #ParseLabelSize optionally disables parsing of the preferred size of a label.

    • #DISABLE_USER_TAGS changed its type from TypedKey<boolean> to TypedKey<GraphItemTypes>.

    • #DISABLE_STRIPE_USER_TAGS changed its type from TypedKey<boolean> to TypedKey<StripeTypes>.

    • #WRITE_GRAPH_SETTINGS and #DISABLE_GRAPH_SETTINGS have been merged to a single #DISABLE_GRAPH_SETTINGS property which is interpreted according to the context where it is set.

    • #INDENT_OUTPUT has been added that allows to define whether the XML output should be properly indented.

  • A few abstract base classes have been merged:

    • AbstractXmlWriter and DirectXmlWriter have been merged into XmlWriter.

    • AbstractMapperInputHandler and ComplexMapperInputHandler have been merged into MapperInputHandler.

    • AbstractMapperOutputHandler and ComplexMapperOutputHandler have been merged into MapperOutputHandler.

  • TypeConverter and all subclasses have been removed and were replaced either by ValueSerializer s or by implementations of the new interface IMarkupExtensionConverter.

  • The generic types of collection properties are now better (de-)serialized. To achieve this, method PropertyInfo#getPropertyType now returns a Type instead of a Class.

  • The legacy interface IDeserializer and all implementations have been removed. For custom deserialization an event handler for GraphMLIOHandler#HandleDeserialization can be used.

  • The legacy interface ISerializer and all implementations have been removed. For custom serialization an event handler for GraphMLIOHandler#HandleSerialization can be used.

  • ArrayValueSerializer and NullXmlWriter have been removed.

  • IXamlNameMapper has been refactored:

    • The methods #addMapping have been removed

    • The method #getXmlNamespace has been removed

    • The return type of #getName has been changed from String to XmlName, so the XmlNamespace of a type can be retrieved via XmlName#getXmlNamespace.

  • QueryOutputHandlersEventArgs: The overload of #addOutputHandler taking an object id has been removed

  • XmlWriter: constructor overloads taking a boolean parameter indent have been added that allow to define whether the XML output should be properly indented.

  • XmlWriter: the constructor overload taking an InternalXmlWriter as well as the corresponding property #DelegateWriter have been removed.

  • GraphMLSerializationMode has been removed. The GraphMLMemberVisibility can be used instead.

  • The annotations ContentProperty, ValueSerializer and SingletonSerialization have been replaced by corresponding properties on annotation GraphML. Annotation MarkupExtensionReturnType has been removed.

Utility classes

  • Removed a lot of utility classes and interfaces:

    • Reference and all subclasses.

    • EmptyCollection<T>, EmptyList<T>, DoubleCollection CompositeEnumerable, CompositeListEnumerable, SingleListEnumerable, SingletonCollection, SingletonList, SingletonEnumerator and CompositeEnumerator.

    • CompositeHandle<T> and CompositePositionHandler.

    • IStruct, ElementFoundCallback and ILookupProvider.

    • Replaced IMapperDelegate and FactoryDelegate<TResult,TContext> by java.util.function.Function.

    • ILookupCallback and ContextLookups. Use IContextLookup instead.

    • CompositeCollectionModel, CallbackLookup, AbstractContextLookupChainLink, GenericYList, GenericListCell and HashSet.

    • CollectionChangedEventArgs, CollectionChangeType, CollectionExtensions and ICollectionChangeReporter.

    • ComponentResourceKey was removed and usages replaced by its base class ResourceKey which got a new constructor taking a Class and an Object as parameter.

    • The class GraphCopier for layout graphs and related classes and methods have been removed. Note that the GraphCopier implementation for IGraph still exists.

    • The classes DefaultNodeLookup, DefaultEdgeLookup, DefaultPortLookup, DefaultLabelLookup, DefaultBendLookup and DefaultItemLookup have been removed. Instead the properties #DefaultNodeLookup, #DefaultEdgeLookup, #DefaultPortLookup, #DefaultLabelLookup and #DefaultBendLookup have been added to DefaultGraph.

    • Class ItemDecorator<TModelItem> has been removed. Its members have been pushed down to its former sub classes NodeDecorator, EdgeDecorator, LabelDecorator, PortDecorator and BendDecorator.

  • The events #ItemSelected and #ItemDeselected on ISelectionModel have been merged into the #ItemSelectionChanged event.

  • Changed the return type for some methods from IEnumerable to the less restrictive type Iterable where possible in IHitTester, IBendSelectionTester, IHandleProvider, IPortCandidateProvider and many more. This makes it easier for clients to implement or extend those classes.

  • GeomSupport: method #createSmoothedPath has been moved to class GeneralPath.

  • Usage of EventHandler was made more consistent:

    • The sub interfaces ItemEventHandler, HierarchyItemEventHandler, Mouse2DEventHandler and CompoundKeyEventHandler have been replaced by EventHandler s typed with the specific EventArgs like EventHandler<ItemEventArgs>.

    • More usages of EventHandler have been typed to the specific EventArgs that are used by the handler.

  • The methods #contains, #notContains and #containsAll have been added to FlagsEnum.

  • GeneralPath: Removed the #FillMode parameter from methods #createPath and #updatePath.

  • GeneralPath: Removed the unused methods #createGeometry.

  • The interface IMapperMetadata has been removed and its single implementation MapperMetadata is now used instead.

  • IMapper: The method #removeValue has been removed. It depends on the specific implementation of the mapper whether a mapping can be removed. If an implementation provides a way to remove a mapping, that should be preferred over setting a null value.

  • TagOwnerMapper has been removed. Use this or similar code instead to access Tag s via an IMapper : Mappers#createMapper<ITagOwner, object>(key ⇒ key.Tag).

  • CanvasPrinter: The property #PageMarkPrintingEnabled and the protected method #createPageMarks have been added to support adding page marks to the print output.

  • The interface IPropertyChangeReporter has been removed. Usages have been replaced by regular events.

  • The classes TypedKey and TypedKeyMapper have been moved to package com.yworks.yfiles.graphml.

  • The interface ICollectionModel has been renamed to IObservableCollection and its implementing classes accordingly.

Layout

Layout execution

  • LayoutExecutor:

    • The method #stop now stops a running layout calculation as soon as possible and then immediately shows the result so far, skipping any animation. In addition, the new method #cancel immediately cancels a running calculation and doesn’t change the GraphControl#Graph unless the animation was already running.

    • The method #setAbortHandler has been removed. Instead there is a protected factory method #createAbortHandler which can be overridden to create a custom AbortHandler implementation.

    • Labels are now taken into account for the final content rectangle and viewport animation.

    • The property #FinishedHandler has been replaced by the event #LayoutFinished that uses the new LayoutEventArgs. LayoutExceptionEventArgs have been replaced by LayoutEventArgs whose property #Exception is null when no exception occured.

    • The new property #ConsiderViewportLimiter can be enabled to let the target viewport after a layout respect the ViewportLimiter of the GraphControl. The ViewportAnimation has a new property #ConsiderViewportLimiter for the same purpose.

    • Classes LayoutExecutor and LayoutGraphAdapter now have a property #AutomaticEdgeGrouping that automatically configures edge groups for ports with multiple incoming or outgoing edges. This feature is enabled by default.

    • Classes LayoutExecutor and LayoutGraphAdapter now have a property #FixPorts that automatically configures strong source and target port constraints for all edges in the graph. This feature is disabled by default.

  • LayoutGraphAdapter now adds data providers that map each node, edge and label of a LayoutGraph to their corresponding IModelItem in the original IGraph. Especially, these data providers are available if a layout is run with a LayoutExecutor or the convenience methods LayoutExtensions#morphLayout and LayoutExtensions#applyLayout.

  • The factory methods #createEdgeBetweennessPartitionFinder, #createComponentPartitionPlacer, #createPolylineInterEdgeRouter, #createChannelInterEdgeRouter and their overloads have been moved from the PartitionLayout class to appropriate interfaces IPartitionFinder, IPartitionPlacer and IInterEdgeRouter.

Streamlined Layout API

  • The legacy hierarchic layout com.yworks.yfiles.layout.hierarchic.HierarchicLayouter, com.yworks.yfiles.layout.hierarchic.HierarchicGroupLayouter, and the associated legacy interfaces ILayerer, IDrawer, IMementoSupport, ILayerSequencer, together with their implementations, have been removed. Instead, IncrementalHierarchicLayouter has been renamed to HierarchicLayout and is now the only implementation of the hierarchic layout style. All associated interfaces and implementations from the package com.yworks.yfiles.layout.hierarchic.incremental have been moved up to com.yworks.yfiles.layout.hierarchic.

  • Legacy classes OrthogonalGroupLayouter and DirectedOrthogonalLayouter have been removed and their features have been incorporated in OrthogonalLayout. Class DirectedOrthogonalLayoutData has been removed and its features have been incorporated into OrthogonalLayoutData.

  • Legacy class OrthogonalEdgeRouter and all associated classes have been removed.

  • Class HVTreeLayouter has been removed and its features have been incorporated into TreeLayout.

  • Class DefaultGraphLayout has been removed.

  • Class ParentEdgeAugmentationStage has been removed.

  • Method Graph#moveSubgraph has been removed.

  • CopiedLayoutIGraph was removed. An instance of the super type CopiedLayoutGraph with the same functionality can be obtained from factory method #createCopiedLayoutGraph in LayoutGraphAdapter.

  • The method canLayout has been removed from all layout algorithms. Previously it pretty much always returned true.

Major Features Added

  • Added support for Sankey diagrams which visualize flow quantity between entities like e.g., cost or energy flow.
  • HierarchicLayout: Added support for port grouping, see PortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY. Edges are bundled at their ports, but routed independently.
  • HierarchicLayout now allows to specify the directedness of edges, see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY. This new feature enables to, for example, support mixed graphs that contain both directed and undirected edges: While for directed edges the layering step tries to find a solution where the source of an edge is placed above the target (with respect to the main layout direction), for undirected edges the direction doesn't matter and the edge may also be inserted as same-layer edge. This feature also enables to force some edges to specifically point against the main layout direction.
  • HierarchicLayout: Added support for edges with a specific thickness. Minimum distances in the layout will consider these thicknesses, see HierarchicLayout#EDGE_THICKNESS_DPKEY.
  • Added preferred placement specifiers LabelLayoutConstants#PLACE_AT_SOURCE_PORT and LabelLayoutConstants#PLACE_AT_TARGET_PORT for edge labels which express that the label should be placed directly at the source/target port of the edge. Currently, the specifiers are only considered by the integrated labeling of the HierarchicLayout.
  • OrganicLayout now supports the detection of regular substructures in the graph (see OrganicLayout#setChainSubstructureStyle(ChainSubstructureStyle), OrganicLayout#setStarSubstructureStyle(StarSubstructureStyle), OrganicLayout#setCycleSubstructureStyle(CycleSubstructureStyle), and OrganicLayout#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 TreeReductionStage#setNonTreeEdgeLabelingAlgorithm and TreeReductionStage#setNonTreeEdgeLabelSelectionKey.
  • 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 SeriesParallelLayout#setNonSeriesParallelEdgeLabelingAlgorithm and SeriesParallelLayout#getNonSeriesParallelEdgeLabelSelectionKey.
  • HierarchicLayout supports recursively routed edges. Edges that pass the border of group nodes will always leave at the bottom side and enter at the top side of the group node. This routing style is specified using EdgeLayoutDescriptor#setRecursiveEdgeStyle(RecursiveEdgeStyle).
  • HierarchicLayout: Improved from-sketch behavior for groups with changed bounds (e.g. after folding or expanding a group node).
  • Added edge bundling feature. 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 following layout algorithms support edge bundling:
    • CircularLayout: Edge bundling is applied to edges of the same partition.
    • TreeReductionStage: Edge bundling is applied to non-tree edges.
    • RadialLayout: Edge bundling is applied to non-tree edges.
  • Added new layout algorithm SeriesParallelLayout for graphs that are constructed only by series (combining two series parallel graphs by merging the source of one graph with the sink of the other) and parallel (combining two series parallel graphs by merging the sources and the sinks) operations.
  • Added multi-parent support to TreeLayout. A tree node can have multiple parents that are connected to all of its siblings and share the same parents. This might come to use in organizational charts where a team answers to multiple superiors.
  • Added grid placement support for nodes and edges to HierarchicLayout.
  • Passing data to a layout algorithm has been simplified by the new LayoutData classes. For each major and many minor layout algorithms a subclass of LayoutData has been added that allows to set data relevant for this algorithm using properties. This LayoutData object can be set on LayoutExecutor or passed to the IGraph#applyLayout or GraphControl#morphLayout method. The following layout data classes have been added:
    • ARTreeLayoutData for the ARTreeLayouter
    • BalloonLayoutData for the BalloonLayouter
    • BusRouterData for the BusRouter
    • ChannelEdgeRouterData for the ChannelEdgeRouter
    • CircularLayoutData for the CircularLayouter
    • ComponentLayoutData for the ComponentLayouter
    • CompositeLayoutData to combine different layout data objects
    • DirectedOrthogonalLayoutData for the DirectedOrthogonalLayouter
    • FamilyTreeLayoutData for the FamilyTreeLayouter
    • FixedGroupLayoutData for the FixedGroupLayoutStage
    • GenericTreeLayoutData for the GenericTreeLayouter
    • HVTreeLayoutData for the HVTreeLayouter
    • IncrementalHierarchicLayoutData for the HierarchicLayout
    • LabelingData for the SALabeling and GreedyMISLabeling
    • MultiPageLayoutData for the MultiPageLayouter
    • OrganicEdgeRouterData for the OrganicEdgeRouter
    • OrthogonalEdgeRouterData for the OrthogonalEdgeRouter
    • OrthogonalLayoutData for the OrthogonalLayouter
    • OrthogonalPatternEdgeRouterData for the OrthogonalPatternEdgeRouter
    • ParallelEdgeLayoutData for the ParallelEdgeLayouter
    • PartialLayoutData for the PartialLayouter
    • PartitionLayoutData for the PartitionLayouter
    • PolylineEdgeRouterData for the com.yworks.yfiles.layout.router.polyline.EdgeRouter
    • RadialLayoutData for the RadialLayouter
    • RecursiveGroupLayoutData for the RecursiveGroupLayouter
    • SelfloopCalculatorLayoutData for the SelfloopCalculator
    • SmartOrganicLayoutData for the SmartOrganicLayouter
    • StraightLineEdgeRouterData for the StraightLineEdgeRouter
    • TreeReductionStageData for the TreeReductionStage

Minor Features Added

  • HierarchicLayout: Added support for sequence constraints between edges as well as nodes and edges, see SequenceConstraintFactory.
  • HierarchicLayout: Added support for overlapping layers. The strict layer structure can be compacted by moving layers up into the space of previous layers. Layers are only moved if it won't produce overlaps with nodes or edges.
  • HierarchicLayout: Added feature that allows for edges that connect group nodes with their descendants to directly connect from inside to the group node's border. It can be activated for each edge individually on the EdgeLayoutDescriptor by calling EdgeLayoutDescriptor#setDirectGroupContentEdgeRoutingEnabled(boolean).
  • RecursiveGroupLayout: Added edge splitting for inter-edges and the possibility to align edges that connect to the group border from inside and outside.
  • GenericLabeling: Added option AbstractMISLabeling#setAmbiguityReductionEnabled(boolean) that reduces the ambiguity of label placements. When enabled, the labeling algorithms try to avoid placing labels at positions where it is not clear to which graph element a label belongs.
  • Added layout stage CurveFittingLayoutStage which allows the approximation of edge paths with cubic bezier curve control points. The stage is especially useful if curved edges are modeled using a large number of bends connected via straight lines.
  • AbortHandler: Added method hasCheckFailed() that allows to query whether a check method was called after a stop or cancel event.
  • Added interface LabelLayoutFactory that provides methods for creating, adding and removing node/edge labels for LayoutGraphs.
  • HierarchicLayout: Added support for incremental group nodes (see IncrementalHintsFactory#createIncrementalGroupHint(Object)). Incremental groups will be placed on a suitable position. The hints of their descendants are interpreted relative to the group node.
  • SimplexNodePlacer: Added option setNodeCompactionEnabled(boolean) that allows to place adjacent nodes of a layer in a more compact, stacked style.
  • Added vertical alignment option for DefaultNodePlacer and SimpleNodePlacer. In addition to the previous compact child placement, siblings can now be aligned at top, center or bottom for example.
  • TreeLayout: Added support for critical edges in DefaultNodePlacer, DendrogramNodePlacer, SimpleNodePlacer, LayeredNodePlacer and DoubleLineNodePlacer. Nodes connected to a critical edge will be center aligned which can be used to highlight certain paths in the tree.
  • TreeLayout: Added support for grouped edges in DefaultPortAssignment. Grouped edges will share the same port location at local root.
  • Added class GroupedNodePlacer that allows TreeLayout to place siblings into different groups.
  • RecursiveGroupLayout: Added option setInterEdgeRouter(ILayoutAlgorithm) to specify an edge router to layout edges that cross group node bounds. Thus, it is not necessary to subclass the layouter to change inter-edge routing anymore.
  • Added layout stage FixPortLocationStage which ensures that layout algorithms that cannot handle port constraints keep the ports of edges with strong port constraints.
  • Added layout stage PortPlacementStage which assigns edges to the ports specified by PortConstraints or PortCandidates after calling the core layout.
  • Groups: Added k-means clustering algorithm that partitions a given graph in k-clusters.
  • Groups: Added hierarchical clustering algorithm that partitions a given graph based on agglomerative (i.e., bottom-up) strategy and some linkage function (single-, complete- and average-linkage).

Improvements

  • HierarchicLayout: Improved support for PortCandidates at group nodes. Previously, they were only obeyed if there was just a single candidate defined, which also applied to the opposite node (not necessarily a group node). Now, out of the given candidates, one is selected and considered for the routing. Still, fixed candidates are treated like free ones and are not supported at the side of group nodes.
  • Improved the performance of OrthogonalSegmentDistributionStage and thus also ChannelEdgeRouter which by default uses the mentioned stage as edge distribution strategy.
  • 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 MultiPageLayout#setStrictClusterSeparationEnabled(boolean) that allows to specify whether or not nodes with different cluster IDs may be placed onto the same page.
  • The following tree algorithms now support custom selection of the root node of the tree:
    • BalloonLayout
    • TreeLayout
    • ClassicTreeLayout
    • AspectRatioTreeLayout
  • BalloonLayout: Interleaved child placement now works in conjunction with from sketch-mode and custom child order comparators. This means that the settings BalloonLayout#setFromSketchModeEnabled(boolean) and BalloonLayout#setComparator(Comparator) are no longer ignored when enabling the interleaved placement mode (see BalloonLayout#setInterleavedMode(InterleavedMode)).
  • TreeLayout and ClassicTreeLayout: Now take into consideration the minimum group node size specified by the user with a DataProvider registered with the graph with key GroupingKeys#MINIMUM_NODE_SIZE_DPKEY.
  • ChannelRouter: Improved order of segments to avoid edge crossings when there are multiple segments that have one common end point.
  • New convenience method LayoutGraphUtilities#getPathClippedOnBB(YPointPath, YRectangle, YRectangle) that computes a clipped edge path given a YPointPath and two YRectangles to clip on.
  • HierarchicLayout: Added properties that allow for stopping the layout algorithm after the layering or the sequencing phase while skipping the subsequent phases. This may be useful when using two layout runs to collect layering and/or sequencing information in the first run that will be used during the second run.
  • HierarchicLayout: Fixed edges which have segments that should be horizontal or vertical but are slightly non-orthogonal.
  • HierarchicLayout: Improved behavior in incremental mode that moved normal nodes that were in different layers (in the initial layout) to the same layer. This behavior occurred in case there were group nodes that extended into the layer above or below to get a compact result.
  • EdgeRouter will now consider the target group of an edge if this edge is the only member of its source group.
  • EdgeRouter: Improved edge routes of self-loops to go around at least one corner of the node. Only if both source and target port are restricted to the same side (PortConstraint, PortCandidate), self-loops may start and end at the same side of the node.
  • InteractiveOrganicLayout: Fixed possible performance problem after changing the inertia/stress of some nodes.
  • The directed style of the OrthogonalLayout: Now always produces planar drawings for trees.
  • GenericLabeling: Generic labeling algorithms do not consider any more labels of zero width or height. Before, bad labeling results were possible.
  • GenericLabeling: Improved performance - especially for large graph instances.
  • Improved support for PreferredPlacementDescriptor side preference (left, on-edge, right) when using generic labeling algorithms GenericLabeling. Now, the side preference is considered for edge labels with arbitrary EdgeLabelModel implementations.
  • TreeLayout: Improved DefaultPortAssignment to consider PortConstraints in all modes. If a distributed mode is selected then weak constraints will also be distributed on the according side.
  • LayeredNodePlacer: Improved spacing between labels and bends when polyline labeling is enabled.
  • RadialLayout: If the data provider registered with key RadialLayout.NODE_INFO_DPKEY also implements DataAcceptor interface, it will be filled with the according RadialLayout.NodeInfo object for each node.
  • Added layout stage HandleNaNCoordinatesStage which prevents layout algorithms that take initial coordinates for nodes and edges into account from failing if some of those graph elements have NaN-coordinates.
  • Several smaller runtime improvements for the following layout algorithms:
    • HierarchicLayout
    • ChannelRouter
    • OrganicLayout
    • OrthogonalLayout
    • CircularLayout
    • RadialLayout
  • HierarchicLayout: Reduced number of group node overlaps that may appear for groups containing elements with tail/head constraints, see SequenceConstraintFactory#addPlaceNodeAtTailConstraint(Object) and SequenceConstraintFactory#addPlaceNodeAtHeadConstraint(Object).
  • Improved abort handling for algorithms that use ConstraintIncrementalLayerer, ConstraintLayerer and TopologicalIncrementalLayerer. For large graphs these classes may require a long runtime that cannot be canceled by using an AbortHandler.
  • HierarchicLayout: The group transposition feature (see DefaultLayerSequencer.setGroupTranspositionEnabled(boolean)) can now also be used in incremental layout mode.
  • ConstraintIncrementalLayerer: Improved handling of same layer constraints. In previous versions the layerer sometimes ignores same layer constraints even though there is a valid layering.
  • HierarchicLayout: More compact placement of rotated as well as stacked labels.
  • OrganicLayout: Now also considers the group node compactness (see option setGroupNodeCompactness(double)) if option setNodeEdgeOverlapAvoided(boolean) is enabled.
  • OrganicLayout: Improved node overlap removal (see option setNodeOverlapsAllowed(boolean)). Now, if the scope is set to SUBSET or MAINLY_SUBSET, the number of node overlaps that cannot be removed is reduced.
  • LayeredNodePlacer: Reduced overlaps between edges and node labels for all routing styles.
  • GridNodePlacer: Corrected alignment of child nodes and edge routing when there are node labels.
  • AbstractRotatableNodePlacer.RootAlignment, DefaultNodePlacer and DendrogramNodePlacer: Instead of aligning bounding boxes including nodes and their labels, nodes are aligned directly with other nodes. Therefore a layout with node labels gets more compact and the alignment is consistent with that of graphs without node labels.
  • DelegatingNodePlacer: Added support for a child comparator for children of local root nodes.
  • TreeLayout now ignores labels with zero width or height in all distance calculations.
  • TreeLayout: INodePlacer implementations now also use the specified spacing as minimum distance between different subtrees.
  • PartialLayout: Reduced number of element overlaps if there are partial group nodes.
  • ParallelEdgeRouter: Now always separates parallel edges according to their direction, i.e., edges (v,w) and (w,v) are never placed interleaved.
  • GenericLabeling now also considers the node/edge overlap penalty specified by a LabelCandidate.

Changes in Default Behavior

  • HierarchicLayout: Creating layer constraints (see LayerConstraintFactory) or sequence constraints (see SequenceConstraintFactory) using a disposed of factory now throws an IllegalStateException.
  • GenericLabeling: Changed LabelCandidates default for overlap penalty of nodes and edges from 0 to 1. This means label overlaps are now considered more severe.
  • 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.
  • The following default values of properties have been changed:
    • MultiStageLayout and MultiPageLayout: The default LabelLayout is now set to an instance of GenericLabeling.
    • PartialLayout: Default value of property MinimalNodeDistance is now 10d instead of 0.0.
    • MultiParentDescriptor: Default value of property MinimumNodeDistance is now 15d instead of 10.0.
    • BalloonLayout: Default value of property MinimalNodeDistance is now 10.0 instead of 0.0.
    • GenericLabeling: Default value of property DeterministicModeEnabled is now true instead of false.
    • SplitEdgeLayoutStage: Default value of property ProxyNodeSize is now 1.0 instead of 0.0.
  • HierarchicLayout: For input graphs with infeasible PortConstraints and PortCandidates/PortCandidateSets (i.e., for edges that have non-matching port constraints/candidates), the layout algorithm now always prefers PortConstraints. In previous versions, the behaviour was not well-defined for such cases.
  • PortCandidateAssignmentStage: Now, if an edge has registered PortCandidates and connects to nodes with PortCandidateSets, the stage will try to match both collections to find an appropriate port. In case there is no matching port candidate, a PortCandidate specified for the edge is preferred. Before, one of PortCandidates was selected without trying to match with node port candidates.
  • GraphTransformer: Method setOperation(int) now only sets the operation value and does not disable the automatic selection of best fitting rotation angle if an operation other than ROTATE is selected.
  • Centrality: The following methods can now take empty INodeMaps and IEdgeMaps as arguments for returning the resulting centrality values.
    • Centrality#edgeBetweenness(Graph, IEdgeMap, boolean, DataProvider)
    • Centrality#nodeBetweenness(Graph, INodeMap, boolean, DataProvider)
    • Centrality#nodeEdgeBetweenness(Graph, INodeMap, IEdgeMap, boolean, DataProvider)
  • Most of the setter methods of the properties of package layout now throw an IllegalArgumentException if an unexpected/illegal or null argument is given as input.
  • DelegatingNodePlacer: Method determineChildConnector(Node) now throws an IllegalStateException instead of an IllegalArgumentException.
  • OrthogonalLayout: Method setIntegratedEdgeLabelingEnabled(boolean) throws an IllegalStateException if the current label layouter is not of type LabelLayoutTranslator.
  • TreeComponentLayout: Constructor TreeComponentLayout(ILayouterAlgorithm) throws an IllegalArgumentException if null is given as argument.

Other API Changes

  • Groups.Dendrogram does no longer extend class Graph. To enable convenient iteration of a dendrogram, method Groups.Dendrogram.getChildren(Node) was added.
  • The following constructors have been removed:
    • Bipartitions.Bipartitions()
    • Centrality.Centrality()
    • Cycles.Cycles()
    • GraphConnectivity.GraphConnectivity()
    • NetworkFlows.NetworkFlows()
    • NodeOrders.NodeOrders()
    • Paths.Paths()
    • RankAssignments.RankAssignments()
    • SpanningTrees.SpanningTrees
    • Transitivity.Transitivity()
    • Bfs.Bfs()
    • Grouping.Grouping()
    • Swimlanes.Swimlanes()
    • RecursiveGroupLayout.RecursiveGroupLayout(ILayoutAlgorithm,IGroupBoundsCalculator)
  • FixedGroupLayoutStage: Method getInterEdgeroutingStyle() has been renamed to getInterEdgeRoutingStyle().
  • EdgeReverser: Method reverseEdges(Graph,EdgeList) has become static.
  • The following classes, constructors, and methods have been deprecated:
    • PortConstraint: All constructors
    • PortCandidate: All constructors
    • SequenceConstraintFactory: Methods
      • addPlaceNodeAfterConstraint(Object, Object)
      • addPlaceNodeAtHeadConstraint(Object)
      • addPlaceNodeAtTailConstraint(Object)
      • addPlaceNodeBeforeConstraint(Object, Object)
    • WeightedLayerer: Method downShiftNodes(Graph, INodeMap, int)
  • BendConverter: The data provider key ScopeDpKey has been renamed to AffectedEdgesDpKey.
  • BendConverter: Property AdoptSelection has been renamed to AdoptEdgeMarking.
  • BendConverter: Property SelectedEdgesDpKey has been renamed to MarkedEdgesDpKey.
  • CircularLayouter: The data provider key CircleIdHolderDpKey has been renamed to CircleIdDpKey.
  • CircularLayouter: The data provider key CircularCustomGroupsDpKey has been renamed to CustomGroupsDpKey.
  • com.yworks.yfiles.layout.circular.LayoutStyle: Enum type CircularCustomGroups has been renamed to CustomGroups.
  • ComponentLayouter: The data provider key LayoutNodeDpKey has been renamed to AffectedComponentsDpKey.
  • ComponentLayouter: The data provider key GivenComponentDpKey has been renamed to ComponentIdDpKey.
  • EdgeReversalStage: The data provider key ReverseEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • FamilyTreeLayouter: The data provider key DpKeyFamilyType has been renamed to FamilyTypeDpKey and data provider registered with this key have to return values of the new com.yworks.yfiles.layout.genealogy.FamilyType enum.
  • PartitionGrid: The data provider key PartitionCellDpKey has been renamed to PartitionCellIdDpKey.
  • ConstraintIncrementalLayerer: The data provider key EdgeWeightsDpKey has been renamed to AdditionalEdgeWeightDpKey.
  • com.yworks.yfiles.layout.hierarchic.HierarchicLayouter: The data provider key LayerValueHolderDpKey has been renamed to LayerIndexDpKey.
  • com.yworks.yfiles.layout.hierarchic.HierarchicLayouter: The data provider key SequenceValueHolderDpKey has been renamed to SequenceIndexDpKey.
  • com.yworks.yfiles.layout.hierarchic.IEdgeData: The property SourceCandidates has been renamed to SourcePortCandidates.
  • com.yworks.yfiles.layout.hierarchic.IEdgeData: The property TargetCandidates has been renamed to TargetPortCandidates.
  • SelfloopCalculator: The data provider key IsOctilinearDpKey has been renamed to OctilinearEdgesDpKey.
  • HierarchicLayout: The data provider key CriticalEdgeDpKey has been renamed to CriticalEdgePriorityDpKey.
  • HierarchicLayout: The data provider key LayerValueHolderDpKey has been renamed to LayerIndexDpKey.
  • HierarchicLayout: The data provider key SequenceValueHolderDpKey has been renamed to SequenceIndexDpKey.
  • LayouterKeys: The data provider key SelectedNodesDpKey has been renamed to AffectedNodesDpKey.
  • LayouterKeys: The data provider key SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • LabelLayoutKeys: The data provider key IgnoreLabelDpKey has been renamed to IgnoredLabelsDpKey.
  • LabelingBase: Property SelectedLabelsDpKey has been renamed to AffectedLabelsDpKey.
  • NormalizingGraphElementOrderStage: The data provider key ComparableNodeDpKey has been renamed to NodeComparableDpKey.
  • NormalizingGraphElementOrderStage: The data provider key ComparableEdgeDpKey has been renamed to EdgeComparableDpKey.
  • The enum com.yworks.yfiles.layout.organic.SphereOfAction has been removed. Earlier usages have been replaced by com.yworks.yfiles.layout.organic.Scope. SphereOfAction.ALL has been mapped to Scope.ALL, SphereOfAction.MAINLY_SELECTION has been mapped to Scope.MAINLY_SUBSET and SphereOfAction.ONLY_SELECTION has been mapped to Scope.SUBSET.
  • OrganicLayouter: The data provider key SphereOfActionNodesDpKey has been renamed to AffectedNodesDpKey.
  • OrganicLayouter: Property SphereOfAction has been renamed to Scope and is now of type com.yworks.yfiles.layout.organic.Scope.
  • ShuffleLayouter: The data provider key MinimalDistanceDpKey has been renamed to MinimalNodeDistanceDpKey.
  • SmartOrganicLayouter: The data provider key NodeSubsetDpKey has been renamed to AffectedNodesDpKey.
  • SmartOrganicLayouter: Data provider registered with the key GroupNodeModeDpKey now have to return values of the new com.yworks.yfiles.layout.organic.GroupNodeMode enum.
  • SplitEdgeLayoutStage: Property SplitEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • ParallelEdgeLayouter: The data provider key ScopeDpKey has been renamed to AffectedEdgesDpKey.
  • PartialLayouter: The data provider key PartialNodesDpKey has been renamed to AffectedNodesDpKey.
  • PartialLayouter: The data provider key PartialEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • PartialLayouter: The data provider key ComponentAssignmentDpKey has been renamed to ComponentIdDpKey.
  • PartitionLayouter.OrthogonalInterEdgeRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • PartitionLayouter.PolylineInterEdgeRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • PortCandidate: The data provider key SourcePcListDpKey has been renamed to SourcePortCandidateCollectionDpKey.
  • PortCandidate: The data provider key TargetPcListDpKey has been renamed to TargetPortCandidateCollectionDpKey.
  • PortCandidateSet: The data provider key NodeDpKey has been renamed to NodePortCandidateSetDpKey.
  • com.yworks.yfiles.layout.radial.CenterNodesPolicy: Enum type Selection has been renamed to Custom.
  • BusRouter: The data provider key EdgeSubsetDpKey has been renamed to AffectedEdgesDefaultDpKey.
  • BusRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • CollinearBendHider: The data provider key SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • The enum com.yworks.yfiles.layout.router.SphereOfAction has been removed. Earlier usages have been replaced by com.yworks.yfiles.layout.router.Scope. SphereOfAction.ROUTE_ALL_EDGES has been mapped to Scope.ALL, SphereOfAction.ROUTE_SELECTED_EDGES has been mapped to Scope.SUBSET and SphereOfAction.ROUTE_EDGES_AT_SELECTED_NODES has been mapped to the new enum value Scope.SUBSET_AT_AFFECTED_NODES.
  • OrganicEdgeRouter: The data provider key RouteEdgeDpKey has been renamed to AffectedEdgesDpKey.
  • OrthogonalEdgeRouter: Property SelectedNodesDpKey has been renamed to AffectedNodesDpKey.
  • OrthogonalEdgeRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • OrthogonalEdgeRouter: Property SphereOfAction has been renamed to Scope and is now of type com.yworks.yfiles.layout.router.Scope.
  • com.yworks.yfiles.layout.router.Polyline.EdgeRouter: The data provider key LabelCrossingCostFactorDpKey has been renamed to LabelCrossingPenaltyFactorDpKey.
  • com.yworks.yfiles.layout.router.Polyline.EdgeRouter: Property SphereOfAction has been renamed to Scope and is now of type com.yworks.yfiles.layout.router.Scope.
  • com.yworks.yfiles.layout.router.Polyline.EdgeRouter: Property SelectedNodesDpKey has been renamed to AffectedNodesDpKey.
  • com.yworks.yfiles.layout.router.Polyline.EdgeRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • com.yworks.yfiles.layout.router.Polyline.EdgeRouter: Method IsSelected has been renamed to IsAffected.
  • PolylineLayoutStage: Property SphereOfAction has been renamed to Scope and is now of type com.yworks.yfiles.layout.router.Scope.
  • PolylineLayoutStage: Property SelectedNodesDpKey has been renamed to AffectedNodesDpKey.
  • PolylineLayoutStage: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • StraightLineEdgeRouter: Property SphereOfAction has been renamed to Scope and is now of type com.yworks.yfiles.layout.router.Scope.
  • StraightLineEdgeRouter: Property SelectedNodesDpKey has been renamed to AffectedNodesDpKey.
  • StraightLineEdgeRouter: Property SelectedEdgesDpKey has been renamed to AffectedEdgesDpKey.
  • SubgraphLayouter: Property SubgraphNodesDpKey has been renamed to AffectedNodesDpKey.
  • ARTreeLayouter: The data provider key RatioDpKey has been renamed to SubtreeAspectRatioDpKey.
  • ARTreeLayouter: Data provider registered with the key RootPlacementDpKey now have to return values of the new com.yworks.yfiles.layout.tree.RootPlacement enum.
  • ARTreeLayouter: The data provider key RoutingPolicyDpKey has been renamed to SubtreeRoutingPolicyDpKey and data provider registered with this key now have to return values of the new com.yworks.yfiles.layout.tree.RoutingPolicy enum.
  • ARTreeLayouter: Method GetRoutingPolicy now returns a RoutingPolicy enum value.
  • ARTreeLayouter: Method GetRootPlacement now returns a RootPlacement enum value.
  • ARTreeLayouter: Property RoutingPolicy is now of the type RoutingPolicy.
  • ARTreeLayouter: Property RootPlacement is now of the type RootPlacement.
  • AssistantPlacer: The data provider key AssistantDpKey has been renamed to AssistantNodeDpKey.
  • DelegatingNodePlacer: The data provider key LeftRightDpKey has been renamed to PrimaryNodesDpKey.
  • DelegatingNodePlacer: Method GetUpperLeftChildren has been renamed to PrimaryChildren.
  • DelegatingNodePlacer: Method GetLowerRightChildren has been renamed to SecondaryChildren.
  • DelegatingNodePlacer: Property PlacerUpperLeft has been renamed to PrimaryPlacer.
  • DelegatingNodePlacer: Property PlacerLowerRight has been renamed to SecondaryPlacer.
  • com.yworks.yfiles.layout.tree.InterleavedMode: Enum type SelectedNodes has been renamed to MarkedNodes.
  • GenericTreeLayouter: The data provider key ChildComparatorDpKey has been renamed to OutEdgeComparerDpKey.
  • GridNodePlacer: The data provider key GridDpKey has been renamed to RowIndexDpKey.
  • LeftRightPlacer: The data provider key LeftRightDpKey has been renamed to LeftNodeDpKey.
  • NodeOrderComparator: The data provider key NodeOrderDpKey has been renamed to NodeOrderComparableDpKey.
  • Class HierarchicTreePlacer has been renamed to HierarchicTreeNodePlacer.
  • Class ParallelEdgeLayouter has been renamed to ParallelEdgeRouter.
  • Class ReducedSphereOfActionStage has been renamed to ReducedScopeStage.
  • Class SelfLoopLayouter has been renamed to SelfLoopRouter.
  • Class AssistantPlacer has been renamed to AssistantNodePlacer.
  • Class BusPlacer has been renamed to BusNodePlacer.
  • Class DendrogramPlacer has been renamed to DendrogramNodePlacer.
  • Class DoubleLinePlacer has been renamed to DoubleLineNodePlacer.
  • Class FreePlacer has been renamed to FreeNodePlacer.
  • Class LeafPlacer has been renamed to LeafNodePlacer.
  • Class LeftRightPlacer has been renamed to LeftRightNodePlacer.
  • EdgeLabelLayoutImpl: obsolete property PreferredPlacement has been removed.
  • com.yworks.yfiles.layout.hierarchic.EdgeLayoutDescriptor: obsolete property OrthogonallyRouted has been removed.
  • WeightedLayerer: deprecated method AssignNodeLayer has been removed.
  • LabelingBase: deprecated property UseAlternativeSideHandling has been removed.
  • LabelLayoutData: deprecated constructors LabelLayoutData(double,double,LabelPlacements) and LabelLayoutData(YOrientedRectangle,LabelPlacements) has been removed.
  • LabelLayoutData: obsolete property PreferredPlacement has been removed.
  • OrthogonalLayouter: obsolete properties NodeModel and UseSpacePostprocessing have been removed.
  • PortConstraint: the deprecated constructors have been removed.
  • CanvasObjectDescriptor: deprecated fields Paintable and DynamicDirtyPaintable have been removed.
  • TapInputMode: deprecated property DoubleTap has been removed.
  • LayoutExtensions: deprecated extension method CreateLayerConstraintFactory has been removed.

Demos

  • Added a demo that shows how to model a Business Process Diagram editor using customized styles and layout algorithms.
  • Added a demo that presents different layout algorithms and their configuration properties.
  • Added a demo that shows how to extend the export capabilities of yFiles for JavaFX with third-party libraries to export a graph in the SVG format.
  • Added a demo that presents the various events dispatched by the model and the input modes that can be listened to.

Bugfixes

Viewer

  • 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.
  • Fixed an issue where moving edge ports of a self-loop could break edge orthogonality despite orthogonal edge editing.
  • Fixed a bug that prevented individually disabling certain grouping commands.
  • Fixed a bug with folding that sometimes ignored the view state for a port on a folder node when a folding edge was created.
  • A bug in OverviewInputMode has been fixed that could break the overview visualization if the overview has a specific very small width or height.
  • 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 an issue where setting a BridgeManager on the RenderContextEvent had no effect and bridges would not show.
  • Fixed an issue where setting a custom Pen for a grid with GridStyle.DOTS had no effect.
  • Fixed incorrect rendering of grids for viewports with aspect ratios smaller than 1.
  • Removed remaining dependencies to AWT classes.
  • Fixed a bug in OverviewInputMode that could break the overview visualization if the overview has a specific very small width or height. This was for example the case when using a GraphOverviewControl in a TitledPane that was collapsed/expanded in an animated fashion.
  • Fixed NullPointerException that occurred when calling the GraphOverviewControl's constructor with a new GraphControl as argument.
  • Properties StripeDefaults#Insets and SimpleLabelStyle#TextFormat have default values that are intended to be shareable but were mutable which could lead to unwanted side effects. The default values for those properties have been made immutable.
  • SimpleLabelStyleRenderer: Fixed a bug that caused the border of the label to be clipped away sometimes.
  • Fixed a bug that prevents disabling the snapping feature by pressing the control key when moving or resizing nodes or creating edges interactively.
  • Changing the zoom level by mouse wheel is now the same on all systems.
  • Added missing shortcuts for the open (Shortcut+O) and save (Shortcut+S) commands.
  • Fixed a ClassCastException that occurs when the CollapsibleNodeStyleDecoratorRenderer specifies a collapse button that is not a JavaFX Button instance.
  • Fixed an issue that prevented saving and loading graphs with table nodes.
  • PixelImageExporter: fixed a bug that prevented CSS styling to be applied to the exported image.
  • MouseHoverInputMode: fixed a NullPointerException that sometimes occured when trying to hide a tooltip.

Layout

  • 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.
  • SimplexNodePlacer: Fixed bug that caused overlaps between edges and nodes when enabling node compaction (#setNodeCompactionEnabled(boolean)) and having edges with either strong PortConstraints or fixed PortCandidates.
  • HierarchicLayout: Fixed bug that caused a violation of minimum first/last segment length for backloop/reversed edges that connect to group nodes.
  • HierarchicLayout: Fixed rare bug that caused overlaps between labels and segments of edges with octilinear routes.
  • HierarchicLayout: fixed possible infinite loop if there are critical edges (see #CRITICAL_EDGE_DPKEY).
  • HierarchicLayout: Fixed bug that caused critical edges to not be aligned (see #CRITICAL_EDGE_DPKEY).
  • HierarchicLayout: Fixed rare NullPointerException triggered in AsIsSequencer for edges incident to group nodes that have a sketch without bend points as well as port constraints.
  • HierarchicLayout: Fixed bug that caused non-orthogonal segments of grouped edges even though orthogonal edge routing was enabled.
  • HierarchicLayout: Improved compactness of layouts that feature group nodes with insets and (group) nodes with halos (NodeHalo). Previously, specifying halos could enlarge the insets of group nodes by an unnecessary large amount.
  • HierarchicLayout: Fixed bug that caused a violation of the specified minimum distance or edge overlaps in the case of same-layer edges.
  • HierarchicLayout: Fixed NullPointerException that could happen in AsIsSequencer when incremental group hints are defined (see IncrementalHintsFactory#createIncrementalGroupHint(java.lang.Object)) along with specific port constraints on edges incident to an incremental group node.
  • HierarchicLayout: Improved result if compact label placement is enabled (which is the default), see SimplexNodePlacer#setLabelCompactionEnabled(boolean). 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).
  • 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 backloops.
  • HierarchicLayout: Fixed bug that caused the minimum edge-to-edge distance to be violated by edges with strong port constraints that cross each other.
  • Fixed IllegalArgumentException that is triggered in some cases when using a SequenceConstraintFactory.
  • RecursiveGroupLayout when used with HierarchicLayout as core layout algorithm: Fixed IllegalStateException that could be triggered when group nodes of the input graph have PortCandidates.
  • OrganicLayout now temporarily hides DataProviders which are registered by the user with keys that are related to RecursiveGroupLayout and #LayoutMultiplexer since their presence during the layout process may cause corrupted results.
  • PartialLayout: fixed NullPointerException that appeared if no DataProvider with key PartialLayouter#PARTIAL_NODES_DPKEY is registered with the input graph.
  • GraphPartitionManager: fixed functionality to hide edges when using methods GraphPartitionManager#hide(Edge), GraphPartitionManager#hideEdges(), GraphPartitionManager#hide(EdgeCursor) or GraphPartitionManager#hide(EdgeList). Previously, edges were actually not hidden from the graph.
  • ParallelEdgeRouter: Fixed bug that caused wrong (very large) edge port coordinates. These coordinates could also lead to Exceptions later when processing the graph, for example, when calculating placements of edge labels belonging to the edges with bad coordinates.
  • TreeLayout: fixed possible group node overlaps in conjunction with some node placers, for example AssistantNodePlacer.
  • TreeLayout: fixed bug that caused less compact layout results when having node halos (see NodeHalo).
  • TreeLayout: Fixed bug that caused edges which are reversed during the layout and have a port constraint only to one endpoint (e.g., source) to obtain the same port constraint also to the other endpoint (e.g., target).
  • EdgeRouter: Fixed rare RuntimeException that appeared if there were fixed (see EdgeRouter#setSphereOfAction(byte)) and grouped edges at the same time.
  • EdgeRouter: Fixed possible NullPointerException that may appear if a specified PortCandidate has multiple directions.
  • 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.
  • BusRouter: Fixed rare IllegalStateException caused by non-orthogonal edge segments.
  • Groups#hierarchicalClustering(Graph, int, INodeMap,INodeDistanceProvider, Linkage): Fixed NullPointerException that occurred when the given maximum number of clusters was 0 or 1.
  • HierarchicLayout: Fixed bug that caused grouped edge segments to overlap with one of the adjacent nodes if it is a group node.
  • HierarchicLayout: Fixed bug that caused same layer segments to be too short for the labels that should be placed at those segments.
  • HierarchicLayout: Fixed bug that caused a violation of minimum first/last segment length for edges that connect two neighboring nodes in the same layer.
  • HierarchicLayout: Fixed bug that caused a violation of minimum first/last segment length for edges that connect to group nodes. Now, the first/last segments of those edges will have at least the length of the largest minimum first/last segment length of all edges connected to the same group node.
  • HierarchicLayout: Fixed rare IllegalStateException that is caused by an inconsistent group node order that may appear for input graphs containing both swimlanes and groups.
  • HierarchicLayout: Fixed bug with some ignored any side strong port constraints.
  • HierarchicLayout: Fixed bug that caused PortCandidates to potentially be ignored or not handled correctly for self-loops when having directions other than PortCandidate.NORTH, PortCandidate.SOUTH, PortCandidate.WEST or PortCandidate.EAST
  • EdgeRouter: Fixed bug that caused edges routed by the EdgeRouter to sometimes share the same port with edges defined as fixed.
  • EdgeRouter: Fixed bug that caused violations of the node to edge distance between an edge and its target if the edge approaches the target from the opposite side of the target port constraint.
  • EdgeRouter: Fixed bug that caused incorrect routes for grouped edges with intersecting source and target.
  • EdgeRouter: Fixed rare NullPointerException that may appear during rerouting of edges (see EdgeRouter.setReroutingEnabled(boolean)) if the input graph contains overlapping nodes.
  • EdgeRouter: Fixed possible NullPointerException that may appear if there are grouped edges consisting of both fixed and non-fixed edges (see EdgeRouter.setScope(Scope)).
  • EdgeRouter: Fixed bug that may cause that some edges are not considered during rerouting. It only appears if the graph contains grouped edges.
  • EdgeRouter: Fixed rare bug that may cause a StackOverflowError.
  • GenericLabeling: Improved placement of edge labels with preferred placement at source/target if the label model FreeEdgeLabelModel.
  • GenericLabeling: Fixed bug that may cause that the postprocessing step ignores some node labels with model FreeNodeLabelModel.
  • Directed style of the OrthogonalLayout: Fixed problem that may cause non-directed routes for directed edges if option OrthogonalLayout.setAlignDegreeOneNodesEnabled(boolean) is enabled.
  • MultiPageLayout: Fixed possible NullPointerException that may appear if an internal layouter queries a DataProvider for an inserted dummy node.
  • CircularLayout: Fixed a bug that could potentially cause an infinite loop when encountering a node with a very high out-degree.
  • CircularLayout: Fixed bug that caused nodes to be placed outside of the enclosing circle when using layout style SINGLE_CYCLE and partition layout style PARTITION_LAYOUTSTYLE_ORGANIC.
  • ParallelEdgeRouter: Fixed possible NullPointerException that may appear if the parallel edge is almost horizontal/vertical.
  • PortCandidateAssignmentStage: Fixed bug that caused the location of strong port constraints to be ignored when using this stage together with a layout algorithm that cannot handle port constraints.
  • RemoveCollinearBendsStage: Now coincident bend points can also be removed since they produced edge segments of very small length and, thus, in some layout algorithms caused label placement failures.
  • FamilyTreeLayout: Fixed handling of grouping DataProviders so they are not changed by the layout algorithm.
  • FamilyTreeLayout: Fixed possible NullPointerException that may appear if the input graph contains group nodes.
  • HierarchicLayout: Fixed IllegalStateException that may appear in incremental layout mode if there are group nodes that contain non-incremental elements.
  • HierarchicLayout: Fixed bug that may cause an incorrect order of elements if the graph contains sequence constraints.
  • HierarchicLayout: Fixed problem that may cause a very long runtime if the layouter is applied in incremental mode and the graph contains sequence constraints.
  • HierarchicLayout: Fixed bug that caused that the layer of an incremental group (see IncrementalHintsFactory.createIncrementalGroupHint(Object)) depends on the group's location if recursive layering is enabled (see IncrementalHierarchicLayouter.setRecursiveGroupLayeringEnabled(boolean)). However, the position of incremental groups should be freely chosen by the layouter.
  • HierarchicLayout: fixed orientation of edge labels on selfloops connected to a group node.
  • HierarchicLayout: Fixed NullPointerException that occurred if an incremental group node has only incremental descendants.
  • HierarchicLayout: Fixed problem that caused bad results when assigning top or bottom layer constraints (i.e., LayerConstraintFactory.addPlaceNodeAtTopConstraint(Object) or LayerConstraintFactory#addPlaceNodeAtBottomConstraint(Object)) to fixed elements.
  • HierarchicLayout: Fixed bug that caused collinear bends in some edge routes.
  • HierarchicLayout: Fixed bug that caused the maximum duration values specified for Layerer, Sequencer and NodePlacer to be overridden and not considered during the hierarchic layout.
  • EdgeRouter: Fixed bug that caused violations of the minimum first or last segment length for target grouped edges. This only happened when these distances were defined in the default EdgeLayoutDescriptor instead of a DataProvider with individual descriptors.
  • EdgeRouter: Fixed side handling of external strong ports.
  • EdgeRouter: Fixed rare NullPointerException that may occur for graphs where only a subset of edges is routed, see EdgeRouter.setScope(Scope).
  • SimplexNodePlacer: fixed bug that disabled label compaction feature.
  • BalloonLayout: Fixed bug that caused BalloonLayout.CHILD_ORDERING_POLICY_SYMMETRIC not to work as desired.
  • AssistantNodePlacer: fixed placement of assistant nodes. When all children of a node are assistants, they are all placed left/right.
  • ClassicTreeLayout: Fixed StackOverflowError occurred in trees with high depth.
  • TreeLayout: Fixed root alignments to only take the child node bounds into account without considering edge segments in the subtree.
  • DelegatingNodePlacer: Constants DelegatingNodePlacer.VERTICAL and DelegatingNodePlacer.HORIZONTAL along with methods DelegatingNodePlacer.setOrientation(Orientation) and DelegatingNodePlacer#getOrientation() are deprecated since they had no effect.
  • Trees: fixed method getCenterRoot(Graph) that didn't always return the correct center node of a tree.
  • ClassicOrganicLayout: Fixed bug that caused tree-beautifier feature (see ClassicOrganicLayout#setActivateTreeBeautifier(boolean)) to have no effect if activated when the graph is actually flat (i.e., there is no group node that contains child nodes) but data providers for groups (see GroupingKeys) are registered with the graph.
  • CircularLayout: Fixed bug that may cause node overlaps.
  • SplitEdgeStage: Fixed bug that caused the user's selection for edges that have to be split to be ignored. Also, fixed bug that caused an IllegalArgumentException because of nodes with zero width/height.
  • ShortestPaths: Fixed NullPointerException that occurred when applying the Dijkstra or Bellman-Ford algorithm to an empty graph.
  • HierarchicLayout: Fixed label placement for octilinear selfloops with the same side constraints for source and target port.
  • HierarchicLayout: Fixed routing style violations in octilinear grouped edges.
  • HierarchicLayout: Fixed NullPointerException that could occur when octilinear edges are attached to group nodes.
  • HierarchicLayout: Fixed bug that caused first or last segments of edges to be too short to span all associated labels.
  • HierarchicLayout and RankAssignments: Fixed possible NullPointerException that may occur if the maximal duration of the algorithm is limited.
  • HierarchicLayout: Fixed bug that may cause overlaps of edge labels with preferred placement at source/target.
  • HierarchicLayout: Fixed rare IllegalStateException that may appear for grouped graphs containing nodes with fixed coordinates hint (see, e.g., IncrementalHintsFactory#createUseExactCoordinatesHint(Object)).
  • HierarchicLayout: Fixed bug that breaks incremental hints of grouped edges in incremental layout mode. (see IncrementalHintsFactory#createSequenceIncrementallyHint(Object)).
  • HierarchicLayout: Fixed bug that may cause an incorrect order of fixed (non-incremental) elements if the layouter is applied in incremental mode and the graph contains sequence constraints.
  • OrthogonalLayout: Fixed bug that caused an IllegalArgumentException if data provider key PortConstraintKeys#SOURCE_GROUPID_KEY is registered to the input graph but data provider key PortConstraintKeys#TARGET_GROUPID_KEY is not registered.
  • OrthogonalLayout: Fixed possible IllegalArgumentException caused by nodes without node IDs. This problem may only appear if the inter edge router is set to PartitionLayout.ChannelInterEdgeRouter.
  • ClassicTreeLayout: Fixed bug that may cause a ClassCastException if the input graph is a CopiedLayoutGraph that consists of multiple connected components and the layouter uses the LayeredNodePlacer (e.g., if property ClassicTreeLayout.setLeafPlacement(LeafPlacement) is set to ClassicTreeLayout.ALL_LEAVES_ON_SAME_LAYER).
  • DoubleLineNodePlacer: Fixed the distance between the local root and the upper line to match the specified spacing. The distance between the two lines can now be defined in relation to the spacing.
  • TreeReductionStage: Fixed wrong handling of group nodes which may cause a WrongGraphStructure exception as well as broken routes of edges incident to group nodes.
  • SimpleNodePlacer: Fixed broken edge routes that may appear for edges on nodes with external labels if integrated node labeling is enabled.
  • MultiPageLayout: Fixed bug that caused that an AbortHandler attached to the input graph was ignored.
  • MultiPageLayout: Fixed NullPointerException that may occur if the edge ID data provider (see MultiPageLayout.EDGE_ID_DPKEY is an instance of IEdgeMap.
  • MultiPageLayout: Fixed bug that may cause non-orthogonal edge routes.
  • ComponentLayout: Fixed bug that caused an ArrayIndexOutOfBoundsException if the style is set to ComponentArrangementStyles.MULTI_ROWS_HEIGHT_CONSTRAINT or ComponentArrangementStyles#MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT (see ComponentLayout.setStyle(ComponentArrangementStyles)) and all components exceed the preferred height (see ComponentLayout.setPreferredLayoutSize(double, double)).
  • PortCandidateSet: Fixed bug that caused method PortCandidateSet.CandidateMatcher.findMatchingCandidate() to return the entry with the highest cost instead of the lowest cost if the candidate matcher is created with method PortCandidateSet.createMatcher().
  • CopiedLayoutGraph: Fixed NullPointerException that occurs when nodes or edges are added to the copied graph without removing them before calling commitLayoutToOriginalGraph().
  • CopiedLayoutGraph: Fixed problem that may cause movement of label boxes in the original graph even if method CopiedLayoutGraph.commitLayoutToOriginalGraph() is not called.
  • BorderLine: Fixed bug in method grow(double, double, boolean) that may produce an IllegalArgumentException because the min value of a BorderLine becomes greater than its max value.
  • PartialLayout: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if option setImmediateInterEdgeRoutingEnabled(boolean) is enabled.
  • EdgeRouter: Fixed rare NullPointerException that mainly appears if there are overlapping nodes.
  • EdgeRouter: Fixed bug that may cause zero length routes of edges whose start and end point are at the same location.
  • AbstractLabeling: Fixed bug that may cause removal of labels that don't overlap with other elements if option setNodeOverlapsRemovalEnabled(boolean) is enabled.

yFiles for JavaFX 2.0.0.1 - Changes Since 2.0

Bugfixes

Viewer

  • CanvasContainer as well as internally used subclasses of Parent now call Parent#requestLayout upon changes to their list of children. This serves as a workaround for the JavaFX bug documented in JDK-8130376. This makes using JavaFX controls as part of the visualization of elements in a CanvasControl a lot easier because they are now correctly layouted by the framework.
  • The AbstractContextMenuInputMode now opens the context menu on a JavaFX control at the correct location in the canvas.
  • Fixed a bug where using NodeStyleDecorationInstaller and similar classes would cause an IndexOutOfRangeException. Also extended the GraphViewerDemo with a showcase for those classes in conjunction with the ItemHoverInputMode.
  • GraphML: Fixed incorrect parsing of CDATA sections.
  • A bug in RotatedSliderEdgeLabelModel that could only occur in very rare occasions where the first or last edge segment is orthogonal and the source or target port was completely outside the node boundaries, could cause the label to lie at infinite coordinates. In most cases this would result in the label becoming just invisible, but code that does not properly handle infinite coordinates could possibly break due to numeric instabilities.
  • An edge whose source or target port is owned by another edge (edge-to-edge connection) was always drawn in the background if grouping was enabled instead of in front of the related groups. Now, such an edge is drawn in front of these groups, with the same z-index as a similar edge from node to node would get.
  • Nodes can now be reparented with a touch gesture, by touch-dragging a node onto its new parent. Previously, that was only possible with a mouse drag.
  • GenericYList: Calling #add on an empty list has thrown an exception.
  • MoveViewportInputMode no longer fires the DragFinishing and DragFinished events for simple clicks without any mouse movement.
  • NodeDefaults, EdgeDefaults and all other Defaults: it was erroneously possible to assign null to the #Style property. Now, the property throws an NullPointerException in this case.
  • FoldedGraph detects more carefully what has changed before invoking the methods #createDummyEdgeAppearance and #changeDummyEdgeAppearance of IDummyEdgeConverter. Previously, in some cases, these methods were called too often or not at all.
  • When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
  • Fixed problem in LayoutGraphAdapter where label candidates for edge labels were not always determined correctly.
  • When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
  • FoldedGraphUndoSupport didn't add the correct bend information to its internal data structures.
  • DefaultArrow#getLength did not take the scale factor into account, sometimes leading to gaps between the edge and the arrow.
  • Custom selection visualizations using EdgeStyleDecorationInstaller were not animated correctly.
  • Custom selection visualizations using EdgeStyleDecorationInstaller in DecorationZoomMode#MIXED or DecorationZoomMode#VIEW_COORDINATES did not work correctly together with BridgeManager.
  • Explicit null values (<x:Null/>) in GraphML could lead to NullPointerException.
  • GraphML serialization can be forced to write a class property in element syntax using the GraphML annotation's #writeAsAttribute property with value XamlAttributeWriteMode#NEVER. Forcing a property that is shared to be written as element lead to invalid GraphML files.
  • If property GraphEditorInputMode#Graph had been changed, the mode still held a reference to items from the previous graph instance, thus delaying garbage collection of that graph instance. This has been improved.
  • Orthogonal edge editing could throw an exception if edges were removed during a gesture that would require edge orthogonalization.
  • Event location of the various TapInputMode events was not always updated properly.
  • Improved performance of BridgeManager and prevented redundant GeneralPath#lineTo path elements.
  • Changes to IGraph#getNodes, IGraph#getEdges and other collection properties on AbstractGraphWrapper implementations were not correctly propagated to the wrapped IGraph instance. In particular, this affected folding views.
  • NodeDropInputMode: If the property #LeafAsParentEnabled was set to true, the value of the #FolderAsParentEnabled property was ignored.

Layout

  • EdgeRouter: Fixed rare NullPointerException that may occur for graphs where only a subset of edges is routed, see EdgeRouter#setSphereOfAction.
  • CircularLayouter: Fixed bug that may cause node overlaps.
  • CopiedLayoutGraph: Fixed problem that may cause movement of label boxes in the original graph even if method CopiedLayoutGraph#commitLayoutToOriginalGraph is not called.
  • ComponentLayouterModule: Disabled from-sketch option for styles that don't support it.
  • IncrementalHierarchicLayouter: Fixed label placement for octilinear selfloops with the same side constraints for source and target port.

Demos

  • Improved demos to look better with different dpi settings.
  • ReshapeHandleProviderApplication: Prevented the demo from crashing when nodes are resized to zero.
  • IncrementalHierarchicLayouterApplication: Improved demo to support touch input.

Incompatible Changes

Changes in Default Behavior

  • NodeDropInputMode: If the property #LeafAsParentEnabled was set to false, dropping a node onto a leaf node did not consider parent group nodes of the leaf node as possible drag targets. The fixed behavior is slightly incompatible with the previous release.

yFiles for JavaFX 2.0 - Changes Since 1.0.0.1

Major Features Added

Viewer

  • Added support for Java 8.
    • Added support for streams in yFiles collection class Enumerable.

      This means that it is now possible to use the stream API with most of the data structures in the yFiles library. For example, it is now possible to write

      graph.getNodes().stream().filter(node -> node.getLabels().size() > 0);

      to retrieve all labeled nodes in an IGraph.
    • Convenience methods for many yFiles classes defined in utility classes (so-called extension classes) were added as default methods to yFiles interfaces and are thus easier to find and to use. For example, to remove all entities in proper order from a graph, instead of calling

      GraphExtensions.clear(graph)

      you can simply call the same method defined as a default method on IGraph on the graph instance:

      graph.clear()

  • GraphClipboard now supports copying independent items. This allows the user to copy labels, ports, bends, or edges to other elements without having to copy their owners. Also this technique allows for copying an item (for example a label) to multiple target elements at once.
  • The GraphClipboard now supports an optional target location for pasting and the new method GraphEditorInputMode#pasteAtLocation can be used for this end, too. In addition, ApplicationCommands#PASTE_COMMAND now supports an optional parameter of type IPoint to provide a target location.
  • GraphEditorInputMode now provides default action for duplicating single graph items or whole subgraphs. This also works with incomplete subgraphs, for example in a tree, it is possible to duplicate a subtree and the tree will never be disconnected.
    In addition, the new command GraphCommands#DUPLICATE_SELECTION_COMMAND (shortcut: Ctrl-D) and the new method GraphClipboard#duplicate can be used to duplicate selected items without altering the clipboard contents.
  • GraphEditorInputMode now provides a default action for reversing edges. To this end, the methods #reverseEdge and #reverseEdges have been added to GraphEditorInputMode. Also, the new command GraphCommands#REVERSE_EDGES_COMMAND (shortcut: Ctrl-R) has been added.
  • Node and edge labels can now snap to particular locations while moving them interactively. Both types of labels can be aligned horizontally or vertically to their original location. In addition, a node label can be aligned with the borders or the center of its owner, and during resizing of that owner, smartly keeps its relative location to the snapped position. An edge label can be snapped on the path of its owner, or at particular distances of it.
    This feature can be enabled and configured with an LabelSnapContext and is available for labels with one of these label models: SmartEdgeLabelModel, FreeEdgeLabelModel, FreeNodeLabelModel, and FreeLabelModel.
  • Interactive label editing and creation has the following new features:
    • The current label visual can be hidden while the text editor is shown to reduce visual clutter. This feature is enabled by default and can be controlled through the property GraphEditorInputMode#HidingLabelDuringEditingEnabled.
    • GraphEditorInputMode and TableEditorInputMode provide new events LabelTextEditingStarted and LabelTextEditingCanceled that are raised directly before the label text editor is shown and after the label editing has been canceled, respectively.
    • Double clicking nodes and edges now opens the label editor. An existing label can be double clicked to edit the label text. This feature can be disabled with the property GraphEditorInputMode#LabelEditingOnDoubleClickEnabled.
    • IEditLabelHelper implementations provided by the ILabel's lookup can now be used to forbid or customize the editing of individual labels. Class LabelDecorator provides a new property #EditLabelHelperDecorator to customize this feature.
    • GraphEditorInputMode#editLabel and TableEditorInputMode#editLabel can now be used with SimpleLabel instances. This provides editing capabilities for dummy elements such as legends, page headers or other textual elements.
    In addition, label editing has been reworked for a more consistent user experience. Especially, label editing now:
    • Uses the various callback methods on GraphEditorInputMode, TableEditorInputMode and IEditLabelHelper implementations in a consistent way, regardless of how many labels or labeled items are edited or added, and independent from how the editing/label creation process has been started (e.g. through a command or programmatically through the input mode convenience methods).
    • Determines the actual labeled item that is modified when multiple elements are selected in a consistent way.

Layout

  • Added new layout algorithm RadialLayouter that places nodes on concentric circles. Edges are routed in a radial fashion using one of several routing strategies.
  • Added support for terminating (layout) algorithms prematurely. To this end, new class AbortHandler provides methods for requesting early but graceful termination (see #stop) and immediate termination (see #cancel).
    The following layout algorithms have at least rudimentary support for immediate termination:
    Layout Algorithms Routing Algorithms Other Algorithms
    • BalloonLayouter
    • CircularLayouter
    • CompactOrthogonalLayouter
    • DirectedOrthogonalLayouter
    • GenericTreeLayouter
    • GRIP
    • HierarchicGroupLayouter
    • HierarchicLayouter
    • IncrementalHierarchicLayouter
    • OrganicLayouter
    • OrthogonalGroupLayouter
    • OrthogonalLayouter
    • PartialLayouter
    • RadialLayouter
    • RecursiveGroupLayouter
    • SmartOrganicLayouter
    • BusRouter
    • EdgeRouter
    • OrganicEdgeRouter
    • OrthogonalEdgeRouter
    • GreedyMISLabeling
    • SALabeling
    The following layout algorithms also support graceful early termination:
    Layout Algorithms Routing Algorithms Other Algorithms
    • HierarchicGroupLayouter
    • HierarchicLayouter
    • IncrementalHierarchicLayouter
    • OrganicLayouter
    • SmartOrganicLayouter
    • EdgeRouter
    • SALabeling
  • Added support for parallel execution of computationally intensive tasks.
    Layout algorithms SmartOrganicLayouter and OrganicLayouter may take advantage of multiple threads for layout calculations. Parallel execution is enabled using the algorithms' setMultiThreadingAllowed(boolean) method.
    Interface ITaskExecutor and factory classes TaskExecutorFactory make up the programmatic interface for the new concurrency support.
  • Introduced concept of node halos. Halos are reserved space around a node in which layout algorithms will not place other graph elements. Node halos are modelled using class NodeHalo.
    The following layout algorithms support node halos:
    Layout Algorithms Routing Algorithms Other Algorithms
    • BalloonLayouter
    • CircularLayouter
    • CompactOrthogonalLayouter
    • ComponentLayouter
    • DirectedOrthogonalLayouter
    • GenericTreeLayouter
    • IncrementalHierarchicLayouter
    • OrthogonalGroupLayouter
    • OrthogonalLayouter
    • RadialLayouter
    • RecursiveGroupLayouter
    • SmartOrganicLayouter
    • TreeLayouter
    • EdgeRouter
    • SelfLoopLayouter
    • GreedyMISLabeling
    • SALabeling
    • InsetsGroupBoundsCalculator
    • MinimumSizeGroupBoundsCalculator
  • SmartOrganicLayouter: Added support for partition grid layout. See PartitionGrid.

Minor Features Added

Viewer

  • Added class CanvasPrinter that leverages the new printing API of JavaFX 8
  • ContextMenuInputMode has now an abstract subclass to handle non-JavaFX context menu as shown in the interoperability demos.
  • LayoutExecutor can now safely handle concurrent layout requests. By default an already running layout will be short-cut and the next layout request will be processed. Property #SequentialExecution can be set to false to revert to the old (unsafe) behavior. The new #stop method and the #Running property can also be used in this context.
  • GraphEditorInputMode got support for cyclic click selection. This helps in conveniently selecting items that are hidden behind other items. By default, this features is bound to the Alt-Key being pressed. It can be disabled by setting the #CyclicSelectionRecognizer property to EventRecognizers#NEVER.
  • ItemDropInputMode is a new DropInputMode that facilitates subclasses that support preview and snapping of the dragged item as well as highlighting potential drop targets.
    NodeDropInputMode and StripeDropInputMode have been refactored to use ItemDropInputMode as base class.
  • ItemHoverInputMode is a new IInputMode that fires events when the mouse enters or leaves the visualization of a graph item.
  • GraphEditorInputMode and GraphViewerInputMode provide a new CanvasClicked event to detect clicks on an empty canvas location.
  • Node ports can now be moved by dragging their IHandle.
  • When zooming while editing a label, the label text editor now stays at its minimum (maximum) size when the zoom level becomes smaller (larger) than the specified threshold. Previously, the label text editor jumped back to the size of zoom level 1.0 for such values.
  • GraphClipboard has new properties CopyItems, IndependentCopyItems, and DependentCopyItems that allow for restricting the types of items that can be copied at all, independently from their owners, or implicitly through their owners, respectively.
  • GraphViewerInputMode and GraphEditorInputMode: Their ClickInputMode now delivers both left and right clicks.
  • GraphViewerInputMode: The click hit test order can now be configured by property #ClickHitTestOrder.
  • GraphEditorInputMode provides an explicit hit test order for double clicks that can be changed through the #DoubleClickHitTestOrder property. By default, this hit test order prefers labels over other graph elements.
  • Added new methods ClickInputMode#preventNextDoubleClick and TapInputMode#preventNextDoubleTap that can be used in event handlers for single clicks/taps to prevent that this click can become part of a double click event.
  • NodeDropInputMode can now optionally drop nodes onto leaf nodes and thus convert the leaves into group nodes. Also it is possible to drop nodes into collapsed folder nodes. For both use-cases, an opt-in property has been added and a predicate property allows for fine-grained control over this feature.
  • Similarly, leaf nodes can now be the target of a reparenting gesture if the property GraphEditorInputMode#ReparentingToLeavesEnabled is enabled. In this case, leaves are converted into group nodes.
  • Added support for deleting bends in a way that an orthogonal edge remains orthogonal after removing the bends. The new property GraphEditorInputMode#OrthogonalBendRemovalEnabled enables/disables this feature.
  • GraphViewerInputMode now supports multi-selection via Ctrl+Click and marquee selection. The latter is disabled by default.
  • OverviewInputMode and the GraphOverviewControl have been optimized to improve the user experience when used on touch devices.
  • OverviewInputMode can be customized more easily. Minor modes can be replaced and adjusted, as well as the list of available default command bindings can be modified.
  • Improved GraphModelManager to allow for easier customizations. Property #HierarchicNestingEnabled was added to allow for adding custom logic that uses a different approach to hierarchic nesting. Also the return types of some of the factory methods where made less restrictive to allow for further modifications.
  • FoldingManager now offers two convenience methods, #updateViewStates(INode) and #updateViewStates(IEdge), that will trigger update calls on IDummyNodeConverter and IDummyEdgeConverter for elements that are currently being displayed in a view. This makes it easier to synchronize states between the master graph and the folded graph views in case this is not automatically performed by the default implementation.

Layout

  • BalloonLayouter: Added support for integrated node and edge labeling. See new properties #IntegratedEdgeLabelingEnabled, #IntegratedNodeLabelingEnabled, and #NodeLabelingPolicy.
  • BalloonLayouter: Added support for different policies to align nodes having the same root node. See new property #ChildAlignmentPolicy.
  • BalloonLayouter: Added support for interleaved child node placement. With interleaved placement, child nodes are placed at different distances to their parent node to achieve a more compact layout. See new property #InterleavedMode.
  • IncrementalHierarchicLayouter: Improved partition grid support. Nodes can now be mapped to a multi-lane partition cell identifier, i.e., a cell spanning multiple columns and rows. See PartitionGrid.
  • IncrementalHierarchicLayouter: Improved edge label placement. Edge labels with preferred placement at source/target are placed closer to the corresponding node. Additionally, SimplexNodePlacer offers the option to place adjacent edge labels in a compact, stacked style. See new property #LabelCompactionEnabled.
  • EdgeRouter: Added a fine-granular configuration option to weigh the crossing costs for each label using the data provider look-up key #LABEL_CROSSING_COST_FACTOR_DPKEY.
  • EdgeRouter: Added property #IgnoreInnerNodeLabelsEnabled for ignoring node labels that are inside the bounds of their owner node. Node labels that are ignored because of this setting may be crossed by edges. This is especially useful if inner labels of group nodes may be crossed but outer labels of normal nodes may not.
  • EdgeRouter: Added support for customizing the order in which edges are routed. See new property #EdgeOrderComparator.
  • GenericTreeLayouter: When enabling the new properties #IntegratedNodeLabeling and/or #IntegratedEdgeLabeling, the respective labels will be taken into account during the calculation of group bounds.
  • PartialLayouter: Now supports handling of directed and undirected edges; see data provider key #DIRECTED_EDGES_DPKEY.
  • LabelLayoutTranslator: Added properties #WriteBackRelativeEdgeLabelLocationEnabled and #WriteBackRelativeNodeLabelLocationEnabled that allow a core layouter to specify new node or edge label locations relative to the label's owner.
  • LabelLayoutKeys: Added key #IGNORE_LABEL_KEY that allows specifying which edge and node labels should be ignored during layout calculations.
  • Added new class OrganicRemoveOverlapsStage that removes node overlaps while respecting a specified minimal node distance. Unlike the approach implemented in class RemoveOverlapsLayoutStage, this approach tries to keep the original layout structure, i.e., it tries to keep the geometric distance between the nodes.

Demos

  • Added a demo to show how to print the contents of a yFiles CanvasControl using the JavaFX 8 printing API.
  • Added a demo to show how to use yFiles for JavaFX in an Eclipe RCP application.
  • Added a demo to show how to use the JavaFX 8 rich text API together with yFiles labels.
  • Interoperability demos show how to wire up Commands of the GraphControl with buttons in the toolbar.
  • Interoperability demos show how to implement a ContextMenuInputMode that handle non-JavaFX context menu controls.
  • Interoperability demos show how to implement drag and drop of nodes from a Swing or SWT palette to the GraphControl.
  • Removed Shrinker from obfuscation demo since it is not Java 8 compliant yet.

Tutorials

  • Vastly improved the Getting Started tutorial in regards to documentation and content.

Improvements

Viewer

  • To support proper serialization and deserialization of URLs, we have added the ability to specify the base URI when loading GraphML files via methods that use java.io.InputStream or java.io.Reader. The added methods in particular are:
    • GraphControl#importFromGraphML(InputStream, URI)
    • GraphControl#importFromGraphML(Reader, URI)
    • GraphMLIOHandler#read(IGraph, InputStream, URI)
    • GraphMLIOHandler#read(IGraph, Reader, URI)
    • GraphMLParser#parse(InputStream, URI, IGraph, IGraphElementFactory)
    • GraphMLParser#parse(Reader, URI, IGraph, IGraphElementFactory)
    This e.g. enables the usage of relative paths in the GraphML.
  • Added class RenderContext as a default implementation of the IRenderContext interface for use in custom calls to rendering related methods like IVisualCreator#createVisual(IRenderContext) or CanvasControl#createContentVisual(IRenderContext). An instance of this class can be obtained by calling CanvasControl#createRenderContext.
  • Added class ContextConfigurator which can be used to create IRenderContexts that are configured to render certain regions of a CanvasControl with a certain scale and margins. This class is used for image export and printing.
  • ResizeStripeInputMode uses now the proper cursors for resizing stripes.
  • Zooming with the mouse wheel now works with the Shift key pressed.
  • The performance of parsing GraphML files has been improved. The speed-up is especially notable for large graphs with several thousands of nodes.
  • Optionally, LayoutExecutor uses WaitInputMode while waiting during the calculation of a layout.
  • LayoutGraphAdapter provides now the original Tag data for temporary graph objects.
  • ContextMenuInputMode added support for Menu-Key.
  • Added serialization and deserialization for javafx.scene.paint.LinearGradient, javafx.scene.paint.RadialGradient and javafx.scene.paint.ImagePattern.
  • Added proper serialization and deserialization for URLs. This means that it is now possible to use relative paths for external resources in GraphML, for example for images in ImageNodeStyle.
  • GraphControl: Added the method #importFromGraphML(URL) to conveniently load GraphML files from URLs.
  • Various performance improvements for the rendering and the selection handling. This affects, amongst others, styles that use a GeneralPath.
  • Property GraphEditorInputMode#DetailSelectionRecognizer is now also applied for double clicks to determine the clicked item.
  • GraphEditorInputMode and GraphViewerInputMode don't select or focus graph items styled with a void style (VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, and VoidPortStyle). The new property #IgnoringVoidStylesEnabled specifies whether this feature is enabled.
  • GraphEditorInputMode and GraphViewerInputMode: the new protected method #shouldSelect can be overridden to determine whether an item can be selected in general.
  • DropInputMode: Added property #LastDragEvent.
  • OverviewInputMode: The new property #Margins specifies margins for the visible area of the bound GraphOverviewControl. The new protected method #updateVisibleArea provides further means for customizing the visible area.
  • CompositePositionHandler: Added methods #getPositionHandler and #getHandle to retrieve an earlier added IPositionHandler or IHandle.
  • PortRelocationHandles now triggers the EdgePortsChanged event of the GraphEditorInputMode.
  • EdgeStyleDecorationInstaller can now be used with self loops without bends, too.
  • TableLayoutConfigurator: Improved support for routing algorithms.
  • IGraph: The collection models of graph items returned by the methods #getNodes, getEdges, etc. now support the methods #remove and #clear to remove graph items from the graph. Note that calling the method #add is still not allowed.
  • GraphModelManager: New callback method #onGraphChanged.
  • LayoutExecutor: The new property #ConsideringViewportLimiterEnabled can be used to let the target viewport after a layout respect the ViewportLimiter of the GraphControl.
    The ViewportAnimation has a new property #ConsideringViewportLimiterEnabled for the same purpose.
  • LayoutGraphAdapter now adds data providers that map each node, edge and label of a LayoutGraph to their corresponding IModelItem in the original IGraph. Especially, these data providers are available if a layout is run with a LayoutExecutor or the convenience methods LayoutExtensions.MorphLayout and LayoutExtensions.ApplyLayout.
  • GeomSupport: The new method #createSmoothedPath creates a new path as copy of a given one but with smoothed bends.
  • IconLabelStyle: The icon is added to the hit test area for mouse clicks and marquee selection. This can be switched off by overriding IconLabelStyleRenderer#shouldHitTestIcon.
  • CanvasControl: Method #fitContent now respects the #ViewportLimiter property. This might result in zoom levels greater than 1.0.
  • DefaultDummyEdgeConverter now synchronizes the #Tag property of the first label if label synchronization is enabled.
  • GraphCopier has been improved to facilitate manipulation of the copied items:
    • The new events NodeCopied, EdgeCopied, LabelCopied, and PortCopied are dispatched after a model item has been copied.
    • The method #getOrCreateCopy<T> is now public to facilitate copying of, for example, node tags.
  • GraphClipboard: In hierarchically organized graphs, nodes are now pasted into their previous parent group, the group at their target position, or the root, depending on the new property #ParentNodeDetection.

Algorithms

  • Dfs: Added method #cancel that can be used by subclasses to cancel the search.
  • Cycles: Improved method #findCycle to stop the search as soon as the first cycle has been found.

Layout

  • IncrementalHierarchicLayouter: The default sequencing phase has been improved to produce less crossings and run faster.
  • IncrementalHierarchicLayouter: Now prevents overlaps among same layer edges attached to group nodes.
  • IncrementalHierarchicLayouter: During layering, edges connected to group nodes may be redirected and replaced by dummy edges connected to the children of the group node. For these dummy edges ILayoutDataProvider#getEdgeData now returns an IEdgeData of the new type EdgeDataType#REDIRECTED_GROUP_EDGE.
  • PCListOptimizer: Improved port candidate assignment calculated by method #optimizeAfterSequencing.
  • SmartOrganicLayouter: Now uses a more sophisticated approach to remove node overlaps if the scope is set to #SCOPE_ALL and the quality to time ratio (see #setQualityTimeRatio) is greater than or equal to 0.7.
  • InteractiveOrganicLayouter: Method #startLayout now takes advantage of multiple threads for layout calculation which may reduce the required runtime.
  • PartitionLayouter: Added nested class PolylineInterEdgeRouter that routes inter-edges using class EdgeRouter.
  • PartialLayouter: Now considers port constraints independent of the specified layout orientation. Note that port constraints are considered only if the core layout algorithm (see #setCoreLayouter) supports port constraints as well.
  • PartialLayouter$StraightLineEdgeRouter: Added support for port constraints.
  • RecursiveGroupLayouter: Added property #ReplacingPortConstraintsEnabled that replaces port constraints by port candidates and, thus, may improve the layout result.
  • EdgeRouter: Memory usage has been reduced.
  • EdgeRouter: Added penalty setting for edge length. See property #EdgeLengthPenalty.
  • EdgeRouter: Now avoids very small octilinear segments.
  • EdgeRouter: Added four predefined optimization strategies. See PenaltySettings#OPTIMIZATION_BALANCED, PenaltySettings#OPTIMIZATION_EDGE_BENDS, PenaltySettings#OPTIMIZATION_EDGE_CROSSINGS, and PenaltySettings#OPTIMIZATION_EDGE_LENGTHS.
  • DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added optimization step that reduces the number of perceived bends. See new property #PerceivedBendsOptimizationEnabled.
  • OrthogonalLayouter, OrthogonalGroupLayouter and DirectedOrthogonalLayouter: Added optimization step that aligns degree one nodes (i.e. nodes with one incident edge) that have the same neighbor. See new property #AlignDegreeOneNodesEnabled.
  • OrthogonalGroupLayouter: Improved routing and edge labeling for self-loops of normal (non-group) nodes.
  • LayoutTool: Added new rectangle arrangement method #arrangeRectangleMultiRows(java.awt.geom.Rectangle2D[], java.awt.geom.Rectangle2D, double, double, boolean, byte, int) suitable for arranging rows of rectangles with highly different sizes.
  • ComponentLayouter: Added new component arrangement strategies #STYLE_MULTI_ROWS, #STYLE_MULTI_ROWS_COMPACT, #STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED, #STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT, #STYLE_MULTI_ROWS_WIDTH_CONSTRAINED, and #STYLE_MULTI_ROWS_WIDTH_CONSTRAINED_COMPACT suitable for components with highly different sizes.

Bugfixes

Viewer

  • Fixed static method FlagsEnum#xor that called non-static method #and by mistake.
  • Fixed unfunctional PointSelectionIndicatorInstaller.
  • GraphML:
    • Fixed a possible NullPointException when deserializing properties of obfuscated enums.
    • Folding: Source port tags in view states were not parsed correctly.
    • Properties with a text value containing nested CDATA sections were not parsed correctly.
    • Primitive types like floats and doubles could not be read when used in element syntax.
    • Write events were not always raised.
    • Fixed a bug were incorrect values for bend tags were written.
    • The #Name property of the @GraphML annotation was not considered during deserialization.
    • GraphMLIOHandler: Method #addNamespace had no effect, and adding a custom schema with #addSchemaLocation triggered an exception.
  • TableEditorInputMode by default also handled right clicks, which prevented the context menu for stripes from appearing and erroneously toggled the stripe selection state.
  • Creating a new node as a child of an existing node which was not a group node did not cause the state change to be recorded by the undo engine. After undoing the node creation, the parent node still behaved like a group node. Such an implicit change is now recorded properly and can be reverted through undo as expected.
  • Fixed too large dirty regions when using certain kinds of SnapLines.
  • Fixed memory leak that occurred when CreateEdgeInputMode was uninstalled.
  • CanvasControl: Fixed incorrect event propagation.
  • CreateEdgeInputMode now removes event handlers when it is uninstalled.
  • It is now possible to set the line spacing and wrapping width for the JavaFX Text nodes that the SimpleLabelStyle is producing to render labels via its #TextFormat property.
  • SimpleLabelStyle: #ClippingText property is now useful.
  • ShinyPlateNodeStyleRenderer now uses its getters to access the properties of its style. This means that overriding them now has an effect.
  • SimpleLabelStyleRenderer: Prevented NullPointerException for labels with negative width or height.
  • Pen:
    • Changed default values for #LineCap and #LineJoin properties.
    • Fixed incorrect application of the #DashStyle property.
  • TextEditorInputMode: The internal positioning/scaling calculation now respects the values returned by the methods #getMaximumZoom and #getMinimumZoom properly.
  • FilteredGraphWrapper: #dispose did not clean up all event listeners.
  • Undoing a reparent grouping gesture might have resulted in inconsistent group node sizes. Note: The fix results in a slightly incompatible behavior when nodes are reparented programmatically and multiple folding views are used. In that case, you need now to subscribe to hierarchy events and manually adjust the group node bounds.
  • IUndoSupport: Manually bracketing undo edits with beginEdit might have led to exceptions when folding was active.
  • ClickInputMode: The property #FocusClickSwallowingEnabled had only an effect for the very first click.
  • Copying table stripes did not work correctly.
  • GraphOverviewControl: Moving the viewport by clicking into the control did not honor the #ViewPortLimiter property restrictions of CanvasControl.
  • RotatedSliderEdgeLabelModel can now deal with edge paths that are null, e.g. when using VoidEdgeStyle.
  • FoldedGraph detects more carefully what has changed before invoking the methods #createDummyEdgeAppearance and #changeDummyEdgeAppearance of IDummyEdgeConverter. Previously, in some cases, these methods were called too often or not at all.
  • When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
  • Fixed problem in LayoutGraphAdapter where label candidates for edge labels were not always determined correctly.
  • Fixed LayoutGraphAdapter producing threading issues when PortCalculator was used during a multi-threaded layout.
  • When snapping was disabled temporarily (using Ctrl) during a move gesture the moved item snapped after finishing the gesture, anyway.
  • FoldedGraphUndoSupport didn't add the correct bend information to its internal data structures.
  • CreateEdgeInputMode: Fixed some problems with mixed mouse and touch input.
  • When using an IEditLabelHelper and adding a label interactively, the helper's #editLabel callback was called instead of #addLabel.
  • Newly added labels could have had an empty size when an IEditLabelHelper instance was registered.
  • When a highlighted item was removed from the graph, the highlight was not cleaned up.
  • Reparenting an empty group node displayed the target node highlight around the reparented node.
  • The modified MoveInputMode created by MainInputMode#createMoveUnselectedInputMode changed the cursor to indicate a movable object even when the modifierRecognizer disabled moving.
  • When both a group node and its child node were resized together the group node bounds shrunk to its original bounds once the child had reached the original bounds.
  • ClickInputMode: Cancelling the mode during clicks didn't work correctly and as a result, the location reported for the next click might have been wrong.
  • CreateEdgeInputMode now copies the dummy edge's tag to the created edge. This could have caused issues when the EdgeCreationStarted event was used to set a custom tag on the dummy edge.
  • When the pressed status of the Shift key changed during a reparenting gesture of a node, the bounds of its containing group node were not immediately updated.
  • The secondary multi-tap gesture was not recognized correctly.
  • Labels whose positions were determined by NinePositionsEdgeLabelModel, SliderEdgeLabelModel, and SideSliderEdgeLabelModel might have disappeared when one or more edge segments were hidden under the source or target node.
  • SnapContext: Snap results with a null tag were erroneously always discarded.
  • GeneralPath: Method #transform, amongst others using Matrix2D, applied the transformation matrix incorrectly in the case of a rotation.
  • IconLabelStyle: Method #getBounds in IconLabelStyleRenderer returned a valid rectangle even if the label layout was invalid. As a consequence, IsVisible erroneously returned true for labels with invalid bounds.
  • The lookup of CollapsibleNodeStyleRenderer was missing the correct results for IGroupBoundsCalculator, ISizeConstraintProvider, and IShapeGeometry.
  • CanvasControl#ensureVisible hasn't worked for bounds larger than the current viewport.
  • Setting the view point on a CanvasControl with a width or height of 0.0 could cause an exception if a #ViewportLimiter was set.
  • GraphCopier threw an ConcurrentModificationException if the source and the target graph are identical.
  • GraphEditorInputMode and GraphViewerInputMode now respect the MultiSelectionRecognizer for extending an existing selection via marquee.
  • Fixed TableEditorInputMode exhibiting problematic behavior under certain circumstances when the GraphControl's graph is replaced.
  • RotatedSideSliderEdgeLabelModel: Label model parameters of this model were serialized as the respective parameters of RotatedSliderEdgeLabelModel. Thus, after loading, the positions of the labels are the expected ones but the label models changed.
  • RotatedSliderEdgeLabelModel: Parameters with ratio 0.5 were not correctly deserialized from GraphML.
  • FilteredGraphWrapper: The #edgesAt methods erroneously returned edges that were marked as hidden by the #EdgePredicate. The methods #degree, #inDegree and #outDegree are based on these methods and were affected, too.
  • GraphSnapContext: Snapping nodes to vertical edge segments was not working if property #NodeToEdgeDistance was set to 0.
  • The EdgeStyleDecorationInstaller did not copy the tags of dummy ports and edges used when displayed in view coordinates (#ZoomMode = DecorationZoomMode#VIEW_COORDINATES).
  • GraphEditorInputMode#findItems: Only the first element in the test array parameter was actually checked.

Layout

  • MultiPageLayouter: Fixed bug that caused that an AbortHandler attached to the input graph to be ignored.
  • IncrementalHierarchicLayouter: Fixed routing style violations in octilinear grouped edges.
  • MultiPageLayouter: Fixed NullPointerException that may occur if the edge-id DataProvider (see MultiPageLayouter#EDGE_ID_DPKEY) is an instance of EdgeMap.
  • IncrementalHierarchicLayouter: Fixed NullPointerException that could occur when octilinear edges are attached to group nodes.
  • HVTreeLayouter: Fixed bug that may cause edges with reversed direction if the layout isn't run in buffered mode.
  • PortCandidateSet: Fixed bug that caused method PortCandidateSet.ICandidateMatcher#findMatchingCandidate() to return the entry with the highest cost instead of the lowest cost if the candidate matcher is created with method PortCandidateSet#createMatcher().
  • DirectedOrthogonalLayouter: Fixed bug that caused an ArgumentException if DataProvider-Key PortConstraintKeys#SOURCE_GROUP_ID_DPKEY is registered to the input graph but DataProvider-Key PortConstraintKeys#TARGET_GROUP_ID_DPKEY is not registered.
  • ComponentLayouter: Fixed bug that caused an ArrayIndexOutOfBoundsException if the style is set to ComponentArrangementStyle#MULTI_ROWS_HEIGHT_CONSTRAINT or ComponentArrangementStyle#MULTI_ROWS_HEIGHT_CONSTRAINT_COMPACT (see ComponentLayouter#Style) and all components exceed the preferred height (see ComponentLayouter#PreferredLayoutSize).
  • IncrementalHierarchicLayouter: Fixed bug that caused first or last segments of edges to be too short to span all associated labels.
  • MultiPageLayouter: Fixed bug that may cause non-orthogonal edge routes.
  • TreeReductionStage: Fixed bug that may cause a InvalidGraphStructureException if the input graph contains group nodes with incident edges.
  • TreeLayouter: Fixed bug that may cause a ClassCastException if the input graph is a CopiedLayoutGraph that consists of multiple connected components and the layouter uses the LayeredNodePlacer (e.g., if option TreeLayouter#setChildPlacementPolicy is set to ChildPlacementPolicy#ALL_LEAVES_ON_SAME_LAYER).
  • IncrementalHierarchicLayouter and RankAssignments: Fixed possible NullPointerException that may occur if the maximal duration of the algorithm is limited.
  • IncrementalHierarchicLayouter: Fixed bug that may cause overlaps of edge labels with preferred placement at source/target.
  • Polyline.EdgeRouter: Fixed rare NullPointerException that mainly appears if there are overlapping nodes.
  • PartialLayouter: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if option ImmediateInterEdgeRoutingEnabled is true.
  • CompactOrthogonalLayouter: Fixed possible IllegalArgumentException caused by nodes without node-ids. This problem may only appear if the inter edge router is set to PartitionLayouter.ChannelInterEdgeRouter.
  • Running any label placement algorithm had no effect for node/edge labels if the properties #NodeOverlapsRemovalEnabled/#EdgeOverlapsRemovalEnabled were enabled because all potential candidates were erroneously rejected.
  • IncrementalHierarchicLayouter: Fixed bug that may cause edges with zig-zag paths if there are swimlanes and integrated edge labeling is enabled.
  • IncrementalHierarchicLayouter and TopologicalIncrementalLayerer: Fixed bug that may cause unwanted same-layer edges between incremental nodes.
  • GenericTreeLayouter: Fixed issue that caused too large group nodes when label consideration is enabled and the layout is not oriented top-to-bottom.
  • GenericTreeLayouter: Fixed issue that causes group nodes to be too small to include all edge labels when the edge connects to a child of an inner group node.
  • GenericTreeLayouter: Fixed issue that causes group nodes to be too small to node halos.
  • IncrementalHierarchicLayouter: Fixed minimum edge length for orthogonal edges. It is now also taken into consideration for edges that connect to a node's side and for backloop edges (see property #BackloopRoutingEnabled).
  • IncrementalHierarchicLayouter: Fixed possible ArrayIndexOutOfBoundsException in PCListOptimizer that may appear if there are port constraints which have no matching port candidate or port candidate set entry.
  • IncrementalHierarchicLayouter: Fixed possible IndexOutOfBoundsException if PortConstraints are used together with PortCandidateSets.
  • EdgeRouter: Minimum first and last segment length and minimum node to edge distance were sometimes ignored when used together with octilinear routing style.
  • GraphGrouping: Fixed bug in method #getNearestCommonAncestor that sometimes caused wrong results if one of the specified nodes is the ancestor of the other node.
  • InsetsGroupBoundsCalculator: Fixed method #calculateBounds to consider only the given child nodes and all edges between those child nodes instead of all nodes and all edges in the graph.
  • GenericTreeLayouter: Fixed NullPointerException that occurred when using LayeredNodePlacer as default node placer.
  • LayoutTool: Fixed calculation of lower width bound in method #arrangeRectangleRows(java.awt.geom.Rectangle2D[], java.awt.geom.Rectangle2D, double, int). Due to the better bound, the optimization procedure now needs less steps, especially for graphs with very wide components. Note, that the results may also slightly differ, because the optimization may now stop with slightly different values.
  • SALabeling and GreedyMISLabeling: Fixed possible NullPointerException caused by labels with zero width/height and a "free" edge label model.

Incompatible Changes

Viewer

  • CanvasControl: Removed obsolete #PrintCommandsEnabled property.
  • PixelImageExporter: instead of using the JavaFX SnapshotParameters class directly, the exporter now holds an instance of ContextConfigurator which is designed to make the exporting of a certain region or scale of the contents of a CanvasControl to an image a lot easier. Clients can still overwrite the new protected method #getSnapshotParameters to return an instance of SnapshotParameters that will be used to make the actual snapshot of the JavaFX node.
  • IRenderContext: removed obsolete methods #getWorldTransform and #getTransform since all calculations related to rendering and transformation of elements can be achieved by the transform returned by #getViewTransform.
  • To support proper resize cursors the properties
    • CanvasCursor#SizeNS
    • CanvasCursor#SizeWE
    • CanvasCursor#SizeNWSE
    • CanvasCursor#SizeNESW
    • CanvasCursor#SizeSizeAll
    were replaced by
    • CanvasCursor#SizeN
    • CanvasCursor#SizeS
    • CanvasCursor#SizeE
    • CanvasCursor#SizeW
    • CanvasCursor#SizeSE
    • CanvasCursor#SizeNE
    • CanvasCursor#SizeSW
    • CanvasCursor#SizeNW
    • CanvasCursor#Move
  • To handle non-JavaFX context menu controls ContextMenuInputMode has now a super class AbstractContextMenuInputMode that is used in the MainInputMode and GraphEditorInputMode. The contextMenu property of class PopulateContextMenuEventArgs has now type Object and must be cast to the type of the context menu control of the used toolkit.
  • Obsolete classes InputGesture and KeyGesture were replaced by the JavaFX class javafx.scene.input.KeyCodeCombination.
  • CanvasControl: removed erroneous and obsolete #invalidateWorld method.
  • Pen: removed unused #DashCap property.
  • Class DateTime was replaced by the Java 8 class Instant.
  • Class javafx.util.Duration was replaced by the more common Java 8 class java.time.Duration.
  • Property URL of class ImageNodeStyle is now of type java.net.URL instead of string. GraphML files that use this property might not load anymore because of this change. In this case, the specified paths in the file need to be adjusted to URLs.
  • TextEditorInputMode: The resource key #TEXT_BOX_STYLE_KEY was removed due to insufficient compatibility with the JavaFX css styling mechanism. Clients that want to change the visual appearence of the text box should instead retrieve the instance of the control via #getTextBox and use the JavaFX framework methods to change the style.

API Changes

  • Changed SnapLine to support non-orthogonal snap lines as well: its properties #From and #To have been changed from type double to PointD, its property #Orientation was removed, and its constructors have been changed accordingly.

    Orthogonal snap lines are now modeled by class OrthogonalSnapLine. It extends SnapLine and provides the property #Orientation. Existing API uses either SnapLine or OrthogonalSnapLine, depending on whether it works only with orthogonal snap lines or not.

    As a consequence, in class SnapLineSnapResult, the method #getSnapLine returns a non-orthogonal SnapLine and #getDelta returns a PointD instead of a double. API related to GraphSnapContext still works only with orthogonal snap lines and uses OrthogonalSnapLine.

  • The #Key property on SingleLineSnapLineContainer, FixedDistanceSnapLineContainer and InBetweenSnapLineContainer, has been made read only.
  • GraphModelManager's factory methods for creating the installers now have a less restrictive return type. The default implementation still returns the same types as before, though.
  • GraphClipboard's factory methods for creating the predicates for the various cut and copy operations now require a second argument that is the graph that the predicate is working on. Usages typically use the graph in the graph control where the selection is also being used. If the default graph selection implementation is used. The graph instance can be obtained from its corresponding property.
  • GraphModelManager's installer related properties now use a weaker return type to simplify subclassing with new functionality. The instances used are the same and can be down-casted accordingly to the more specific types as documented.
  • AlgorithmAbortedException: Removed overloaded methods #check. Client code that needs to terminate layout calculations prematurely must use new class AbortHandler instead.
  • Moved classes PartitionGrid, PartitionCellId, RowDescriptor, and ColumnDescriptor from package com.yworks.yfiles.layout.incremental to package com.yworks.yfiles.layout.grid.
  • IItemFactory: Added method #createRedirectedGroupEdge.
  • LayeredNodePlacer: Removed data provider key #DISTANCE_TO_PARENT_MAP_DPKEY from public API, since it is for internal use only.
  • EdgeRouter: Penalty settings have been changed to double precision. See class PenaltySettings.
  • PathSearch: Signature of method #calculateCosts has changed. It now takes an additional double array as parameter that is populated with the calculated costs instead of returning a new array.
  • GraphClipboard's protected method #copy(IGraph, Predicate<IModelItem>, IGraph, ElementCopiedDelegate) which was called by #cut, #copy, and #paste to invoke the GraphCopier has been split: #copy(IGraph, Predicate<IModelItem>, IGraph, ElementCopiedDelegate) now is called only by #cut and #copy. #paste now invokes the new method #paste(IGraph, Predicate<IModelItem>, IGraph, ElementCopiedDelegate, Predicate<IModelItem>).
  • The type of GraphMLAttribute's #Serializable property has been changed from boolean to the enum GraphMLSerializationMode.
  • GraphEditorInputMode and TableEditorInputMode: return value of callback methods #onAddLabel and #onEditLabel has been changed from void to boolean. The return value should specify whether the operation in question was successful.
  • The ContextMenuInputMode's protected method onPopulateContextMenu(ContextMenu, PointD, boolean) and the constructors of PopulateContextMenuEventArgs and PopulateItemContextMenuEventArgs now require an additional argument that indicates whether the request to display a context menu was caused by the keyboard.

Behavior Changes

  • The default constructor of TextFormat and SimpleLabelStyle uses now the default font of the current UI environment instead of "Arial".
  • TableEditorInputMode now only handles left mouse clicks by default, which is consistent with the rest of the library.
  • EdgeRouter: Labels of table nodes are no longer ignored by the router if TableLayoutConfigurator is used to prepare the graph for layout calculations. If you want to ignore such labels you can use a IDataProvider registered with key LabelLayoutKeys#IGNORE_LABEL_KEY.
  • EdgeRouter: Method #doLayout now throws an IllegalArgumentException if there is a node with zero width or height in the given graph.
  • FixedGroupLayoutStage: Method #getOrthogonalEdgeRouter now returns an instance of class EdgeRouter instead of class OrthogonalEdgeRouter.
  • ComponentLayouter: Method #setPreferredLayoutSize now throws an IllegalArgumentException when setting the preferred size to negative values or zero.
  • Changed default behavior of edge label placement in OrthogonalLayouter and LabelLayoutDataRefinement when using PreferredPlacementDescriptor#PLACE_ANYWHERE Now edge labels are placed on the edge and in the center between source and target node.
  • GraphEditorInputMode now by default supports the new GraphCommands.DUPLICATE_COMMAND that is bound to keyboard shortcut Ctrl-D. If this behavior is undesired new behavior, the #DuplicationEnabled property can be set to false.
  • The clipboard now supports copying and pasting of items independently from their owning elements. E.g. single selected labels can be copied to other elements, as well as edges without their source and target nodes. This behavior can be reverted to the old behavior by setting GraphClipboard's #IndependentCopyItems to GraphItemTypes#NONE.
  • GraphEditorInputMode now by default allows for reversing selected edges using the Ctrl-R keyboard shortcut and the new GraphCommands.REVERSE_EDGE_COMMAND. This new behavior can be turned off by setting the #EdgeReversalEnabled property to false.
  • ClickInputMode: If #ActiveButtons includes MouseButtons#RIGHT, the original right click event is marked as handled if ClickInputMode's event handlers mark the higher level click event as handled. Especially, no context menu will be shown if the right click is handled by ClickInputMode itself.
  • GraphEditorInputMode and GraphViewerInputMode: The default click actions that change the selection and create new nodes are only triggered on left mouse clicks now.
  • Previously, ports at nodes and edges that were copied and pasted to and from the clipboard were all copied, even if there where no edges attached to them after the operation. Now those empty ports are not copied/pasted anymore unless the PortDefaults' #AutoCleanupEnabled property is set to false or they were unoccupied before the operation already. In order to restore the old behavior, where all ports were copied, regardless of edges where adjacent to them, make sure to include them in the core predicate, since this behavior change just affects ports that had previously not been accepted by the core predicate function.
  • GraphEditorInputMode's NodeCreated event may now report nodes that are not part of the graph, when the user has dropped a node via NodeDropInputMode and the new NodeDropInputMode#FolderAsParentEnabled property is enabled. By default this feature is disabled, though.
  • IReparentNodeHandler's #isValidParent method may now also be queried if the new GraphEditorInputMode#ReparentingToLeavesEnabled property is enabled. By default this property is disabled, though. Note that the method will also be queried if the reparent handler is used outside the context of GraphEditorInputMode.
  • GraphMLValueSerializerContext: The property #Instance now provides the object that should be converted, not the parent object. If you need to access the actual parent object, you can use the #Owner property.
  • GraphMLIOHandler: The event QueryReferenceId is now never fired for MarkupExtensions and other proxy objects for serialization, only for the original object references.
  • EdgeRouter: Method #doLayout now throws an IllegalArgumentException if there is a node with zero width or height in the given graph.
  • FixedGroupLayoutStage: Property #OrthogonalEdgeRouter now yields an instance of class EdgeRouter instead of class OrthogonalEdgeRouter per default.
  • ComponentLayouter: Method #setPreferredLayoutSize now throws an IllegalArgumentException when setting the preferred size to negative values or zero.
  • Changed default behavior of edge label placement in layouters with integrated edge labeling when using LabelPlacements#ANYWHERE. Now edge labels are placed on the edge and in the center between source and target node. This change affects the following layout algorithms: IncrementalHierarchicLayouter, OrthogonalLayouter, OrthogonalGroupLayouter, DirectedOrthogonalLayouter, GenericTreeLayouter, and LabelLayoutDataRefinement.
  • LabelCandidateDescriptor: The default values of the properties #EdgeOverlapPenalty and #NodeOverlapPenalty have been changed to 0.0. Values greater than 0.0 trigger a known issue in all generic label placement algorithms that erroneously rejects all potential candidates. As a result, no suitable placement is calculated in this case.
  • MoveInputMode accepts mouse hovers with the Shift key held down again.
  • GraphEditorInputMode and GraphViewerInputMode: By default, graph items styled with a void style (VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, VoidPortStyle) won't be selected or get the focus.
  • GraphEditorInputMode's #ClickHitTestOrder property default value has changed. Now it does not contain the redundant GraphItemTypes#ALL as the last element in the array anymore.
  • GraphViewerInputMode: By default, clipboard commands are now disabled. This can be controlled with the new property #ClipboardCommandsEnabled.
  • The default keyboard shortcut for deselecting elements (GraphCommand#DESELECT_ALL_COMMAND) has been changed to Ctrl+Shift+A. Ctrl+D is now the default shortcut for duplicating selected elements (GraphCommand#DUPLICATE_SELECTION_COMMAND). Duplicating elements can be disabled via the GraphEditorInputMode#DuplicationEnabled property.
  • GraphEditorInputMode: Method #shouldBeMarqueeSelectable is no longer queried by the Paste command to determine the items which should be selected after paste. Instead, the new method #shouldBeSelectedAfterPaste is queried. Note that #shouldBeMarqueeSelectable still is queried to determine the items which should be selected by marquee selection.
  • Now, all pasted items are selected after a Paste (was: only nodes, edges, and bends). This can be configured via the new #PasteSelectableItems property in GraphEditorInputMode and the corresponding #shouldBeSelectedAfterPaste method.
  • If ClickInputMode is configured to deliver both single and double clicks, double clicks are not reported if the first click has created a new node or if cyclic selection is currently active. The same holds for TapInputMode and single/double taps.
  • The segment index for label model parameters of SliderEdgeLabelModel and SideSliderEdgeLabelModel now is related to the visible segments for edges styled with PolylineEdgeStyle.
  • If an IEditLabelHelper implementation is present in an ILabel's lookup, its #editLabel method is now called in addition to an eventual owner's edit helper when the label text is edited. If implementations are present for both the label and the owner, editing is only allowed if both helpers return true. Additionally, the predicate method GraphEditorInputMode#shouldLabelBeEdited always has to return true, whether edit helpers are present or not.
  • The label that is edited is now determined in the following order:
    1. If a label is explicitly provided as a command parameter or through a convenience method or is the only selected element, it is edited if the previous condition is satisfied. No other candidates are tried in that case.
    2. If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, the first label that satisfies the condition above is edited if the previous condition is satisfied. If no such label exists, a new label is be added, provided that the owner allows adding. In either case, no other candidates are tried.
    3. The first selected label for which the previous condition is satisfied.
    4. If multiple label owners are selected, the first owner that has a label for which the previous condition is satisfied (in which case that label is edited).
    5. If IEditLabelHelper#editLabel for either an editable label or its owner provides a different label instance, this instance is edited instead.
    6. Otherwise, a label is added if an eligible owner can be found (see below).
  • If an IEditLabelHelper implementation is present in an ILabeledItem's lookup, its #addLabel method is called to determine whether a label may be added and provide a suitable label instance. Additionally, the predicate method GraphEditorInputMode#shouldLabelBeAdded always has to return true, whether edit helpers are present or not. If the new label should be edited interactively after it's creation (the default behavior), it also must be editable, following the rules above. Therefore an IEditLabelHelper implementation usually should allow editing of label instances that it has created itself in #addLabel.
  • The label owner for which a label is added is now determined in the following order:
    1. If a label owner is explicitly provided as a command parameter or through a convenience method, or is the only selected element, a label is added if the previous condition is satisfied. No other candidates are tried in that case.
    2. If multiple label owners are selected, the first one for which the previous condition is satisfied.

yFiles for JavaFX 1.0.0.1 - Changes Since 1.0

Bugfixes

Viewer

  • Fixed a ConcurrentModificationException when using newer Java versions (1.8.0_20 and above) in MultiplexingInputMode that occurred in certain situations (e.g. when resizing a row or column in a table interactively).
  • SimpleLabelStyleRenderer now updates the location of a label properly (e.g. when using undo).
  • OrientedRectangleExtensions#contains does not modify the given PointD instance anymore.
  • GraphML: Prevented an IllegalArgumentException when deserializing images with no image data.
  • GraphOverviewControl now adapts its zoom level to size changes of its container.
  • Node ports can now be moved by dragging their IHandle.
  • Classes of the package com.yworks.yfiles.geometry will no longer throw a NullPointerException when calling #equals with null as parameter.
  • Key events that are handled by the framework will now be consumed. This prevents that they are processed elsewhere again.
  • Looking up typed subclasses of IHitTestEnumerator no longer throws a ClassCastException.
  • Fixed API documentation of method ImageNodeStyle#clone which falsely claimed that a deep copy is created.

Layout

  • IncrementalHierarchicLayouter: Fixed NPE that could occur when octilinear edges are attached to group nodes.
  • HVTreeLayouter: Fixed bug that may cause edges with reversed direction if the layout isn't run in buffered mode.
  • PortCandidateSet: Fixed bug that caused method PortCandidateSet.CandidateMatcher#findMatchingCandidate() to return the entry with the highest cost instead of the lowest cost if the candidate matcher is created with method PortCandidateSet#createMatcher().
  • DirectedOrthogonalLayouter: Fixed bug that caused an IllegalArgumentException if DataProvider-Key y.layout.PortConstraintKeys#SOURCE_GROUPID_KEY is registered to the input graph but DataProvider-Key y.layout.PortConstraintKeys#TARGET_GROUPID_KEY is not registered.
  • MultiPageLayouter: Fixed bug that may cause non-orthogonal edge routes.
  • TreeReductionStage: Fixed bug that may cause a WrongGraphStructure-Exception if the input graph contains group nodes with incident edges.
  • TreeLayouter: Fixed bug that may cause a ClassCastException if the input graph is a CopiedLayoutGraph that consists of multiple connected components and the layouter uses the LayeredNodePlacer (e.g., if option TreeLayouter#getChildPlacementPolicy(byte) is set to TreeLayouter#CHILD_PLACEMENT_POLICY_ALL_LEAVES_ON_SAME_LAYER).
  • Polyline.EdgeRouter: Fixed rare NullReferenceException that mainly appears if there are overlapping nodes.
  • PartialLayouter: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if option RouteInterEdgesImmediately is enabled.
  • CompactOrthogonalLayouter: Fixed possible ArgumentException caused by nodes without node-ids. This problem may only appear if the inter edge router is set to ChannelInterEdgeRouter.
  • AbstractLabelingAlgorithm: Fixed bug that may cause removal of labels that don't overlap with other elements if option RemoveNodeOverlaps is enabled.
  • IncrementalHierarchicLayouter: Fixed rare InvalidOperationException that may appear for grouped graphs containing nodes with fixed coordinates hint (see, e.g., IncrementalHintsFactory.CreateUseExactCoordinatesHint).
  • IncrementalHierarchicLayouter: Fixed bug that breaks incremental hints of grouped edges in incremental layout mode. (see IncrementalHintsFactory.CreateSequenceIncrementallyHint).
  • IncrementalHierarchicLayouter: Fixed bug that may cause a wrong order of fixed (non-incremental) elements if the layouter is applied in incremental mode and the graph contains sequence constraints.
  • BorderLine: Fixed bug in method Grow that may result in an ArgumentException because the minimum value of a BorderLine becomes greater than the maximum value.
  • Polyline.EdgeRouter: Fixed bug that may cause zero length routes of edges whose start and end point are at the same location.
  • IncrementalHierarchicLayouter: Fixed possible IndexOutOfRangeException that may occur for grouped graphs in incremental mode with recursive group layering enabled.
  • BusRouter: Fixed NullReferenceException that may appear for graphs containing isolated nodes with self-loops.
  • TreeReductionStage: Fixed wrong handling of group nodes which may cause a WrongGraphStructure exception as well as broken routes of edges incident to group nodes.
  • Fixed NullReferenceException when using AssistantPlacer together with distributed port assignment.
  • IncrementalHierarchicLayouter: Fixed possible IllegalArgumentException caused by an inconsistent order of group nodes.
  • IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if there are "critical" edges, see #CRITICAL_EDGE_DPKEY.
  • IncrementalHierarchicLayouter: Fixed IllegalArgumentException (Graph is not acyclic) in SimplexNodePlacer that could appear when sequence constraints were added to a graph with swimlanes and group nodes.
  • IncrementalHierarchicLayouter: Fixed IllegalArgumentException in ConstraintIncrementalLayerer that could appear when layer constraints were added in incremental mode.
  • IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if SimplexNodePlacer's property #EdgeStraighteningOptimizationEnabled is enabled.
  • IncrementalHierarchicLayouter: Fixed rare IllegalArgumentException in BorderLine that was caused by numerical instability when using swimlanes.
  • SmartOrganicLayouter: Fixed bug that caused weird placement of fixed elements if the minimal node distance is set to 0.
  • CircularLayouter: Fixed possible NullPointerException when layout style is set to #BCC_ISOLATED and consider node labels is enabled.
  • Fixed NullPointerException when using AssistantPlacer together with distributed port assignment.
  • CircularLayouter: Fixed issue that may cause infinite/too large node coordinates for unfavorable input settings, e.g., if the maximal deviation angle is chosen to small (see property #MaximalDeviationAngle). Note that such coordinates may produce infinite looping or other exceptions.
  • MultiPageLayouter: Fixed possible NullPointerException if the input graph contains empty group nodes.
  • MultiPageLayouter: Fixed possible ClassCastException if group node insets are specified with class java.awt.Insets.
  • PartialLayouter: Fixed broken edge routes that may appear if option #EdgeRoutingStrategy is set to #EDGE_ROUTING_STRATEGY_OCTILINEAR.
  • EdgeRouter: Fixed wrong heuristic bend calculation if grid is used.
  • BusRouter: Fixed NullPointerException in BusRepresentations that could appear if the input graph contains overlapping nodes.
  • AbstractLabelingAlgorithm: Fixed bug that causes poor results if option #EdgeOverlapsRemovalEnabled is enabled and the labels should be placed on the edge.
  • FixedGroupLayoutStage: Fixed #canLayout which changed the structure and layout of the graph.
  • IncrementalHierarchicLayouter: Fixed rare bug that caused broken edge routes if edges are routed as polylines.
  • IncrementalHierarchicLayouter: Fixed IllegalArgumentException that may appear for graphs containing nodes with fixed coordinates.
  • IncrementalHierarchicLayouter: Fixed bug that caused wrong coordinates of empty rows (see class RowDescriptor) whose minimum height is zero.
  • LabelLayoutDataRefinement: Fixed possible ClassCastException for unbuffered layout runs.
  • RecursiveGroupLayouter: Removed all temporarily inserted port candidates before calling the inter-edge routing because otherwise the edges routes may become corrupted.
  • DirectedOrthogonalLayouter: Fixed a bug that sometimes caused misplaced edge labels of grouped edges.
  • TreeLayouter and GenericTreeLayouter: Fixed possible NullPointerException for trees with empty group nodes.
  • ShuffleLayouter: Fixed bug that may cause small offsets of fixed nodes.
  • EdgeRouter: Fixed bug in calculation of edge to edge distance penalties which could reduce the space where edges can be routed causing them to take unnecessary long routes.
  • EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to violate the minimal node to edge distance for the target node.
  • EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to have unnecessary long and bended edge paths when using port constraints.
  • EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to cross their source nodes when using port constraints.
  • EdgeRouter: Fixed bug that makes it possible to group the source of one edge and the target of another edge at their common node.
  • EdgeRouter: Fixed bug that sometimes causes superfluous edge overlaps.
  • EdgeRouter: Fixed bug that caused minimum distance violation of grouped edges.
  • EdgeRouter: Fixed rare NullPointerException while calculating edge crossing costs.
  • EdgeRouter: Fixed possible NullPointerException for edge groups that contain fixed edges.
  • EdgeRouter: Fixed bug that caused wrong routes for edges grouped with fixed edges.
  • EdgeRouter: Fixed bug that sometimes assumed wrong label bounds for labels of table nodes. This could result in too many bends for edges that were routed around those wrong boxes. Labels of table nodes are now ignored by the router if TableLayoutConfigurator is used to prepare the graph for layout calculations.
  • EdgeRouter: Fixed bug that sometimes assumed wrong label bounds if the router was used directly after another layout algorithm. This could result in too many bends for edges that were routed around those wrong boxes and/or edges crossing labels because the actual label boxes were ignored.
  • PolylineLayoutStage: Fixed possible ArrayIndexOutOfBoundsException if there are fixed edges with a single, very short segment.
  • BusRouter: Fixed clean up of bends that resulted in unnecessary detours in edge paths.
  • BusRouter: Fixed possible ArrayIndexOutOfBoundsException.
  • BusRouter: Fixed possible IllegalStateException caused by non-orthogonal edge segments.
  • BusRouter: Fixed possible NullPointerException when routing only a subset of edges without adding a IDataProvider to the graph that marks edges as selected.
  • EdgeRouter: Fixed possible ArrayIndexOutOfBoundsException for graphs with very short fixed edges.
  • IncrementalHierarchicLayouter: Fixed a bug that could result in infinite y-coordinates when octilinear edge routing was enabled.

Demos

  • Fixed the ANT build script to run the demos.
  • Fixed the ANT build script to run the SWT interoperability demo with Java 8.