yFiles for Java Change Log

yFiles for Java 3.2 – Changes Since 3.1.0.1

Major New Features

  • The new LabelDropInputMode and PortDropInputMode classes implement drag and drop for labels and ports, respectively. The API of these classes is similar to NodeDropInputMode for nodes.
  • Labels can now be added to ports and the new label models FreePortLabelModel and InsideOutsideLabelModel can be used to place such labels. On the technical side, IPort now extends the ILabelOwner interface and the enum constant GraphItemTypes#PORT_LABEL was added.
  • The new LassoSelectionInputMode selects all model items inside a hand-drawn lasso region. This mode allows combinations of free-hand and straight-line sections during path creation. The following types and methods were added to support this mode.
    • Added the GraphEditorInputMode#LassoSelectionInputMode and GraphViewerInputMode#LassoSelectionInputMode properties and a corresponding factory method. LassoSelectionInputMode is disabled per default.
    • The new GraphEditorInputMode#lassoSelect and GraphViewerInputMode#lassoSelect methods programmatically selects all items in the provided GeneralPath.
    • The new ILassoTestable interface specifies whether the item is considered to be inside the lasso path. This is analog to the IMarqueeTestable interface for marquee selection.
    • Any model item can be decorated with an instance of ILassoTestable or provide one in its lookup. For this, the Node/Edge/Port/Label/BendDecorator classes got the new LassoTestableDecorator property for decorating an item with a custom ILassoTestable.
    • The new #isInPath method of AbstractNode/Edge/Port/ LabelStyle can be overridden to customize the lasso testing behavior.
  • Labels and ports can now optionally be rendered directly in front of their owner. Such a rendering order can make the ownership of labels and ports more clear if nodes overlap. Previously, all label and ports were rendered in front of all nodes. The new rendering order can be enabled by setting the new properties LabelLayerPolicy and PortLayerPolicy of GraphModelManager to LabelLayerPolicy#AT_OWNER and PortLayerPolicy#AT_OWNER.

New Features

  • The new GraphBuilder, TreeBuilder, and AdjacentNodesGraphBuilder classes can be used to build a graph from custom data.
  • The nesting options of GraphModelManager for the visualizations of nodes and edges have been improved and clearified.
    • The properties HierarchicNodeNestingEnabled and HierarchicEdgeNestingEnabled are superseded by the new HierarchicNestingPolicy property. This property has the enum type HierarchicNestingPolicy.
    • The new option HierarchicNestingPolicy#GROUP_NODES configures GraphModelManager to visualize all leaf nodes in one canvas object group while nesting all group nodes depending on their hierarchical depth.
  • The mouse wheel behavior of the overview can now be switched between ZOOM, SCROLL, and NONE, and optionally, the action can be performed only when the control is focused. This can be configured with the new OverviewInputMode#MouseWheelBehavior property.
  • TableEditorInputMode: Double clicking a stripe or stripe label now edits the label in the same way as for other graph items.
  • RectD and InsetsD: Added methods to reduce the size of an RectD and InsetsD instance, respectively.
  • The new static methods IPositionHandler#combine combine multiple position handler instances into a single instance.
  • Added the events ElementsCopied, ElementsCut, and ElementsPasted to GraphEditorInputMode, and the event ElementsCopied to GraphViewerInputMode.
  • The new static IAnimation#createSequentialAnimation method creates an animation that animates multiple animations in sequence.
  • The rectangle of the marquee selection can now be customized with the new protected method MarqueeSelectionInputModes#calculateMarqueeRectangle.
  • Added new decorator implementations for table items. You can access these new decorators via the new method ITable#getDecorator with the RowDecorator, ColumnDecorator and StripeLabelDecorator properties.
  • If the new CanvasComponent#QuantizingInputCoordinatesEnabled property is enabled, world coordinates of mouse events are rounded to nicer values to avoid unnecessary precision. For example, you'll get the value 326.375 instead of 326.3758109495. The rounding is chosen based on the zoom level to ensure that there is almost no visual deviation. Lower zoom levels will result in coarser rounding, higher zoom levels will use exactly as much precision as necessary. By default, this option is enabled.

Layout

  • OrthogonalLayout: Added support for parallel routing of parallel edges (multi-edges that share the same source and target node). They are routed as parallel as possible; if there are edge labels, the routes must differ somewhat. Previously, parallel edges were not handled explicitly and their routes were often very different, making the recognition of parallel structures difficult.
  • OrthogonalLayout: Added new property MaximumDuration, which enables to control the preferred time limit of the layout algorithms.
  • OrthogonalLayout: Added property UniformPortAssignmentEnabled that allows to obtain results with a more uniform port assignment.
  • Added convenience layout stage TemporaryGroupNodesInsertionStage that automatically generates a (non-nested) grouping structure from a given mapping of nodes to a component Id. This temporary grouping is meant for use during the run of the core layout algorithm of the stage. It allows, for example, easy use of RecursiveGroupLayout without the need for a real grouping structure when the requirement is that different sub-graphs need to be arranged with different layout algorithms.
  • Added the TemporaryGroupNodeInsertionData configuration class for the new TemporaryGroupNodeInsertionStage layout stage.
  • TreeLayout: Added node placer CompactNodePlacer that produces more compact tree layouts. It uses a dynamic optimization approach that chooses a placement strategy of the children such that the overall result is compact with respect to a specified aspect ratio, see property CompactNodePlacer#PreferredAspectRatio.
  • The new TreeLayoutData#CompactNodePlacerStrategyMementos property can be used to to maintain similar layout styles over subsequent runs of compact tree layout.
  • Added the new layout algorithm TabularLayout that generates simple tabular arrangements of nodes. It allows for placing nodes in rows and columns, such that each table cell contains at most one node. Among its features is, for example, a from-sketch mode, the possibility to exactly map nodes to specific cells or different vertical and horizontal alignments.
  • Added the TabularLayoutData configuration class for the new TabularLayout algorithm.
  • OrthogonalLayout: Added support for special layout styles of various substructures that are automatically detected in the input graph. Supported substructures are trees, chains and cycles - see the according properties OrthogonalLayout#TreeStyle, OrthogonalLayout#ChainStyle and OrthogonalLayout#CycleStyle. In addition to the style, the new feature offers more settings, like, for example, the desired tree layout orientation (see OrthogonalLayout#TreeOrientation). The orthogonal layout style LayoutStyle#NORMAL_TREE has been removed as the new tree style feature allows more settings for the arrangement of tree-like graphs.
  • Added the new layout algorithm TreeMapLayout that generates tree maps. Tree maps present hierarchical data using nested rectangles (nodes) where each rectangle (node) gets its size depending on a specific dimension of data associated to it.
  • Added the TreeMapLayoutData configuration class for the new TreeMapLayout algorithm.
  • Polyline.EdgeRouter now supports routing through user-specified intermediate points. All specified points will lie on the edge route in the given order. See new property EdgeLayoutDescriptor#IntermediateRoutingPoints.
  • Polyline.EdgeRouter: Edges that connect group nodes with their descendants can now directly connect from the inside to the group node border. Previously, an edge needed to always leave the group node before connecting to it. The feature can be enabled/disabled individually for each edge using the new property EdgeLayoutDescriptor#DirectGroupContentEdgeRoutingEnabled.
  • HierarchicLayout: Added feature that allows to define sub-components of the input graph such that each sub-component is arranged by a user-specified layout algorithm. This allows for hierarchical layouts where parts of the graph are arranged in a different fashion, e.g., to emphasize special sub-structures. The sub-components can be specified by a data provider registered with the input graph with key HierarchicLayout.SUB_COMPONENT_ID_DPKEY or with the new HierarchicLayoutData#SubComponents property .
  • ShortestPaths: Added a-star (A*) algorithm for finding the shortest path between two nodes in a directed or undirected, arbitrary graph.

Improvements

Graph Model

  • All methods that set a node layout or a bend location are now fail-fast if the provided layout or location contains a NaN value. Previously, this resulted not in an immediate error but broke subsequent code like an automatic layout or a content rectangle calculation.
  • The performance of FilteredGraphWrapper has been improved. Now, it depends mainly on the size of the resulting filtered graph. This allows for loading very large graphs into memory and displaying only a subset of them using FilteredGraphWrapper.
  • For ITable's default methods findRow, findColumn, findStripe and findStripes, overloads without the Predicate parameter have been added.
  • DefaultGraph has new factory methods to customize undo unit creation.
  • DefaultGraph now fills the undo engine and triggers events in a consistent manner for all graph element factory methods.
  • Many label model createParameter methods now have overloads without those parameters that are not needed every time.
  • InteriorStretchLabelModel: Added new parameters CENTER_HORIZONTAL and CENTER_VERTICAL for horizontal or vertical centered one-line labels.
  • The factory method IMapper#fromMap has been added which returns an implementation of IMapper that delegates to a java.util.Map.

View

  • The new method GraphModelManager#getMainCanvasObject returns the canvas object that should be used when changing the visibility or z-order of a model item.
  • Assigning a new graph instance to GraphOverviewComponent now keeps configuration changes made to the overview's GraphVisualCreator instance.
  • Selfloop edges are now properly displayed in the GraphOverviewComponent.
  • Animations after a layout don't break anymore if the graph is modified concurrently.
  • Added the new CanvasComponent#LimitingFitContentZoomEnabled property which controls whether the maximum zoom level for the CanvasComponent#fitContent method as well as the FitContent command is restricted to 1 or the value of the MaximumZoom property.
  • Akin to the two CanvasComponent#zoomTo methods, there are now two CanvasComponent#zoomToAnimated methods that animate the viewport change.
  • ICanvasObjectGroup#addChild: A default method without the ICanvasObjectDescriptor parameter was added as overload which uses the ICanvasObjectDescriptor#ALWAYS_DIRTY_INSTANCE.
  • GraphModelManager now avoids unnecessary re-installation of items if they keep their ICanvasObjectGroup. By these re-installations the z-order of the item in its group was lost and a new visual was created.
  • The factory method IAnimation#createLayoutAnimation has been added which delegates to LayoutUtilities#createLayoutAnimation as the method is easier to find in IAnimation.
  • The factory methods IAnimation#createParallelAnimation now takes covariant Iterables, i.e. Iterable<T extends IAnimation> instead of Iterable<IAnimation>.
  • Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time and we fixed several problems that caused erratic behavior.
  • The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. Therefore, the visualizations no longer extend into the node bounds.

