yFiles for JavaFX Release Notes

yFiles for JavaFX version 3.1 is the newest major release available. (See also the entire yFiles for JavaFX change log.)

Technical Requirements

  • Oracle JDK 1.8 (8u40) or higher is needed for software development with yFiles for JavaFX.
  • Oracle JRE 1.8 (8u40) or higher is needed to execute programs using yFiles for JavaFX.
  • A browser to view the HTML documentation.

yFiles for JavaFX 3.1 - Changes Since 3.0

Hide Description
Open in yEd LiveDownload
yFiles for JavaFX 3.1 Release Notes
Major rendering performance improvements
yFiles for JavaFX 3.1 Release Notes
Eclipse RCP based graph editor application
yFiles for JavaFX 3.1 Release Notes
Improved, stricter GraphML parsing

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.