Input

  • Don't run unneccessary hit tests when a mode is canceled.
  • The INode parameter of the NavigationInputMode#enterGroup method is now optional. If it is null the whole graph will be revealed.
  • The CanvasComponent#createInputModeContext method is now public instead of protected.
  • ItemClickedEventArgs now extends ClickEventArgs and therefore provides additional information like the InputModeContext.
  • The new overload of the CreateEdgeInputMode#doStartEdgeCreation method taking an initialTargetLocation parameter can be used to define the initial location that shall be used to find a target node.
  • CreateEdgeInputMode now removes coinciding bends if orthogonal edge creation is enabled.
  • CreateEdgeInputMode provides access to a dummy target node which is used during the interactive edge creation. This allows making the node visible during creation by setting a style and size.
  • CreateEdgeInputMode now supports edges ending without a valid target port candidate. This allows for creating new target nodes together with newly created edges.
  • The new property CreateEdgeInputMode#PrematureEndHitTestable allows for considering any location as valid target point for an edge.
  • The new CreateEdgeInputMode#DragCursor property specifies the cursor that is used during edge creation when no bend may be created at the current location.
  • CreateEdgeInputMode now supports showing port candidates at potential sources for edge creation, too.
  • CreateEdgeInputMode now always creates dummy ports during a gesture, instead of temporarily reusing real ports if available. This makes it possible to change e.g. the dummy edge's source port's style during the gesture.
  • The new CreateEdgeInputMode#StartingOverCandidateOnlyEnabled property can be used to restrict the start of an edge creation gesture to directly hovered port candidates.
  • The new protected CreateEdgeInputMode#getSourcePortCandidates method makes determining source port candidates more flexible.
  • GraphEditorInputMode and TableEditorInputMode: Method editLabel now also returns a Future, similar to addLabel and createLabel.
  • ClickInputMode now dispatches the clicked events in the same order as GraphEditorInputMode and GraphViewerInputMode, i.e. the more specific events LeftClicked, RightClicked, LeftDoubleClicked and RightDoubleClicked are now dispatched before Clicked and DoubleClicked. Hence, Clicked and DoubleClicked will only be triggered if the event wasn't handled before.
  • TableEditorInputMode now handles clicks similar to GraphEditorInputMode:
    • New ItemClicked, ItemLeftClicked, ItemRightClicked, ItemDoubleClicked, ItemLeftDoubleClicked, ItemRightDoubleClicked events are raised.
    • If an event is handled, its default behavior is prevented.
    • The new properties ClickableItems and ClickableRegions determine for which items and regions a click event will be raised.
  • The properties MaximumSnapDistance, ShowingHitPortOwnerCandidatesOnlyEnabled and Visualization have been added to PortRelocationHandleProvider and are applied to each PortRelocationHandle created by this provider.
  • The default value of DefaultPortCandidate#LocationParameter is now FreeNodePortLocationModel#NODE_CENTER_ANCHORED for nodes and BendAnchoredPortLocationModel#FIRST_BEND for edges instead of a parameter of an internal model.
  • During interactive edge creation, the tip of a newly created edge now only snaps to valid target port candidates to create orthogonal end segments.
  • Moving a node with the MoveInputMode for unselected nodes now moves the bends of adjacent self-loops, too.
  • Added overridable methods to PortRelocationHandle to allow customization of the port candidates.
  • The new TextEditorInputMode#TextAreaPlacementPolicy property provides finer control of what happens when the TextArea is (partially) outside of the viewport.
  • The new TextEditorInputMode#TextAreaPadding property controls the padding between the TextArea and the border of the canvas.
  • The CanvasComponent#Mouse2DClicked event now reports the position of the mouse down event as its location. Previously, this was the location of the up events which can be slightly different.
  • The new PortRelocationHandle#Visualization property controls how the preview during edge reconnection is handled. A new option is to change the edge during the gesture, which improves fidelity of the preview in certain cases.
  • MoveLabelInputMode: The visualization of a moved label has been improved. The new property Visualization allows easy switching between a symbolic preview, a preview or a live view.
  • The following input modes now release the mutex before dispatching their final event:
    • CreateEdgeInputMode now releases the mutex before dispatching the EdgeCreated event.
    • MoveInputMode now releases the mutex before dispatching the DragFinished event.
    • ResizeStripeInputMode now releases the mutex before dispatching the DragFinished event.
  • The new methods findNextItem and findNearestItem of NavigationInputMode can be used to configure the determination of the "next" item.
  • The type parameter T of class ItemDropInputMode<T> is no longer restricted to IModelItem.
  • Overloads of the methods GraphCopier#copy and GraphClipboard#duplicate without the IElementCopiedCallback parameter have been added.
  • The new GraphEditorInputMode#MoveUnselectedInputMode property provides a child input mode for moving unselected items. It supersedes the previous #createMoveUnselectedInputMode method. This input mode is disabled by default.
  • The static constants SELECTED_MOVABLES_POSITION_HANDLER and SELECTED_MOVABLES_HIT_TESTABLE have been added to GraphEditorInputMode. These are used as default PositionHandler and HitTestable properties of GraphEditorInputMode#MoveInputMode and can be reused for other input modes.

Layout

  • HierarchicLayout: Reduced required memory for graphs with sequence constraints.
  • Polyline.EdgeRouter: Improved routing quality for edges between group nodes and their descendants in the case that the routing is aborted via AbortHandler or when the maximum duration time limit is up. Previously, such edges might not have been handled in this case, whereas now they always get a simple but valid orthogonal route.
  • HierarchicLayout: Improved handling of sequence and layering constraints between sub-components, see HierarchicLayout#SUB_COMPONENT_ID_DPKEY or HierarchicLayoutData#SubComponent. Previously, such constraints were ignored.
  • OrthogonalLayout: Reduced the number of bends of directed edges.
  • OrthogonalLayout: Reduced number of crossings for directed edges.
  • BusRouter: Now automatically ignores non-orthogonal edges with fixed bus descriptor (see BusDescriptor#isFixed) or transforms them into orthogonal edges if they are octilinear. In previous versions, the layout algorithm simply throws an IllegalArgumentException in such cases.
  • OrthogonalLayout: Improved compactness of the layout results.
  • OrthogonalLayout: Improved result of the perceived bends optimization (see OrthogonalLayout#PerceivedBendsOptimizationEnabled).
  • OrthogonalLayout: The postprocessing step now also applies special transformations that can reduce the overall edge length.
  • MultiPageLayout: Improved runtime as well as layout quality if the input is a tree structure and the specified #CoreLayout is either an instance of class TreeLayout or ClassicTreeLayout. Furthermore, property MultiPageLayout#AdditionalParentCount allows for specifing the number of additional proxies that the algorithm tries to add to a subtree. The original nodes associated with these proxies lie on the path of the tree's root to the subtree placed on a page.
  • MultiPageLayout: Added property #ProxyReferenceNodeCreationEnabled that allows for disabling the creation of proxy reference nodes as well as property #MultipleComponentsOnSinglePagePlacementEnabled that allows to prevent that elements of different connected components are placed on the same page.
  • PortPlacementStage now additionally considers port grouping constraints. If two edges are port-grouped at a certain node, the stage assigns the same port location to the edges. For more information about port grouping, see PortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY.
  • TreeComponentLayout: Added property UndirectedTreeConsiderationEnabled that allows for specifing whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered.
  • OrthogonalLayout: Reduced the length of straight-line edges which can lead to layouts that are significantly more compact.
  • OrthogonalLayout: Improved optimization that reduces the number of perceived bends, see OrthogonalLayout#PerceivedBendsOptimizationEnabled.
  • HierarchicLayout: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers.
  • Added new stage PlaceNodesAtBarycenterStage that places a user-specified subset of nodes on the barycenter of their neighbors. During the core layout, these node are hidden.
  • DefaultNodePlacer and SimpleNodePlacer now both support to specify a minimum distance between the edge segments that are routed orthogonally in the channel between the root node and the child nodes, see method DefaultNodePlacer#MinimumChannelSegmentDistance and SimpleNodePlacer#MinimumChannelSegmentDistance respectively.
  • ClassicTreeLayout now allows for specifying a minimum vertical distance for the horizontal edge segments of the bus, see ClassicTreeLayout#MinimumBusSegmentDistance.
  • Major performance improvement for Polyline.EdgeRouter and routing scenarios where it is unavoidable to cross obstacles (e.g. other nodes, labels) in order to reach the target, including cases where a crossing is necessary to guarantee that port candidates/constraints at the target side are satisfied.
  • Polyline.EdgeRouter: Improved quality in maze routing scenarios. Previously, it could happen that edge-node overlaps occurred even though there exists a more complicated path that yields no overlaps.
  • Several minor performance improvements for Polyline.EdgeRouter that affect the path search phase as well as the segment location assignment phase.
  • The new TreeLayoutData#CriticalEdgePriorities property can be used to specify critical edges.
  • The new LayoutExecutor#createLayoutGraphAdapter callback method makes it possible to configure the LayoutGraphAdapter that is used for the layout calculation.
  • SmartEdgeLabelModel now is properly handled by labeling algorithms, resulting in better label placements.
  • The new ImprovingPortAssignmentEnabled property of LayoutExecutor and LayoutGraphAdapter enables PortCalculator to improve the port assignment.
  • The combination of PartitionGridData and TableLayoutConfigurator has been improved:
    • PartitionGridData now reuses the PartitionGrid created by the TableLayoutConfigurator.
    • Several methods have been added to TableLayoutConfigurator which provide access to the PartitionCellId assignment of the configurator as well as the mappings between IRow/IColumn and RowDescriptor/ColumnDescriptor.
  • The new properties LayerConstraints and SequenceConstraints of HierarchicLayoutData can be used to configure layer and sequence constraints for the HierarchicLayout. These supersede the previous LayerConstraintFactory and SequenceConstraintFactory properties.
  • The property ItemMapping#Map has been added that allows you to use a java.util.Map for the mapping from items to values.

Demos

  • A new LargeGraphsDemo has been added that shows some strategies how to keep a smooth UI when large graphs shall be visualized.
  • The new GraphBuilderDemo and InteractiveNodesGraphBuilderDemo have been added that demonstrate basic usage of yFiles' new GraphBuilder classes.
  • A new CustomPortModelDemo has been added that shows how to create and use a custom IPortLocationModel.

Further improvements

  • The PointD#toMutablePoint and RectD#toMutableRectangle methods now return a MutablePoint instead of IMutablePoint and a MutableRectangle instead of a IMutableRectangle, respectively.
  • The new method GeneralPath#intersects(GeneralPath) determines whether the path intersects with another GeneralPath.
  • The GeneralPath#createSmoothedPath method now has additional parameters to change how smoothing is applied. Those new options result in nicer smoothing when combined with large smoothing lengths and many different segment lengths in the path.
  • When reading GraphML with the deserialization property IgnoreXamlDeserializationErrors enabled, invalid property content is now skipped instead of discarding the whole object with such content.
  • Added a remove method to NodeDecorator, LabelDecorator, EdgeDecorator, PortDecorator, and BendDecorator for easy removal of decorations.
  • PolylineEdgeStyle renders better looking paths for self loop edges whose ports are near the node border.
  • The performance of the DefaultLabelStyle has been improved. Using another VisualCachingPolicy then VisualCachingPolicy#Never now also speeds up the DefaultLabelStyle.
  • The class CanvasResourceBundle has been added which can be used to replace the default command binding key strokes and command names via ResourceBundles.
  • The new class LicenseConfig has been added whose static INSTANCE can be optionally used to configure the license resolving:
    • If the content of the license file is set as LicenseString property, it is used directly instead of trying to load a license file.
    • Otherwise if the LicenseClassLoader property is set, this ClassLoader is used to load the license file.
  • The PlatformClassloader introduced with JDK 9 is now recognized per default when writing GraphML. For JDK classes of JDK 9 that are no longer known to the bootstrap classloader but only to the platform classloader no explicit XamlNamespaceMapping has to be added to GraphMLIOHandler.

Bugfixes

Graph Model

  • The SmartEdgeLabelModel#findBestParameter method returned a parameter that was centered on the edge even if the desired label layout overlapped only a little bit with an edge segment or was directly aside of one.
  • The graph of an IFoldingView now raises the NodeCreated, EdgeCreated, PortAdded, LabelAdded, and BendAdded events after the created element is registered. This fixes a bug where the master item of the created item was not available in handlers for these events.
  • Table: The methods setLabelText, remove, setLabelPreferredSize and setLabelLayoutParameter now throw an IllegalArgumentException instead of an InvalidStateException.
  • DefaultGraph now calls the onRemovingEdge and onRemovingPort methods before their incident items are removed.
  • When a stripe is removed, ITable#LabelRemoved events for the implicitly removed associated labels are now raised, too.
  • The implementations of IStripeHitTestHelper and IBoundsProvider in the lookup of an IStripe could neither be decorated nor overridden by the context lookup provided by a stripe style.
  • The INodeInsetsProvider implementations which can be retrieved from InteriorLabelModel and InteriorStretchLabelModel now correctly sum up the space required by overlapping labels.

View

  • The methods getBounds and isVisible describing the RectangleIndicatorInstaller returned wrong values. This could impact the performance as e.g. some node selection highlights were updated although they were not in the view port and result in unnecessary large content rectangles.
  • GraphModelManager: Fixed NullPointerException that occured when any of the Descriptor properties were set while the GraphModelManager instance was not yet associated to an IGraph.
  • Bridges: For edges which cross each other with the same absolute slope now a bridge is added on exactly one of these edges, depending on the crossing policy (was: either on both edges or none of them).
  • Reduced memory consumption of DefaultEdgePathCropper.
  • Removing an item that is currently highlighted with a custom HighlightIndicatorManager, FocusIndicatorManager, or SelectionIndicatorManager no longer results in a NullPointerException.
  • Selected stripe labels no longer remain selected after their owning stripe is deleted.
  • Selected stripe labels no longer cause exceptions when hovering over them.
  • The selection indicator for selected stripe labels is now shown correctly.
  • The methods GraphClipboard#copy and GraphClipboard#cut don't copy items anymore which depend on items that are selected but not included in GraphClipboard#CopyItems.
  • Undo units created by the execution of a layout algorithm are now correctly merged with undo units of the previously executed interactive gesture.
  • Corrected weird scrolling behavior of the scroll bar when the viewport was outside the content rectangle.
  • The commands COPY, CUT, and DUPLICATE are no longer enabled if there are no elements to cut, copy or duplicate.
  • Fixed a bug that sometimes prevented dispatching the mouse up event.
  • CanvasComponent#fitContent now takes into account that scroll bars that are currently visible may vanish.
  • Mouse wheel scrolling and scroll commands no longer move the view to the top left corner if a the viewport is limited by a ViewportLimiter.
  • Bridges did sometimes not appear on edges when they were scrolled into the viewport.

Input

  • PortRelocationHandleProvider now can handle null as graph constructor parameter.
  • PortRelocationHandle#GHOST_VISUALIZATION_PEN_KEY now is excluded from obfuscation.
  • Fixed IHitTestable implementation of DefaultPortCandidateDescriptor which used incorrect coordinates.
  • The ParentInputMode property of the InputModeEventArgs now is the input mode which has raised the event. Previously, some input modes erroneously set the ParentInputMode to the containing GraphEditorInputMode or GraphViewerInputMode.
  • Switching the input mode in an event handler of the current input mode no longer throws an exception.
  • ItemHoverInputMode updates the hovered item upon mouse drag events, too. This is the documented behavior. Previously, the hovered item was only updated on mouse move events.
  • ItemHoverInputMode removes the hovered item upon cancel.
  • GraphClipboard: The contents of a folder node was not copied if the folder was copied from within a group view, i.e. if the user entered a group node. In the worst case, this might have frozen the complete application.
  • Fixed an exception when an edge or label is pasted without selected target while its original owner is not in the current view.
  • ClickInputMode provided wrong click locations in the Clicked event if a Mouse2DEventTypes#CLICKED event without preceding Mouse2DEventTypes#PRESSED event was processed.
  • CreateEdgeInputMode and CreateBendInputMode now cancel on MOUSE_LOST_CAPTURE_DURING_DRAG event.
  • CreateEdgeInputMode did not show port candidates after re-installation of the input mode.
  • Moving an edge label with SmartEdgeLabelModel that is owned by an edge without visible path no longer throws an exception.
  • ItemHoverInputMode now resets the hovered item when moving the mouse out of the component.
  • GraphEditorInputMode and GraphViewerInputMode no longer ignore changes to their sub-input modes after having been installed once.
  • The HitTestRadius property of the following implementations of ICanvasContext now correctly contain the value in world coordinates instead of view coordinates:
    • The context created by ICanvasContext#create when passing a CanvasComponent but no hit test radius.
    • The context passed to IDisposeVisualCallback.
    • The context passed to IPositionHandlers by MoveInputMode.
    • The context passed to adjacent handles when moving a bend handle.
  • Disabling MarqueeSelectionInputMode during the gesture via code left the marquee visible on the screen.
  • When a selected stripe label is edited its TextArea now is correctly placed.
  • While relocating edges, dropping a port over an invalid target or empty canvas no longer creates an empty undo unit.
  • The Clicked and DoubleClicked events of ClickInputMode were sometimes missing when clicking on a node or edge. Now, they are always triggered unless the event was handled before.
  • Snap lines which indicate the same size are no longer shown for implicitly re-sized parent group nodes.
  • TextEditorInputMode: Inserting a line break now replaces selected text.
  • Node-to-edge snapping is now disabled by default which is the documented and intended value. For this, the initial value of the GraphSnapContext#NodeToEdgeDistance property is set to -1.0.
  • The LabelEditingEventArgs#Context#ParentInputMode property provided in the events GraphEditorInputMode#LabelAdding, GraphEditorInputMode#LabelEditing, TableEditorInputMode#LabelAdding and TableEditorInputMode#LabelEditing now contains the corresponding GraphEditorInputMode or TableEditorInputMode instance.
  • The default implementation of IPortSnapResultProvider never returned any snap results.
  • CreateEdgeInputMode: The ValidBeginCursor is now correctly hidden during edge creation when bend creation isn't allowed.
  • CreateEdgeInputMode didn't always update the highlight of possible source port candidates when its ShowPortCandidates property was configured to show the source port candidates.
  • GraphEditorInputMode/GraphViewerInputMode: Corrected the popup menu location if the menu is opened using the keyboard. Previously, the menu could appear outside the GraphComponent if the selected items or the current item were not completely inside the current viewport. Now the popup menu location (i.e. the menu's upper left corner) will be always inside the GraphComponent.
  • ReparentStripePositionHandler: The source and target ghost visualization was not always updated correctly when custom ghosts were used.
  • Changing the values of the CreateEdgeInputMode#DummyEdgeGraph#EdgeDefaults property had no effect for some interactions.
  • Fixed a possible infinite loop in OrthogonalEdgeHelper.
  • The cursor is now correctly reset after editing an orthogonal edge.
  • Fixed a possible NullPointerException which could occur in customized LabelDropInputMode and PortDropInputMode classes.
  • The CreateEdgeInputMode doesn't show port candidates anymore if bend creation is enforced (by pressing CTRL key during edge creation).
  • The indicators for bend grid snapping were not always drawn at the correct position for bends which were implicitly moved with a selected edge.

Layout

  • HierarchicLayout: Fixed problem where edges between group nodes contained superfluous bends if there were grouped edges in the input graph.
  • Polyline.EdgeRouter: Fixed issue that sometimes caused weird edge routes if there are edges with intermediate routing points.
  • Polyline.EdgeRouter: Fixed NullPointerException that was triggered when the list of intermediate points for an edge consisted of exactly two equal points.
  • OrganicLayout: Fixed IllegalArgumentException that could appear if cycle substructure detection is enabled, see OrganicLayout#CycleSubstructureStyle.
  • HierarchicLayout: Fixed an issue that caused non-symmetric results for grouped edges even though property SimplexNodePlacer#BaryCenterModeEnabled was enabled.
  • OrthogonalLayout: Fixed rare infinite loop issue for grouped graphs.
  • Polyline.EdgeRouter: Fixed rare NullPointerException.
  • Polyline.EdgeRouter: Fixed NullPointerException that occurred when there were intermediate routing points and the path search got aborted (e.g. because of maximum duration time limit).
  • ShortestPaths: Fixed possible NullPointerException that occurred when the a-star algorithm was applied to a graph with non-monotonic heuristic costs.
  • HierarchicLayout: Fixed UnsupportedOperationException that was triggered when a DataProviderAdapter that does not implement IDataProvider#get was registered with key GivenLayersLayerer#LAYER_ID_DPKEY. The issue only appeared in conjunction with sub-components, see HierarchicLayout#SUB_COMPONENT_ID_DPKEY.
  • FamilyTreeLayout: Fixed bug that caused that the preferred family member order wasn't considered, see FamilyTreeLayout#FamilyMembersSortingPolicy.
  • GenericLabeling: Fixed bug that could cause that a label candidate with a lower profit (see AbstractLabeling#Profit) was preferred over another candidate with higher profit even though both candidates did not overlap with any other elements.
  • GenericLabeling: Fixed unexpected labeling results that occurred if a label had label candidates with different sizes. The labeling algorithm previously calculated profits of candidates under the assumption that all candidates have equal size.
  • HierarchicLayout: Fixed rare infinite looping issue for input graphs with fixed (i.e., non-incremental) nodes and layering constraints.
  • Polyline.EdgeRouter: Fixed a rare bug that caused port candidate failures for edges grouped with fixed edges.
  • Polyline.EdgeRouter: Fixed a bug that caused collinear bends and self-crossings to be removed from fixed edges. Now, such fixed edges are not changed anymore.
  • HierarchicLayout: Fixed bug that sometimes caused a NullPointerException if the input graph contains port groups, see PortConstraintKeys#SOURCE_PORT_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_PORT_GROUP_ID_DPKEY.
  • HierarchicLayout: Fixed bug that sometimes caused superfluous bends if the edges were routed on a grid and the grid reference point was different from (0,0), see property NodeLayoutDescriptor#GridReference.
  • GraphLayoutLineWrapper: Fixed bug that sometimes caused a large empty space inside the drawing.
  • CircularLayout: Now correctly considers whether or not an inter-partition edge should be bundled or not (see EdgeBundleDescriptor#isBundled). Previously, when having multiple partitions, inter-partition edges where sometimes bundled even if the bundling property was disabled.
  • HierarchicLayout: Fixed a bug where the edge thickness of grouped edge segments was not considered correctly (e.g. there was not enough space for a thick edge).
  • BusRouter: Fixed non-deterministic behavior with respect to multiple runs that occurred in very rare cases.
  • Corrected an error in the Rectangle2D#Contains(Rectangle2D) method. As a consequence of this error, the results of various algorithms and automatic layouts could have been wrong.
  • OrthogonalLayout now considers edge grouping also if there are no directed edges specified.

Further Bugfixes

  • GenericLabelModel serialization: Fixed cyclic reference in GraphML which could happen while serializing a GenericLabelModel with a parameter with associated descriptor.
  • PolylineEdgeStyle now takes arrow heads into account for visibility checks.
  • The default method IOrientedRectangle#getCenter didn't return the correct center if the width or height of the rectangle was equal to 0.
  • Sometimes the GroupNodeDefaults#LabelDefaults#AutoAdjustingPreferredSizeEnabled property and the GroupNodeDefaults#PortDefaults#AutoCleanupEnabled property were not considered for labels and ports of groups.
  • The GroupingSupport#hasGroupNodes method now returns only true if there are actually group nodes in the graph. Previously, it returned also true if there once were group nodes which had been removed in the meantime.
  • TableNodeStyle: Fixed missing default visualization.
  • Fixed a possible NullPointerException in TableNodeStyleRenderer when a TableNodeStyle is rendered with #Table set to null.
  • The clone method now is overridable in all style implementations.

Incompatible Changes

  • ReparentStripePositionHandler: All callback methods dealing with ghost objects have been renamed consistently:
    • UpdateXyzVisualization to UpdateXyzGhost.
    • UpdateTargetVisualizationBounds to UpdateTargetGhostBounds.
  • The method Arrow#getAsFrozen was removed as there was no benefit in converting the Arrow instance in an immutable instance.
  • The protected factory method MoveLabelInputMode#createLabelHitTestable has been removed. Developers who want to set a custom instance need to set it directly to the HitTestable property.
  • The #CanvasClicked event of GraphEditorInputMode/GraphViewerInputMode now provides the GraphEditorInputMode/GraphViewerInputMode as parent input mode in the Context property of its ClickEventArgs.
  • The ITable#RelativeLocation property has been removed. Use ITable#Insets with corresponding Left and Top values instead.
  • Renamed all occurrences of Cleanup to CleanUp in API names.
  • ItemClickedEventArgs now extends ClickEventArgs.
  • CreateEdgeInputMode's EdgeCreator might receive null as targetPortCandidate parameter. Callbacks must handle this case by either creating a target port of their own or canceling the edge creation by returning null.
  • The StripeSubregion#TargetTableNode property is now read-only.
  • Renamed the enumeration value ShowFocusPolicy#WHEN_FOCUSED to ONLY_WHEN_FOCUSED.
  • Renamed the Animator#destroy method to stop.
  • The GraphEditorInputMode#createMoveUnselectedInputMode method has been removed. Use the property MoveUnselectedInputMode instead.
  • The boolean CreateEdgeInputMode#PortCandidateShowingEnabled property has been replaced by the CreateEdgeInputMode#ShowPortCandidates property which has the enum type ShowPortCandidates.
  • The boolean OverviewInputMode#AutoMouseWheelZoomEnabled property has been replaced by the OverviewInputMode#MouseWheelBehavior property which has the enum type MouseWheelBehaviors.
  • Classes PropertyInfo, TypedKey, XamlHelper and XmlName were removed from the layout distribution where they were not used.
  • CanvasComponent: Removed the events MouseWheelZoomFactorChanged, MouseWheelScrollFactorChanged, AutoDragChanged and HitTestRadiusChanged. These events are unneeded since the corresponding properties are not changed by library code.
  • The method Pen#adopt has been renamed to #commit to better reflect what it really does.
  • DpKeyBase has been renamed to AbstractDpKey and made an abstract class. AbstractDpKey and all subclasses now take the value type as additional constructor parameter. This value type may be retrieved through read-only property ValueType.
  • IMapperRegistry: The value type parameter was removed from all default methods taking NodeDpKey, EdgeDpKey or ILabelLayoutDpKey.
  • MoveViewportInputMode: The properties that controlled the inertia behavior have been removed since they no longer apply to the new algorithm. Instead, the new property InertiaDuration can be used to specify the duration of the inertia scrolling.
  • GraphModelManager#HierarchicNodeNestingEnabled has been removed. Set the new HierarchicNestingPolicy property to HierarchicNestingPolicy#NONE to disable node nesting or to either HierarchicNestingPolicy#NODES or HierarchicNestingPolicy#NODES_AND_EDGES to use nesting. Similarly, GraphModelManager#HierarchicEdgeNestingEnabled has been removed. Use either HierarchicNestingPolicy#NODES_AND_EDGES to enable edge nesting or any other policy to disable it.
  • The method CanvasComponent#animateScrollTo has been removed and is superseded by the new #zoomToAnimated methods.
  • The property SliderEdgeLabelLayoutModel#AutoFlipping has been renamed to #AutoFlippingEnabled.
  • The property TableLayoutConfigurator#Compaction has been renamed to #CompactionEnabled.
  • The property GraphPartitionManager#FiringGraphEventsEnabled has been removed.
  • The overloads of ValueSerializer#getSerializerFor taking no context have been removed.
  • The class com.yworks.yfiles.layout.hierarchic.GroupingSupport has been removed.

Changes of Default Behavior

  • The IGraph#setNodeLayout method and the various methods to create a node now throw an IllegalArgumentException if the layout rectangle contains one or more NaN values. Similarly, the IGraph#setBendLocation and the various methods to add a bend to an edge now throw an IllegalArgumentException if the location point contains one or two NaN values.
  • By default, stripe labels that are programmatically selected or highlighted don't show a selection or highlight indicator anymore.
  • Inertia scrolling of the viewport behaves now in a more natural way. The scrolling stops now after a fixed amount of time. Previously, the duration depended on the initial inertia velocity.
  • GraphML: Duplicate properties on XAML input are now considered an error in accordance with the XAML specification.
  • The stroke thickness is now considered for the calculation of the origin of the default arrow visualizations. This can result in a slightly different rendering of the arrows.
  • The CreateEdgeInputMode#DummyEdge property is now always reset after the edge creation was finished or canceled.
  • RectD#isFinite and SizeD#isFinite now also consider empty instances as not finite.
  • MoveLabelInputMode: The moved label now is visualized as a preview instead of a symbolic rectangle. Set the Visualization property to Visualization#GHOST to restore the old mode.
  • The LayoutExecutor#ContentRectUpdatingEnabled property is now enabled by default.
  • CreateEdgeInputMode: The determination whether the mouse hovers over a valid end has changed. If ForcingSnapToCandidateEnabled is disabled, the EndHitTestable now is queried first and a target port candidate is only searched if the hit testable returns true. Previously, the hit testable was only queried if no target port candidate was found at the current location.
  • Previously, even if the GraphModelManager#UsingHierarchicEdgeNestingEnabled property was set to true, canvas objects for edges were added to the GraphModelManager#EdgeGroup as long as no group nodes were part of the graph. The corresponding new HierarchicNestingPolicy NODES_AND_EDGES has no such behavior and thus, EdgeGroup is empty by default. Use one of the other polices if canvas objects for edges should be part of EdgeGroup.
  • PolylineEdgeStyle defaults to an improved smoothing algorithm when using the SmoothingLength property. This is especially apparent when using large values for SmoothingLength.
  • The method CollapsibleNodeStyleDecorator#createSelectionInstaller has been removed.
  • ClickInputMode now dispatches the more specific events LeftClicked, RightClicked, LeftDoubleClicked and RightDoubleClicked before the general Clicked and DoubleClicked events. Hence, Clicked and DoubleClicked will only be triggered if the event wasn't handled before.

Deprecated

  • The properties LayerConstraintFactory and SequenceConstraintFactory of HierarchicLayoutData have been marked as deprecated. The new properties LayerConstraints and SequenceConstraints should be used instead. Similarly, the factory methods LayoutUtilities#createLayerConstraintFactory(IGraph) and LayoutUtilities#createSequenceConstraintFactory(IGraph) have been marked as @Deprecated.
  • PartitionGrid#hasAtLeastTwoNonEmptyRows has been marked as @Deprecated and may be removed in future releases.

yFiles for Java 3.1.0.1 – Changes Since 3.1

Improvements

Demos

  • Added new demos:
    • The GraphEvents demo can be used to explore the different kinds of events dispatched by yFiles for Java.
    • The IsometricDrawing demo displays graphs in an isometric fashion to create an impression of a 3-dimensional view.
    • The EdgeBundling demo shows how to reduce visual clutter through edge bundling.
    • The Uml demo shows interactive creation and editing of UML class diagrams.
  • PDFImageExportDemo, SVGImageExportDemo and SVGNodeStyleDemo: Made the build scripts Java 9 ready.

Viewer

  • Improved general rendering performance, which especially affects large graphs dramatically.
  • GridVisualCreator now respects the clip of the render context passed to its #createVisual and #updateVisual methods.
  • IArrow#CIRCLE now uses a real circle for rendering.
  • Removed unusable SnapLine resource keys from CanvasComponent's client properties.

Bugfixes

Viewer

  • GraphEditorInputMode and GraphViewerInputMode no longer ignore changes to the sub-input modes exposed as properties after having been installed once.
  • Fixed a bug in CanvasComponent that moved the viewpoint too much when changing the zoom property.
  • Fixed a bug in GraphML serialization that always looked for singletons on classes that were annotated with @GraphML even if the GraphML#singletonContainers property was not set.
  • TextEditorInputMode: The size calculation for the editing #TextArea was fixed to respect all properties of the #TextArea.
  • TextEditorInputMode: Using ENTER as #LineBreakRecognizer no longer results in two new lines each time ENTER is pressed.
  • Fixed a bug that might occur when changing wrapped styles in CollapsibleNodeStyleDecorator, ShadowNodeStyleDecorator, FixedShapeShadowNodeStyleDecorator and NodeStylePortStyleAdapter.
  • DefaultLabelStyle: Fixed line breaks when text wrapping is enabled.
  • Added missing Obfuscation annotation for DashStyle constants.
  • Fixed serialization of shared collection resources.
  • Fixed parsing of font style constants of GraphML files written with yFiles for Java 3.0.
  • DefaultLabelStyle: Fixed #updateVisual to take all style properties into account when determining whether or not the visualization has to be re-created.
  • AbstractJComponentStyle: Fixed a bug that prevented serialization of the #ContextLookup property after obfuscating the library.
  • XmlWriter: Fixed JDK 9 only additional, undesired whitespace when writing CData nodes.
  • Several context implementations throughout the library now use the correct value in world coordinates for the HitTestRadius property instead of view coordinates:
    • The context created by ICanvasContext.createCanvasContext when passing a CanvasComponent, but no hit test radius.
    • The IRenderContext passed to IDisposeVisualCallback.
    • The IInputModeContext passed to IPositionHandlers by MoveInputMode.
    • The IInputModeContext passed to adjacent handles when moving a bend handle.
  • InteriorStretchLabelModel#getMinimumNodeSize now uses the correct insets for width calculation. Previously the top insets were erroneously used for the width.
  • The NodeStyleStripeStyleAdapter#updateVisual method always created a new visual by delegating to the #createVisual method.
  • Mouse wheel zoom during an input gesture no longer results in incorrect coordinates for the subsequently dispatched mouse event.
  • Switching the GraphComponent's #InputMode in a key event handler no longer throws an exception.
  • MapperRegistry#addMapper no longer throws an exception when trying to replace a mapper for an existing key.
  • 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.
  • GeneralPath#getTangent now returns null if there is no tangent at the requested position. Previously, it returned a bogus tangent.
  • 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 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.
  • 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.
  • HandleInputMode's #CurrentHandle property could not always be obtained during the #DragFinished, #DragFinishing, #DragCanceling, and #DragCanceled events of HandleInputMode.
  • Setting CreateEdgeInputMode's #CancelRecognizer could potentially get the input mode into a broken state.
  • The ICommand#COPY command is no longer executed twice.
  • Fixed a bug in ViewportAnimation that sometimes moved the viewport a bit before the animation started.
  • Fixed an exception in DropInputMode which occurred if a drag enter was recognized while another drag action was still running.
  • CreateEdgeInputMode no longer fires gesture cancel events if it has not been started before.
  • StripeDropInputMode no longer calls #ItemCreator twice.
  • The StripeDropInputMode#ItemCreated event was not raised.
  • GeneralPath#isVisible often returned true for invisible paths.
  • 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 #AutoMergeTime.

Layout

  • Corrected an error in the Rectangle2D#contains(Rectangle2D) method. As a consequence, the results of various algorithms and automatic layouts could have been wrong.
  • PortPlacementStage: Fixed bug that caused NullPointerException when the ports of edges in the input graph were outside the node bounds.
  • BusRouter: Fixed rare NullPointerException that could be triggered if there are buses with both fixed and movable edges at the same time.
  • AbstractLabelLayout: Fixed bug that the box returned by AbstractLabelLayout#BoundingBox was not consistent with the bounding box of the oriented box (AbstractLabelLayout#OrientedBox). This was the case when the mutable oriented box instance was changed.
  • LayeredNodePlacer: Fixed bug that caused node-edge overlaps for some configurations.
  • MultiPageLayout: Fixed bug that edge type EdgeType#PROXY was never used.
  • Setting PartialLayout#EdgeRoutingStrategy to StraightLine erroneously rerouted all edges in the graph instead of just the ones that were required.
  • polyline.EdgeRouter: Fixed RuntimeException that could be triggered when the graph contained fixed edges (see EdgeRouter#SphereOfAction) with very short segments.
  • HierarchicLayout: Fixed IllegalArgumentException that could be triggered when the user specified both edge directedness (see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY) and layering constraints.
  • OrthogonalLayout: Fixed rare bug that caused node-edge overlaps.
  • HierarchicLayout and SimplexNodePlacer: Fixed rare IllegalArgumentException that could be triggered when the input graph had a partition grid and PortCandidates or PortConstraints.
  • OrganicRemoveOverlapsStage: Improved adherence to the specified maximum duration.
  • HierarchicLayout: Improved port assignment for edges incident to group nodes that are routed directly (see EdgeLayoutDescriptor#DirectGroupContentEdgeRouting). Previously, such edges were often reversed.
  • HierarchicLayout: Fixed bug that caused violation of specified PortCandidates of edges with labels with preferred placement specifier LabelPlacements#AT_SOURCE_PORT or LabelPlacements#AT_TARGET_PORT when using an orientation other than top-to-bottom.
  • SeriesParallelLayout: Fixed bug that caused misplaced edge labels for graphs containing only a single edge.
  • HierarchicLayout: Improved adherence to the specified maximum duration by applying a suitable runtime restriction to class PortCandidateOptimizer. Previously, this class didn't have any runtime restrictions.
  • OrthogonalLayout: Fixed rare bug that caused overlapping nodes.
  • OrthogonalLayout: Improved from-sketch mode (see UseSketchDrawing) in conjunction with node labels or node halos. Previously, in the presence of the mentioned elements, the layout results did not always correctly resemble the sketch drawing, even if it was a good sketch.
  • HierarchicLayout: Fixed bug that caused that property HierarchicLayout#ComponentArrangementPolicy was not correctly considered when there are undirected edges (see HierarchicLayout#EDGE_DIRECTEDNESS_DPKEY).
  • HierarchicLayout: Fixed bug that lead to edge ports lying outside the node boundaries when using the edge thickness feature (i.e. edges with thickness greater than zero, see HierarchicLayout#EDGE_THICKNESS_DPKEY) together with a (rather large) grid spacing value and the default port assignment PortAssignmentMode#DEFAULT.
  • HierarchicLayout: Fixed bug that caused unnecessarily large layer distances in case that there exist empty partition grid rows with a minimum row height.
  • HierarchicLayout with partition grid: Fixed bug that in some cases caused an IllegalArgumentException when the layout algorithm was configured to stop after the layering or sequencing phase (see HierarchicLayout#StopAfterLayeringEnabled and HierarchicLayout#StopAfterSequencingEnabled).
  • DefaultNodePlacer: Fixed bug in DefaultNodePlacer#MinimumLastSegmentLength that caused that the value of DefaultNodePlacer#MinimumFirstSegmentLength was returned.
  • TreeLayout: Fixed bug in DefaultPortAssignment that caused a memory leak.
  • TreeLayout: Fixed bug in the integrated edge labeling feature that caused that multiple edge labels were not always ordered correctly along the edge with respect to their preferred placement setting (i.e., place at source, center or target preference). For example, a source label should always come before a target label in the direction of the actual edge flow.
  • polyline.EdgeRouter: Fixed bug that sometimes caused a violation of the minimum first or last segment length if they were set to relatively large values.
  • OrthogonalLayout: Fixed rare bug that caused non-orthogonal line segments and bad edge end points.

Incompatible Changes

View

  • CreateEdgeInputMode now triggers the EdgeCreationStarted event for programmatic edge creation with the doStartEdgeCreation method.

yFiles for Java 3.1 – Changes Since 3.0.0.4

General Improvements

  • The naming of classes, members and parameters has been reviewed and now uses more consistent and intuitive names. Please consult the Developer's Guide for a complete list of renamings.
  • Some functionality has been removed from the API to reduce its complexity and some of the functionality has been moved to different classes or packages. Again, see the Developer's Guide to get a full list of moved/removed functionality.

Features

Layout

  • HierarchicLayout: Added support for port grouping, see PortConstraintKeys#SOURCE_GROUP_ID_DPKEY and PortConstraintKeys#TARGET_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.
  • LabelPlacements: Added preferred placement specifiers #AT_SOURCE_PORT and #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 and can be specified with property PreferredPlacementDescriptor#PlaceAlongEdge.
  • OrganicLayout now supports the detection of regular substructures in the graph (see methods #setChainSubstructureStyle(ChainSubstructureStyle), #setStarSubstructureStyle(StarSubstructureStyle), #setCycleSubstructureStyle(CycleSubstructureStyle), and #setParallelSubstructureStyle(ParallelSubstructureStyle) and applies a specific layout style to them such that they can be better recognized.
  • TreeReductionStage: Added possibility to specify a custom labeling algorithm that places labels of non-tree edges. Now, users do not need to take care of such edge labels themselves after using a tree layout algorithm on a non-tree input graph in conjunction with the reduction stage. See properties #NonTreeEdgeLabelingAlgorithm and #NonTreeEdgeLabelSelectionKey.
  • SeriesParallelLayout: Added possibility to specify a custom labeling algorithm that places labels of non-series-parallel edges. Such labels are now automatically handled. Users do not need to handle them after running the algorithm with a non-series-parallel input graph. See properties #NonSeriesParallelEdgeLabelingAlgorithm and #NonSeriesParallelEdgeLabelSelectionKey.

Improvements

Viewer

  • IGraph: The default methods #applyLayout(ILayoutAlgorithm) and #applyLayout(ILayoutAlgorithm, LayoutData) have been added.
  • FilteredGraphWrapper now no longer queries the node and edge predicates as often.
  • IMapperRegistry: Several overloads for the #create*Mapper methods have been added that take more specific tags but allow to omit the keyType parameter.
  • GraphComponent: Four #morphLayout convenience methods have been added that run a layout on the graph of the component and animate the results.
  • The property GraphComponent#GraphMLIOHandler has been added to set a custom GraphMLIOHandler to be used by the IO commands and convenience IO methods. Previously the lookup of the class needed to be decorated.
  • GraphComponent: The overloads #importFromGraphML(java.io.Reader), #importFromGraphML(java.io.InputStream), #exportToGraphML(java.io.OutputStream, java.net.URI) and #exportToGraphML(java.io.Writer, java.net.URI) have been added.
  • Animator: A getter for the CanvasComponent, which had been passed to the constructor, was added.
  • The types of the static #INSTANCE fields of VoidNodeStyle, VoidEdgeStyle, VoidLabelStyle, VoidPortStyle, VoidStripeStyle and VoidStripeStyleRenderer have been changed to the concrete types instead of the interface types (e.g. INodeStyle).
  • IconLabelStyle: A constructor has been added that only takes a custom renderer as argument.
  • Class DefaultPortCandidateDescriptor, which is used to visualize IPortCandidates, now provides static ResourceKey fields that are used to lookup IVisualTemplates for the different states of IPortCandidates. Custom IVisualTemplates can be used by either registering them via CanvasComponent#putClientProperty or by the new convenience method DefaultPortCandidateDescriptor#setTemplate.
  • Resizing a table row or column now respects the GraphEditorInputMode#AdjustContentRectPolicy.
  • CreateEdgeInputMode now respects the settings #SnappingBendsToSnapLinesEnabled and #SnappingBendAdjacentSegmentsEnabled on GraphSnapContext. It also handles grid snapping according to the configuration for snapping.
  • Nodes now show their target grouping hierarchy z-order during a reparenting gesture.
  • 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.
  • GraphMLIOHandler: The overloads #read(IGraph,java.io.Reader), #read(IGraph, java.io.InputStream), #write(IGraph, java.io.OutputStream, java.nio.charset.Charset, java.net.URI) and #write(IGraph, java.io.Writer, java.net.URI) have been added.
  • GraphMLParser: The overloads #parse(IGraph,Reader,IGraphElementFactory) and #parse(IGraph, InputStream, IGraphElementFactory) have been added.
  • GraphML: The performance for parsing java enums and FlagsEnums has been improved.
  • GraphML: Parsing java enums and FlagsEnums has been refactored and now respects SerializationProperties#IGNORE_PROPERTY_CASE.

Layout

  • HierarchicLayout: Slightly reduced the number of bends when integrated edge labeling is enabled.
  • HierarchicLayout: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to 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.
  • 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.
  • 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 #StrictClusterSeparationEnabled that allows to specify whether or not nodes with different cluster IDs may be placed onto the same page.
  • The tree algorithms BalloonLayout, TreeLayout and AspectRatioTreeLayout now support custom selection of the root node of the tree.
  • BalloonLayout: Interleaved child placement now works in conjunction with from sketch-mode and custom child order comparators. This means that the settings #FromSketchModeEnabled and #Comparator are no longer ignored when enabling the interleaved placement mode (see #InterleavedMode).
  • TreeLayout: Now take into consideration the minimum group node size specified by the user with a IDataProvider registered with the graph with key GroupingKeys#MINIMUM_NODE_SIZE_DPKEY.
  • SeriesParallelLayout: Now takes into consideration the minimum node size specified by the user with a IDataProvider registered with the graph with key GroupingKeys#MINIMUM_NODE_SIZE_DPKEY.
  • Improved the runtime of EdgeRouter when routing edges that have PortConstraints or PortCandidates.
  • Improved the performance of OrthogonalSegmentDistributionStage and thus also ChannelEdgeRouter which by default uses the mentioned stage as edge distribution strategy.
  • ChannelRouter: Improved order of segments to avoid edge crossings when there are multiple segments that have one common end point.
  • Improved the performance of PartialLayout for input graphs that feature a high number of large subgraph components. Does not apply for component assignment strategy ComponentAssignmentStrategy#SINGLE.
  • LayoutUtilities#applyLayout now supports layout of tables.
  • ItemMapping: The property #Mapper is now automatically set on first read-access to the property, enabling more convenient use of the mapper without first having to instantiate a matching instance.
  • PartitionGridData: It is now sufficient to specify one of a row mapping or the column mapping. The unspecified one will automatically be set to 0, resulting in a single row or column being used.
  • BalloonLayoutData, HierarchicLayoutData, LabelingData, OrthogonalLayoutData, SeriesParallelLayoutData and TreeLayoutData now have an EdgeLabelPreferredPlacement property which supports an ItemMapping for edge labels to provide a PrefererredPlacementDescriptor. Can be used as alternative to mappers registered with LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEY.
  • PlanarEmbedding has been added and allows to calculate and query an embedding of a planar graph.

Bugfixes

Viewer

Model

  • Fixed a bug in IGraph#addLabel that ignored an explicitly specified preferred size if folding is enabled.
  • FilteredGraphWrapper: The fail-fast mechanism to detect concurrent modification changes in the #Nodes, #Edges, #Labels and #Ports IListEnumerables didn't detect all modifications correctly.
  • Folding:
    • Fixed a bug that sometimes ignored the view state for a port on a folder node when a folding edge was created.
    • Fixed a potential exception when using folding on a filtered graph when either nodes with labels or ports, or edges with bends or labels are shown for the first time after being hidden before.
    • Fixed a bug that treated group nodes with no children als non-group nodes after they have been expanded.
    • Fixed a bug that creates folders with empty size when manually creating groups and the folding view is configured to collapse group nodes by default.
  • SandwichLabelModel: Fixed incorrect DefaultValue annotation for some created parameters.
  • SmartEdgeLabelModel: An exception was thrown if the path of the corresponding edge contained bends that were close together or at the same location.
  • NinePositionsEdgeLabelModel: Fixed the placement for the positions #SOURCE_BELOW and #TARGET_BELOW.

Geometry

  • GeneralPath#equals does no longer check for path equivalence (same coordinates etc.), but simply checks reference equality. This makes it consistent with the #hashCode method. To check for path value equivalence, use the new method #isEquivalentTo instead.

View

  • Fixed GraphComponent's #importFromGraphML(java.io.File) method to respect the GraphMLIOHandler's #ClearingGraphBeforeReadEnabled property. (All the other #importFromGraphML methods already did so.)
  • Label text isn't mirrored anymore if ComponentOrientation#RIGHT_TO_LEFT is set on the GraphComponent.
  • GraphOverviewComponent: Setting a new #OverviewInputMode updates now the #InputMode property accordingly.
  • Fixed a bug that might occur when changing wrapped styles in CollapsibleNodeStyleDecorator, ShadowNodeStyleDecorator, NodeStyleLabelStyleAdapter and NodeStylePortStyleAdapter.
  • Fixed a bug in GraphModelManager that didn't update the child groups if a new #ContentGroup is set.
  • Fixed a bug in GraphModelManager where #HierarchicEdgeNestingEnabled set to false was not respected when the graph changed or a group node was created first on a yet ungrouped graph.
  • Fixed some styles to call IRenderContext#childVisualRemoved after the IVisual actually has been removed instead of just before the removal.
  • Fixed a possible NullPointerException in the graph rendering code when items were removed from the graph during their style's #updateVisual method. This could happen when removing graph items from a different thread (which is still not supported, but at least this particular case won't crash anymore).
  • Fixed the maximum y-coordinate for horizontal grid lines produced by GridVisualCreator with grid style LINES.

Input

  • All shortcuts have been adapted to the operation system conventions, e.g. shortcuts on Mac do not use the Control key anymore but the Command key as modifier instead.
  • CreateEdgeInputMode: Fixed a bug that didn't show the edge preview when the edge would be created between a node and one of its ancestors or vice versa.
  • CreateEdgeInputMode: The #EdgeCreated event triggered before the corresponding undoable edit was committed. This could result in a broken undo queue, if e.g. an animated layout was started during in the event listener. The event now triggers after the edit has been committed. With automatic undo unit merging, this should not make a difference for the end user, however from the perspective of the code there will be two subsequent edits, rather than one compound, if the code in the listener actually modifies the edge.
  • CreateEdgeInputMode: Fixed a bug that broke the edge preview after the input mode was uninstalled and reinstalled again.
  • Fixed a bug in bend creation for orthogonal edges when grid snapping was enabled.
  • A bug in orthogonal edge editing was fixed where an edge could become non-orthogonal when a non-selected bend was moved.
  • Fixed an issue with orthogonal edge editing where canceling moving a port or node would add bends to otherwise straight edge segments.
  • Self-loops with same source and target location are now treated as orthogonal.
  • When dragging an unselected bend and canceling the gesture by pressing ESC, the dragged bend was removed.
  • Fixed a bug that prevented individually disabling certain grouping commands.
  • OverviewInputMode: Fixed a bug that could break the overview visualization if the overview has a specific very small width or height.
  • StripeDropInputMode: Fixed a bug that could result in nodes being moved to a wrong stripe when a new stripe was created or an existing one relocated.
  • NodeDropInputMode: Fixed a possible exception when snapping is enabled, but preview disabled.
  • When a node and its parent group node were both selected and moved with the SHIFT key held down the node was erroneously reparented to the root.
  • Fixed reparent highlighting when multiple nodes are reparented together.
  • Fixed an issue where the parameter finder for FreeEdgeLabelModel cannot place the label correctly for self-loops. Labels previously always appeared at the port location in this case.
  • Hiding INodeSnapResultProvider or IBendSnapResultProvider from the lookup no longer leads to a crash when nodes or bends are moved.
  • Fixed an issue where ICommand#EDIT_LABEL would not work directly on labels when a TableEditorInputMode is active.

Styles

  • DefaultLabelStyle: Fixed vertical text alignment for instances with non-empty insets.
  • IconLabelStyle: Fixed a NullPointerException that occurred when rendering the style while the #Icon property is set to null

GraphML

  • Fixed a bug in GraphML parsing that prevented finding the annotated @GraphML#contentProperty of a class.
  • Fixed a bug in GraphML parsing that could result in an exception when parsing an empty text element.
  • Fixed a bug in GraphML serialization that ignored @GraphML annotations for static fields.
  • Fixed structured GraphML serialization of DashStyle, Pen and URL instances.
  • The ValueSerializer used for predefined Pens and IArrows now also respects the SerializationProperty#IGNORE_PROPERTY_CASE.
  • Methods GraphMLIOHandler#addRegistryOutputMapper(String,Object) and #addRegistryOutputMapper(String, String, Object, IEventListener) created multiple GraphML key definitions for the same mapper instance
  • Arrow: Added @Obfuscation annotation to exclude the class from obfuscation. Excluding Arrow from obfuscation is necessary for properly reading (and writing) GraphML files.
  • Fixed the @DefaultValue annotations for the #Pen and #Paint properties in ArcEdgeStyle, PolylineEdgeStyle, GeneralPathNodeStyle and ShapeNodeStyle.
  • Fixed GraphML (de-)serialization of ports using SegmentRatioPortLocationModel and corresponding port location parameter instances.

Layout

  • HierarchicLayout: Fixed bug that caused a violation of the specified minimum distance or edge overlaps in the case of same-layer edges.
  • HierarchicLayout: Fixed rare bug that caused same-layer edge to cross through their source or target node, e.g., the port was at the top of the source node but the edge crossed through the source node to leave it at the bottom.
  • HierarchicLayout: Fixed bug that sometimes caused the route of back-loop edges with at least one endpoint incident to a group node to unnecessarily enter this group node.
  • HierarchicLayout: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled.
  • HierarchicLayout: Fixed bug that caused that the directedness of edges incident to groups wasn't considered correctly (see HierarchicLayout#EDGE_DIRECTEDNESS_DP_KEY).
  • HierarchicLayout: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications.
  • RecursiveGroupLayout when used with HierarchicLayout as core layout algorithm: Fixed IllegalStateException that could be triggered when group nodes of the input graph have PortCandidates.
  • 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.
  • SimplexNodePlacer: Fixed bug that caused overlaps between edges and nodes when enabling node compaction (see #NodeCompaction) and having edges with either strong PortConstraints or PortCandidates.
  • OrganicLayout: Fixed bug that caused group nodes with zero height/width in the layout result. The bug appeared when having empty groups, group node insets smaller than one (defined via GroupingKeys#GROUP_NODE_INSETS_DPKEY) and no minimum group node size specified (GroupingKeys#MINIMUM_NODE_SIZE_DPKEY).
  • OrganicLayout and ClassicOrganicLayout: Fixed bug that caused the algorithm to not consider the specified custom IGroupBoundsCalculator (see ClassicOrganicLayout#GroupBoundsCalculator).
  • Fixed OrganicLayout ignoring the GroupNodeMode settings.
  • 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.
  • 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#Bundled wasn't considered correctly.
  • CircularLayout: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled.
  • SingleCycleLayout: Fixed bug that may lead to a ClassCastException if edge bundling is enabled and a custom node sequencer is specified (see SingleCycleLayout#NodeSequencer).
  • AspectRatioTreeLayout#ROOT_PLACEMENT_DPKEY is now of type NodeDpKey<RootPlacement>.
  • AspectRatioTreeLayout#SUBTREE_ROUTING_POLICY_DPKEY is now of type NodeDpKey<SubtreeArrangement>.
  • AspectRatioTreeLayoutData did not register the correct values with the graph for the root placement and the subtree routing policy.
  • MultiPageLayout: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes.
  • IsolatedGroupComponentLayout: Fixed bug that caused edge labels that intersect with group nodes even though option ComponentLayout#LabelConsiderationEnabled is enabled.
  • EdgeRouter: Fixed rare RuntimeException that appeared if there were fixed (see #Scope) and grouped edges at the same time.
  • 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.
  • 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 IDataProvider with key EdgeRouter#EDGE_LAYOUT_DESCRIPTOR_DPKEY.
  • EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions (see EdgeLayoutDescriptor.MonotonicPathRestriction).
  • ChannelEdgeRouter: Fixed routing of self-loops that have both source and target end point at the same side of the node. Previously, when multiple such self-loops were present at the same node, the routing produced bad end points located outside of the node.
  • Groups#hierarchicalClustering(Graph,int,INodeMap,INodeDistanceProvider,Linkage): Fixed NullPointerException that occurred when the given maximum number of clusters was 0 or 1.
  • Fixed NullPointerExceptions in some LayoutData implementations that could happen if some of the mappings where accessed but were never really used in client code.
  • Fixed a bug in TableLayoutConfigurator which altered the size of a column or row if an edge routing algorithm has been applied.
  • Fixed a bug in TableLayoutConfigurator which sometimes used the wrong table insets.
  • LayoutGraphAdapter/CopiedLayoutIGraph: IMappers which use ILabels as key and boolean, int or double as value are now correctly translated into data providers for layout algorithms.
  • Fixed a bug that a dataprovider with key LayoutGraphAdapter#EDGE_LABEL_LAYOUT_PREFERRED_PLACEMENT_DESCRIPTOR_DPKEY that has been filled by a LayoutData has been ignored.

Incompatible Changes

Viewer

Model

  • IGraph: The signature of method #addBend(IEdge, int, PointD) has been changed to #addBend(IEdge, PointD, int).
  • IMapperRegistry: Renamed the methods #add* to #create*. The type of property #MapperMetadata has been changed from IMapperMetadata to MapperMetadata.
  • DefaultGraph and AbstractGraphWrapper: The signature of method #addBend(IEdge, int, PointD) has been changed to #addBend(IEdge, PointD, int).
  • FoldingEdgeState: The signature of method #addBend(int, PointD) has been changed to #addBend(PointD, int).

Geometry

  • GeneralPath: The return value type of method createPath has been changed from Path2D.Double to Path2D.

View

  • Most implementations and some usages of IAnimation have been removed and are now available as factory methods in IAnimation. This included the classes LayoutMorpher, EasedAnimation, GeneralPathAnimation, ParallelAnimation, LabelAnimation, NodeAnimation, PortAnimation, EdgeAnimation.
  • GraphModelManager: Signature of method #typedHitElementsAt(IInputModeContext, Class<T>, PointD, ICanvasObjectGroup) has been changed to #typedHitElementsAt(Class<T>, IInputModeContext, PointD, ICanvasObjectGroup).
  • CanvasComponent: The property #Editable has been removed. It had no effect on almost all input modes anyway. To no longer allow editing a CanvasComponent use a different input mode instead, e.g. GraphViewerInputMode, or configure the current input mode in a way that it no longer allows changes.
  • GraphComponent: Decorating the lookup of GraphComponent or IGraph to set the GraphMLIOHandler used by the IO commands and convenience IO methods on GraphComponent is no longer supported. Use the #GraphMLIOHandler property on GraphComponent instead.
  • The interface IRectanglePainter has been replaced by the more powerful interface IVisualTemplate. Implementations have been adjusted accordingly and members and classes with name *Painter or *RectanglePainter have been renamed to *Template or *VisualTemplate.
  • EdgeDecorationInstaller: The method #getBendVisual(IRenderContext,IBend) returning an IVisual was replaced by the method #getBendDrawing(CanvasComponent,IEdge) returning an IVisualTemplate that is used for all bends of the passed edge.
    The subclasses EdgeFocusIndicatorInstaller, EdgeHighlightIndicatorInstaller and EdgeSelectionIndicatorInstaller now contain static ResourceKey fields #BEND_TEMPLATE_KEY that can be used to register custom IVisualTemplates for bends on the GraphComponent.

Input

  • The command mechanism has been refactored:

    • ICommand, CommandAction, CommandBindingAction have been moved to package com.yworks.yfiles.view.input. Classes Command, CommandBinding, CommandManager, CanExecuteRoutedEventArgs, ExecutedRoutedEventArgs as well as the related properties on CanvasComponent have been removed. KeyboardInputMode offers new methods #addCommandBinding and #addKeyBinding for binding commands to actions and keyboard gestures to commands.
    • Class KeyboardInputMode has been refactored. New interfaces CanExecuteCommandHandler and ExecuteCommandHandler for handling commands have been introduced. All methods for binding commands to IEventListener implementations have been retrofitted to the aforementioned handlers. All methods for removing command or key bindings have been removed. Methods for adding such bindings now return a KeyboardInputModeBinding instance that offers a #remove method for this purpose.
  • OverviewInputMode now allows to zoom out further.
  • OrthogonalEdgeEditingContext: Changed return value of methods #getMovementInfos(IEdge) and #getSegmentOrientations(IEdge) to IListEnumerable.
  • HandleInputMode: For all HandleTypes a corresponding ResourceKey was added as static field that can be used to register a custom IVisualTemplate for this handle type. Per default the #createVisual(IRenderContext,IHandle) method now looks up the IVisualTemplate for the ResourceKey matching the HandleType for the passed IHandle. The #updateVisual method is no longer used and was removed.
  • An initially collapsed group node as a result of ICommand#GROUP_SELECTION now has a reasonable size.
  • IClipboardIdProvider: Signature of method #getId(IModelItem, IGraphClipboardContext) has been changed to #getId(IGraphClipboardContext, IModelItem).
  • GraphCopier: Changed signature of method #addBend(IGraph, IGraph, IEdge, IBend, int, PointD) to #addBend(IGraph, IGraph, IEdge, IBend, PointD, int).

Styles

  • AbstractEdgeStyle and AbstractStripeStyle: The return type of method #clone() has been changed from AbstractEdgeStyle<TVisual> to AbstractEdgeStyle. Furthermore, the return type of methods #createVisual(IRenderContext, IEdge) and #updateVisual(IRenderContext, IVisual, IEdge) has been changed from TVisual extends IVisual to IVisual.
  • IconLabelStyle:
    • The type of property #Url has been changed from String to java.net.URL.
    • The constructors have been changed and now take the URL of the icon instead of its Image.
  • MemoryIconLabelStyle: Simplified constructors that now only allow to specify the image of the icon as well as a custom renderer.
  • The type of ArcEdgeStyle#Renderer has been changed from IEdgeStyleRenderer to ArcEdgeStyleRenderer.
  • The type of PolylineEdgeStyle#Renderer has been changed from IEdgeStyleRenderer to PolylineEdgeStyleRenderer.
  • TableNodeStyle: The type of property #Renderer has been changed from INodeStyleRenderer to TableNodeStyleRenderer. Furthermore, the parameter type of methods #addPropertyChangedListener(IEventListener<PropertyChangedEventArgs>) and #removePropertyChangedListener(IEventListener<PropertyChangedEventArgs>) has been changed from IEventListener to IEventListener<PropertyChangedEventArgs>.
  • The type of VoidStripeStyle#Renderer has been changed from IStripeStyleRenderer to VoidStripeStyleRenderer.

GraphML

  • GraphML annotations: SerializationVisibilityType and GraphMLSerializationMode have been merged to GraphMLMemberVisibility.
  • Property: The properties #Value and #OwnerInstance have been removed. The new methods getValue and setValue now take the owner instance as parameter.
  • HandleSerializationEventArgs: The property #SourceType is now of type java.lang.reflect.Type instead of java.lang.Class.
  • IWriteContext and IParseContext: A parameter of type Class<T> that describes the target type has been added to the #getCurrent methods.
  • XamlSerializer: Signature of method #serialize(Type, IWriteContext, Object) has been changed to #serialize(IWriteContext, Object).
  • IXamlNameMapper: The return type of method getName(IWriteContext, Type) has been changed from String to XmlName.
  • QueryOutputHandlersEventArgs: Constructor QueryOutputHandlersEventArgs(IWriteContext, KeyScope, Map<Object, IOutputHandler>) has been changed to QueryOutputHandlersEventArgs(IWriteContext, KeyScope).
  • GraphMLWriter: Return type of method #getOutputHandlers(IWriteContext, KeyScope) has been changed from Map<Object, IOutputHandler> to Iterable<IOutputHandler>.
  • AbstractInputHandler: The return type of method #initializeFromKeyDefinition(IParseContext, Element) has been changed from boolean to void.

Algorithms

  • The following classes have been deprecated: GraphEvent, IGraphListener, Maps.HighPerformanceIntMap and Maps.HighPerformanceDoubleMap.
  • YList: The constructor YList(Collection<Object>) has been changed to YList(Collection<Iterable>). Method #remove(int) has been deprecated.
  • Comparators: Method #compare(int, int) has been deprecated.
  • Graph: Methods #addGraphListener(IGraphListener), #edgeObjects(), #getSource(Object), #getTarget(Object), #nodeObjects(), #removeGraphListener(IGraphListener), #firePostEvent() and #firePreEvent() have been deprecated.

Layout

  • ClassicOrganicLayout: The return type of method property #PreferredEdgeLength has been changed from int to double. Note that this also induces a corresponding change in class OrganicLayoutData.
  • OrganicLayout and ClassicOrganicLayout: The type of constant #PREFERRED_EDGE_LENGTH_DPKEY has been changed from EdgeDpKey<Integer> to EdgeDpKey<Double>.
  • LayoutGraph: Methods #getEdgeLabelLayout(Object), #getEdgeLayout(Object), #getNodeLabelLayout(Object) and #getNodeLayout(Object) have been deprecated.
  • HierarchicLayoutCore.IncrementalHint has been deprecated. Method INodeData#getIncrementalHint() now returns Object.
  • LayoutGraphAdapter: The type of the provided data provider keys have been changed from Object to a more specific type.
  • PartitionCellId: The return type of property #Cells has been changed from Collection<Object> to Iterable<Cell>.
  • HierarchicLayout:
    • The edge grouping now supports to group incoming and outgoing edges of a node. In previous versions incoming and outgoing edges always defined separate groups even though the user specified the same group IDs for such edges.
    • Method #isIntegratedEdgeLabelingEnabled does now always return false if the labeling algorithm is disabled (see MultiStageLayout#isLabelingEnabled. In previous versions it was only required that an appropriate labeling algorithm was specified, but it was not necessary that it is enabled. Therefore, the integrated labeling state queried from the property might not have corresponded to what the layout algorithm actually did. The same behavior change applies for the following methods:
      • HierarchicLayout#isNodeLabelConsiderationEnabled
      • OrthogonalLayout#isIntegratedEdgeLabelingEnabled
      • OrthogonalLayout#isNodeLabelConsiderationEnabled
    • 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.
    • Geometry information registered with data providers with keys #ALTERNATIVE_GROUP_BOUNDS_DP_KEY and #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
  • OrganicLayout does no longer resize empty group nodes, possible ignoring a minimum group node size for them (see GroupingKeys#MINIMUM_NODE_SIZE_DPKEY). The behavior with respect to empty group nodes is now in line with the behavior of other common layout algorithms.
  • Method Centrality#closenessCentrality now sets the closeness of a node to Infinity if the sum of the shortest path distances is 0. Before, it was set to NaN in such cases.
  • Groups.Dendrogram does no longer extend class Graph. To enable convenient iteration of a dendrogram, method #getChildren(Node) was added.
  • SingleCycleLayout: Property #NodeSequencer now allows to specify null to return to the default sequencer. In previous versions, specifying null leads to an IllegalStateException.

Demo Improvements

  • The package structure of the source code demos has been changed to a more intuitive structure.
  • The Viewer distribution now provides several source code demos.
  • The layout code in the BPMN demo was simplified and is now easier to adjust
  • A new demo application that shows how to configure hierarchic layout for arranging Sankey diagrams was added.
  • The new GraphMLCompatibilityDemo that shows how to load GraphML files created by yFiles for Java 3.0.x was added.

yFiles for Java 3.0.0.4 – Changes Since 3.0.0.3

Improvements

Demos

  • BPMNEditorDemo: The class BpmnLayoutData was added and is now used instead of the BpmnLayoutConfigurator.
  • BPMNEditorDemo: Fixed the initialization of snapping and of the default group node style.
  • LayoutStylesDemo: The bound restrictions of the Organic layout can now be specified explicitly.
  • LayoutStylesDemo: Fixed the configuration for the minimum node distance of the Organic layout that was not editable before.

Bugfixes

Viewer

  • Folding: Fixed a bug in the folding mechanism that could lead to an endless loop when loading a GraphML file containing FoldingEdgeState information.
  • PathBasedEdgeStyleRenderer: Fixed bug that could leave visual artifacts when switching to an arrow that returned a null visual.
  • CanvasComponent: Fixed a bug in the mouse wheel scroll behavior that moved the viewport in the wrong direction when scrolling page-wise vertically.

Layout

  • Fixed java.lang.IllegalArgumentException: Comparison method violates its general contract! problems caused by calling java.util.Arrays.sort for java.util.Comparator implementations that do not imply a total order.
  • HierarchicLayout: Fixed bug that caused a violation of the minimum first/last segment length for reversed/backloop edges which connect to group nodes.
  • HierarchicLayout: Fixed rare bug that may cause overlaps between labels and segments of edges with octilinear routes.
  • HierarchicLayout: Fixed possible infinite loop if there are critical edges (see CRITICAL_EDGE_DP_KEY).
  • 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 using node halos (see NodeHalo).
  • OrganicLayout: The type of the dataprovider key GROUP_NODE_MODE_DPKEY was fixed from NodeDpKey<Object> to NodeDpKey<GroupNodeMode>.
  • OrganicLayoutData: The type of the property GroupNodeModes was fixed from ItemMapping<Node, GroupNodeMode> to ItemMapping<INode, GroupNodeMode>.

yFiles for Java 3.0.0.3 – Changes Since 3.0.0.2

Bugfixes

Viewer

  • Folding: when using a MergingFoldingEdgeConverter the FoldingEdgeState representing multiple edges could become inconsistent after removing or reconnecting some of the edges.
  • Path Cropping: fixed a certain case where inaccurate numeric results with ports on node shape outlines would result in the first or last edge segment being completely removed.
  • DefaultEdgePathCropper: fixed an issue where getIntersection would not be called when cropping an edge at the source end.
  • IInputModeContext: fixed a bug in getGraph that could cause a stack overflow.
  • Edge Creation: fixed bug that could cause a 'Node not in this graph' exception during interactive edge creation.
  • PopupMenuInputMode: moved the default popup menu location one pixel to the right and one pixel down to prevent the mouse cursor from being positioned directly on the popup menu's border. (Mouse clicks on the popup menu's border do neither close the popup menu nor trigger any of the popup menu's entries.)

Layout

  • HierarchicLayout: fixed 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 may cause non-orthogonal segments of grouped edges even though orthogonal edge routing is enabled.
  • HierarchicLayout: improved compactness of layouts that feature group nodes with insets and (group) nodes with halos (NodeHalo). Previously, the specification of halos could enlarge the insets of group nodes by an unnecessary large amount.
  • HierarchicLayout: fixed an exception that sometimes got triggered when sequence constraints were used.
  • PartialLayout: fixed NullPointerException that appeared if no DataProvider with key PARTIAL_NODES_DP_KEY is registered with the input graph.

yFiles for Java 3.0.0.2 – Changes Since 3.0.0.1

Improvements

Documentation

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

Viewer

  • Events defined on DropInputMode now carry additional event arguments DropTargetEventArgs which hold the original Java Swing drag and drop events.

Bugfixes

Viewer

  • Fixed shortcut Ctrl+O for the command to open a document.
  • Methods GraphMLIOHandler.addRegistryOutputMapper(String,Object) and addRegistryOutputMapper(String, String, Object, IEventListener) wrongly created multiple GraphML key definitions for the same mapper instance.
  • Some GraphML annotations have been added to properties of label models and enums to increase the cross-product compatibility of generated GraphML files. The following properties have been annotated:
    • SmartEdgeLabelModel.AutoRotationEnabled is now annotated AutoRotation
    • HorizontalAlignment's CENTER, LEFT and RIGHT values are now annotated Center, Left and Right
    • TextTrimming's NONE, CHARACTER_ELLIPSIS and WORD_ELLIPSIS values are now annotated None, CharacterEllipsis and WordEllipsis
    • TextWrapping's WRAP_WITH_OVERFLOW, NO_WRAP and WRAP values are now annotated WrapWithOverflow, NoWrap and Wrap
    • EdgePathLabelModel.AutoRotationEnabled is now annotated AutoRotation
    • EdgeSegmentLabelModel.AutoRotationEnabled is now annotated AutoRotation
    • FreeEdgeLabelModel.RelativeAngleEnabled is now annotated EdgeRelativeAngle
    • AbstractJComponentLabelStyle.AutoFlippingEnabled is now annotated AutoFlip
    • ArcEdgeStyle.FixedHeightEnabled is now annotated FixedHeight
    • HtmlLabelStyle.AutoFlippingEnabled is now annotated AutoFlip
    • NodeStyleLabelStyleAdapter.AutoFlippingEnabled is now annotated AutoFlip
  • The default value for GraphML serialization of PanelNodeStyle.Color is now Black.

Layout

  • HierarchicLayout: Fixed NullPointerException that could happen in AsIsSequencer when incremental group hints are defined (see IncrementalHintsFactory.createIncrementalGroupHint) along with specific port constraints on edges incident to an incremental group node.
  • HierarchicLayout: Improved result if compact label placement is enabled (which is the default), see SimplexNodePlacer.LabelCompaction. In previous versions the labels may have been placed in a stacked style even if this did not make the result more compact (e.g. if all labels are placed to the right of the edges).
  • GraphPartitionManager: Fixed functionality to hide edges when using methods GraphPartitionManager.hide. Previously, edges were actually not hidden from the graph.
  • HierarchicLayout: Fixed distance between vertical (in a top-to-bottom layout) segments of same layer edges that connect to group nodes. This also applies to self-loops that connect to the top or bottom of a group node with both ends as well as same layer parts of other edges like back-loops.
  • HierarchicLayout: Fixed bug that caused the minimum edge-to-edge distance to be violated by edges with strong port constraints that cross each other.

Demos

  • BPMNEditorDemo: Fixed positioning of the dynamic substate button of activity and choreography nodes.
  • Fixed invalid HTML structure of demo readmes.

yFiles for Java 3.0.0.1 – Changes Since 3.0

Demos and Tutorials

  • Added new demo layout.LayoutStylesDemo that presents all major layout algorithms in an easily explorable and configurable manner.
  • Added new demo viewer.svgimageexport.SVGImageExportDemo that shows how to export the contents of a GraphComponent to SVG.
  • Added new demo viewer.pdfimageexport.PDFImageExportDemo that shows how to export the contents of a GraphComponent to PDF, EPS and EMF.
  • Added new demo viewer.svgnodestyle.SVGNodeStyleDemo that shows how to use SVG for node visualization.
  • Added new demo bpmn.editor.BPMNEditorDemo with corresponding graph element styles and a customized layout algorithm that demonstrates how to use yFiles for BPMN applications
  • GraphViewerDemo: Shift click on a node in the movie graph opens now a related link in the default browser (as already stated by the graph's description).

Improvements

Viewer

  • CanvasComponent: Added an event FitContentViewMarginsChanged that gets invoked when the propery #FitContentViewMargins has been changed.

Documentation Viewer

  • Method parameters are shown in search results and quick navigation popups.
  • Default properties are listed in a separate member section.
  • The documentation viewer can be used offline by running bower install and opening index-offline.html.
  • Fixed links to package documentation pages.

Bugfixes

Viewer

  • Property CanvasComponent#FitContentViewMargins is now initialized to (10,10,10,10) as mentioned in its documentation.
  • The SerializationVisibility annotation as well as the SerializationVisibilityType enum that are used to customize the serialization behavior of properties are now public to work properly.
  • Renaming FlagsEnum members with GraphML annotations did not work.
  • CollapsibleNodeStyleDecorator didn't handle the hit testing correctly when different button sizes for the collapsed and expanded state were used.
  • NodeStyleLabelStyleAdapter sometimes produced a NullPointerException during rendering.
  • NodeStylePortStyleAdapter didn't work well together with AbstractComponentNodeStyle as inner style.
  • The AutoCleanupEnabled property of PortDefaults wasn't serialized correctly as 'AutoCleanup' due to a missing GraphML rename.
  • Port location model parameters created with GenericPortLocationModel weren't serialized correctly.
  • ITable#setStyle(ILabel, ILabelStyle) and ITable#setLabelModelParameter ignored the provided style resp. label model parameter.

Layout

  • SeriesParallelLayout: Fixed possible NullPointerException when handling graphs with group nodes.
  • ParallelEdgeLayout: Fixed bug that caused wrong edge port coordinates.
  • SeriesParallelLayout: Fixed violations of the minimum first and last segment length and self-crossings of octilinear edges.
  • SeriesParallelLayout: Fixed bug that caused node-to-node or node-to-edge overlaps in the case where the graph contained group nodes and node/edge labels.
  • HierarchicLayout: Fixed bug that caused critical edges to not be aligned (see CRITICAL_EDGE_PRIORITY_DPKEY).
  • BusRouter: Fixed rare IllegalStateException caused by non-orthogonal edge segments.
  • TreeLayout: Fixed bug that occurs when edges with single port constraints are reversed during the layout.
  • Polyline.EdgeRouter: Fixed possible NullPointerException that may appear if a specified PortCandidate has multiple directions.
  • OrganicLayout: Fixed a bug that may occur when using OrganicLayout with RecursiveGroupLayout and LayoutMultiplexer.

Incompatible Changes

Changes in Default Behavior

Viewer

  • FlagsEnum members now respect GraphML annotations for renaming. Such members can't be read back in prior versions of the library. Reading older files with the current version still works.

yFiles for Java 3.0

This is the initial release of the 3.0 series that brings a modernized API, many new or improved library features and support for current Java language features.

Please see the Developer's Guide for migration instructions from yFiles for Java 2.x