yFiles for Java (Swing) 2.x — Changelog
Skip 2.x — Use the modern 3.x line of yFiles for Java (Swing)!
or higher
Beginning with version 3.0, the yFiles for Java (Swing) diagramming library features a brand-new, modern API which requires Java 8. This API is mature and provides many new features that are not available out-of-the-box in the 2.x line. It also provides the functionality of the ySVG, yExport and yBPMN package as source code application, therefore the extension packages are no longer required.
We recommend to start development with the next-generation yFiles for Java in new Java Swing projects.
Especially in projects that don't need to support legacy Java versions before Java 8, this
is the recommended way to realize your application's diagram visualization part.
This file documents the feature enhancements and API changes to previous yFiles versions.
yFiles 2.18 - Changes Since 2.17
New Features
Layout
- Added new scope SCOPE_MAINLY_SUBSET_GEOMETRIC for the organic layout algorithm. In addition to the actual subset nodes, this scope may to some degree move nodes that are geometrically close to one of the nodes in the actual subset. The existing scope SCOPE_MAINLY_SUBSET is similar, but it does determine the closeness of other nodes by using the graph structure and not the current geometry (i.e. location).
- The SmartOrganicLayouter has a new clustering policy property, which allows to specify the clustering algorithm that is applied (if any). Three clustering algorithms, namely louvain modularity, edge betweenness and label propagation are offered. See setClusteringPolicy. Previously, the automatic clustering was always based on edge betweenness. By default, the automatic clustering is disabled (CLUSTERING_POLICY_NONE).
- The SmartOrganicLayouter now allows to define node types that control the detection of substructures (e.g. stars, parallel structures). When types are defined, only nodes of the same type can form a substructure. To define types, register a data provider with the graph with key NODE_TYPE_DPKEY. For star-like and parallel substructures, it is also possible to have a single substructure with nodes of different types, see properties setParallelSubstructureTypeSeparationEnabled and setStarSubstructureTypeSeparationEnabled. The algorithm still tries to highlight the different types by, e.g., placing nodes of the same type closer together or on the same circle.
- The OrthogonalLayouter and DirectedOrthogonalLayouter now allow to define node types that control the detection of substructures (i.e. trees, chains, cycles). When types are defined, only nodes of the same type can form a substructure. To define types, register a data provider with the graph with key NODE_TYPE_DPKEY.
- The GenericTreeLayouter and TreeLayouter now support node types. The types influence the ordering of child nodes and the subtrees rooted at them such that nodes of the same type are preferably placed next to each other. Node types are a weak criterion, i.e., if the ordering is given by other constraints, these are prioritized. To define types, register a data provider with the graph with key NODE_TYPE_DPKEY.
- The IncrementalHierarchicLayouter now supports node types. The types influence the ordering of nodes within their layers as a subordinate optimization criteria. More precisely, nodes of the same type are more likely to be placed next to each other if this does not violate with other constraints.
- Added NodeTypeAwareSequencer that can be specified for the SingleCycleLayouter and ensures that the nodes of a circle are separated by type.
- The ComponentLayouter now supports node types. The types influence the arrangement and ordering of the the components such that components consisting mostly of nodes of the same type are put close to other components consisting of nodes of that type. To define types, register a data provider with the graph with key NODE_TYPE_DPKEY.
-
EdgeRouter, BusRouter and
ChannelEdgeRouter: Added a feature that automatically determines whether or not a new path
should be calculated for a certain edge. The feature is controlled via the new routing policy properties, see
EdgeLayoutDescriptor.setRoutingPolicy,
BusDescriptor.setRoutingPolicy and
ChannelEdgeRouter.setRoutingPolicy respectively.
The decision is based on the quality of the existing routes - edges with strict violations
of the routing style or that intersect other elements will be selected for routing.
- ROUTING_POLICY_ALWAYS: old and default behavior, a new route is calculated in any case
- ROUTING_POLICY_PATH_AS_NEEDED: automatic selection - once selected, the existing path of the route is not further considered when computing the new route.
- ROUTING_POLICY_SEGMENTS_AS_NEEDED: automatic selection and an emphasis on preserving the existing path as much as possible. Only the required segments are changed. This policy is not supported by BusRouter and ChannelEdgeRouter.
- EdgeRouter: Added the new penalty property setSketchViolationPenalty, which defines the cost for a deviation from the original edge path if the new routing policy is set to ROUTING_POLICY_SEGMENTS_AS_NEEDED.
- PartialLayouter: Added new property setMovingFixedElementsAllowed that specifies whether or not the algorithm may move fixed elements. This often yields a better layout quality even though the preservation of the mental map declines because the fixed elements can change their position.
Algorithms
- Added methods to find the parallel edges in a graph. See findParallelEdges and findParallelEdges.
Improvements
Layout
- TreeLayouter now supports specifying a minimum first/last segment length for the orthogonal routing style.
-
Improved the quality of the curved edge routing was improved with respect to various aspects and such that it
yields aesthetically nicer curves. To further configure the curve routing, the following settings were added.
- CurveShortcutsAllowed: if shortcuts are allowed, curves can become smoother and more direct but may violate other constraints (e.g. edge-to-edge distance). Available for IncrementalHierarchicLayouter (isCurveShortcutsAllowed), EdgeRouter (isCurveShortcutsAllowed), and CurveRoutingStage (isCurveShortcutsAllowed).
- CurveUTurnSymmetry: allows to specify the symmetry preference for u-turns (180 degree turns) of curved routes. The default is zero so that results are equal to previous results. Available for IncrementalHierarchicLayouter (getCurveUTurnSymmetry), EdgeRouter (getCurveUTurnSymmetry), and CurveRoutingStage (getCurveUTurnSymmetry).
- EdgeRouter: Improved the quality of the routing when the maximum duration is highly restricted or the algorithm is aborted via AbortHandler (i.e. it operates in the fastest possible mode). The quality improvements mainly affect cases with fixed port locations.
- EdgeRouter: Reduced the number of cases where it is not possible to insert an octilinear (i.e. diagonal) segment after/before the first/last segment of a route for edges with octilinear routing style.
-
EdgeRouter: Added new penalty properties
setAdjacentEdgeCrossingPenalty and
setSelfCrossingPenalty. They allow to define the costs for
crossings between adjacent edges and for crossings between line segments that actually belong to the same edge,
respectively. Previously, all crossings were covered by the existing property
setEdgeCrossingPenalty.
- By default, now, crossings of adjacent edges are more expensive than normal ones and self-crossings are the most expensive.
- Furthermore, the default values of properties setEdgeLengthPenalty and setGroupNodeCrossingPenalty were increased to obtain more balanced edge routing results.
- The scope SCOPE_MAINLY_SUBSET of the organic layout now works together with more other features and constraints. Previously, it e.g. had very little or no effect when a partition grid or an output restriction was defined.
- SmartOrganicLayouter: For substructures, the layout algorithm now often produces more compact results and comes with an improved placement of degree-one nodes.
-
SmartOrganicLayouter: For substructures, it is now possible to explicitly specify whether
structures are allowed to be nested or not. Previously, substructures were allowed to be nested by default.
New styles were added while the old styles now will not generated nested structures anymore.
- Star structures offer the new styles STAR_SUBSTRUCTURE_STYLE_RADIAL_NESTED and STAR_SUBSTRUCTURE_STYLE_CIRCULAR_NESTED.
- CHAIN_SUBSTRUCTURE_STYLE_RECTANGULAR_NESTED and CHAIN_SUBSTRUCTURE_STYLE_STRAIGHT_LINE_NESTED are the new styles for nested chains.
- CYCLE_SUBSTRUCTURE_STYLE_CIRCULAR_NESTED is the new style for nested cycles.
- SmartOrganicLayouter: It is now possible to define the minimum sizes of substructures (stars, chains, cycles and parallel structures). Structures of smaller size are not handled as a substructure. For each type of structure a new property was added: setStarSubstructureSize, setChainSubstructureSize, setCycleSubstructureSize and setParallelSubstructureSize.
- IncrementalHierarchicLayouter: Improved choice of port candidate for edges with multiple candidates. This new strategy often leads to less bends.
- IncrementalHierarchicLayouter: the paths of edges that cross borders of partition grid columns are now shorter in cases where there are no other obvious constraints that require the edge to be longer. This holds for the default vertical layout orientation; for a horizontal orientation, edges that cross borders of rows are affected by this improvement.
- ParallelEdgeLayouter: It is now possible to retrieve the parallel edges that the stage routed and that were hidden during the core layout. Register a data acceptor with the new key ROUTED_PARALLEL_EDGES_DPKEY and the parallel, non-leading edges will be marked.
- SubgraphLayouter: It is now possible to define which edges must be included/excluded in the subgraph. Previously, only nodes could be specified. To define which edges must be included, register a data provider with the new key SUBGRAPH_EDGES_DPKEY. By default, i.e., if now provider is registered, all edges are included.
Bugfixes
Layout
-
IncrementalHierarchicLayouter and SimplexNodePlacer:
Fixed a possible
NullPointerException
that may be caused by an internal overflow for very wide layouts. - IncrementalHierarchicLayouter: Fixed a bug that led to cases where the halos of group nodes (see NodeHalo) were not considered correctly when a partition grid was defined.
- IncrementalHierarchicLayouter: Fixed a bug that caused misplaced edge labels for some rare cases with grouped edges.
- IncrementalHierarchicLayouter: Fixed a bug that could cause node-edge overlaps for some rare cases with grouped edges.
- IncrementalHierarchicLayouter: Fixed a bug that could cause non-orthogonal edge segments of same-layer edges for some cases in conjunction with integrated edge labeling and edge labels placed at the ports (PLACE_AT_SOURCE_PORT or PLACE_AT_TARGET_PORT).
- IncrementalHierarchicLayouter: Fixed a bug that caused that PortCandidates at same-layer edge were not correctly considered when edges additionally have labels that must be placed at the port (PLACE_AT_SOURCE_PORT or PLACE_AT_TARGET_PORT).
- IncrementalHierarchicLayouter: Fixed a bug that may have caused a broken edge grouping structure for short edges with the same source and target group id (see SOURCE_GROUPID_KEY and TARGET_GROUPID_KEY).
- IncrementalHierarchicLayouter: Fixed a bug that in some cases caused overlaps between large node labels and edge segments of other edges.
- IncrementalHierarchicLayouter: Fixed a bug that could cause overlaps between elements of a sub-component (see SUB_COMPONENT_ID_DPKEY) and edges that are not part of the component.
- IncrementalHierarchicLayouter: Fixed a bug which caused that an edge label's PreferredPlacementDescriptor was not correctly considered when additionally having edge groupings defined. It could, for example, happen that the edge label was placed on the wrong side of the edge.
- IncrementalHierarchicLayouter: Fixed a bug that sometimes caused violations of the uniform port distribution at group nodes (if enabled, see UNIFORM_PORT_ASSIGNMENT_GROUPS_DPKEY).
- IncrementalHierarchicLayouter: Fixed a bug that sometimes caused superfluous port overlaps if there are edges with strong port constraints.
-
IncrementalHierarchicLayouter: Fixed a possible
ArrayIndexOutOfBoundsException
if there are sub-components (see SUB_COMPONENT_ID_DPKEY) and curved edge routes. - IncrementalHierarchicLayouter: Fixed a bug that caused edge crossings when using PortCandidates with layout orientations other than TOP_TO_BOTTOM.
- IncrementalHierarchicLayouter: Fixed a bug that sometimes causes less compact results for grouped input graphs if the node compaction is enabled (see setNodeCompactionEnabled).
- IncrementalHierarchicLayouter: Fixed a bug that in some cases lead to results where the specified critical edges (see CRITICAL_EDGE_DPKEY) were not considered correctly if the input graph contained grouped edges (see SOURCE_GROUPID_KEY and TARGET_GROUPID_KEY).
- IncrementalHierarchicLayouter: Fixed a bug that sometimes lead to results where the specified port groups were not considered correctly if there were either critical edges (see CRITICAL_EDGE_DPKEY) or property setEdgeStraighteningOptimizationEnabled was enabled.
- IncrementalHierarchicLayouter: Fixed a bug that sometimes lead to overlapping group nodes for input graphs with PartitionGrid.
- IncrementalHierarchicLayouter: Fixed a bug that caused a long runtime for large graphs. The algorithm now adheres more closely to its maximum duration and its AbortHandler.
- IncrementalHierarchicLayouter: Improved results for same-layer edges with multiple available port candidates. Previously, the chosen candidate may have led to superfluous back-loops.
- IncrementalHierarchicLayouter: Improved time for sequencing phase for large graphs with sequence constraints.
- IncrementalHierarchicLayouter: Fixed a possible infinite looping issue in the incremental layout mode for input graphs with layer constraints that specify that a node should be placed in the topmost/bottommost layer.
- IncrementalHierarchicLayouter: Fixed a bug that could cause a violation of the backloop routing style (see setBackloopRoutingEnabled) if there are critical edges (see see CRITICAL_EDGE_DPKEY).
- IncrementalHierarchicLayouter: Fixed a bug that sometimes lead to a violation of the specified minimum length for edges incident to group nodes.
- Curved routing feature of IncrementalHierarchicLayouter, EdgeRouter and CurveRoutingStage: Fixed a bug that caused violations of the minimum distance to nodes and sometimes node-edge intersections.
- IncrementalHierarchicLayouter: Fixed a bug that lead to unnecessary edge crossings between self-loops at nodes with a large number of self-loop edges.
- Curved routing feature of IncrementalHierarchicLayouter, EdgeRouter and CurveRoutingStage: Fixed a bug that could cause a self-crossing for edges connected at group nodes and with connection style ORGANIC.
- IncrementalHierarchicLayouter: Fixed a bug that in some cases when using the sub-components feature (see SUB_COMPONENT_ID_DPKEY) induced unnecessary spacing between sub-components and other elements, thus, leading to less compact results.
- OrthogonalLayouter and DirectedOrthogonalLayouter: Fixed a bug that in rare cases generated non-orthogonal edges that are not connected to their source node anymore. Only happened when preferring parallel edges by enabling property isParallelRoutesPreferenceEnabled.
-
OrthogonalLayouter, DirectedOrthogonalLayouter
and OrthogonalGroupLayouter: Fixed a rare
RuntimeException
that could occur if the input graph contained parallel edges and property setParallelRoutesPreferenceEnabled was enabled. - OrthogonalGroupLayouter: Fixed an issue that caused the specified minimum group size (see key MINIMUM_NODE_SIZE_DPKEY) to be always enlarged by the groups' insets (see key GROUP_NODE_INSETS_DPKEY). Actually, the minimum size should include the insets.
- SmartOrganicLayouter: Fixed an issue that may have led to a wrong assignment of nodes to the associated partition grid cells (see PartitionGrid) if the substructure detection is enabled.
- SmartOrganicLayouter: Fixed an issue that may have led to fixed content or fixed bounds group violations if the substructure detection is enabled (see GROUP_NODE_MODE_DATA).
- SmartOrganicLayouter: Fixed an issue that caused that chain substructures were not always correctly detected if there are nodes of different types (NODE_TYPE_DPKEY).
- SmartOrganicLayouter: Fixed a bug that could cause bad layout results if auto-clustering is enabled (see setAutoClusteringEnabled) and the group node mode is GROUP_NODE_MODE_FIX_BOUNDS or GROUP_NODE_MODE_FIX_CONTENTS.
-
SmartOrganicLayouter: Fixed a bug that caused a
NullPointerException
when running the algorithm with a PartitionGrid, group nodes and such that the ids of the group nodes (see provider key NODE_ID_DPKEY) were defined using a DataProvider that cannot handle null as argument to its get method. - SmartOrganicLayouter and OrganicLayouter: Fixed a bug that caused undesired layout side-effects (e.g. fixed nodes that are moved) when running the organic layout with group nodes while having a data provider registered with key GROUP_NODE_LAYOUTER_DPKEY.
- SmartOrganicLayouter and OrganicLayouter: Fixed an internal integer overflow that may cause an early exit and, thus, poor layout results for very large input graphs.
- SmartOrganicLayouter: Fixed a bug that may have caused broken routes of self-loops at group nodes if the scope is not equal to SCOPE_ALL.
- PartialLayouter: Fixed an issue that sometimes caused broken edge routes if property setMovingFixedElementsAllowed is enabled.
- ClearAreaLayouter: Fixed an issue that sometimes caused non-cleared areas if property setClearAreaStrategy is set to STRATEGY_PRESERVE_SHAPES or STRATEGY_PRESERVE_SHAPES_UNIFORM.
- ClearAreaLayouter: Fixed an issue that sometimes caused broken edge routes if property setEdgeRoutingStrategy is set to EDGE_ROUTING_STRATEGY_STRAIGHTLINE.
- ClearAreaLayouter: Fixed a rare issue that caused violations of the initial partition grid assignment.
-
ClearAreaLayouter: Fixed a
NullPointerException
that could appear in scenarios where the same algorithm instance was first applied to a graph with a PartitionGrid and later to a graph without grid. -
ClearAreaLayouter and FillAreaLayouter:
Fixed a possible
NullPointerException
that could appear for graphs with edge labels if property setEdgeLabelConsiderationEnabled was enabled. - ClearAreaLayouter: Fixed a bug that sometimes lead to results where node labels intersect with the specified area that must be cleared.
-
CircularLayouter: Fixed a bug that caused a
NullPointerException
when applying the algorithm with edge bundling and node types (see NodeTypeAwareSequencer and NODE_TYPE_DPKEY) to a graph that contains parallel edges. -
CircularLayouter: Fixed an issue that may have caused node overlaps if
property setMinimalNodeDistance is set to
0
. - CircularLayouter: Fixed an issue that sometimes caused node label overlaps for graphs when property setPlaceChildrenOnCommonRadiusEnabled is disabled.
- RadialLayouter: Fixed an issue that caused a long runtime for large tree graphs.
- GenericTreeLayouter: Fixed a bug that sometimes lead to overlapping elements and halo violations if the tree contained group nodes.
- RecursiveGroupLayouter: Fixed a bug leading to invisible/ignored edges and, thus, to broken edge routes for setups that use both recursive and non-recursive group nodes (see DataProvider key GROUP_NODE_LAYOUTER_DPKEY).
-
IsolatedGroupComponentLayouter: Fixed an issue that caused too large group nodes
if the specified grid spacing is
0
. - TabularLayouter: Fixed a bug that the algorithm did not properly assign the node to a partition cell and did not compute the position/width/height of the grid row/columns in the case that the input graph contained a single node only.
- TabularLayouter: Fixed a bug that the algorithm used incorrect bounding boxes for considered node labels so that the resulting row/column sizes might have been wrong.
- EdgeRouter: Fixed an issue that direct content edges do not work together with PortCandidateSets at group nodes.
- EdgeRouter: Fixed an issue that may have caused routing artifacts if there were edges with curved routing style as well as labels, and the integrated edge labeling was disabled (see isIntegratedEdgeLabelingEnabled).
- EdgeRouter: Fixed a bug that in rare cases caused that edges contained self-crossings which the algorithm failed to eliminate.
- EdgeRouter: Fixed a bug that caused that edge grouping constraints where ignored when the maximum duration was highly restricted or the router was stopped using the AbortHandler. The algorithm now still tries to use the same port for grouped edges while previously grouping was mostly ignored once the time limit was reached.
- EdgeRouter: Fixed an issue that could cause a long runtime even though the maximum duration was highly restricted or the router was stopped using the AbortHandler.
- EdgeRouter: Fixed a problem where some edges of a bus with fixed edges do not use the given ports.
- EdgeRouter: Fixed an issue that sometimes led to strange routes for edges incident to a fixed inner port of a group node when the routing algorithm has restricted maximum duration.
- EdgeRouter and PolylineLayoutStage: Fixed a rare issue that could lead to broken routes for edges with polyline segments.
- EdgeRouter: Fixed an issue regarding the monotonic path restriction (see setMonotonicPathRestriction) which sometimes caused unnecessary detours in the resulting routes.
-
EdgeRouter and RemoveColinearBendsStage:
Fixed a rare
NullPointerException
that may be caused by a specific kind of collinear bends. - EdgeRouter: Fixed a bug that the maximum duration (see getMaximumDuration) and the AbortHandler were ignored when the octilinear routing style is selected.
- BusRouter: Fixed some bad results where the internal bus placement lead to unsuitable edge routes.
- OrganicEdgeRouter: The property setUsingBends now obeys its definition and actually keeps the absolute coordinates of the existing bends.
- ParallelEdgeLayouter: Fixed a bug that caused strange non-parallel edge routes if property setJoinEndsEnabled was enabled.
- PolylineLayoutStage: The stage now considers a registered AbortHandler instance so that it is possible to terminate early. Previously, the stage ignored it.
- CurveRoutingStage: Fixed a bug which caused that the minimum node-edge distance specified with property getMinimumNodeToEdgeDistance was not correctly considered.
- SALabeling and GreedyMISLabeling: Fixed a possible exception that may appear for edge labels with preferred placement descriptor when property setPlaceEdgeLabels is disabled.
- SALabeling and GreedyMISLabeling: Fixed a bug that sometimes caused superfluous label overlaps if property setRemoveNodeOverlaps or setRemoveEdgeOverlaps is enabled.
Viewer
- DropSupport: Fixed drag and drop behavior when using one DropSupport instance for multiple Graph2DView instances. When dragging data over one view into another view, all drag and drop events were incorrectly delivered to the first view in this case.
-
MoveLabelMode:
Fixed
NullPointerException
that occurs when dragging a label whose model does not have any candidates.
Incompatible Changes
API Changes
- setAutoClusteringEnabled is now deprecated. It is replaced by the new property setClusteringPolicy. To disable the clustering specify CLUSTERING_POLICY_NONE. To enable it and use the same algorithm as before, specify CLUSTERING_POLICY_EDGE_BETWEENNESS.
Behavior Changes
-
IncrementalHierarchicLayouter with polyline edge routing:
The default value of property setMinimumSlope
was changed from
0.3
to0.2
which makes the sloped segments less steep and the overall results more compact. -
The constructors in the following classes now throw an
IllegalArgumentException
when providing an unexpected/invalidnull
parameter: AssistantPlacer, BusPlacer, DelegatingNodePlacer, GridNodePlacer, LayeredNodePlacer, LeftRightPlacer, SimpleNodePlacer, DoubleLinePlacer, AbstractRotatableNodePlacer and ConstraintIncrementalLayerer. Even though previously thenull
argument was allowed, the application would have failed when running the respective layout algorithm. -
The following properties no longer allow to specify
null
as value but now throw anIllegalArgumentException
when calling the setter. Note that previously, the respective algorithm would have crashed later, upon invocation of the layout.- DoubleLinePlacer.setRootAlignment
- LayeredNodePlacer.setRootAlignment
- GridNodePlacer.setRootAlignment
- SimpleNodePlacer.setRootAlignment
- AssistantPlacer.setChildNodePlacer
- TreeComponentLayouter setTreeComponentCoreLayouter
- EdgeLayoutDescriptor.setRoutingStyle
- NodeLayoutDescriptor.setGridReference
- SwimLaneDescriptor.setClientObject
-
TreeLayouter:
- The default value of property setMinimalLayerDistance was changed from
40.0
to20.0
. - The default value of property setBusAlignment was changed from
0.3
to0.5
.
0.0
will neutralize their influence on the result. - The default value of property setMinimalLayerDistance was changed from
-
GenericTreeLayouter with DefaultNodePlacer:
-
The default values of properties setHorizontalDistance
and setVerticalDistance were changed from
40.0
to20.0
. -
The default values of properties setMinFirstSegmentLength
and setMinLastSegmentLength were changed from
0.0
to20.0
.
-
The default values of properties setHorizontalDistance
and setVerticalDistance were changed from
-
GenericTreeLayouter with CompactNodePlacer:
-
The default values of properties setHorizontalDistance
and setVerticalDistance were changed from
40.0
to20.0
. -
The default values of properties setMinimumFirstSegmentLength
and setMinimumLastSegmentLength were changed from
10.0
to20.0
.
-
The default values of properties setHorizontalDistance
and setVerticalDistance were changed from
-
GenericTreeLayouter with LayeredNodePlacer:
The default value of property setBusAlignment was changed from
0.3
to0.5
. - SmartOrganicLayouter: The way edge grouping influences the layout of certain substructures has changed. Structures are not split up into several separate structures anymore when edges of nodes in the structure have different group ids. Now, the new node types can be used to split up structures (using the key NODE_TYPE_DPKEY). If a structure contains different edge groups, the grouping is properly considered and may influence the sorting of elements within the structure. Affected substructure styles are STAR_SUBSTRUCTURE_STYLE_SEPARATED_RADIAL, PARALLEL_SUBSTRUCTURE_STYLE_RADIAL, PARALLEL_SUBSTRUCTURE_STYLE_STRAIGHT_LINE, and PARALLEL_SUBSTRUCTURE_STYLE_RECTANGULAR.
- SmartOrganicLayouter: The substructure styles STAR_SUBSTRUCTURE_STYLE_RADIAL, STAR_SUBSTRUCTURE_STYLE_CIRCULAR, CHAIN_SUBSTRUCTURE_STYLE_RECTANGULAR, CHAIN_SUBSTRUCTURE_STYLE_STRAIGHT_LINE, and CIRCULAR_SUBSTRUCTURE_STYLE_CIRCULAR do no longer allow that the detected substructures are nested inside other substructures. To get the old behavior and allow nesting, new style values were added (e.g. STAR_SUBSTRUCTURE_STYLE_RADIAL_NESTED).
- OrganicEdgeRouter: The property setUsingBends now obeys its definition and actually keeps the coordinates of the existing bends. The new property setExistingBendsConsiderationEnabled was introduced and offers the same behavior as the former property previously did. Existing bends are considered, but their absolute coordinates are not kept.
yFiles 2.17 - Changes Since 2.16
New Features
Layout
- Added ClearAreaLayouter that can clear a certain area in an existing layout by moving elements. It is suitable if the rest of the layout should not change much but some free space is required, e.g., because new elements were inserted.
- Added FillAreaLayouter than can fill a specified area in an existing layout by moving elements into or towards it. It can make layouts around the specified area more compact and is suitable if, e.g., elements were removed from the graph.
- Added layout stage CurveRoutingStage. It replaces polyline edge paths with curved segments using cubic bezier splines and provides a generic way to produce layouts with curved edges.
- Added layout stage EdgeBundlingStage that offers edge bundling for general undirected graphs. Bundling together multiple edges means that their common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability of graph drawings with a high number of edges that connect a comparably small number of nodes.
- IncrementalHierarchicLayouter: Added routing style that produces curved edge paths consisting of cubic bezier splines, see EDGE_STYLE_CURVED.
- DefaultPortAllocator: Added property setFixedPortConsiderationEnabled for specifying whether edges with strong port constraints or fixed port candidates should be considered during the port assignment. Previously, such edges were ignored which could lead to intersections with the ports of the other edges. This new feature is enabled by default.
- CircularLayouter: The algorithm now supports exterior edges that are routed around the exterior of the circle as smooth arcs, see the new edge routing property setEdgeRoutingPolicy.
- RadialLayouter: The algorithm now supports a user-defined layer/circle assignment strategy, see LAYERING_STRATEGY_USER_DEFINED and LAYER_ID_DPKEY.
- EdgeRouter: Added property setRoutingStyle for specifying an individual routing style for each edge. Furthermore, new properties setMaximumOctilinearSegmentRatio and setPreferredOctilinearSegmentLength provide means to configure the octilinear routing style.
- EdgeRouter: Added routing style that produces curved edge paths consisting of cubic bezier splines, see EDGE_STYLE_CURVED.
Algorithms
- Added class NodeAggregation which represents an algorithm that tries to intelligently aggregate nodes of (large) input graphs and does not require that the user is familiar with specific clustering/aggregation algorithms.
- Added class Substructures that provides methods to detect chains, cliques, cycles, stars, and sub-trees.
- Groups: Added method getClusteringCoefficient that computes the local clustering coefficient for each node as well as the average clustering coefficient.
- Groups: Added methods to detect communities in the input graph using the well-known louvain modularity approach, see louvainModularity et al.
- Groups: Added methods to detect communities in the input graph using the label propagation algorithm, see labelPropagation et al.
- Groups: Added methods to compute the modularity of a graph, see getModularity et al.
- Centrality: Added methods to compute the eigenvector centrality for each node in an undirected graph, see eigenvectorCentrality et al.
- Centrality: Added methods to compute the page rank of nodes, see pageRank et al.
- GraphConnectivity: Added methods to compute the so-called k-cores of an undirected graph, see kCore et al.
- GraphChecker: Added method getAverageDegree to compute the average degree in a graph.
- GraphChecker: Added method getAverageWeightedDegree to compute the average weighted degree in a graph.
- GraphChecker: Added method getDiameter to compute the diameter of a graph.
- GraphChecker: Added method getDensity to compute the several density of a graph.
- Transitivity: Added method transitiveEdges that creates the transitive edges which connect the visible nodes in an input graph.
Improvements
Layout
- ComponentLayouter: Packed layout styles like STYLE_PACKED_RECTANGLE or STYLE_PACKED_CIRCLE now take node and edge labels into account when arranging components. Previously, labels could overlap other elements when using packed styles.
- PartialLayouter now produces more stable results if it is applied multiple times to the same input graph and setPositioningStrategy is set to SUBGRAPH_POSITIONING_STRATEGY_FROM_SKETCH.
- GroupNodeHider: Added property setEdgePathResettingEnabled for specifying whether or not the stage resets the layout of edges incident to group nodes.
- EdgeRouter: The algorithm now adheres more closely to its minimum edge-to-edge distance settings if there is a strongly restricted maximum duration or if the algorithm gets stopped via stop.
- EdgeRouter: Improved support for early exits due to a restricted maximum duration. The routing algorithm now reacts more sensibly when the specified duration is reached.
Viewer
- TableLayoutConfigurator: Added method getAnchorNode to provide means for configuring table nodes that are not necessarily top-level nodes in the root graph of a graph hierarchy.
I/O
-
GraphMLIOHandler, XGMLIOHandler, and XmlXslIOHandler:
These I/O handlers have been improved to prevent external entity injection
(and in the case of XmlXslIOHandler code execution injection from
stylesheets) attacks by default.
To prevent these attacks, the aforementioned handlers disallow DTD declarations in read XML documents. Disallowing DTD declarations requires enabling special features of Java's XML processor implementations. These features only work reliably for Java 7 and newer. For older versions of Java or if the DTDs are required, the following solutions are recommended:- GraphMLIOHandler
- Client code should parse XML documents in a secure way with its choice of XML processor and pass the resulting org.w3c.dom.Document instance to the I/O handler's read method.
- XGMLIOHandler
- Client code should overwrite method read to instantiate a custom XGMLTokenizer implementation that parses the given source's contents in a secure way.
- XmlXslIOHandler
- Client code should parse XML documents in a secure way with its choice of XML processor, transform the resulting org.w3c.dom.Document instances and pass the transformed org.w3c.dom.Document instances to read.
- TGFIOHandler now supports '#' characters in label texts. A '#' character is now recognized as delimiter between node and edge sections only if the '#' is placed on a line of its own.
Bugfixes
Layout
-
IncrementalHierarchicLayouter: Fixed an
IllegalArgumentException
that could be triggered when isGroupCompactionEnabled was enabled in conjunction with layering constraints and/or group nodes marked as incremental. - IncrementalHierarchicLayouter: Fixed a bug in conjunction with bus structures which could cause edges connecting to group nodes not being routed but hidden from the layout graph. As a result, other layout stages (e.g. ComponentLayouter) could fail with an exception.
-
IncrementalHierarchicLayouter: Fixed a possible
NullPointerException
that could occur with bus structures (see BusDescriptor) in conjunction with undirected edges. -
IncrementalHierarchicLayouter: Fixed a possible
NullPointerException
that could occur with bus structures (see BusDescriptor) in conjunction with layering constraints. - IncrementalHierarchicLayouter: Fixed a problem which caused the specified maximum number of nodes before/after the bus (see BusDescriptor) to be violated for single line (layer) buses. In addition, for multiple layer buses, the distance between nodes and the vertical bus edge was too large (the distance should depend on the specified node to edge distance).
- IncrementalHierarchicLayouter: Fixed a bug that could cause unnecessary (double) edge crossings when executed in incremental layout mode with edge grouping and alternative group bounds.
- IncrementalHierarchicLayouter: Reduced number of superfluous bends of grouped edges for graphs with a PartitionGrid.
- IncrementalHierarchicLayouter: Fixed a bug that in some cases caused a violation of the minimum first or last segment length (mostly relevant when the minimum length values were rather large).
-
IncrementalHierarchicLayouter: Fixed an
IllegalArgumentException
that could be triggered for bus structures (see BusDescriptor) with edges for which a recursive edge style was set (see setRecursiveEdgeStyle). - SmartOrganicLayouter: Fixed an exception that could occur when a partition grid was defined and at the same time a subset scope was specified (e.g. SCOPE_SUBSET) such that all nodes of the graph were selected.
- SmartOrganicLayouter: Fixed a problem that caused superfluous node overlaps when the scope was set to SCOPE_MAINLY_SUBSET and property setNodeOverlapsAllowed was disabled.
-
OrthogonalLayouter,
OrthogonalGroupLayouter, and DirectedOrthogonalLayouter:
Fixed a possible
IllegalArgumentException
that could occur if the input graph contained parallel edges and property setParallelRoutesPreferenceEnabled was enabled. - AbstractNodePlacer: Fixed placeSubtree to clear its internal caches, especially the cached graph. Previously, holding onto a node placer instance could lead to subtle memory leaks.
-
ARTreeLayouter: Fixed a
StackOverflowError
that could occur for large chain graphs. -
BalloonLayouter: Fixed a
StackOverflowError
that could occur for graphs containing very long chains. - PartialLayouter now transfers its getMaximalDuration to the internally used edge routing algorithm. This means that when the partial layout has a restricted running time, the routing part will be restricted, too. Previously, edge routing could still run unrestricted.
-
RecursiveGroupLayouter:
Fixed a bug resulting in child nodes not being moved along with their parent group nodes.
This could happen if the core layout algorithm was
null
but an individual layout algorithm was specified for arranging said group nodes. -
FamilyTreeLayouter: Fixed a bug that could cause a
StackOverflowError
or non-orthogonal edge routes when having cycles in the tree structure, e.g., induced by a family founded by parent and (step-)child. -
EdgeRouter: Fixed a
NullPointerException
that could occur if the input contained buses (see BusDescriptor). -
EdgeRouter: Fixed a possible
NullPointerException
that could occur for some rare cases with fixed grouped edges and octilinear paths. -
EdgeRouter: Fixed an
IllegalStateException
that could occur if the user specified buses with both fixed and non-fixed edges. -
EdgeRouter: Fixed a bug in conjunction with buses that contained both fixed and selected
edges (see BusDescriptor). It could trigger a
NullPointerException
when integrated labeling was enabled or lead to the misbehavior that a selected edge not part of the bus was not routed at all. - EdgeRouter: Fixed a bug that caused an available PortCandidate in a PortCandidateSet to be ignored by edges. This could happen when several candidates with capacity for a single edge were specified on the same node side.
- EdgeRouter: Fixed a bug which caused grouped edges sometimes to be not grouped together. This mainly appeared in conjunction with a large value for either minimum first or last segment length.
- EdgeRouter: Fixed a bug that in some cases caused unnecessary overlaps when the source or target node is overlapped by (several) label elements. Generally improved the ability of the router to deal with input that contains source/target nodes that are overlapped by other elements and are required to be crossed by an edge route.
- EdgeRouter: Fixed a bug that sometimes generated bad routing artifacts with edge grouping when non-affected (i.e. fixed) edges were grouped at both end points.
- EdgeRouter: Fixed a bug that caused edge labels overlapping with unrelated group nodes. This issue could appear when edge labels were placed by the routing algorithm, i.e. integrated edge labeling was enabled (see isIntegratedEdgeLabelingEnabled).
- EdgeRouter: Fixed a bug that caused the same fixed PortCandidate out of a PortCandidateSet to be chosen even though there was another, non-saturated candidate that could have been chosen instead. This could yield edge segment overlaps.
- EdgeRouter: Fixed a bug that in rare cases had the effect that shapes of non-affected, fixed edges were incorrectly parsed, which could lead to undesired effects like incorrect path cost calculation of affected edges.
- EdgeRouter: Fixed a bug that sometimes made the routing algorithm ignore port constraints/candidates due to incorrect path cost calculations.
- BusRouter: Fixed a bug that caused disconnected buses even though edges with the same bus Id were specified. This happened sometimes when fixed and non-fixed elements associated with the same bus were given.
- BusRouter: Fixed a bug that caused edges not to be routed when those edges were assigned to a bus with fixed edges (isFixed). This could happen if the ignored edge shared its source and target port with one or more fixed edges.
-
ParallelEdgeLayouter: Fixed a bug that occasionally caused a
NullPointerException
when having a large number of parallel edges and a leading edge with ports on the node border. - OrthogonalPatternEdgeRouter: Fixed a bug that caused duplicate points on the edge path when the minimum distance was set to zero. This could also lead to degenerated routing results when using the ChannelEdgeRouter with the mentioned pattern router class.
- OrthogonalSegmentDistributionStage does no longer crash when receiving input graphs with a very large edge count (greater than approximately 22000). Note that ChannelEdgeRouter is affected by this change too, because this router calls the stage by default.
- OrthogonalSegmentDistributionStage: Fixed problems caused when encountering zero-length segments in the input, that is, a duplicate edge path point. The stage could produce degenerated (e.g. very large or small) coordinates for edges containing such segments.
- SliderEdgeLabelModel: Fixed a bug that in some cases generated label candidate positions with invalid coordinate values (NaN values). This bug could also yield to an exception when running generic labeling algorithms (SALabeling or GreedyMISLabeling).
- BendConverter: Made the element processing order deterministic. The previously non-deterministic order in which elements were inserted and removed could lead to non-deterministic behavior for consecutive layout calculations.
Algorithms
-
Cycles: Fixed a
NullPointerException
in findCycleEdges that could appear when the input graph contained self-loops.
Viewer
- MultiplexingNodeEditor: Receiving a MOUSE_EXITED event now properly triggers stopEditing if no subordinate editor is active.
Modules
- TreeLayoutModule: The module no longer selects non-tree edges when those edges are routed orthogonally.
Incompatible Changes
API Changes
-
The following properties of class EdgeRouter are now deprecated:
- isPolylineRoutingEnabled is superseded by routing style EDGE_STYLE_OCTILINEAR that can be specified on the edge layout descriptor individually for each edge.
- setPreferredPolylineSegmentLength is superseded by the edge layout descriptor setting setPreferredOctilinearSegmentLength.
- setMaximumPolylineSegmentRatio is superseded by the edge layout descriptor setting setMaximumOctilinearSegmentRatio.
Behavior Changes
-
EdgeRouter: The return value of method
getPartition is now
null
after running the algorithm. It is only intended to be used during the algorithm's execution. Previously, its value was cached even though the documentation stated otherwise. -
GraphMLIOHandler, XGMLIOHandler, and XmlXslIOHandler:
These I/O handlers have been improved to prevent external entity injection
(and in the case of XmlXslIOHandler code execution injection from
stylesheets) attacks by default.
To prevent these attacks, the aforementioned handlers disallow DTD declarations in read XML documents. Disallowing DTD declarations requires enabling special features of Java's XML processor implementations. These features only work reliably for Java 7 and newer. For older versions of Java or if the DTDs are required, the following solutions are recommended:- GraphMLIOHandler
- Client code should parse XML documents in a secure way with its choice of XML processor and pass the resulting org.w3c.dom.Document instance to the I/O handler's read method.
- XGMLIOHandler
- Client code should overwrite method read to instantiate a custom XGMLTokenizer implementation that parses the given source's contents in a secure way.
- XmlXslIOHandler
- Client code should parse XML documents in a secure way with its choice of XML processor, transform the resulting org.w3c.dom.Document instances and pass the transformed org.w3c.dom.Document instances to read.
- TGFIOHandler now supports '#' characters in label texts. A '#' character is now recognized as delimiter between node and edge sections only if the '#' is placed on a line of its own.
yFiles 2.16 - Changes Since 2.15
New Features
Layout
- IncrementalHierarchicLayouter: Added support for the compact arrangement of bus-like substructures. The structures can be manually defined by means of the key BUS_DESCRIPTOR_DPKEY. The new BusDescriptor allows defining more settings for a specific bus structure.
- IncrementalHierarchicLayouter: Added new key EDGE_CROSSING_COST_DPKEY that allows to specify custom crossing costs for edges.
- IncrementalHierarchicLayouter: Added new key GROUP_BORDER_CROSSING_COST_DPKEY that allows to specify custom costs for crossing a group node border.
- IncrementalHierarchicLayouter: Added new feature that allows uniformly distributing ports at group nodes. The feature can be enabled individually for each group node using the DataProvider key UNIFORM_PORT_ASSIGNMENT_GROUPS_DPKEY.
- SmartOrganicLayouter: Added property set3DEnabled for creating 3D layout results.
- InteractiveOrganicLayouter: Added property setCompactness for manipulating the compactness of the result.
- OrthogonalLayouter, DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added new keys EDGE_BEND_COST_DPKEY and EDGE_CROSSING_COST_DPKEY for specifying custom costs for bends and crossings of edges.
- The node placer LeftRightPlacer now supports placing the children in multiple different branches, where each branch consists of a vertical bus where the subtrees are placed left or right of it. The number of branches is controlled via the new setting setBranchCount.
-
The node placer GridNodePlacer does offer the following new features:
- The placement of the bus for routes to the child nodes can now be configured. Available options are BUS_PLACEMENT_LEADING, BUS_PLACEMENT_TRAILING and BUS_PLACEMENT_CENTER
- Child subtrees can be assigned to rows automatically, see setAutomaticRowAssignmentEnabled
- New alignment BUS_ALIGNED that aligns the root node with the bus.
- Added stage GenericPartitionGridStage that offers generic support for partition grid structures.
- EdgeRouter: Added support for port grouping, see SOURCE_PORT_GROUP_ID_DPKEY and TARGET_PORT_GROUP_ID_DPKEY. Edges are bundled at their ports, but routed independently.
- EdgeRouter: Added support for bus routing, see BUS_DESCRIPTOR_DPKEY.
- EdgeRouter: Added support for integrated edge label placement. Labels are automatically placed when the new property isIntegratedEdgeLabelingEnabled is enabled. Furthermore, the placement considers the optional PreferredPlacementDescriptor.
- Added new stage GivenCoordinatesStage that changes node locations and edge paths to user-specified values before invoking the core layout algorithm.
Improvements
Layout
- IncrementalHierarchicLayouter: Improved the calculation of the width of the group bounds. Previously, the groups' insets were slightly too large (up to one pixel).
- IncrementalHierarchicLayouter: The layout algorithm now uses the specified layer alignment (see getLayerAlignment) to align sub-components (see SUB_COMPONENT_ID_DPKEY).
- IncrementalHierarchicLayouter: Reduced the number of crossings between edges and group node borders.
- IncrementalHierarchicLayouter: Reduced number of node overlaps for graphs with fixed coordinate hints, see createUseExactCoordinatesHint.
- IncrementalHierarchicLayouter: Now also considers sequence constraints for grouped edges.
- IncrementalHierarchicLayouter: Now also considers critical edge priorities for grouped edges, see CRITICAL_EDGE_DPKEY.
- IncrementalHierarchicLayouter: Improved the layering with respect to the resulting edge lengths if recursive group layering is enabled (see setRecursiveGroupLayeringEnabled).
- IncrementalHierarchicLayouter: Now always places the port of an edge with a port label and that connects at a side where it is the only edge in the middle of the node side. Previously the port was only centered if the label was additionally placed on the edge.
- SmartOrganicLayouter: Added data provider keys NODE_INERTIA_DPKEY and NODE_STRESS_DPKEY for specifying the inertia and stress for each node.
- OrthogonalLayouter, DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added new setting isParallelRoutesPreferenceEnabled for controlling how parallel edges (multi-edges) are routed.
- SALabeling and GreedyMISLabeling: Minor performance improvement and slightly improved placement quality in some cases.
- SALabeling and GreedyMISLabeling: Improved quality of edge label placement for labels with a source/target preference and in case that there are multiple such labels near the same node. They may now be placed further away, but avoiding undesired overlaps.
- RecursiveGroupLayouter: Added functionality to define a local partition grid structure for each recursively handled group node (see GROUP_NODE_PARTITION_GRID_DPKEY).
- TreeReductionStage: The stage now marks non-tree edges if a DataAcceptor is registered with the input graph with key getNonTreeEdgeSelectionKey. This way a user is able to query which edges the algorithm determined to be the non-tree edges.
- RemoveColinearBendsStage: The scale property of the stage does now also allow zero and negative numbers as its value. This makes it possible to internally round coordinates to full integer values for the comparison of bend points and, thus, the stage can be made more fuzzy.
- PlaceNodesAtBarycenterStage: Added new options for specifying the size of affected nodes, consider the grouping structure when calculating the barycenter of nodes and remove the bends of edges incident to affected nodes.
- EdgeRouter: Now generates less edge-edge overlaps and a better distribution of edge segments when the maximum duration (see getMaximumDuration) is strongly restricted or zero or when the algorithm is stopped via stop.
- EdgeRouter: Now supports edge grouping on both endpoints. Previously, an edge could only either be part of a source or a target group.
- EdgeRouter: If an edge at a group node has a strong PortConstraint or a fixed PortCandidate that lies inside the group node, then a proper routing from the border of the group to the fixed location is generated. Previously, the route was only calculated to the border and then the last segment was extended without consideration of obstacles and other elements.
- EdgeRouter: Improved path search performance for edges with an external PortConstraint or an external PortCandidate.
- EdgeRouter: Now avoids superfluous bends that were in some cases caused by group nodes with (small) inset values.
- ParallelEdgeLayouter: For cases where the master edge is clipped on the bounds of its source/target, the parallel edges are clipped on that bounds, too.
- PortCalculator: Now also considers edge label positions such they are not affected by whether this stage is applied or not. Previously, label positions could be changed if the label position was stored relative to the first/last segment or the port.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed a bug that could cause intersections between edges and elements of a sub-component (see SUB_COMPONENT_ID_DPKEY). Note that this fix may sometimes cause less compact results within a layer.
- IncrementalHierarchicLayouter now produces shorter, more direct edge routes for edges connecting at a group node and leaving on the the left/right group side. This only affects cases where the relevant group node also contains direct-content edges (see setDirectGroupContentEdgeRoutingEnabled).
-
IncrementalHierarchicLayouter: Fixed a possible
NullPointerException
if the IncrementalHierarchicLayouter is wrapped by an instance of RecursiveGroupLayouter and the input graph contains layering constraints between elements of different groups. - IncrementalHierarchicLayouter: Fixed a bug that sometimes caused groups with too large insets for inputs with nested group nodes.
-
IncrementalHierarchicLayouter: Fixed a very rare bug that lead to an
IllegalArgumentException
in incremental layout mode. -
SmartOrganicLayouter: Fixed a possible
IllegalArgumentException
that may appear if all nodes are located at position(0,0)
and the algorithm handles substructures in a special way (see setChainSubstructureStyle, setStarSubstructureStyle, setCycleSubstructureStyle, and setParallelSubstructureStyle). - OrthogonalLayouter and DirectedOrthogonalLayouter: Fixed a rare infinite looping issue for input graphs that are tree structures and have mixed edge directedness (see EDGE_DIRECTEDNESS_DPKEY). In addition, the problem only occurs if property getTreeStyle is not set to TREE_STYLE_NONE.
-
OrthogonalLayouter and DirectedOrthogonalLayouter:
Fixed a rare bug that caused an
ArrayIndexOutOfBoundsException
if property setUseFaceMaximization is enabled. - TreeMapLayouter: Fixed a bug that may lead to results with elements placed at infinite coordinates.
-
SeriesParallelLayouter: Fixed
WrongGraphStructure
exception for input graphs with groups that only contain disconnected nodes. - PartialLayouter does no longer reduce the size of fixed group nodes if option setFixedGroupResizingEnabled is disabled.
- PortCandidateAssignmentStage: Fixed a bug that destroyed the grouping information for the core layout algorithm.
-
TreeMapLayoutModule: Fixed a possible
ArrayIndexOutOfBoundsException
that may appear for some input graphs with empty group nodes. -
SALabeling and GreedyMISLabeling: Fixed a rare bug that caused
an
IllegalArgumentException
if there were labels on edges with zero length. - SALabeling and GreedyMISLabeling: Fixed bug which caused that the preferred distance to the edge (getDistanceToEdge of an edge label was violated even though it would have been possible to keep it. The issue affected edge labels with a PreferredPlacementDescriptor and multiple side preferences (e.g. left of edge or on the edge).
- SALabeling and GreedyMISLabeling: Fixed a wrong label profit calculation with respect to edge labels with a PreferredPlacementDescriptor.
- SALabeling and GreedyMISLabeling: Fixed an issue that caused bad positions for labels of direct content edges (edges that directly connect a group node with a descendant, without leaving the group) with a free edge label model.
- SimpleNodePlacer: Fixed an issue that sometimes caused very long horizontal distances between subtrees.
-
CompactNodePlacer: Fixed a possible
IllegalStateException
for input graphs with specified strategy mementos (see STRATEGY_MEMENTO_DPKEY). -
EdgeRouter: Fixed a rare bug that caused an
IndexOutOfBoundsException
. - EdgeRouter: Fixed a bug that caused that edges mapped to equal group ids with different object ids were not grouped.
- EdgeRouter: The routing algorithm now avoids unnecessary bends in cases that contain PortCandidates with fixed offsets (or strong PortConstraints) where the fixed port locations have a very similar x- or y-coordinate such that the path must consist of three segments with a single, very short middle segment. Previously, five segments in total were generated.
- EdgeRouter: Fixed a rare bug that sometimes caused weird routes of direct content edges with strong port constraints at the group nodes.
- EdgeRouter: Fixed a bug that sometimes caused an exception if the input graph contained edges with external ports.
- EdgeRouter: Fixed bug that sometimes caused a non-deterministic behavior.
- EdgeRouter: Fixed bug that caused intersections between edges and labels of fixed edges even though property setConsiderEdgeLabelsEnabled was enabled.
-
EdgeRouter: Fixed a rare
NullPointerException
for inputs containing fixed, grouped edges and when using polyline routing style. - EdgeRouter: Fixed an issue that the algorithm considered the NodeHalo associated with the source (instead of the target) node when handling the minimum last segment length setting. This could lead to unnecessarily long or too short last segments.
-
EdgeRouter: Fixed very rare
NullPointerException
that could be triggered during routing in cases where the source/target node is covered by obstacles (i.e. other nodes, labels). - EdgeRouter: Fixed two issues resulting in a violation of a PortCandidate with fixed offsets (or a strong PortConstraint). The first was only triggered for constraints at the target side and only when the target node was additionally partly or fully covered by other obstacles (e.g. node labels). The second issue appeared in cases with the source and target node fully overlapping (e.g. an edge from group to child).
- EdgeRouter: Fixed a bug that caused that intermediate routing points were in some cases not correctly part of the final path when polyline routing was enabled (see isPolylineRoutingEnabled).
-
EdgeRouter: Fixed a rare
NullPointerException
that was triggered in cases where the input contained grouped edges. -
EdgeRouter: Fixed a rare
NullPointerException
that occurred for inputs with a grid (see Grid). - PolylineLayoutStage: Fixed a bug that sometimes caused node-edge-overlaps due to sloped, polyline segments created by the stage.
Algorithms
- Paths: Fixed a bug in method findAllChains that caused wrong results if the input graph contained a cycle.
- Bfs: Fixed a bug in method getLayers that caused the maximum layer index stored in the NodeMap to exceed the number of layers of the returned NodeList array.
- GraphChecker: Method isMultipleEdgeFree now correctly considers input graphs with self-loops.
Base
-
YList: Fixed method addAll that previously inserted the first
element of the given collection at position
index + 1
instead ofindex
.
Incompatible Changes
Behavior Changes
-
Grouping does no longer throw an
IllegalArgumentException
if there is a node without associated id (see NODE_ID_DPKEY). Instead the class uses the node itself as id. -
setScale does no longer throw an
IllegalArgumentException
if the specified value is less than or equal to zero. -
YList: Method addAll does no longer insert the first
element of the given collection at position
index + 1
but uses positionindex
now as specified injava.util.List#addAll(int, java.util.Collection)
. - PartialLayouter does no longer reduce the size of fixed group nodes if option setFixedGroupResizingEnabled is disabled.
- IncrementalHierarchicLayouter: Increased the crossing cost for group node borders. To specify custom values, see GROUP_BORDER_CROSSING_COST_DPKEY.
- SimplexNodePlacer: The property isBaryCenterModeEnabled is now enabled by default and, thus, the IncrementalHierarchicLayouter with default settings now produces different (usually more symmetric) layouts.
- GridNodePlacer: The default value of property getRootAlignment was changed from TRAILING to BUS_ALIGNED.
API Changes
-
The following changes regarding the expert-API related to EdgeRouter were made:
-
AbstractSegmentInfo: Changed the first parameter of the constructors from type
Edge to type
java.lang.Object
. It should be of type PathRequest for routed edges and Edge for fixed ones. The method getEdge has been removed as the info is not necessarily associated with an edge. -
EdgeCellInfo: Changed the first parameter of the constructor from type Edge
to type
java.lang.Object
. It should be of type PathRequest for routed edges and Edge for fixed ones. Removed method getEdge and replaced it with getItem. -
EdgeInfo: Changed the constructor signature from
y.layout.router.polyline.EdgeInfo(y.layout.router.polyline.Path, y.layout.router.polyline.PathSearchConfiguration)
to PathSearchConfiguration). -
Path: Removed the parameter of type Edge from the constructor and removed
method
y.layout.router.polyline.Path#getEdge()
. A path is now not necessarily associated with an edge but only with the newly introduced PathRequest. - PathSearchResult: Removed method getEdgeInfo.
-
AbstractSegmentInfo: Changed the first parameter of the constructors from type
Edge to type
yFiles 2.15 - Changes Since 2.14
Features Added
Layout
- Added the new layout algorithm TabularLayouter that generates simple tabular arrangements of nodes. It allows to place 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 new layout algorithm TreeMapLayouter 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. The new Tree Map demo shows a possible use case for the new layout style.
- IncrementalHierarchicLayouter: 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 SUB_COMPONENT_ID_DPKEY.
- OrthogonalLayouter and DirectedOrthogonalLayouter: 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 setTreeStyle, setChainStyle and setCycleStyle. In addition to the style, the new feature offers more settings, like, for example, the desired tree layout orientation (see setTreeOrientation). The layout style NORMAL_TREE_STYLE is now deprecated as the new tree style feature allows more settings for the arrangement of tree-like graphs.
- OrthogonalLayouter and DirectedOrthogonalLayouter: 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.
- OrthogonalLayouter, DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added new property setMaximumDuration, which enables to control the preferred time limit of the layout algorithms.
- OrthogonalLayouter: Added property setUniformPortAssignmentEnabled that allows to obtain results with a more uniform port assignment.
- 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 setIntermediateRoutingPoints.
- 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 setDirectGroupContentEdgeRoutingEnabled.
- GenericTreeLayouter: 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 setPreferredAspectRatio.
- Added convenience layout stage TemporaryGroupNodeInsertionStage 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 RecursiveGroupLayouter without the need for a real grouping structure when the requirement is that different sub-graphs need to be arranged with different layout algorithms.
Algorithms
- ShortestPaths: Added a-star (A*) algorithm for finding the shortest path between two nodes in a directed or undirected, arbitrary graph.
Improvements
Layout
- IncrementalHierarchicLayouter: Reduced required memory for graphs with sequence constraints.
- IncrementalHierarchicLayouter: Fixed problem that sometimes caused an unnecessarily large distance between adjacent layers.
- DirectedOrthogonalLayouter: Reduced number of crossings and bends for directed edges.
- OrthogonalLayouter, OrthogonalGroupLayouter and DirectedOrthogonalLayouter: Improved compactness of the layout results.
- OrthogonalLayouter: Improved result of the perceived bends optimization (see setPerceivedBendsOptimizationEnabled).
- OrthogonalLayouter and OrthogonalGroupLayouter: The postprocessing step now also applies special transformations that can reduce the overall edge length.
- OrthogonalLayouter, OrthogonalGroupLayouter and DirectedOrthogonalLayouter: Reduced the length of straight-line edges which can lead to layouts that are significantly more compact.
- OrthogonalLayouter, OrthogonalGroupLayouter: Improved optimization that reduces the number of perceived bends, see setPerceivedBendsOptimizationEnabled.
- MultiPageLayouter: Improved runtime as well as layout quality if the input is a tree structure and the specified getCoreLayouter is either an instance of class GenericTreeLayouter or TreeLayouter. Furthermore, property setAdditionalParentCount allows to specify 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.
- MultiPageLayouter: Added property setProxyReferenceNodeCreationEnabled that allows to disable the creation of proxy reference nodes as well as property setMultipleComponentsOnSinglePagePlacementEnabled that allows to prevent that elements of different connected components are placed on the same page.
- PortCandidateAssignmentStage 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 SOURCE_PORT_GROUP_ID_DPKEY and TARGET_PORT_GROUP_ID_DPKEY.
- 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.
- TreeComponentLayouter: added property setUndirectedTreeConsiderationEnabled that allows to specify whether or not undirected tree structures should be handled or not. Previously, only directed tree structures were considered.
- 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 setMinimumChannelSegmentDistance and setMinimumChannelSegmentDistance respectively.
- TreeLayouter now allows to specify a minimum vertical distance for the horizontal edge segments of the bus, see setMinimumBusSegmentDistance.
- 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.
- Major performance improvement for 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.
- 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 EdgeRouter that affect the path search phase as well as the segment location assignment phase.
-
BusRouter: Now automatically ignores non-orthogonal edges with fixed bus descriptor
(see isFixed) or transforms them into orthogonal edges if they are octilinear.
In previous versions, the layout algorithm simply throws an
IllegalArgumentException
in such cases.
Viewer
- ImageOptionItem: Added new attributes ATTRIBUTE_FILE_CHOOSER and ATTRIBUTE_SHOW_URL. The former allows using pre-configured file chooser instances when browsing for image files. The latter may be used to control whether or not the option editor displays the file URL in addition to the corresponding image.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Self-loop segments are now shorter and take up less space if possible. Previously, segments were sometimes unnecessarily long even though the minimum length settings allowed shorter segments.
- IncrementalHierarchicLayouter: Fixed an issue that caused superfluous crossings if there were same-layer edges with PortConstraints or PortCandidates.
- IncrementalHierarchicLayouter: Fixed a bug that could cause non-orthogonal segments when the input contained port labels in conjunction with edge grouping.
- IncrementalHierarchicLayouter: Fixed a problem that sometimes caused too long straight-line same-layer edges. Note that the additional length was equal to the value of setNodeToEdgeDistance
- IncrementalHierarchicLayouter: Fixed problem where edges between group nodes contained superfluous bends if there were grouped edges in the input graph.
- IncrementalHierarchicLayouter: Fixed an issue that caused non-symmetric results for grouped edges even though property setBaryCenterModeEnabled was enabled.
- IncrementalHierarchicLayouter: Fixed a bug that caused a very large distance between some nodes of input graphs graphs with source/target port labels (see PLACE_AT_SOURCE_PORT and PLACE_AT_TARGET_PORT) that have zero height or width.
-
IncrementalHierarchicLayouter: Fixed rare
IllegalStateException
caused by an inconsistent grouping state that may appear for input graphs with groups and incremental elements (see LAYOUT_MODE_INCREMENTAL). - IncrementalHierarchicLayouter: Fixed possible intersections between labels and the horizontal grid lines of a PartitionGrid.
-
IncrementalHierarchicLayouter: Fixed possible
NullPointerException
for input graphs with source/target port labels (see PLACE_AT_SOURCE_PORT and PLACE_AT_TARGET_PORT) and with a subset of nodes associated with halos (see NodeHalo). - IncrementalHierarchicLayouter: Fixed a bug that sometimes caused a wrong placement of source/target edge labels when integrated edge labeling was enabled and if there were either critical edges (see CRITICAL_EDGE_DPKEY) or propery setEdgeStraighteningOptimizationEnabled was enabled.
- IncrementalHierarchicLayouter: Fixed rare infinite looping issue for input graphs with fixed (i.e., non-incremental) nodes and layering constraints.
- IncrementalHierarchicLayouter: Fixed bug that could cause the violation of fixed port candidates if there were critical edges (see CRITICAL_EDGE_DPKEY) and edges connecting to group nodes.
-
IncrementalHierarchicLayouter: Fixed bug that sometimes caused a
NullPointerException
if the input graph contains port groups, see SOURCE_PORT_GROUP_ID_DPKEY and TARGET_PORT_GROUP_ID_DPKEY. -
IncrementalHierarchicLayouter: 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 setGridReference. -
IncrementalHierarchicLayouter and SimplexNodePlacer:
Fixed a very rare
IllegalArgumentException
that was caused by some input graphs that contain both swimlanes and groups as well as fixed elements. - IncrementalHierarchicLayouter: 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).
-
IncrementalHierarchicLayouter:
Fixed
IllegalArgumentException
that could be triggered when the user specified both edge directedness (see EDGE_DIRECTEDNESS_DPKEY) and layering constraints. -
IncrementalHierarchicLayouter and SimplexNodePlacer:
Fixed rare
IllegalArgumentException
that could be triggered when the input graph had a partition grid and PortCandidates or PortConstraints. - IncrementalHierarchicLayouter: Improved port assignment for edges incident to group nodes that are routed directly (see setDirectGroupContentEdgeRoutingEnabled). Previously, such edges were often reversed.
- IncrementalHierarchicLayouter: Fixed bug that caused violation of specified PortCandidates of edges with labels with preferred placement specifier PLACE_AT_SOURCE_PORT or PLACE_AT_TARGET_PORT when using an orientation other than top-to-bottom.
- IncrementalHierarchicLayouter: Improved adherence to the specified maximum duration by applying a suitable runtime restriction to class PCListOptimizer. Previously, this class didn't have any runtime restrictions.
- IncrementalHierarchicLayouter: Fixed bug that caused that property getComponentArrangementPolicy was not correctly considered when there are undirected edges (see EDGE_DIRECTEDNESS_DPKEY).
- IncrementalHierarchicLayouter: 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 EDGE_THICKNESS_DPKEY) together with a (rather large) grid spacing value and the default port assignment PORT_ASSIGNMENT_DEFAULT.
- IncrementalHierarchicLayouter: Fixed bug that caused unnecessarily large layer distances in case that there exist empty partition grid rows with a minimum row height.
-
IncrementalHierarchicLayouter 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 setStopAfterLayeringEnabled and setStopAfterSequencingEnabled). - IncrementalHierarchicLayouter: Fixed a bug that caused that sloped segments of grouped octilinear edges were sometimes not perfectly overlapping but slightly displaced.
-
SmartOrganicLayouter: Fixed
IllegalArgumentException
that could appear if cycle substructure detection is enabled, see setCycleSubstructureStyle. - SmartOrganicLayouter: Fixed bug that caused that movable nodes kept their initial location if the scope is set to SCOPE_SUBSET or SCOPE_MAINLY_SUBSET and if there are output restrictions (see setOutputRestriction).
- SmartOrganicLayouter: Fixed non-deterministic behavior with respect to multiple runs that occurred in some cases with group nodes.
- OrganicRemoveOverlapsStage: Improved adherence to the specified maximum duration.
- OrganicRemoveOverlapsStage: Fixed rare infinite looping issue.
-
OrthogonalLayouter: Fixed an
IllegalArgumentException
that was triggered in some cases when there were parallel edges and property setUniformPortAssignmentEnabled was enabled. - OrthogonalLayouter, DirectedOrthogonalLayouter, OrthogonalGroupLayouter: Fixed rare bug that caused node-edge overlaps.
- OrthogonalGroupLayouter: Fixed rare infinite loop issue for grouped graphs.
- OrthogonalLayouter, DirectedOrthogonalLayouter, OrthogonalGroupLayouter: Fixed rare bug that caused overlapping nodes.
- OrthogonalLayouter and DirectedOrthogonalLayouter: Improved from-sketch mode (see setUseSketchDrawing) 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.
- OrthogonalLayouter: Fixed rare bug that caused non-orthogonal line segments and bad edge end points.
- PartialLayouter: Fixed bug that sometimes caused that PortCandidates were not considered correctly during the orthogonal/octilinear edge routing.
- MultiPageLayouter: Fixed bug that edge type TYPE_PROXY was never used.
- GenericTreeLayouter: Fixed bug that caused that the layout algorithm sometimes did not pass on exceptions that occurred during the layout calculation but caught them without proper handling.
- LayeredNodePlacer: Fixed bug that caused node-edge overlaps for some configurations.
- DefaultNodePlacer: Fixed bug in getMinLastSegmentLength that caused that the value of getMinFirstSegmentLength was returned.
- GenericTreeLayouter: Fixed bug in DefaultPortAssignment that caused a memory leak.
- GenericTreeLayouter: 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.
- CircularLayouter: Now correctly considers whether or not an inter-partition edge should be bundled or not (see isBundled). Previously, when having multiple partitions, inter-partition edges where sometimes bundled even if the bundling property was disabled.
-
EdgeRouter: Fixed rare
StackOverflowError
that may appear for larger graphs. - EdgeRouter: Improved the path search performance for cases where a large number of fixed and overlapping edge segments exist. Previously, the search could become very slow in such scenarios.
-
EdgeRouter: Fixed a rare
NullPointerException
that was triggered for some input graphs when the maximum duration was exceeded. - EdgeRouter: Fixed bug that could cause unnecessary bends for edges that need to cross group node borders.
- EdgeRouter: Fixed an issue that caused edge-to-edge distance violations (for segments directly connecting at a node) even if a cheaper route that e.g., introduces a bend - which costs less by default - was available.
- EdgeRouter: Fixed a rare bug that caused port candidate failures for edges grouped with fixed edges.
- 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.
-
EdgeRouter:
Fixed
RuntimeException
that could be triggered when the graph contained fixed edges (see setSphereOfAction) with very short segments. - EdgeRouter: Fixed bug that sometimes caused a violation of the minimum first or last segment length if they were set to relatively large values.
- EdgeRouter: Fixed bug that caused that PortCandidates with multiple directions were always considered to be fixed.
- PolylineLayoutStage: Fixed a bug that caused collinear bends to be removed from fixed edges. Now, such fixed edges are not changed anymore.
-
BusRouter: Fixed rare
NullPointerException
that could be triggered if there are buses with both fixed and movable edges at the same time. - BusRouter: Fixed non-deterministic behavior with respect to multiple runs that occurred in very rare cases.
- SeriesParallelLayouter: Fixed bug that caused misplaced edge labels for graphs containing only a single edge.
-
SeriesParallelLayouter: Fixed bug that triggered a
NullPointerException
when the graph contained only a single edge, group nodes and integrated edge labeling was enabled. -
SeriesParallelLayouter: Fixed a rare bug that triggered a
NullPointerException
when the input location of a node was set to a very large value (e.g. largest possible floating-point value). This applies if the algorithm is not in from-sketch mode. For the from-sketch mode, an exception can still occur - this case is considered to be bad input. -
SALabeling and GreedyMISLabeling: Fixed a very rare
IllegalArgumentException
that was caused by some input graphs that contain edges with zero length segments and labels associated with a free edge label model (i.e., SmartEdgeLabelModel or FreeEdgeLabelModel). - SALabeling and GreedyMISLabeling: Fixed bug that could cause that a label candidate with a lower profit (see getProfit) was preferred over another candidate with higher profit even though both candidates did not overlap with any other elements.
- SALabeling: 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.
- RecursiveGroupLayouter: Fixed a bug that caused violation of PortConstraints or PortCandidates for self-loops where both endpoints were restricted to the same node side.
- RecursiveGroupLayouter: Fixed a bug which caused that partition grid rows and columns got wrong values for their computed width, height and position, see getComputedWidth, getComputedHeight, getComputedPosition and getComputedPosition. This could happen when EdgeRouter was used as inter-edge routing algorithm.
-
ComponentLayouter: Fixed an
IllegalArgumentException
that was triggered for some input graphs with user-defined components (see GIVEN_COMPONENT_ID_DPKEY) where at least one node hadnull
as its component id. - FamilyTreeLayouter: Fixed bug that caused that the preferred family member order wasn't considered, see setSortFamilyMembers.
- GraphLayoutLineWrapper: Fixed bug that sometimes caused a large empty space inside the drawing.
-
PortCandidateAssignmentStage: Fixed bug that caused
NullPointerException
when the ports of edges in the input graph were outside the node bounds. - LabelLayoutImpl: Fixed bug that the box returned by getBox was not consistent with the bounding box of the oriented box (getOrientedBox). This was the case when the mutable oriented box instance was changed.
- TreeLayoutModule: Fixed editor for properties Horizontal Spacing and Vertical Spacing of the Horizontal-Vertical tree layout algorithm to no longer allow illegal negative values.
I/O
-
DomXmlWriter: Fixed JDK 9 only additional, undesired
whitespace when writing
Text
orCData
nodes. - TGFIOHandler: Fixed erroneous truncation of TGF files when exporting label texts with characters that required multiple bytes in the platform default encoding.
Viewer
-
SmartEdgeLabelModel:
Fixed
NullPointerException
that occurred when interactively moving labels while MoveLabelMode's isSnappingEnabled property was set tofalse
. -
TableEditorFactory: Added missing event handling for
editingCanceled
andeditingStopped
events when editing table cell values of a table editor in external editing dialogs. Previously open external editing dialogs ignored these events. Now open external editing dialogs will be closed when notified of these events from their associated table cell editor.
This fix constitutes a change in behavior for external editing dialogs. - ColorOptionItem: Fixed transparency support in the item's color chooser for Java 9 and newer.
-
HierarchyTreeModel: Fixed erroneous selection changes
that could occur when processing hierarchy events that were
bracketed with
PRE_EVENT
andPOST_EVENT
.
Demos
-
Improved yFiles'
DemoBrowser
to run with Java 9, 10, and 11. -
StateNodeRealizer
: Fixed settingStateNodeRealizer
's custom shape type.
Incompatible Changes
Behavior Changes
- DirectedOrthogonalLayoutModule: The module now does no longer automatically group parallel edges.
API Changes
-
Removed class
y.option.IconPopupEditor
. This class could never be safely used, because its constructor requires types that are not part of yFiles for Java's public API.
yFiles 2.14 - Changes Since 2.13
Features Added
Layout
- Added support for Sankey diagrams which visualize flow quantity between entities like e.g., cost or energy flow. The new Sankey Demo shows how such diagrams can be generated by means of the IncrementalHierarchicLayouter.
- IncrementalHierarchicLayouter: Added support for port grouping, see SOURCE_PORT_GROUP_ID_DPKEY and TARGET_PORT_GROUP_ID_DPKEY. Edges are bundled at their ports, but routed independently.
- IncrementalHierarchicLayouter now allows to specify the directedness of edges, see 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.
- IncrementalHierarchicLayouter: Added support for edges with a specific thickness. Minimum distances in the layout will consider these thicknesses, see EDGE_THICKNESS_DPKEY.
- Added preferred placement specifiers PLACE_AT_SOURCE_PORT and PLACE_AT_TARGET_PORT for edge labels which express that the label should be placed directly at the source/target port of the edge. Currently, the specifiers are only considered by the integrated labeling of the IncrementalHierarchicLayouter.
- SmartOrganicLayouter now supports the detection of regular substructures in the graph (see setChainSubstructureStyle, setStarSubstructureStyle, setCycleSubstructureStyle, and setParallelSubstructureStyle) 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 setNonTreeEdgeLabelingAlgorithm and setNonTreeEdgeLabelSelectionKey.
- SeriesParallelLayouter: 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 setNonSeriesParallelEdgeLabelingAlgorithm and setNonSeriesParallelEdgeLabelSelectionKey.
Improvements
Layout
- IncrementalHierarchicLayouter: Slightly reduced the number of bends when integrated edge labeling is enabled.
- IncrementalHierarchicLayouter: Fixed unstable from-sketch behavior for non-default layout orientations when group nodes are folded or expanded. Applies to orientations LEFT_TO_RIGHT, RIGHT_TO_LEFT and BOTTOM_TO_TOP. Geometry information registered with data providers with keys ALTERNATIVE_GROUP_BOUNDS_DPKEY and ALTERNATIVE_EDGE_PATH_DPKEY is now automatically rotated according to the specified layout orientation.
- IncrementalHierarchicLayouter: Improved support for PortCandidates at group nodes. Previously, they were only obeyed if there was just a single candidate defined, which also applied to the opposite node (not necessarily a group node). Now, out of the given candidates, one is selected and considered for the routing. Still, fixed candidates are treated like free ones and are not supported at the side of group nodes.
- Improved the performance of OrthogonalSegmentDistributionStage and thus also ChannelEdgeRouter which by default uses the mentioned stage as edge distribution strategy.
- IncrementalHierarchicLayouter: 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.
- IncrementalHierarchicLayouter: Improved edge grouping such that it is now possible to group incoming/outgoing edges as well as same-layer/backloop edges with common edges.
- IncrementalHierarchicLayouter can now take the original edge route into account to determine the route of a self-loop.
- InteractiveOrganicLayouter: Improved performance for continuing layout calls for varying graph sizes in single threaded mode.
- MultiPageLayouter: Added new option setStrictClusterSeparationEnabled that allows to specify whether or not nodes with different cluster IDs may be placed onto the same page.
- SeriesParallelLayouter: Now takes into consideration the minimum node size specified by the user with a DataProvider registered with the graph with key MINIMUM_NODE_SIZE_DPKEY.
- The following tree algorithms now support custom selection of the root node of the tree:
- BalloonLayouter: Interleaved child placement now works in conjunction with from sketch-mode and custom child order comparators. This means that the settings setFromSketchModeEnabled and setComparator are no longer ignored when enabling the interleaved placement mode (see setInterleavedMode).
- TreeLayouter and GenericTreeLayouter: Now take into consideration the minimum group node size specified by the user with a DataProvider registered with the graph with key MINIMUM_NODE_SIZE_DPKEY.
- Improved the runtime of EdgeRouter when routing edges that have PortConstraints or PortCandidates.
- ChannelRouter: Improved order of segments to avoid edge crossings when there are multiple segments that have one common end point.
- New convenience method getPathClippedOnBB that computes a clipped edge path given a YPointPath and two YRectangles to clip on.
- LabelingModule: Now extends LayoutModule instead of YModule. This improvement also constitutes a change in behavior because the module's Graph2DLayoutExecutor now runs in ANIMATED mode instead of UNBUFFERED mode by default.
- Improved the performance of PartialLayouter for input graphs that feature a high number of large subgraph components. Does not apply to component assignment strategy COMPONENT_ASSIGNMENT_STRATEGY_SINGLE.
Viewer
- ShapeNodePainter and ShapeNodeRealizer: Added additional shape types TRIANGLE_2, PARALLELOGRAM_2, STAR5, STAR6, STAR8, FAT_ARROW, and FAT_ARROW_2.
-
ShapeNodeRealizer: Added property
raisedBorderEnabled
that governs whether the node border is painted before or after node ports and node labels. - GroupNodePainter: Added protected methods shouldChangeState, shouldConfigureDefaultLabel, and configureDefaultLabel for easier customization.
- GroupLayoutConfigurator: Added public methods getGraph and getHierarchyManager as well as protected methods createGroupProvider, createGroupNodeInsetsProvider, and createMinNodeSizesProvider for easier customization.
- NodePortLayoutConfigurator: Added support for port grouping, see isAutomaticPortGroupsEnabled, SOURCE_PORT_GROUP_ID_DPKEY, and TARGET_PORT_GROUP_ID_DPKEY.
- Arrow: Added new arrow styles CROSS, WHITE_CIRCLE, and WHITE_DELTA_BAR.
-
MoveSnapContext: Added property
bendToBendDistance
that may be used to enable bend-to-bend snapping.
Documentation
The new interactive documentation viewer integrates the yFiles for Java API documentation and the yFiles for Java Developer's Guide. Its built-in optimized search capability makes it easy to quickly get a result list of both API references and related descriptions.
The Javadoc™ API documentation is additionally available in the doc/javadoc/ folder.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed bug that caused node-edge overlaps in conjunction with some complex edge grouping specifications.
- IncrementalHierarchicLayouter: Fixed bug that could have led to too large group nodes if there are grouped edges.
- IncrementalHierarchicLayouter: Fixed bug that sometimes caused superfluous bends in edge routes when integrated edge labeling was enabled.
- IncrementalHierarchicLayouter: 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.
- IncrementalHierarchicLayouter: Fixed bug that sometimes caused the route of back-loop edges with at least one endpoint incident to a group node to unnecessarily enter this group node.
- SimplexNodePlacer: Fixed bug that caused overlaps between edges and nodes when enabling node compaction (setNodeCompactionEnabled) and having edges with either strong PortConstraints or fixed PortCandidates.
- IncrementalHierarchicLayouter: Fixed bug that caused a violation of minimum first/last segment length for backloop/reversed edges that connect to group nodes.
- IncrementalHierarchicLayouter: Fixed rare bug that caused overlaps between labels and segments of edges with octilinear routes.
- IncrementalHierarchicLayouter: Fixed possible infinite loop if there are critical edges (see CRITICAL_EDGE_DPKEY).
- IncrementalHierarchicLayouter: Fixed bug that caused critical edges to not be aligned (see CRITICAL_EDGE_DPKEY).
-
IncrementalHierarchicLayouter: Fixed rare
NullPointerException
triggered in AsIsSequencer for edges incident to group nodes that have a sketch without bend points as well as port constraints. - IncrementalHierarchicLayouter: Fixed bug that caused non-orthogonal segments of grouped edges even though orthogonal edge routing was enabled.
- IncrementalHierarchicLayouter: Improved compactness of layouts that feature group nodes with insets and (group) nodes with halos (NodeHalo). Previously, specifying halos could enlarge the insets of group nodes by an unnecessary large amount.
- IncrementalHierarchicLayouter: Fixed bug that caused a violation of the specified minimum distance or edge overlaps in the case of same-layer edges.
-
IncrementalHierarchicLayouter: Fixed
NullPointerException
that could happen in AsIsSequencer when incremental group hints are defined (see createIncrementalGroupHint) along with specific port constraints on edges incident to an incremental group node. - IncrementalHierarchicLayouter: Improved result if compact label placement is enabled (which is the default), see setLabelCompactionEnabled. 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).
- IncrementalHierarchicLayouter: Fixed distance between vertical (in a top-to-bottom layout) segments of same-layer edges that connect to group nodes. This also applies to self-loops that connect to the top or bottom of a group node with both ends as well as same-layer parts of other edges like backloops.
- IncrementalHierarchicLayouter: Fixed bug that caused the minimum edge-to-edge distance to be violated by edges with strong port constraints that cross each other.
-
RecursiveGroupLayouter when used with IncrementalHierarchicLayouter
as core layout algorithm: Fixed
IllegalStateException
that could be triggered when group nodes of the input graph have PortCandidates. - SmartOrganicLayouter now temporarily hides DataProviders which are registered by the user with keys that are related to RecursiveGroupLayouter and LayoutMultiplexer since their presence during the layout process may cause corrupted results.
- SmartOrganicLayouter and OrganicLayouter: 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 GROUP_NODE_INSETS_DPKEY) and no minimum group node size specified (via MINIMUM_NODE_SIZE_DPKEY).
- SmartOrganicLayouter and OrganicLayouter: Fixed bug that caused the algorithm to not consider the specified custom GroupBoundsCalculator (see setGroupBoundsCalculator).
-
SmartOrganicLayouter, OrganicLayouter and
InteractiveOrganicLayouter: Fixed
IllegalArgumentException
that was triggered due to NaN values that could occur in case the input graph has a very large number of nodes. - RecursiveGroupLayouter: 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 getCoreLayouter) is an instance of class IncrementalHierarchicLayouter.
- MultiPageLayouter: Fixed rare bug that sometimes caused straight-line edge routes instead of orthogonal routes.
- CircularLayouter and RadialLayouter: Fixed bug that caused that always all edges are bundled if bundling is enabled for at least one single edge. More precisely, property isBundled wasn't considered correctly.
-
SingleCycleLayouter: Fixed bug that could have led to a
ClassCastException
if edge bundling is enabled and a custom node sequencer is specified (see setNodeSequencer). - CircularLayouter: Fixed bug that in some cases produced self-intersecting edges when edge bundling is enabled.
-
PartialLayouter: Fixed
NullPointerException
that appeared if no DataProvider with key PARTIAL_NODES_DPKEY is registered with the input graph. - GraphPartitionManager: Fixed functionality to hide edges when using methods hide, hideEdges, hide or hide. Previously, edges were actually not hidden from the graph.
- ParallelEdgeLayouter: Fixed bug that caused wrong (very large) edge port coordinates. These coordinates could have led to Exceptions later when processing the graph, for example, when calculating placements of edge labels belonging to the edges with bad coordinates using model SmartEdgeLabelModel.
-
SeriesParallelLayouter: Fixed possible
NullPointerException
when handling graphs with group nodes. - SeriesParallelLayouter: Fixed violations of the minimum first and last segment length and self-crossings of octilinear edges.
- SeriesParallelLayouter: 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.
- GenericTreeLayouter: Fixed possible group node overlaps in conjunction with some node placers, for example AssistantPlacer.
- GenericTreeLayouter: Fixed bug that caused less compact layout results when having node halos (see NodeHalo).
- GenericTreeLayouter: Fixed bug that caused edges which are reversed during the layout and have a port constraint only to one endpoint (e.g., source) to obtain the same port constraint also to the other endpoint (e.g., target).
-
OrthogonalEdgeRouter: Fixed
IllegalArgumentException
that appeared if there were node labels with zero height/width. -
EdgeRouter: Fixed possible
NullPointerException
that appeared if grouped edges were assigned to different fixed port locations (either specified with PortCandidates or PortConstraints) at their grouped end. - EdgeRouter: Fixed rare node overlaps in conjunction with monotonic path restrictions (see setMonotonicPathRestriction).
-
EdgeRouter: Fixed rare
RuntimeException
that appeared if there were fixed (see setSphereOfAction) and grouped edges at the same time. -
EdgeRouter: Fixed possible
NullPointerException
that could have appeared if a specified PortCandidate had multiple directions. - EdgeRouter: Fixed bug that caused violations of minimum first/last segment lengths of grouped edges when using different edge layout descriptors and, second, made the layout algorithm remove a user-registered DataProvider with key EDGE_LAYOUT_DESCRIPTOR_DPKEY.
- ChannelEdgeRouter: Fixed routing of self-loops that have both source and target end point at the same side of the node. Previously, when multiple such self-loops were present at the same node, the routing produced bad end points located outside of the node.
-
BusRouter: Fixed rare
IllegalStateException
caused by non-orthogonal edge segments. - IsolatedGroupComponentLayouter: Fixed bug that caused edge labels that intersected with group nodes even though option isLabelAwarenessEnabled was enabled.
-
Groups: Fixed
NullPointerException
in method hierarchicalClustering that occurred when the given maximum number of clusters was0
or1
.
Viewer
-
DropSupport: Fixed initial
groupClosed
states of realizer delegates in ProxyShapeNodeRealizer instances that are created in createNode for new group/folder nodes. -
EditMode: Fixed
NullPointerException
that occurred on mouse clicks after transferring the focus to the application menu bar by typing the ALT key on Windows. - ConstraintManager: Fixed memory leaks that caused option editors to be retained for the whole life cycle of a constraint manager.
-
Overview: Fixed rare
IllegalArgumentException
that occurred for mouse drag events when the canvas component of the Graph2DView associated to the overview has width or height0
.
Incompatible Changes
Behavior Changes
- LabelingModule: The module's Graph2DLayoutExecutor now runs in ANIMATED mode instead of UNBUFFERED mode by default.
- IncrementalHierarchicLayouter 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.
- IncrementalHierarchicLayouter: 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.
-
IncrementalHierarchicLayouter: Method isIntegratedEdgeLabelingEnabled now always
returns
false
if the labeling algorithm is disabled (see isLabelLayouterEnabled). In previous versions it was only required that an appropriate labeling algorithm was specified, but it was not necessary that it was 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 to the following methods:- IncrementalHierarchicLayouter: isConsiderNodeLabelsEnabled
- DirectedOrthogonalLayouter: isIntegratedEdgeLabelingEnabled
- DirectedOrthogonalLayouter: isConsiderNodeLabelsEnabled
- OrthogonalLayouter: isIntegratedEdgeLabelingEnabled
- OrthogonalLayouter: isConsiderNodeLabelsEnabled
- OrthogonalGroupLayouter: isIntegratedEdgeLabelingEnabled
- OrthogonalGroupLayouter: isConsiderNodeLabelsEnabled
- SmartOrganicLayouter does no longer resize empty group nodes, possibly ignoring a minimum group node size for them (see MINIMUM_NODE_SIZE_DPKEY). The behavior with respect to empty group nodes is now in line with the behavior of other common layout algorithms. The same behavior change applies to OrganicLayouter with group policy setting IGNORE_GROUPS_POLICY, where previously empty groups were resized too.
-
Centrality: Method closenessCentrality
now sets the closeness of a node to
Infinity
if the sum of the shortest path distances is0
. Before, it was set toNaN
in such cases. -
SingleCycleLayouter: Method setNodeSequencer now allows to specify
null
to return to the default sequencer. In previous versions, specifyingnull
leads to anIllegalStateException
. - IncrementalHierarchicLayouter: Geometry information registered with data providers with keys ALTERNATIVE_GROUP_BOUNDS_DPKEY and ALTERNATIVE_EDGE_PATH_DPKEY 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.
API Changes
- Groups.Dendrogram does no longer extend class Graph. To enable convenient iteration of a dendrogram, method getChildren was added.
-
OrganicLayouter: Changed type of property
preferredEdgeLength
fromint
todouble
, see setPreferredEdgeLength and getPreferredEdgeLength. -
The type of values expected for a DataProvider registered with keys
PREFERRED_EDGE_LENGTH_DATA
and PREFERRED_EDGE_LENGTH_DATA
changed from
Integer
toDouble
.
yFiles 2.13 - Changes Since 2.12.0.1
Major Features Added
Layout
- IncrementalHierarchicLayouter supports recursively routed edges. Edges that pass the border of group nodes will always leave at the bottom side and enter at the top side of the group node. This routing style is specified using setRecursiveEdgeStyle.
- IncrementalHierarchicLayouter: Improved from-sketch behavior for groups with changed bounds (e.g. after folding or expanding a group node), seeIncrementalHierarchicFoldExpandDemo.
- Added edge bundling feature. Bundling together multiple edges means that their
common parts are to some degree merged into a bundled part. Edge bundling is useful to increase the readability
of graph drawings with a high number of edges that connect a comparably small number of nodes. The following
layout algorithms support edge bundling:
- CircularLayouter: Edge bundling is applied to edges of the same partition.
- TreeReductionStage: Edge bundling is applied to non-tree edges.
- RadialLayouter: Edge bundling is applied to non-tree edges.
Minor Features Added
Layout
- IncrementalHierarchicLayouter: Added support for sequence constraints between edges as well as nodes and edges, see SequenceConstraintFactory.
- IncrementalHierarchicLayouter: Added support for overlapping layers. The strict layer structure can be compacted by moving layers up into the space of previous layers. Layers are only moved if it won't produce overlaps with nodes or edges.
- IncrementalHierarchicLayouter: Added feature that allows for edges that connect group nodes with their descendants to directly connect from inside to the group node's border. It can be activated for each edge individually on the EdgeLayoutDescriptor by callingsetDirectGroupContentEdgeRoutingEnabled.
- RecursiveGroupLayouter: Added edge splitting for inter-edges and the possibility to align edges that connect to the group border from inside and outside.
- SALabeling and GreedyMISLabeling: Added optionsetAmbiguityReductionEnabled that reduces the ambiguity of label placements. When enabled, the labeling algorithms try to avoid placing labels at positions where it is not clear to which graph element a label belongs.
- Added layout stage CurveFittingLayoutStage which allows the approximation of edge paths with cubic bezier curve control points. The stage is especially useful if curved edges are modeled using a large number of bends connected via straight lines.
Algorithms
- Groups: Added k-means clustering algorithm that partitions a given graph in k-clusters.
- Groups: Added hierarchical clustering algorithm that partitions a given graph based on agglomerative (i.e., bottom-up) strategy and some linkage function (single-, complete- and average-linkage).
Improvements
Layout
- IncrementalHierarchicLayouter: Added properties that allow for stopping the layout algorithm after the layering or the sequencing phase while skipping the subsequent phases. This may be useful when using two layout runs to collect layering and/or sequencing information in the first run that will be used during the second run.
- IncrementalHierarchicLayouter: Fixed edges which have segments that should be horizontal or vertical but are slightly non-orthogonal.
- IncrementalHierarchicLayouter: Improved behavior in incremental mode that moved normal nodes that were in different layers (in the initial layout) to the same layer. This behavior occurred in case there were group nodes that extended into the layer above or below to get a compact result.
- EdgeRouter will now consider the target group of an edge if this edge is the only member of its source group.
- EdgeRouter: Improved edge routes of self-loops to go around at least one corner of the node. Only if both source and target port are restricted to the same side (PortConstraint,PortCandidate), self-loops may start and end at the same side of the node.
- InteractiveOrganicLayouter: Fixed possible performance problem after changing the inertia/stress of some nodes.
- DirectedOrthogonalLayouter: Now always produces planar drawings for trees.
- SALabeling and GreedyMISLabeling: Generic labeling algorithms do not consider any more labels of zero width or height. Before, bad labeling results were possible especially when using zero-sized labels with SALabeling.
- SALabeling and GreedyMISLabeling: Improved performance - especially for large graph instances.
- Improved support for PreferredPlacementDescriptor side preference (left, on-edge, right) when using generic labeling algorithms SALabeling and GreedyMISLabeling. Now, the side preference is considered for edge labels with arbitrary EdgeLabelModel implementations.
- GenericTreeLayouter: Improved DefaultPortAssignment to considerPortConstraints in all modes. If a distributed mode is selected then weak constraints will also be distributed on the according side.
- LayeredNodePlacer: Improved spacing between labels and bends when polyline labeling is enabled.
- RadialLayouter: If the data provider registered with key NODE_INFO_DPKEY also implements DataAcceptor interface, it will be filled with the according RadialLayouter.NodeInfo object for each node.
- Added layout stage HandleNaNCoordinatesStage which prevents layout algorithms that take initial
coordinates for nodes and edges into account from failing if some of those graph elements have
NaN
-coordinates. - Several smaller runtime improvements for the following layout algorithms:
Viewer
- ItemEditor: Added support for alternative font families in editors of text/string based option items with new attributeATTRIBUTE_FONT_NAME.
- Graph2DPrinter: Added protected methodprintGraph for easier customization.
I/O
- GraphML: Added methods
parseIconAttribute
andwriteIconAttribute
to classesEdgeLabelDeserializer,NodeLabelDeserializer,EdgeLabelSerializer, andNodeLabelSerializer respectively for easier customization of icon (de-)serialization.
Demos
- Added Curve Fitting Demo demonstrating possible usages of CurveFittingLayoutStage that fits piecewise cubic bezier curves to given arbitrary edge paths.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed bug that resulted in edges whose segments are not on grid.
- IncrementalHierarchicLayouter: Fixed grid references to place the nodes on grid correctly for each layout orientation.
- IncrementalHierarchicLayouter: Fixed bug that caused grouped edge segments to overlap with one of the adjacent nodes if it is a group node.
- IncrementalHierarchicLayouter: Fixed bug that caused same layer segments to be too short for the labels that should be placed at those segments.
- IncrementalHierarchicLayouter: Fixed bug that caused a violation of minimum first/last segment length for edges that connect two neighboring nodes in the same layer.
- IncrementalHierarchicLayouter: Fixed bug that caused a violation of minimum first/last segment length for edges that connect to group nodes. Now, the first/last segments of those edges will have at least the length of the largest minimum first/last segment length of all edges connected to the same group node.
- IncrementalHierarchicLayouter: Fixed rare
IllegalStateException
that is caused by an inconsistent group node order that may appear for input graphs containing both swimlanes and groups. - IncrementalHierarchicLayouter: Fixed bug with some ignored any side strong port constraints.
- IncrementalHierarchicLayouter: Fixed bug that caused PortCandidates to potentially be ignored or not handled correctly for self-loops when having directions other than NORTH, SOUTH, WEST or EAST.
- EdgeRouter: Fixed bug that caused edges routed by the EdgeRouter to sometimes share the same port with edges defined as fixed.
- EdgeRouter: Fixed bug that caused violations of the node to edge distance between an edge and its target if the edge approaches the target from the opposite side of the target port constraint.
- EdgeRouter: Fixed bug that caused incorrect routes for grouped edges with intersecting source and target.
- EdgeRouter: Fixed rare
NullPointerException
that may appear during rerouting of edges (see setReroutingEnabled) if the input graph contains overlapping nodes. - EdgeRouter: Fixed possible
NullPointerException
that may appear if there are grouped edges consisting of both fixed and non-fixed edges (see setSphereOfAction). - EdgeRouter: Fixed bug that may cause that some edges are not considered during rerouting. It only appears if the graph contains grouped edges.
- EdgeRouter: Fixed rare bug that may cause a
StackOverflowError
. - ChannelEdgeRouter: Fixed bug that may cause segments with infinite coordinates for edges incident to group nodes if the path finder strategy is set to ChannelEdgeRouter.OrthogonalShortestPathPathFinder.
- GreedyMISLabeling and SALabeling: Improved placement of edge labels with preferred placement at source/target if the label model is SmartEdgeLabelModel or FreeEdgeLabelModel.
- GreedyMISLabeling and SALabeling: Fixed bug that may cause that the postprocessing step (see option setApplyPostprocessing) ignores some node labels with model FreeNodeLabelModel.
- DirectedOrthogonalLayouter: Fixed problem that may cause non-directed routes for directed edges if option setAlignDegreeOneNodesEnabled is enabled.
- MultiPageLayouter: Fixed possible
NullPointerException
that may appear if an internal layouter queries a DataProvider for an inserted dummy node. - CircularLayouter: Fixed a bug that could potentially cause an infinite loop when encountering a node with a very high out-degree.
- CircularLayouter: Fixed bug that caused nodes to be placed outside of the enclosing circle when using layout style SINGLE_CYCLE and partition layout style PARTITION_LAYOUTSTYLE_ORGANIC.
- ParallelEdgeLayouter: Fixed possible
NullPointerException
that may appear if the parallel edge is almost horizontal/vertical. - PortCandidateAssignmentStage: Fixed bug that caused the location of strong port constraints to be ignored when using this stage together with a layout algorithm that cannot handle port constraints.
- RemoveColinearBendsStage: Now coincident bend points can also be removed since they produced edge segments of very small length and, thus, in some layout algorithms caused label placement failures.
- FamilyTreeLayouter: Fixed handling of grouping DataProviders so they are not changed by the layout algorithm.
- FamilyTreeLayouter: Fixed possible
NullPointerException
that may appear if the input graph contains group nodes. - BusRouterModule now hides fixed non-orthogonal edges when scope 'Reroute to Selected Nodes' is selected, fixing a bug that caused an Exception because BusRouter can only handle fixed edges that are orthogonal.
Viewer
- TableEditorFactory: MethodresetEditor now properly
removes the editor from its previous option handler and properly adds
the editor to the new option handler. As a resultresetEditor now also triggers
the appropriate
editorAdded
andeditorRemoved
events. - Fixed incorrect sloppy edge painting when using VALUE_SLOPPY_POLYLINE_PAINTING_OFF. The incorrect sloppy edge painting is noticeable when animating edge path changes.
- Fixed
NullPointerException
in TableOrderEditor and TableSizeEditor that may occur if label editing is started while changing the order or size of table columns or rows.
I/O
- GML and XGML: Improved serialization of obfuscated user data and style property types for GenericNodeRealizer andGenericEdgeRealizer as well as obfuscated user data types ofYLabel.
- GraphML: Fixed
NullPointerException
that occurred if aYModule instance without an associated OptionHandler instance was used as post-processor. - GraphML: Fixed GraphML serialization for YLabel properties
horizontalTextPosition
,verticalTextPosition
, andiconTextGap
. - GroupNodeRealizerSerializer:GroupNodeRealizer's
autoResize
property is now stored as part of<GroupNode>
's<State>
child.
Demos
- FamilyTreeDemo: Fixed problem that may cause displacement of graph elements when clicking on a node.
Incompatible Changes
API Changes
- The following constructors have been removed:
y.algo.Bipartitions#Bipartitions()
y.algo.Centrality#Centrality()
y.algo.Cycles#Cycles()
y.algo.GraphConnectivity#GraphConnectivity()
y.algo.NetworkFlows#NetworkFlows()
y.algo.NodeOrders#NodeOrders()
y.algo.Paths#Paths()
y.algo.RankAssignments#RankAssignments()
y.algo.SpanningTrees#SpanningTrees
y.algo.Transitivity#Transitivity()
y.algo.Bfs#Bfs()
y.layout.Grouping#Grouping()
y.layout.Swimlanes#Swimlanes()
y.layout.grouping.RecursiveGroupLayouter#RecursiveGroupLayouter(y.layout.Layouter,y.layout.grouping.GroupBoundsCalculator)
- FixedGroupLayoutStage: Method
getInterEdgeroutingStyle()
has been renamed togetInterEdgeRoutingStyle. - EdgeReverser: Method reverseEdges has become static.
- The following classes, constructors, and methods have been deprecated:
- PortConstraint: All constructors
- PortCandidate: All constructors
- SimplexDrawer: Method getCost
- SequenceConstraintFactory: Methods
- WeightedLayerer: Method downShiftNodes
- Class PartialLayouter.StraightLineEdgeRouter
Behavior Changes
- The following default values of properties have been changed:
- CanonicMultiStageLayouter and MultiPageLayouter:
The default
LabelLayouter
is now set to an instance of SALabeling. - OrthogonalEdgeRouter: Default value of property
CrossingCost
is now1.5
instead of0
. - CompactOrthogonalLayouter:
The OrthogonalShortestPathPathFinder which is used as default
path finder strategy now uses value
1.5
as default for propertyCrossingCost
instead of0
. - PartialLayouter: Default value of property
MinimalNodeDistance
is now10d
instead of0.0
. - MultiParentDescriptor: Default value of property
MinimumNodeDistance
is now15d
instead of10.0
. - BalloonLayouter: Default value of property
MinimalNodeDistance
is now10.0
instead of0.0
. - SALabeling: Default value of property
DeterministicModeEnabled
is nowtrue
instead offalse
. - SplitEdgeLayoutStage: Default value of property
ProxyNodeSize
is now1.0
instead of0.0
.
- CanonicMultiStageLayouter and MultiPageLayouter:
The default
- IncrementalHierarchicLayouter: For input graphs with infeasiblePortConstraints and PortCandidates/PortCandidateSets (i.e., for edges that have non-matching port constraints/candidates), the layout algorithm now always prefersPortConstraints. In previous versions, the behaviour was not well-defined for such cases.
- CompositeLayoutStage: Method canLayout now checks if all theLayoutStages of the pipeline
can layout the given graph and does not return always
true
. - SingleCycleLayouter: Method canLayoutCore now returns
false
ifnull
is given as input. - PortCandidateAssignmentStage: Now, if an edge has registered PortCandidates and connects to nodes with PortCandidateSets, the stage will try to match both collections to find an appropriate port. In case there is no matching port candidate, a PortCandidate specified for the edge is preferred. Before, one of PortCandidates was selected without trying to match with node port candidates.
- GraphTransformer: Method setOperation now only sets the operation value and does not disable the automatic selection of best fitting rotation angle if an operation other than ROTATE is selected.
- Centrality: The following methods can now take empty NodeMaps and EdgeMaps as arguments for returning the resulting centrality values.
- Most of the setter methods of the properties of package
y.layout
now throw anIllegalArgumentException
if an unexpected/illegal ornull
argument is given as input. - The following methods/constructors now throw
IllegalArgumentException
s instead ofNullPointerException
s: - DelegatingNodePlacer: Method determineChildConnector now throws an
IllegalStateException
instead of anIllegalArgumentException
. - OrthogonalLayouter: Method setIntegratedEdgeLabelingEnabled throws an
IllegalStateException
if the current label layouter is not of type LabelLayoutTranslator. - TreeComponentLayouter: Constructor TreeComponentLayouter throws an
IllegalArgumentException
ifnull
is given as argument.
yFiles 2.12.0.1 - Changes Since 2.12
Improvements
Layout
- IncrementalHierarchicLayouter: Reduced number of group node overlaps that may appear for groups containing elements with tail/head constraints, see addPlaceNodeAtTailConstraint and addPlaceNodeAtHeadConstraint.
- Improved abort handling for algorithms that use ConstraintIncrementalLayerer, ConstraintLayerer and TopologicalIncrementalLayerer. For large graphs these classes may require a long runtime that cannot be canceled by using an AbortHandler.
Demos
- LayoutDemo: Added SeriesParallelLayouter to the set of layouters that are applied to the graph.
- LayoutModuleDemo: Added SeriesParallelLayoutModule to the selection of available layout modules.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed
IllegalStateException
that may appear in incremental layout mode if there are group nodes that contain non-incremental elements. - IncrementalHierarchicLayouter: Fixed bug that may cause an incorrect order of elements if the graph contains sequence constraints.
- IncrementalHierarchicLayouter: Fixed problem that may cause a very long runtime if the layouter is applied in incremental mode and the graph contains sequence constraints.
- IncrementalHierarchicLayouter: Fixed bug that caused that the layer of an incremental group (see createIncrementalGroupHint) depends on the group's location if recursive layering is enabled (see setRecursiveGroupLayeringEnabled). However, the position of incremental groups should be freely chosen by the layouter.
- IncrementalHierarchicLayouter: fixed orientation of edge labels on selfloops connected to a group node.
- IncrementalHierarchicLayouter: Fixed
NullPointerException
that occurred if an incremental group node has only incremental descendants. - IncrementalHierarchicLayouter: Fixed problem that caused bad results when assigning top or bottom layer constraints (i.e., addPlaceNodeAtTopConstraint or addPlaceNodeAtBottomConstraint) to fixed elements.
- IncrementalHierarchicLayouter: Fixed bug that caused collinear bends in some edge routes.
- IncrementalHierarchicLayouter: Fixed bug that caused the maximum duration values specified for Layerer, Sequencer and NodePlacer to be overridden and not considered during the hierarchic layout.
- EdgeRouter: Fixed bug that caused violations of the minimum first or last segment length for target grouped edges. This only happened when these distances were defined in the default EdgeLayoutDescriptor instead of a DataProvider with individual descriptors.
- EdgeRouter: Fixed side handling of external strong ports.
- EdgeRouter: Fixed rare
NullPointerException
that may occur for graphs where only a subset of edges is routed, see setSphereOfAction. - SimplexNodePlacer: fixed bug that disabled label compaction feature.
- BalloonLayouter: Fixed bug that caused CHILD_ORDERING_POLICY_SYMMETRIC not to work as desired.
- AssistantPlacer: fixed placement of assistant nodes. When all children of a node are assistants, they are all placed left/right.
- TreeLayouter: Fixed
StackOverflowError
occurred in trees with high depth. - GenericTreeLayouter: Fixed root alignments to only take the child node bounds into account without considering edge segments in the subtree.
- DelegatingNodePlacer: Constants VERTICAL and HORIZONTAL along with methods setOrientation and getOrientation are deprecated since they had no effect.
- Trees: fixed method getCenterRoot that didn't always return the correct center node of a tree.
- OrganicLayouter: Fixed bug that caused tree-beautifier feature (see setActivateTreeBeautifier) to have no effect if activated when the graph is actually flat (i.e., there is no group node that contains child nodes) but data providers for groups (see GroupingKeys) are registered with the graph.
- CircularLayouter: Fixed bug that may cause node overlaps.
- SplitEdgeLayoutStage: Fixed bug that caused the user's selection for edges that have to be split to be ignored. Also, fixed bug that caused an
IllegalArgumentException
because of nodes with zero width/height. - ShortestPaths: Fixed
NullPointerException
that occurred when applying the Dijkstra or Bellman-Ford algorithm to an empty graph. - IncrementalHierarchicLayoutModule: Now also considers incremental group nodes.
- TreeLayoutModule: Fixed bug that caused GenericTreeLayouter not to place the labels at the correct positions close to their corresponding edges when TreeReductionStage is appended and the orientation is not TOP_TO_BOTTOM.
- SmartOrganicLayoutModule: Fixed
IllegalStateException
that was triggered when using group layout policy VALUE_FIX_GROUP_BOUNDS or VALUE_FIX_GROUP_CONTENTS for a graph without any groups. - SmartOrganicLayoutModule: Fixed scope setting for subsets only.
- OrthogonalLayoutModule, DirectedOrthogonalLayoutModule: Fixed bug that caused non-observance of labels even if the integrated or generic labeling is enabled.
Viewer
- IOHandlerModule: Fixed
NullPointerException
that occurred if the module had been instantiated using its deprecated three-arguments constructor. - AbstractInputHandler: Fixed evaluation of valid scopes other than ALL.
- CreateEdgeMode: Method isDisableSnappingModifierPressed is no longer called for
null
events.
I/O
- GraphML: Improved serialization of obfuscated user data types for GenericNodeRealizer, GenericEdgeRealizer, and NodePort instances.
yFiles 2.12 - Changes Since 2.11.0.2
Major Features Added
Layout
- Added new layout algorithm SeriesParallelLayouter for graphs that are constructed only by series (combining two series parallel graphs by merging the source of one graph with the sink of the other) and parallel (combining two series parallel graphs by merging the sources and the sinks) operations.
- Added multi-parent support to GenericTreeLayouter. A tree node can have multiple parents that are connected to all of its siblings and share the same parents. This might come to use in organizational charts where a team answers to multiple superiors.
- Added grid placement support for nodes and edges to IncrementalHierarchicLayouter.
Minor Features Added
Layout
- AbortHandler: Added method hasCheckFailed that allows to query whether a check method was called after a stop or cancel event.
- Added interface LabelLayoutFactory that provides methods for creating, adding and removing node/edge labels for LayoutGraphs.
- IncrementalHierarchicLayouter: Added support for incremental group nodes (see createIncrementalGroupHint). Incremental groups will be placed on a suitable position. The hints of their descendants are interpreted relative to the group node.
- SimplexNodePlacer: Added option setNodeCompactionEnabled that allows to place adjacent nodes of a layer in a more compact, stacked style.
- Added vertical alignment option for DefaultNodePlacer and SimpleNodePlacer. In addition to the previous compact child placement, siblings can now be aligned at top, center or bottom for example.
- GenericTreeLayouter: Added support for critical edges in DefaultNodePlacer, DendrogramPlacer, SimpleNodePlacer, LayeredNodePlacer and DoubleLinePlacer. Nodes connected to a critical edge will be center aligned which can be used to highlight certain paths in the tree.
- GenericTreeLayouter: Added support for grouped edges in DefaultPortAssignment. Grouped edges will share the same port location at local root.
- Added class GroupedNodePlacer that allows GenericTreeLayouter to place siblings into different groups.
- RecursiveGroupLayouter: Added option setInterEdgeRouter to specify an edge router to layout edges that cross group node bounds. Thus, it is not necessary to subclass the layouter to change inter-edge routing anymore.
- Added layout stage KeepStrongPortConstraintsStage which ensures that layout algorithms that cannot handle port constraints keep the ports of edges with strong port constraints.
- Added layout stage PortCandidateAssignmentStage which assigns edges to the ports specified by PortConstraints or PortCandidates after calling the core layout.
I/O
- Added GraphML framework for reading and writing LayoutGraph instances. See class LayoutGraphMLHandler.
- Added GraphML framework for reading and writing Graph instances. See class GraphMLHandler.
Improvements
Layout
- All layout modules have been re-written for a consistent approach to configuring layout algorithms and registering additional data. Additionally, the introduced (protected)
configure
methods allow for easier sub-classing and customization. - IncrementalHierarchicLayouter: The group transposition feature (see setGroupTranspositionEnabled) can now also be used in incremental layout mode.
- ConstraintIncrementalLayerer: Improved handling of same layer constraints. In previous versions the layerer sometimes ignores same layer constraints even though there is a valid layering.
- IncrementalHierarchicLayouter: More compact placement of rotated as well as stacked labels.
- SmartOrganicLayouter: Now also considers the group node compactness (see option setGroupNodeCompactness) if option setNodeEdgeOverlapAvoided is enabled.
- SmartOrganicLayouter: Improved node overlap removal (see option setNodeOverlapsAllowed). Now, if the scope is set to SCOPE_SUBSET or SCOPE_MAINLY_SUBSET, the number of node overlaps that cannot be removed is reduced.
- LayeredNodePlacer: Reduced overlaps between edges and node labels for all routing styles.
- GridNodePlacer: Corrected alignment of child nodes and edge routing when there are node labels.
- AbstractRotatableNodePlacer.RootAlignment, DefaultNodePlacer and DendrogramPlacer: Instead of aligning bounding boxes including nodes and their labels, nodes are aligned directly with other nodes. Therefore a layout with node labels gets more compact and the alignment is consistent with that of graphs without node labels.
- DelegatingNodePlacer: Added support for a child comparator for children of local root nodes.
- GenericTreeLayouter now ignores labels with zero width or height in all distance calculations.
- GenericTreeLayouter: NodePlacer implementations now also use the specified spacing as minimum distance between different subtrees.
- TreeLayoutModule: Now also places edge labels of non-tree edges (if edge labels are considered).
- PartialLayouter: Reduced number of element overlaps if there are partial group nodes.
- ParallelEdgeLayouter: Now always separates parallel edges according to their direction, i.e., edges (v,w) and (w,v) are never placed interleaved.
- SALabeling and GreedyMISLabeling: Both algorithms now also consider the node/edge overlap penalty specified by a LabelCandidate.
Viewer
- DropSupport: With the new DropSupport.EventHandler interface it is now possible to use DropSupport's built-in support for node and edge transfers in inter-process Drag and Drop operations.
- DefaultGraph2DRenderer and DefaultOrderRenderer: Added optional synchronization to support concurrent rendering e.g. while printing and displaying a graph instance at the same time.
- TableEditorFactory: Reduced width of "..." option editor buttons on Mac OS X.
- PortConfigurationAdapter: Added method createConfiguredAdapter for easier customization.
- HierarchyManager: Added method reInsertEdge that allows for re-inserting edges in graph hierarchies (especially inter-edges).
- Improved GraphML serialization to take font attributes into account.
- Improved cropping label configuration to take font attributes into account.
- PrintPreviewPanel: Added option to run
Format
andPrint
actions in current thread instead of background threads.
Demos
- SwingRendererDemo: Improved rendering of scaled text components.
- MindMapDemo: A comparator is used to specify the desired order of nodes in the graph instead of changing the order of edges in the graph like it was done before.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed missing placement on octilinear selfloops with the same side constraints for source and target port.
- IncrementalHierarchicLayouter: Fixed routing style violations in octilinear grouped edges.
- IncrementalHierarchicLayouter: Fixed
NullPointerException
that could occur when octilinear edges are attached to group nodes. - IncrementalHierarchicLayouter: Fixed bug that caused first or last segments of edges to be too short to span all associated labels.
- IncrementalHierarchicLayouter and RankAssignments: Fixed possible
NullPointerException
that may occur if the maximal duration of the algorithm is limited. - IncrementalHierarchicLayouter: Fixed bug that may cause overlaps of edge labels with preferred placement at source/target.
- IncrementalHierarchicLayouter: Fixed rare
IllegalStateException
that may appear for grouped graphs containing nodes with fixed coordinates hint (see, e.g., createUseExactCoordinatesHint). - IncrementalHierarchicLayouter: Fixed bug that breaks incremental hints of grouped edges in incremental layout mode. (see createSequenceIncrementallyHint).
- IncrementalHierarchicLayouter: Fixed bug that may cause an incorrect order of fixed (non-incremental) elements if the layouter is applied in incremental mode and the graph contains sequence constraints.
- DirectedOrthogonalLayouter: Fixed bug that caused an
IllegalArgumentException
if data provider key SOURCE_GROUPID_KEY is registered to the input graph but data provider key TARGET_GROUPID_KEY is not registered. - CompactOrthogonalLayouter: Fixed possible
IllegalArgumentException
caused by nodes without node IDs. This problem may only appear if the inter edge router is set to PartitionLayouter.ChannelInterEdgeRouter. - TreeLayouter: Fixed bug that may cause a
ClassCastException
if the input graph is a CopiedLayoutGraph that consists of multiple connected components and the layouter uses the LayeredNodePlacer (e.g., if property setChildPlacementPolicy is set to CHILD_PLACEMENT_POLICY_ALL_LEAVES_ON_SAME_LAYER). - DoubleLinePlacer: Fixed the distance between the local root and the upper line to match the specified spacing. The distance between the two lines can now be defined in relation to the spacing.
- HVTreeLayouter: Fixed bug that may cause edges with reversed direction if the layout isn't run in buffered mode.
- TreeReductionStage: Fixed wrong handling of group nodes which may cause a
WrongGraphStructure
exception as well as broken routes of edges incident to group nodes. - SimpleNodePlacer: Fixed broken edge routes that may appear for edges on nodes with external labels if integrated node labeling is enabled.
- TreeLayoutModule: Fixed bug that may cause a
WrongGraphStructure
exception if the input graph contains group nodes with incident edges. - MultiPageLayouter: Fixed bug that caused that an AbortHandler attached to the input graph was ignored.
- MultiPageLayouter: Fixed
NullPointerException
that may occur if the edge ID data provider (see EDGE_ID_DPKEY) is an instance of EdgeMap. - MultiPageLayouter: Fixed bug that may cause non-orthogonal edge routes.
- ComponentLayoutModule: Disabled from-sketch option for styles that don't support it.
- ComponentLayouter: Fixed bug that caused an
ArrayIndexOutOfBoundsException
if the style is set to STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED or STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT (see setStyle) and all components exceed the preferred height (see setPreferredLayoutSize). - PortCandidateSet: Fixed bug that caused method findMatchingCandidate to return the entry with the highest cost instead of the lowest cost if the candidate matcher is created with method createMatcher.
- CopiedLayoutGraph: Fixed
NullPointerException
that occurs when nodes or edges are added to the copied graph without removing them before calling commitLayoutToOriginalGraph. - CopiedLayoutGraph: Fixed problem that may cause movement of label boxes in the original graph even if method commitLayoutToOriginalGraph is not called.
- BorderLine: Fixed bug in method grow that may produce an
IllegalArgumentException
because the min value of a BorderLine becomes greater than its max value. - PartialLayouter: Fixed bug that may cause broken edge routes for edges incident to incremental group nodes if option setRouteInterEdgesImmediatelyEnabled is enabled.
- EdgeRouter: Fixed rare
NullPointerException
that mainly appears if there are overlapping nodes. - EdgeRouter: Fixed bug that may cause zero length routes of edges whose start and end point are at the same location.
- AbstractLabelingAlgorithm: Fixed bug that may cause removal of labels that don't overlap with other elements if option setRemoveNodeOverlaps is enabled.
Viewer
- GroupNodeRealizer: Fixed copy constructor and method createCopy to properly adopt the
autoBoundsEnabled
state. - MoveSelectionMode: Fixed rare
NullPointerException
that may be triggered when clicking left and right mouse buttons at the same time while panning. - BevelNodePainter: Corrected upper gradient to run from top to center instead of from top to bottom.
- DefaultEditorFactory: Fixed
NumberFormatException
that is triggered by invalid input forint
ordouble
options with lower and/or upper bounds for their values.
Incompatible Changes
Layout
- IncrementalHierarchicLayouter: Creating layer constraints (see LayerConstraintFactory) or sequence constraints (see SequenceConstraintFactory) using a disposed of factory now throws an
IllegalStateException
. - SALabeling and GreedyMISLabeling: Changed LabelCandidates default for overlap penalty of nodes and edges from 0 to 1. This means label overlaps are now considered more severe.
Viewer
- EdgeRealizer: Method paintLabels now calls paint unconditionally for each label associated with the edge realizer. Previously, this method skipped labels that were not
visible
or had neithertext
noricon
. This change ensures that paintLabels behaves the same way as paintText.
Client code that previously relied on the notext
, noicon
behavior should now use the label'svisible
property to handle label visibility.
Incompatible API Changes
Layout
All layout modules have been re-written for a consistent approach to configuring layout algorithms and registering additional data. This resulted in the following incompatible API changes:
- All option constants in module PartialLayoutModule have been renamed and their visibility has been changed from
public
toprotected
:HIERARCHY_REORGANIZATION
has been removed. - BusRouterModule:
MethodinitOptionHandler(y.option.OptionHandler, y.layout.router.BusRouter)
has been removed.
MethodaddOptionItems(y.option.OptionHandler)
has been changed to addOptionItems.Public
methodconfigure(y.layout.router.BusRouter)
has been replaced withprotected
method configure. - ChannelEdgeRouterModule:
Unused methodinitOptionHandler(y.layout.Layouter)
has been removed.Public
methodconfigure(y.layout.Layouter)
has been replaced withprotected
method configure. - FamilyTreeLayoutModule:
Public
methodconfigure(y.layout.Layouter)
has been replaced withprotected
method configure. - OrthogonalEdgeRouterModule:
Unused methodinitOptionHandler(y.layout.Layouter)
has been removed.Public
methodconfigure(y.layout.Layouter)
has been replaced withprotected
method configure. - PolylineEdgeRouterModule:
Public
methodconfigure(y.layout.Layouter)
has been replaced withprotected
method configure. - BalloonLayoutModule, CircularLayoutModule, CompactOrthogonalLayoutModule, DirectedOrthogonalLayoutModule, HierarchicLayoutModule, IncrementalHierarchicLayoutModule, OrganicEdgeRouterModule, OrthogonalLayoutModule, PartialLayoutModule, RadialLayoutModule, TreeLayoutModule:
Visibility ofpublic
method createOptionHandler has been reduced toprotected
. - BalloonLayoutModule, CircularLayoutModule, CompactOrthogonalLayoutModule, DirectedOrthogonalLayoutModule, FamilyTreeLayoutModule, HierarchicLayoutModule, IncrementalHierarchicLayoutModule, OrthogonalLayoutModule, PolylineEdgeRouterModule, RadialLayoutModule, TreeLayoutModule:
Visibility ofpublic
method mainrun has been reduced toprotected
.
yFiles 2.11.0.2 - Changes Since 2.11.0.1
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed possible
IndexOutOfBoundsException
that may occur for grouped graphs in incremental mode with recursive group layering enabled. - IncrementalHierarchicLayouter: Fixed possible
IllegalStateException
caused by inconsistent grouping. - IncrementalHierarchicLayouter: Fixed bug that may cause edges with zig-zag paths if there are swimlanes and integrated edge labeling is enabled.
- IncrementalHierarchicLayouter and TopologicalIncrementalLayerer: Fixed bug that may cause unwanted same-layer edges between incremental nodes.
- CircularLayouter: Fixed issue that may cause infinite/too large node coordinates for unfavorable input settings, e.g., if the maximal deviation angle is chosen to small (see method setMaximalDeviationAngle). Note that such coordinates may produce infinite looping or other exceptions.
- GenericTreeLayouter: Fixed issue that caused too large group nodes when label consideration is enabled and the layout is not oriented top-to-bottom.
- GenericTreeLayouter: Fixed issue that causes group nodes to be too small to include all edge labels when the edge connects to a child of an inner group node.
- GenericTreeLayouter: Fixed issue that causes group nodes to be too small for node halos.
- GenericTreeLayouter: Fixed issue that produces unnecessary large group nodes if node labels are considered.
- TreeReductionStage: Fixed wrong handling of group nodes which may cause a WrongGraphStructure exception as well as broken routes for edges incident to group nodes.
- Fixed
NullPointerException
when using AssistantPlacer together with distributed port assignment. - BusRouter: Fixed
NullPointerException
that may appear for graphs containing isolated nodes with self-loops. - EdgeGroupConstraintModule: Fixed
NullPointerException
that may appear if option "Configuration Method" is set to "Automatically" and option "Act On" is set to a value other than "All Ports".
Demos
- OrgChartDemo: Fixed
NullPointerException
that may occur when (structurally) moving nodes with collapsed predecessors.
yFiles 2.11.0.1 - Changes Since 2.11
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if there are "critical" edges, see CRITICAL_EDGE_DPKEY.
- IncrementalHierarchicLayouter: Fixed
IllegalArgumentException
(Graph is not acyclic) in SimplexNodePlacer that could appear when sequence constraints were added to a graph with swimlanes and group nodes. - IncrementalHierarchicLayouter: Fixed
IllegalArgumentException
in ConstraintIncrementalLayerer that could appear when layer constraints were added in incremental mode. - IncrementalHierarchicLayouter: Fixed broken edge routes that may occur for edges with labels if SimplexNodePlacer's option setEdgeStraighteningOptimizationEnabled is enabled.
- IncrementalHierarchicLayouter: Fixed rare
IllegalArgumentException
in BorderLine that was caused by numerical instability when using swimlanes. - IncrementalHierarchicLayouter: Fixed minimum edge length for orthogonal edges. It is now also taken into consideration for edges that connect to a node's side and for backloop edges (see setBackloopRoutingEnabled).
- IncrementalHierarchicLayouter: Fixed possible
ArrayIndexOutOfBoundsException
in PCListOptimizer that may appear if there are port constraints which have no matching port candidate or port candidate set entry. - SmartOrganicLayouter: Fixed bug that caused weird placement of fixed elements if the minimal node distance is set to 0.
- CircularLayouter: Fixed possible
NullPointerException
when layout style is set to BCC_ISOLATED and consider node labels is enabled. - MultiPageLayouter: Fixed possible
NullPointerException
if the input graph contains empty group nodes. - MultiPageLayouter: Fixed possible
ClassCastException
if group node insets are specified with classjava.awt.Insets
. - PartialLayouter: Fixed broken edge routes that may appear if option setEdgeRoutingStrategy is set to EDGE_ROUTING_STRATEGY_OCTILINEAR.
- EdgeRouter: Fixed wrong heuristic bend calculation if grid is used.
- BusRouter: Fixed
NullPointerException
in BusRepresentations that could appear if the input graph contains overlapping nodes. - OrganicEdgeRouterModule: Fixed option
Use existing bends
which was ignored in previous versions. - AbstractLabelingAlgorithm: Fixed bug that causes poor results if option setRemoveEdgeOverlaps is enabled and the labels should be placed on the edge.
- FixedGroupLayoutStage: Fixed canLayout which changed the structure and layout of the graph.
Viewer
- DropSupport: Fixed drag and drop feedback for native drag and drop operations. I.e. DropSupport now properly uses acceptDrop instead of acceptDrag.
yFiles 2.11
Major Features Added
Layout
- Added new layout algorithm RadialLayouter that places nodes on concentric circles. Edges are routed in a radial fashion using one of several routing strategies. See RadialLayouterDemo for tutorial code.
- Added support for terminating (layout) algorithms prematurely. To this end, new class AbortHandler provides methods for requesting early but graceful termination (see stop) and immediate termination (see cancel).
The following layout algorithms have at least rudimentary support for immediate termination: Layout Algorithms Routing Algorithms Other Algorithms - BalloonLayouter
- CircularLayouter
- CompactOrthogonalLayouter
- DirectedOrthogonalLayouter
- GenericTreeLayouter
- GRIP
- HierarchicGroupLayouter
- HierarchicLayouter
- IncrementalHierarchicLayouter
- OrganicLayouter
- OrthogonalGroupLayouter
- OrthogonalLayouter
- PartialLayouter
- RadialLayouter
- RecursiveGroupLayouter
- SmartOrganicLayouter
The following layout algorithms also support graceful early termination: Layout Algorithms Routing Algorithms Other Algorithms - Added support for parallel execution of computationally intensive tasks.
Layout algorithms SmartOrganicLayouter and OrganicLayouter may take advantage of multiple threads for layout calculations. Parallel execution is enabled using the algorithms'setMultiThreadingAllowed(boolean)
method.
Interface TaskExecutor and factory classes TaskExecutorFactory and MultiThreadedTaskExecutorFactory make up the programmatic interface for the new concurrency support. - Introduced concept of node halos. Halos are reserved space around a node in which layout algorithms will not place other graph elements. Node halos are modelled using class NodeHalo.
The following layout algorithms support node halos: Layout Algorithms Routing Algorithms Other Algorithms - SmartOrganicLayouter: Added support for partition grid layout. See PartitionGrid.
Minor Features Added
Layout
- BalloonLayouter: Added support for integrated node and edge labeling. See new properties setIntegratedEdgeLabelingEnabled, setIntegratedNodeLabelingEnabled, and setNodeLabelingPolicy.
- BalloonLayouter: Added support for different policies to align nodes having the same root node. See new property setChildAlignmentPolicy.
- BalloonLayouter: Added support for interleaved child node placement. With interleaved placement, child nodes are placed at different distances to their parent node to achieve a more compact layout. See new property setInterleavedMode.
- IncrementalHierarchicLayouter: Improved partition grid support. Nodes can now be mapped to a multi-lane partition cell identifier, i.e., a cell spanning multiple columns and rows. See PartitionGrid.
- IncrementalHierarchicLayouter: Improved edge label placement. Edge labels with preferred placement at source/target are placed closer to the corresponding node. Additionally, SimplexNodePlacer offers the option to place adjacent edge labels in a compact, stacked style. See new property setLabelCompactionEnabled.
- EdgeRouter: Added a fine-granular configuration option to weigh the crossing costs for each label using the data provider look-up key LABEL_CROSSING_COST_FACTOR_DPKEY.
- EdgeRouter: Added option setIgnoreInnerNodeLabelsEnabled for ignoring node labels that are inside the bounds of their owner node. Node labels that are ignored because of this setting may be crossed by edges. This is especially useful if inner labels of group nodes may be crossed but outer labels of normal nodes may not.
- EdgeRouter: Added support for customizing the order in which edges are routed. See new property setEdgeOrderComparator.
- GenericTreeLayouter: When enabling setIntegratedNodeLabeling and/or setIntegratedEdgeLabeling, the respective labels will be taken into account during the calculation of group bounds.
- PartialLayouter: Now supports handling of directed and undirected edges; see data provider key DIRECTED_EDGES_DPKEY.
- LabelLayoutTranslator: Added properties setWriteBackRelativeEdgeLabelLocationEnabled and setWriteBackRelativeNodeLabelLocationEnabled that allow a core layouter to specify new node or edge label locations relative to the label's owner.
- LabelLayoutKeys: Added key IGNORE_LABEL_KEY that allows specifying which edge and node labels should be ignored during layout calculations.
- Added new class OrganicRemoveOverlapsStage that removes node overlaps while respecting a specified minimal node distance. Unlike the approach implemented in class RemoveOverlapsLayoutStage, this approach tries to keep the original layout structure, i.e., it tries to keep the geometric distance between the nodes.
Viewer/Editor Interaction
- Improved support for text anti-aliasing with sub-pixel rendering when painting the contents of a Graph2DView.
A new rendering hint key KEY_ANTIALIASING_HANDLER and a corresponding value VALUE_ANTIALIASING_HANDLER_DESKTOP have been added to YRenderingHints.
Additionally, a protected setRenderingHints method has been added to Graph2DView for increased flexibility with regards to rendering hints.
I/O
- Added new package y.io.graphml.layout for reading and writing a LayoutGraph's geometry data from/to GraphML.
Improvements
Algorithms
- Dfs: Added method cancel that can be used by subclasses to cancel the search.
- Cycles: Improved method findCycle to stop the search as soon as the first cycle has been found.
Layout
- IncrementalHierarchicLayouter: The default sequencing phase has been improved to produce less crossings and run faster.
- IncrementalHierarchicLayouter: Now prevents overlaps among same layer edges attached to group nodes.
- IncrementalHierarchicLayouter: During layering, edges connected to group nodes may be redirected and replaced by dummy edges connected to the children of the group node. For these dummy edges getEdgeData now returns an EdgeData of the new type TYPE_REDIRECTED_GROUP_EDGE.
- PCListOptimizer: Improved port candidate assignment calculated by method optimizeAfterSequencing.
- SmartOrganicLayouter: Now uses a more sophisticated approach to remove node overlaps if the scope is set to SCOPE_ALL and the quality to time ratio (see setQualityTimeRatio) is greater than or equal to
0.7
. - InteractiveOrganicLayouter: Method startLayout now takes advantage of multiple threads for layout calculation which may reduce the required runtime.
- PartitionLayouter: Added nested class PartitionLayouter.PolylineInterEdgeRouter that routes inter-edges using class EdgeRouter.
- PartialLayouter: Now considers port constraints independent of the specified layout orientation. Note that port constraints are considered only if the core layout algorithm (see setCoreLayouter) supports port constraints as well.
- PartialLayouter.StraightLineEdgeRouter: Added support for port constraints.
- RecursiveGroupLayouter: Added option setReplacingPortConstraintsEnabled that replaces port constraints by port candidates and, thus, may improve the layout result.
- EdgeRouter: Memory usage has been reduced.
- EdgeRouter: Added penalty setting for edge length. See PenaltySettings setEdgeLengthPenalty.
- EdgeRouter: Now avoids very small octilinear segments.
- EdgeRouter: Added four predefined optimization strategies. See OPTIMIZATION_BALANCED, OPTIMIZATION_EDGE_BENDS, OPTIMIZATION_EDGE_CROSSINGS, and OPTIMIZATION_EDGE_LENGTHS.
- DirectedOrthogonalLayouter and OrthogonalGroupLayouter: Added optimization step that reduces the number of perceived bends. See new property
setPerceivedBendsOptimizationEnabled(boolean)
. - OrthogonalLayouter, OrthogonalGroupLayouter and DirectedOrthogonalLayouter: Added optimization step that aligns degree one nodes (i.e. nodes with one incident edge) that have the same neighbor. See new property
setAlignDegreeOneNodesEnabled(boolean)
. - OrthogonalGroupLayouter: Improved routing and edge labeling for self-loops of normal (non-group) nodes.
- LayoutTool: Added new rectangle arrangement method arrangeRectangleMultiRows suitable for arranging rows of rectangles with highly different sizes.
- ComponentLayouter: Added new component arrangement strategies STYLE_MULTI_ROWS, STYLE_MULTI_ROWS_COMPACT, STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED, STYLE_MULTI_ROWS_HEIGHT_CONSTRAINED_COMPACT, STYLE_MULTI_ROWS_WIDTH_CONSTRAINED, and STYLE_MULTI_ROWS_WIDTH_CONSTRAINED_COMPACT suitable for components with highly different sizes.
- TreeLayoutModule: Moved balloon layouter to a separate module, see BalloonLayoutModule.
Viewer/Editor Interaction
- Graph2DLayoutExecutor: Added default AbortHandler that may be used to set a maximum duration for stopping or canceling a layout calculation.
- TableSelectionEditor: Added support for cycling the selection through labels, node ports, columns, and rows of a TableGroupNodeRealizer. See related methods setCyclicSelectionEnabled, isCyclicSelectionEnabled, and isCyclicSelectionModifierPressed.
- TableNodePainter: Added protected methods paintBackground and paintForeground for easier customization.
- DropSupport: Now requests the input focus for the target Graph2DView after a successful edge or node drop.
- Graph2D: Added method reverseEdge that optionally adjusts the visual features of an edge accordingly.
- EdgeRealizer: Added new property setLabelRenderingOrderInverted to govern the rendering order of the realizer's labels.
- Whenever possible, hit testing code now uses Graph2DView's associated HitInfoFactory instead of directly creating HitInfo instances.
- LocalViewCreator.Neighborhood: Improved performance of method buildViewGraph for large, nested model graphs significantly.
- Improved support for animations while using Graph2DView's optimized drawing modes (see setDrawingMode).
- YModule: Method createThread now uses the module's name as name for the new thread.
- ObjectStringConversion: Added support for non-opaque colors.
Bugfixes
- IncrementalHierarchicLayouter: Fixed possible
IndexOutOfBoundsException
if PortConstraints are used together with PortCandidateSets. - EdgeRouter: Minimum first and last segment length and minimum node to edge distance were sometimes ignored when used together with octilinear routing style.
- Grouping: Fixed bug in method getNearestCommonAncestor that sometimes caused wrong results if one of the specified nodes is the ancestor of the other node.
- InsetsGroupBoundsCalculator: Fixed method calculateBounds to consider only the given child nodes and all edges between those child nodes instead of all nodes and all edges in the graph.
- GenericTreeLayouter: Fixed
NullPointerException
that occurred when using LayeredNodePlacer as default node placer. - LayoutTool: Fixed calculation of lower width bound in method arrangeRectangleRows. Due to the better bound, the optimization procedure now needs less steps, especially for graphs with very wide components. Note, that the results may also slightly differ, because the optimization may now stop with slightly different values.
- SALabeling and GreedyMISLabeling: Fixed possible
NullPointerException
caused by labels with zero width/height and a "free" edge label model. - LabelingModule: Fixed bug that caused wrong choice of optimization strategy.
- Fixed anti-aliasing option for image output modules. This fix also turns off anti-aliasing in GIF images generated by GIFOutput.
- GenericNodeRealizerSerializer: Fixed deserialization of nodes whose GraphML representation does not contain any style properties. (Previously, default style properties were kept for these nodes.)
- LocalViewCreator.Neighborhood: Method createViewRealizer now adopts selection state from model folder nodes for corresponding view group nodes.
Incompatible Changes
Changes in Technical Requirements
- All yFiles for Java distributions now require Java 1.4 for building and running yFiles for Java based applications.
Behavior Changes
- EdgeRouter: Labels of table nodes are no longer ignored by the router if TableLayoutConfigurator is used to prepare the graph for layout calculations. If you want to ignore such labels you can use a DataProvider registered with key IGNORE_LABEL_KEY.
- EdgeRouter: Method doLayout now throws an
IllegalArgumentException
if there is a node with zero width or height in the given graph. - FixedGroupLayoutStage: Method getOrthogonalEdgeRouter now returns an instance of class EdgeRouter instead of class OrthogonalEdgeRouter.
- ComponentLayouter: Method setPreferredLayoutSize now throws an
IllegalArgumentException
when setting the preferred size to negative values or zero. - Changed default behavior of edge label placement in OrthogonalLayouter and LabelLayoutDataRefinement when using PLACE_ANYWHERE. Now edge labels are placed on the edge and in the center between source and target node.
- HierarchyManager: State-changing operations and grouping operations no longer change the hierarchic order of nodes. E.g. suppose method preTraversal yields the node order
(g1, g2, n1)
withg1
andg2
being top-level group nodes andn1
being a top-level normal node. Prior to 2.11, closing groupg2
changed the pre-traversal order to(g2, g1, n1)
. This change in the hierarchic order could lead to an undesirable change in the rendering order of these nodes as well. - GraphicsSerializationToolkit: Subclasses of
javax.swing.ImageIcon
now require dedicated DeserializationHandler and SerializationHandler implementations by default. - LocalViewCreator: The provided local view creator implementations LocalViewCreator.AncestorGroups, LocalViewCreator.CommonParentGroup, LocalViewCreator.EdgeGroup, LocalViewCreator.Neighborhood, and LocalViewCreator.SourceAndTarget no longer use ModelViewManager for creating view elements and managing mappings between model and view.
API Changes
- AlgorithmAbortedException: Removed methods
check()
andcheck(java.lang.String)
. Client code that needs to terminate layout calculations prematurely must use new class AbortHandler instead. - Moved classes PartitionGrid, PartitionCellId, RowDescriptor, and ColumnDescriptor from package
y.layout.hierarchic.incremental
to package y.layout.grid. - ItemFactory: Added method createRedirectedGroupEdge.
- LayeredNodePlacer: Removed data provider key
DP_KEY_DISTANCE_TO_PARENT_MAP
from public API, since it is for internal use only. - PathSearch: Signature of method calculateCosts has changed. It now takes an additional double array as parameter that is populated with the calculated costs instead of returning a new array.
- EdgeRouter: Penalty settings have been changed to double precision. See PenaltySettings.
- BusRouterModule: Removed protected method
getBusRouter()
. The router instance is no longer cached but re-created for each module run. - DrawingEmbedder: Removed public method
preprocessNodes(y.layout.LayoutGraph)
and protected methodprintStatistics()
.
Demos
- Updated bundled yGuard bytecode obfuscator to version 2.5.2 which has support for renaming
META-INF/services
entries if the entry corresponds to a type that is obfuscated. - NodePortsDemo now uses NodeHalos to prevent layout and edge routing algorithms from generating node port overlaps.
- The ANT build script that is part of demo/view/applet now supports signing the applet jar files. Signing applets is necessary for Java 7u25 and newer.
- Added demo CellSpanLayoutDemo that demonstrates IncrementalHierarchicLayouter's new support for cells spanning multiple columns and/or rows in a PartitionGrid.
- Added demo ComponentLayouterDemo that demonstrates the different arrangement styles provided by ComponentLayouter.
- Changed API of class GedcomInputHandlerImpl for easier customization through subclasses.
yFiles 2.10.1.2 - Changes Since 2.10.1.1
Bugfixes
Layout
- IncrementalHierarchicLayouter: Fixed rare bug that caused broken edge routes if edges are routed as polylines.
- IncrementalHierarchicLayouter: Fixed
IllegalArgumentException
that may appear for graphs containing nodes with fixed coordinates. - IncrementalHierarchicLayouter: Fixed bug that caused wrong coordinates of empty rows (see class RowDescriptor) whose minimum height is zero.
- LabelLayoutDataRefinement: Fixed possible
ClassCastException
for unbuffered layout runs. - RecursiveGroupLayouter: Removed all temporarily inserted port candidates before calling the inter-edge routing because otherwise the edges routes may become corrupted.
- DirectedOrthogonalLayouter: Fixed a bug that sometimes caused misplaced edge labels of grouped edges.
- TreeLayouter and GenericTreeLayouter: Fixed possible
NullPointerException
for trees with empty group nodes. - ShuffleLayouter: Fixed bug that may cause small offsets of fixed nodes.
- EdgeRouter: Fixed bug in calculation of edge to edge distance penalties which could reduce the space where edges can be routed causing them to take unnecessary long routes.
- EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to violate the minimal node to edge distance for the target node.
- EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to have unnecessary long and bended edge paths when using port constraints.
- EdgeRouter: Fixed bug that caused edges that connect a node with an ancestor group node to cross their source nodes when using port constraints.
- EdgeRouter: Fixed bug that makes it possible to group the source of one edge and the target of another edge at their common node.
- EdgeRouter: Fixed bug that sometimes causes superfluous edge overlaps.
- EdgeRouter: Fixed bug that caused minimum distance violation of grouped edges.
- EdgeRouter: Fixed rare
NullPointerException
while calculating edge crossing costs. - EdgeRouter: Fixed possible
NullPointerException
for edge groups that contain fixed edges. - EdgeRouter: Fixed bug that caused wrong routes for edges grouped with fixed edges.
- EdgeRouter: Fixed bug that sometimes assumed wrong label bounds for labels of table nodes. This could result in too many bends for edges that were routed around those wrong boxes. Labels of table nodes are now ignored by the router if TableLayoutConfigurator is used to prepare the graph for layout calculations.
- EdgeRouter: Fixed bug that sometimes assumed wrong label bounds if the router was used directly after another layout algorithm. This could result in too many bends for edges that were routed around those wrong boxes and/or edges crossing labels because the actual label boxes were ignored.
- PolylineLayoutStage: Fixed possible
ArrayIndexOutOfBoundsException
if there are fixed edges with a single, very short segment. - BusRouter: Fixed clean up of bends that resulted in unnecessary detours in edge paths.
- BusRouter: Fixed possible
ArrayIndexOutOfBoundsException
. - BusRouter: Fixed possible
IllegalStateException
caused by non-orthogonal edge segments. - BusRouter: Fixed possible
NullPointerException
when routing only a subset of edges without adding a DataProvider to the graph that marks edges as selected.
View
- HierarchyManager: Fixed removing folder nodes in graph hierarchies. Inter-edges whose real source or real target is the removed folder node and which reside in ancestor graphs of said folder node are now removed as well.
- MoveSelectionMode: Fixed missing undo/redo support for automatic bend removal with
removingInnerBends
enabled.
yFiles 2.10.1.1 - Changes Since 2.10.1
Bugfixes
Layout
- EdgeRouter: Fixed possible
ArrayIndexOutOfBoundsException
for graphs with very short fixed edges. - IncrementalHierarchicLayouter: Fixed a bug that could result in infinite y-coordinates when octilinear edge routing was enabled.
yFiles 2.10.1 - Changes Since 2.10.0.1
Major Features Added
Demos
- Added demo IsometryDemo that displays graphs in an isometric fashion to create the impression of a 3-dimensional view.
- Added demo NetworkMonitoringDemo, a simple network monitoring tool that combines custom realizers with animations.
- Added demo UmlDemo, a simple UML diagram editor with custom user interaction, realizers, and animations.
- Added demo MindMapDemo, a simple mind mapping tool with custom realizers and automatic arrangement of diagram elements.
- The new LayoutDemo demonstrates the main layout styles provided by yFiles for Java.
Minor Features Added
Layout
- DelegatingNodePlacer: Added key LEFT_RIGHT_DPKEY that allows choosing on which side a node is placed.
- FixNodeLayoutStage: Added additional fix point policies FIX_POINT_POLICY_UPPER_RIGHT, FIX_POINT_POLICY_LOWER_RIGHT, and FIX_POINT_POLICY_LOWER_LEFT.
- Added class StraightLineEdgeRouter that routes edges as straight lines considering specified port constraints.
Viewer
- Added new class FramedEdgePainter that draws (and optionally fills) the outline of an edge.
- Added new class BezierPathCalculator to easily create GenericEdgeRealizer configurations with Bezier curve based paths.
- LayoutMorpher: Added methods setEdgeLabelAnimationEnabled and setNodeLabelAnimationEnabled for turning edge label and node label placement change animations on or off.
- EdgeRealizer: Added new property setLabelRenderingOrderInverted to specify whether or not the rendering order of edge labels is inverted. By default, the label inserted last is rendered first.
Demos
- NodeLabelingDemo: Added custom label layout stage that demonstrates how to set up automatic label placement such that label positions above the nodes associated to the labels are preferred.
Improvements
Layout and Algorithms
- EdgeRouter: Improved support for port candidate sets (see PortCandidateSet).
- EdgeRouter: Rerouting improved to provide better results.
- EdgeRouter: Edge grouping improved to keep edge segments grouped longer and to consider the paths of fixed edges when calculating the paths of edges having the same edge group.
- EdgeRouter: When using polyline routing, short orthogonal edge segments in a monotonic path section are replaced by a single diagonal segment instead of a short diagonal segment followed by an orthogonal segment followed by a second short diagonal segment.
- EdgeRouter: Default penalty settings for minimal node to edge distance, minimal group node to edge distance, minimal first and last segment length, and bends in node to edge distance increased. As a result, these restrictions are considered more strongly.
- IncrementalHierarchicLayouter: Selfloop routing now takes the layout flow into account. For layout orientation top-to-bottom, selfloops will by default exit on the left or right and enter on top.
- IncrementalHierarchicLayouter: Added option to route selfloops like backloops (starting at the bottom of the node and ending at the top of the node) when backloop routing is enabled.
- BalloonLayouter: Reduced gaps between adjacent nodes.
- CircularLayouter: Improved results for "from sketch" mode.
- Trees: Added method isForest.
- BusRouterModule: Added new scope setting for routing edges at selected nodes.
Viewer
- GenericNodeRealizer, GenericEdgeRealizer, and NodePort now support serialization and deserialization of user data to/from structured XML using dedicated SerializationHandler and DeserializationHandler implementations.
- HotSpotMode: Added method accept for control over which nodes are resized.
- MovePortMode: Method getHitInfo now delegates to Graph2DView's HitInfoFactory.
- Overview: Added support for Swing borders.
- LineType: Added static factory method createLineType for creating shared LineType instances of arbitrary width.
- LineType: GraphML (de-)serialization of line types with style CUSTOM_STYLE is now fully supported.
- IOHandlerModule: Added new protected method adoptRenderingHints that automatically transfers essential rendering hints from the original view to the view used for export.
- RealizerCellRenderer.NodeRealizerIcon: Added new method paintRealizer for easier customization. Additionally, improved RealizerCellRenderer.NodeRealizerIcon's and RealizerCellRenderer.EdgeRealizerIcon's
paintRealizer
methods to suppress selection state painting using KEY_SELECTION_PAINTING instead of actually changing the displayed realizer's selection property.
Demos
- Undo/redo support is now added to demos which are editable.
- Clipboard support is now added to demos which are editable.
Bugfixes
Layout
- IncrementalHierarchicLayouter: Minimum first and last segment length settings were sometimes ignored when used together with edge grouping or group nodes.
- IncrementalHierarchicLayouter: Minimum edge length is now respected for edges that cross several layers, too.
- IncrementalHierarchicLayouter: Fixed bug that may cause broken edge routes for edges with port candidates if backloop routing is enabled (see option setBackloopRoutingEnabled).
- IncrementalHierarchicLayouter: Fixed bug that resulted in unsuitable edge routes for grouped edges within group nodes.
- IncrementalHierarchicLayouter: Fixed bug that resulted in a violation of strong port constraints of type
ANY_SIDE
for backloop edges. - PartitionGridLayoutStage: Fixed
NullPointerException
for unbuffered layout runs on graphs with group nodes. - SmartOrganicLayouter: Improved results for scope SCOPE_SUBSET and SCOPE_MAINLY_SUBSET (see method setScope) when only few nodes are marked in the subset to be laid out (see NODE_SUBSET_DATA).
- OrthogonalLayouter: Fixed
RuntimeException
that may appear for graphs with nodes of high degree. - OrthogonalGroupLayouter: Fixed bug that may cause wrong group bounds calculation if a group node label lies outside of the group node.
- PartialLayouter: Fixed possible
NullPointerException
if the algorithm is applied to a graph with partition grid (see PartitionGrid). - PartialLayouter: Fixed bug that may cause very long runtime if the algorithm considers node alignment (see option setConsiderNodeAlignment).
- RecursiveGroupLayouter: Fixed
IllegalStateException
that may appear if there are edges that start/end at group nodes. - LayoutTool: Fixed bug in method routeEdgesParallel that may cause points with
Double.NaN
-coordinates for some edges. - EdgeRouter: Fixed bug that may cause an
IllegalArgumentException
if a grid is specified (see option setGrid). - EdgeRouter: Fixed performance problems for graphs with overlapping fixed edges.
- DynamicObstacleDecomposition: Fixed JDK 7 only
IllegalArgumentException
related to comparator implementations that do not define a total order but only a partial order. - ParallelEdgeLayouter: Fixed
NullPointerException
that appears if the leading edge has zero length. - ParallelEdgeLayouter: Fixed bug that may cause points with
Double.NaN
-coordinates for some edges. - BusRouter: Fixed possible
StackOverflowError
. - BusRouter: Fixed bug that may cause a broken bus structure.
- OrthogonalEdgeRouter: Fixed rare
NullPointerException
which may appear if monotonic path restrictions are specified.
Viewer
- TableGroupNodeRealizer: Fixed resizing of inner columns/rows in methods setParent and setParent.
- DefaultEditorFactory: Fixed
IllegalArgumentException
that is triggered by choosing an image with very small aspect ratio as value for ImageOptionItem. - ColorOptionItem: Fixed color icon display in table option editor with Windows Look and Feel and attribute ATTRIBUTE_USE_ICON_AS_TRIGGER set to
true
. - GraphMLParser: Fixed exception messages for missing port definitions.
Incompatible Changes
- Changed default behavior of edge label placement in layouters with integrated edge labeling when using PLACE_ANYWHERE. Now edge labels are placed on the edge and in the center between source and target node. This change affects the following layout algorithms: IncrementalHierarchicLayouter, OrthogonalLayouter, OrthogonalGroupLayouter, DirectedOrthogonalLayouter, and GenericTreeLayouter.
- LineType: Method getLineType is now deprecated. Usages should be replaced by createLineType.
yFiles 2.10.0.1 - Changes Since 2.10
Improvements
- LayoutMorpher: Improved initial position of new bends.
- GraphConnectivity: Improved method makeBiconnected to work with graphs with self-loops (i.e. edges whose source node is also the target node).
- Groups: Replaced recursive implementation of method biconnectedComponentGrouping with an iterative algorithm to support larger graphs.
Bugfixes
- ParallelEdgeLayouter: Fixed NPE which may appear when source/target points of parallel edges are outside of the corresponding node.
- Fixed JDK 7u25 only ImagingOpException that is triggered by BevelNodePainter and ShinyPlateNodePainter with shadow drawing enabled.
- EdgeRouter: Fixed endless loop which may appear in rare cases.
- OrthogonalEdgeRouter: Fixed NPE that may appear when both options setReroutingEnabled and setLocalCrossingMinimizationEnabled are enabled.
- GroupNodeRouterStage: Fixed possible ClassCastException that was caused by missing removal of a temporary added DataProvider.
- EdgeRouter: Fixed exception that could occur when using edge grouping together with custom edge layout descriptors.
- EdgeRouter: Fixed NPE that could occur when sphere of action was not ROUTE_ALL_EDGES.
- LayoutMorpher: Adding node labels or edge labels to a
LayoutMorpher
's graph while running its animation or in between creating theLayoutMorpher
instance and starting its animation no longer causes the animation to break withArrayIndexOutOfBoundsException
s. - PartialLayouter: Reduced cases where the result contains overlapping node elements.
- PartialLayouter: Improved edge routing for edges between fixed elements as well as for cases where option setRouteInterEdgesImmediatelyEnabled is enabled.
- PartialLayouter: Fixed IndexOutOfBoundsException that could occur for large graphs.
- DropSupport: Fixed incorrect return value of method dropNodeRealizer when edge splitting is enabled but the created node does not split any edge.
- DropSupport: dropNodeRealizer now updates the view's world rectangle to contain the new node.
- Graph2DClipboard: Fixed undo/redo of group node size changes after pasting content into a group node.
- Graph2DViewActions.EditLabelAction: Fixed undo/redo regression.
- RecursiveGroupLayouter: Fixed bug that increased the runtime for mainly flat graph structures.
- GraphTransformer: Fixed group nodes bounds after transforming a sub-graph only.
- MagnifierViewMode: Significantly improved memory usage and rendering quality.
- Fixed XmlXslDemo's
ant2graphml.xsl
stylesheet to correctly handle targets with multiple dependencies.
yFiles 2.10 - Changes Since 2.9.0.2
Major Features Added
Layout
- Class EdgeRouter is a new edge routing algorithm that produces polyline edge routes. The segments of an edge are either orthogonal (i.e., the slope of each segment is a multiple of 90 degrees) or octilinear (i.e., the slope of each segment is a multiple of 45 degrees). See OctilinearEdgeRouterDemo.
[To the corresponding section in the yFiles Developer's Guide...] - PolylineLayoutStage: A layout stage that adds polyline segments to the orthogonal edge paths of a graph.
- IncrementalHierarchicLayouter: Added support for octilinear edge routing, i.e., a routing style where the slope of each edge segment is a multiple of 45 degrees. Different edge routing styles can be specified using class RoutingStyle. See IncrementalHierarchicLayouterDemo .
- PreferredPlacementDescriptor: A new descriptor that allows to specify advanced preferred placement information for edge labels. See PreferredLabelPlacementDemo.
[To the corresponding section in the yFiles Developer's Guide...]
Minor Features Added
Viewer/Editor Interaction
- Added new class Graph2DViewMouseWheelScrollListener to support scrolling a Graph2DView's viewport in horizontal or vertical direction in response to mouse wheel events.
- DropSupport: New support for automatically splitting an edge in two when a node is dropped onto it.
- Added Graph2DViewActions.EditLabelAction which supports customization of label text editing in a Graph2DView.
- ColorOptionItem: Optionally, color values in option editors are now represented as hex triplets or quadruples (#RRGGBB or #RRGGBBAA) instead of decimal tuples. The new attribute ATTRIBUTE_DISPLAY_HEX_VALUES enables this representation.
- ColorOptionItem: Added editors which allow the editing, copying, and pasting of the textual representation of color values. The new attribute ATTRIBUTE_ALLOW_TEXT_INPUT enables these editors.
- GenericNodeRealizer: Introduced new GenericNodeRealizer.LabelFactory interface to allow customization of createNodeLabel without the need for subclassing.
- GenericEdgeRealizer: Introduced new GenericEdgeRealizer.LabelFactory interface to allow customization of createEdgeLabel without the need for subclassing.
- Graph2DPrinter: Added callback methods printPosterCoords and initializePosterCoordsFont to customize poster coordinates printing.
Layout
- Extended InteractiveOrganicLayouter with a single threaded mode.
- BalloonLayouter: New option to take into account the bounds of node labels when calculating a layout.
Improvements
- Added sample PortLocationModel implementation SidePortLocationModel to the NodePortsDemo.
- Improved the performance of PortCandidate which potentially improves the performance of the IncrementalHierarchicLayouter with rotated graphs with PortCandidates.
- GenericNodeRealizer.Factory: Fixed getImplementation to support GenericNodeRealizer.LayerHandler.
- Introduced interfaces EdgeLabelDeserializer.ConfigurationFactory and NodeLabelDeserializer.ConfigurationFactory to be able to handle unknown label configuration when parsing GraphML similar to the way GenericEdgeRealizer/GenericNodeRealizer/NodePort configurations are handled.
- GraphLayoutLineWrapper: Improved edge routing for overlapping edges (e.g., grouped edges).
- LayoutMorpher: Now animates label placement changes as well.
- Graph2D: All selection related methods now call the appropriate single-element version of
isSelected
/setSelected
to determine/modify selection states. - Significantly reduced effort necessary to use customized implementations of GraphMLParser and GraphMLWriter for reading/writing GraphML.
- HierarchicLayouter now treats edge groups at empty group nodes like those on normal nodes instead of ignoring them like it is done for non-empty group nodes.
- LabelLayoutTranslator added option setAutoFlippingEnabled to specify whether or not edge labels should be automatically flipped if they would be upside-down.
- AbstractLabelingAlgorithm added option setAutoFlippingEnabled to specify whether or not edge labels associated with a "free" label model should be automatically flipped if they would be upside-down.
- GenericTreeLayouter creates more compact layouts, especially for trees with edge labels.
- PartialLayouter: Now considers edge ports when calculating the barycenter of a component (if setPositioningStrategy is set to SUBGRAPH_POSITIONING_STRATEGY_BARYCENTER).
- Added auto-flipping to RotatedDiscreteEdgeLabelModel and RotatedSliderEdgeLabelModel. Labels that are placed upside down by a layouter will be flipped.
- SmartOrganicLayouter: Now, fixed nodes are not moved by a fixed offset if scope is set to SCOPE_SUBSET.
- Optimized number of generated PortCandidates in RecursiveGroupLayouter for the core layouter.
- WeightedLayerer: Improved quality (i.e., reduced the number of reversed edges) if setWeightedCycleRemovalEnabled is enabled.
- Added the ability to DefaultNodePlacer to produce polyline style edge routings with sloped edge segments.
- Added the ability to DefaultPortAssignment to distribute edges at the border of the nodes.
Demos
- The new OctilinearEdgeRouterDemo demonstrates the routing capabilities of class
EdgeRouter
. - The existing IncrementalHierarchicLayouterDemo
shows how to configure the
IncrementalHierarchicLayouter
to produce octilinear edge routes. - The new PreferredLabelPlacementDemo shows how to configure the
PreferredPlacementDescriptor
of labels and how this affects the label placement of different layouters. - The new IntersectionCalculatorDemo shows how to correct edge connection points for non-rectangular nodes when working without yFiles for Java's visualization framework in package
y.view
and sub-packages thereof.
Bugfixes
- IncrementalHierarchicLayouter: Fixed incorrect handling of port candidates in layouts where rotation and a mirror was set.
- YVector: Fixed rotate to no longer return vertically mirrored results.
- NodePort: Fixed several problems with updating connected edges on node port location changes.
- RotatedSliderEdgeLabelModel, SliderEdgeLabelModel, and SmartEdgeLabelModel: Improved label placement at zero-length edge segments.
- LayoutMorpher: Fixed animation methods to take newly changed settings into account when running the morpher in an AnimationPlayer.
- AbstractNodeRealizerSerializer: Fixed deserialization of nodes whose GraphML representation does not contain any node labels. (Previously, a default label was created for these nodes).
- SmartEdgeLabelModel: Improved label placement at zero-length edge segments to prevent NullPointerExceptions.
- SmartEdgeLabelModel: Improved interactive label placement after removing one or more edge segments to prevent NullPointerExceptions.
- EdgeRealizer and GenericEdgePainter now support VALUE_EDGE_LABEL_PAINTING_ON for sloppy painting.
- EditMode: Fixed cursor that sometimes changed to move cursor although mouse drag resulted in node resizing.
- MovePortMode: Fixed loss of inter-edge node port assignments when changing an inter-edge to a new end node.
- OrientedRectangle: Fixed intersectionPoint that calculated sometimes wrong intersection points.
- Fixed bug that caused ArrayIndexOutOfBoundsException in AspectRatioComponentLayerer.
- Fixed integer overflow when group compaction is activated in IncrementalHierarchicLayouter while layouting extremely large, deeply nested graphs.
- OrthogonalGroupLayouter supports labels at edges adjacent to group nodes.
- Fixed bad edge routings in FamilyTreeLayouter when there are several marriages between generations.
- IsolatedGroupComponentLayouter now considers labels in group bounds calculation if label awareness is enabled.
- IncrementalHierarchicLayouter: Fixed port handling of edges with a single edge port candidate that is contained in a set of node port candidates.
- OrthogonalLayouter and DirectedOrthogonalLayouter: Fixed bug that caused IllegalArgumentException if input graph contains overlapping parallel edges and from sketch mode is enabled (see setUseSketchDrawing).
- MoveSelectionMode: Fixed NullPointerException that resulted from deleting the moved nodes of a hierarchically organized graph and having Shift pressed when releasing the mouse.
Incompatible Changes
- GIFIOHandler now uses
javax.imageio.ImageIO#getImageWritersByFormatName(String)
to retrieve anjavax.imageio.ImageWriter
for encoding images inGIF
format. As of Java 1.6, such anImageWriter
is available by default. For Java 1.4 and Java 1.5, a suitableImageWriter
has to be registered externally (using Java's service provider mechanism). - TableEditorFactory: All editor dialogs (i.e. color chooser, file chooser, multi-line string editor, etc.) now open by default centered on the table editor's ancestor window instead of centered on the screen.
- DefaultGenericAutoBoundsFeature: Methods that previously called one of the class's specific implementations of calcMinimumInsetBounds, getAutoBoundsInsets, or getMinimumSize directly now call the corresponding method of the given context realizer to allow for decoration.
- EdgeLabel: Method setModel does no longer call method setDistance.
- EdgeLabelLayout: Removed method getPreferredPlacement and added method getPreferredPlacementDescriptor.
- PartialLayouter: Replaced method configureOrthogonalEdgeRouter by method configureEdgeRouter.
- PartialLayouter: Method setEdgeRoutingStrategy now disables a previously set customized edge router.
yFiles 2.9.0.2 - Changes Since 2.9.0.1
Improvements
- NodePortLayoutConfigurator: Added support for conversion of group node ports into weak port constraints.
- Improved layout support for group node ports in the NodePortsDemo.
Bugfixes
- EditMode: Fixed problems that allowed for selections of different kinds of elements although
mixedSelectionEnabled
was set tofalse
. - Fixed memory leaks in ImageNodeRealizer, MouseInputEditor implementations for tabular nodes, and editors created by TableEditorFactory.
- GroupNodePainter.GroupStateEditor: Fixed problem that triggered close/open state changes when clicking at the old location of the state change trigger icon of a group node or folder node although the icon's location changed when last closing the group node/opening the folder node.
- MoveNodePortMode: Fixed problem with orthogonal edge routing and ProxyShapeNodeRealizer.
- LayoutMorpher: Fixed morphing of node ports.
- SmartEdgeLabelModel, RotatedDiscreteEdgeLabelModel, RotatedSliderEdgeLabelModel: Fixed possible NullPointerException for labels on horizontal/vertical segments.
- Fixed clipping problems for edges that are bound to node ports that occurred when the edge's source and/or target node was resized.
- ShadowNodePainter: Fixed handling of rendering hint KEY_NODE_PORT_PAINTING.
- TooltipMode: Fixed node port tool tips.
- ShortestPaths: Fixed an error in method findShortestUniformPaths. In many cases, nodes and edges which did not belong to a shortest path were added to the result nevertheless.
- PartialLayouter: Fixed strong port constraints for orthogonally routed inter-edges.
- TopLevelGroupToSwimlaneStage: The stage now respects the minimum sizes of top-level groups.
- Groups: Fixed possible NullPointerException in method biconnectedComponentGrouping when calculating biconnected components in a graph containing self-loops.
yFiles 2.9.0.1 - Changes Since 2.9
Improvements
- Cycles: Method findAllCycleEdges has been improved to return only edges that belong to at least one simple cycle. Previously, all edges were returned for the undirected case.
demo.view.flowchart.layout.FlowchartLayouter
: Support for group nodes, better label positions for labels with a Free or Smart label model.
Bugfixes
- Fixed writing partial graph hierarchies to GraphML. I.e.
graphMLIOHandler.write(g, dest)
whereg
is not the root graph (see getRootGraph) of the graph hierarchy now works as expected. - Fixed occasional
NaN
values in label placement calculated by SmartEdgeLabelModel or RotatedSliderEdgeLabelModel. - Several fixes for the editors of ColorOptionItem: Set a white background for all color patches which brings out transparent colors more clearly, adhere to the value of ATTRIBUTE_SHOW_ALPHA when displaying text, open the popup menu without covering the editor component, set the color chooser dialog's title to the name of the corresponding item and its initial value to the editor's current value.
demo.view.flowchart.layout.FlowchartLayouter
ignores table nodes instead of throwing an exception.- CreateEdgeMode: Fixed IllegalArgumentException that occurred when closing a group node while creating an edge starting at one of the group node's child nodes.
- IncrementalHierarchicLayouter: Fixed bug that caused that options "backloop routing" (see setBackloopRoutingEnabled) and "automatic edge grouping" (see setAutomaticEdgeGroupingEnabled) were ignored.
- MultiPageLayouter: Fixed NullPointerException that occurred when calling
doLayout
several times on the same instance. - GraphConnectivity: Fixed methods that calculate biconnected components to mark selfloops as not belonging to any biconnected component.
yFiles 2.9
Major Features Added
Viewer/Editor Interaction
- New label models SmartNodeLabelModel and SmartEdgeLabelModel enable free label placement of node labels and edge labels. The label models provide smart dynamic behavior including support for automatic label rotation corresponding to the direction of an edge label's associated edge segment and fixed as well as proportional node label alignment with node borders.
View mode class MoveLabelMode provides new dedicated support for interactive snapping of labels that use the new label models.
The SmartLabelModelDemo shows how to useSmartNodeLabelModel
andSmartEdgeLabelModel
, and how node labels and edge labels behave on interactive changes of nodes and edges, respectively.
[To the corresponding section in the yFiles Developer's Guide...] - YRenderingHints: New rendering hints provide fine-grained control over rendering details of graph elements.
The LevelOfDetailDemo presents the effects of using rendering hints to control the rendering process of elements in the view.
[To the corresponding section in the yFiles Developer's Guide...]
Layout
- Class MultiPageLayouter is a new layout algorithm that breaks apart a given graph into a set of smaller graphs so that each layout of a small graph fits into a given width and height.
MultiPageLayoutDemo shows how to use classMultiPageLayouter
to sub-divide large graphs into smaller bits of navigable information.
[To the corresponding section in the yFiles Developer's Guide...]
Minor Features Added
Viewer/Editor Interaction
- Added new dedicated HTML label configuration HtmlLabelConfiguration that supports event handling related to hyperlinks in HTML formatted labels.
- TooltipMode: Added a ViewMode that shows tooltips for all kinds of graph elements: nodes, edges, labels, and node ports. It is possible to enable/disable tooltips for all of these graph elements separately.
- LocalViewCreator: Added hierarchy awareness to LocalViewCreator.Neighborhood and LocalViewCreator.SourceAndTarget so real edge end nodes and ancestor nodes can be shown in a local view. This option can be set using method setHierarchyAware and is disabled by default.
- Graph2DViewActions.DeleteSelectionAction: Added element-type specific callback methods to allow client code to react to deletion events for edges, edge labels, bends, nodes, node labels, node ports, table columns, and table rows.
- ImageIoOutput: Added boolean option "Transparent Background" for PNG and GIF image formats.
- TableEditorFactory: Added new attribute ATTRIBUTE_EDITOR_LOCATION to specify where external item editors should appear.
- GroupNodeRealizer.StateChangeListener can be configured to retain the selection state of ProxyShapeNodeRealizer instances when exchanging delegate realizers.
- MoveLabelMode: New options for displaying the valid label candidates according to a label's label model.
- SelectionPortPainter: Added several selection styles as well as a callback method that allows for customizing color and stroke of the selection marker.
Layout
- The orthogonal layout algorithms OrthogonalLayouter (OL), OrthogonalGroupLayouter (OGL), and DirectedOrthogonalLayouter (DOL) now support specifying a minimum first/last segment length. See the corresponding descriptions of EDGE_LAYOUT_DESCRIPTOR_DPKEY (in OL), EDGE_LAYOUT_DESCRIPTOR_DPKEY (in OGL), and EDGE_LAYOUT_DESCRIPTOR_DPKEY (in DOL), respectively.
- SimplexNodePlacer: Added an algorithm that reduces the number of bends. This option can be set using method setBendReductionEnabled and is enabled by default. Note: using this option increases the runtime of the IncrementalHierarchicLayouter. If the runtime exceeds the maximal duration the number of bends is not reduced.
- Added abstract class AbstractPortConstraintOptimizer, a partial implementation of interface PortConstraintOptimizer, to minimize the effort required to modify the port assignment after the sequencing phase of a hierarchic layout.
- TreeLayouter: When using port styles BORDER_CENTER_PORTS and BORDER_DISTRIBUTED_PORTS together with child placement policies CHILD_PLACEMENT_POLICY_LEAVES_STACKED, CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT, CHILD_PLACEMENT_POLICY_LEAVES_STACKED_RIGHT, and CHILD_PLACEMENT_POLICY_LEAVES_STACKED_LEFT_AND_RIGHT edges connect to the appropriate sides of their target nodes instead of to the top. Moreover, the order of outgoing edges no longer results in crossings for port style BORDER_DISTRIBUTED_PORTS.
- AbstractLabelingAlgorithm: Added DataProvider key LABEL_MODEL_DPKEY that can be used to temporarily specify the model of labels that is used by the labeling algorithm.
Analysis
- ShortestPaths: Added method shortestPair.
Improvements
- FamilyTreeLayouter: Improved the algorithm with respect to the number of edge crossings.
- PCListOptimizer: Improved the handling of port candidates and enhanced backloop routing support.
- MagnifierViewMode: Backgrounds of views that use DefaultBackgroundRenderer are now magnified by default, too.
- Edge labels no longer use the line type of the edge for underlining text but a solid line of width
1
. - Improved reading/writing realizer state from/to GraphML, i.e. the following properties are now supported:
- EdgeRealizer
visible
, - NodeRealizer
visible
, - GroupNodeRealizer
groupDepthFillColorEnabled
, - GroupNodeRealizer
closedGroupIcon
, - GroupNodeRealizer
openGroupIcon
- EdgeRealizer
- Graph2DViewActions.CloseGroupsAction: When closing an inner group node and the resulting folder node is smaller than the group node was, the enclosing group's size will not change anymore.
- BezierEdgeRealizer and QuadCurveEdgeRealizer now always paint the auxiliary lines for selected edges as a solid line of width 1.
- HitInfoFactories.DefaultHitInfoFactory: The behavior of createHitInfo has been adjusted to match its documentation regarding the handling of node label hits for first hit only queries.
- Updated bundled yGuard bytecode obfuscator to version 2.4 which has support for Java 7 class files.
Demos
- The new GraphExplorerDemo shows how to successively explore large graphs.
- Added new MultiPageLayoutDemo that shows how to use class
MultiPageLayouter
to sub-divide large graphs into smaller bits of navigable information. - The new EntityRelationshipDemo shows how to visualize and edit entity-relationship diagrams (ERD).
- Added new SmartLabelModelDemo that demonstrates how to use
SmartNodeLabelModel
andSmartEdgeLabelModel
and how both models behave on interactive changes of nodes and edges. - Added new HyperlinkDemo that demonstrates how to trigger and process hyperlink events for HTML formatted labels.
- Added new FadingGroupStateIconDemo that demonstrates how to fade in/out the group state icon when moving over group/folder nodes using a custom
ViewMode
. - Added new LevelOfDetailDemo that presents the effects of using rendering hints to control the rendering process of elements in the view.
- Extended the FlowchartDemo by a new dedicated layout algorithm for flowchart diagrams and added many new example diagrams.
Bugfixes
- LabelLayoutDataRefinement: Fixed ClassCastException due to wrong type of label model parameters.
- PortCandidate: Fixed bug in method getXOffsetForLayoutOrientation and getYOffsetForLayoutOrientation that caused wrong return results for some input combinations.
- MoveLabelMode: Method mouseExited cancels label movement to prevent inconsistent label model state.
Incompatible Changes
- MoveLabelMode: Method cancelEditing no longer calls mouseReleasedLeft but mimics its previous behavior.
- RotatedSliderEdgeLabelModel: The angle set with method setAngle is now always applied in clockwise direction. Note: For cases where auto-rotation is enabled (see setAutoRotationEnabled) this is not a change to the current behavior.
- RotatedDiscreteEdgeLabelModel: The angle set with method setAngle is now always applied in clockwise direction. Note: For cases where auto-rotation is enabled (see setAutoRotationEnabled) this is not a change to the current behavior.
yFiles 2.8.0.6 - Changes Since 2.8.0.5
Bugfixes
- Fixed JDK 7u25 only
ImagingOpException
that is triggered by BevelNodePainter and ShinyPlateNodePainter with shadow drawing enabled. - RotatedSliderEdgeLabelModel and SliderEdgeLabelModel: Improved label placement at zero-length edge segments.
- NodePort: Fixed several problems with updating connected edges on node port location changes.
- YVector: Fixed rotate to no longer return vertically mirrored results.
yFiles 2.8.0.5 - Changes Since 2.8.0.4
Improvements
- Cycles: Method findAllCycleEdges has been improved to return only edges that belong to at least one simple cycle. Previously, all edges were returned for the undirected case.
Bugfixes
- Groups: Fixed possible NullPointerException in method biconnectedComponentGrouping when calculating biconnected components in a graph containing self-loops.
- ShortestPaths: Fixed an error in method findShortestUniformPaths. In many cases, nodes and edges which did not belong to a shortest path were added to the result nevertheless.
- GraphConnectivity: Fixed methods that calculate biconnected components to mark selfloops as not belonging to any biconnected component.
yFiles 2.8.0.4 - Changes Since 2.8.0.3
Bugfixes
- Fixed JDK 7 only IllegalArgumentException that is triggered by numerical overflow in various Comparator or Comparable implementations.
- GroupNodeRealizerSerializer: GroupNodeRealizer's properties
closedWidth
andclosedHeight
are now stored as part of the<State>
child element of the<GroupNode>
element. - EdgeGroupRouterStage: Fixed broken edge grouping when specifying edge group IDs on both endpoints of an edge.
- TableGroupNodeRealizer: Fixed resizing behavior of first and last row when moving child nodes upwards.
- Fixed TableGroupNodeRealizer's default GenericNodeRealizer.UnionRectCalculator to take node ports into account.
- TableOrderEditor: Improved the editor's robustness in cases where a table column/row is deleted while dragging the column/row to a new position.
- Fixed DefaultOrderRenderer's paintSloppy method that used the renderer's
paintOrder
instead of thesloppyPaintOrder
. - EdgeConnectorDemo: Fixed connector location for overlapping nodes.
- Groups: The parameters
minGroupCount
andmaxGroupCount
of method edgeBetweennessClustering had no effect. - Fixed UnsupportedOperationException that was triggered when using a generic labeling algorithm (i.e. a subclass of AbstractLabelingAlgorithm) together with layout stage LabelLayoutDataRefinement.
- Fixed NullPointerException that happened for the rare case of registering a PartitionGrid, but not assigning any nodes to grid cells.
yFiles 2.8.0.3 - Changes Since 2.8.0.2
Bugfixes
- Fixed JDK 7 only IllegalArgumentException that is triggered by comparator or comparable implementations that do not define a total order but only a partial order.
- Fixed JDK 7 only ClassCastException that is triggered in PartialLayouter with
considerNodeAlignment
set tofalse
- GroupNodeRouterStage: Fixed bug that caused a broken graph structure for graphs containing groups with self-loops.
- EdgeGroupRouterStage: Fixed bug that caused violation of edge grouping constraints as well as port constraints.
- TableNodePainter: Added support for node ports.
- NodePort: Fixed edge port updates for connected self loops when moving a node port.
- PolyLineEdgeRealizer: Fixed selfloop path for edges that are connected to two node ports that are vertically aligned.
- BusPlacer: Fixed bug that sometimes caused exceptions due to rounding errors.
- PartialLayouter: Fixed bug that caused a very long runtime if the layout orientation is not equal to ORIENTATION_NONE and option setConsiderNodeAlignment is enabled.
- IncrementalHierarchicLayouter: Fixed bug that caused superfluous crossings for orthogonal edges attached to the same port.
- Graph2DViewActions.AddPredecessorsAction and Graph2DViewActions.AddSuccessorsAction: Fixed NullPointerException that occurred for graphs without an associated HierarchyManager instance.
yFiles 2.8.0.2 - Changes Since 2.8.0.1
Improvements
- BusRepresentations: The methods to transform from and to hub representation can now copy data which is attached to an original edge using specific data provider keys to the corresponding edge in the transformed graph.
- PartialLayouter: Improved runtime for graphs with large components when option setConsiderNodeAlignment is enabled.
- MoveNodePortMode: Added callback method portMoved that is invoked when the moved node port has been assigned its final position.
- BusRouterDemo: Improved user interaction by automating the hub creation and removal and improved customizability by preserving the edge instances on layout calculation.
Bugfixes
- YGF deserialization support for JDK 1.6.0_26 as well as JDK 1.6.0_25 (and earlier) versions of
javax.swing.ImageIcon
.Warning: This fix requires all classes and interfaces in package
y.x
and sub-packages thereof to be excluded from obfuscation. - Fixed "delete selection" in the flowchart demo.
- IncrementalHierarchicLayouter: Fixed bug that caused unnecessary crossings when using node grouping.
- PartialLayouter: Fixed bug that caused misplaced labels after arranging components.
- NetworkFlows: Fixed wrong calculation of the cut set returned by method calcMaxFlowMinCut.
- LayoutGraphCopyFactory: Added missing parent node information when copying grouped graphs.
- Graph2DViewActions.DuplicateAction: For certain graphs and selections duplicate resulted in an illegal argument exception "Node not in this graph".
- Graph2DClipboard: Setting the parent group in pasteFromClipboard did not work in inner graphs.
- Fixed problem that required a mouse click to happen before edge creation could be cancelled when edge creation is started by DropSupport.
- Fixed edge label positions in LayoutPreviewPanel.
yFiles 2.8.0.1 - Changes Since 2.8
Bugfixes
- SliderEdgeLabelModel and RotatedSliderEdgeLabelModel: Fixed bug that sometimes caused NullPointerException when accessing the model parameter.
- DrawingEmbedder: Fixed NullPointerException caused by nodes having the same center.
- OrientedRectangle: Fixed wrong calculation of intersection point with line segment.
- OrientedRectangle: Fixed bug in contains test.
- IncrementalHierarchicLayouter: Fixed bug that sometimes caused an assignment of infinite coordinates to group nodes as well as to points of edges incident to group nodes.
- IncrementalHierarchicLayouter: Fixed bug that caused unnecessary crossings when using node grouping.
- NodeLabel: Fixed problems with leading newlines in label text for auto size policy AUTOSIZE_NODE_WIDTH and configuration
CroppingLabel
. - Graph2DView: Fixed "Division by 0" when opening label editor for very small zoom levels.
- RealizerCellRenderer.EdgeRealizerIcon: Paint icon at the specified location instead of at location (0,0).
- BusRouter: Fixed bugs that caused a NullPointerException and the IllegalStateException "Segment is not orthogonal".
- BusRouter: Prevent the IllegalStateException "Edge has wrong bus ID".
- Graph2DView: Calling the view's print method now properly sets the
printing
flag of the corresponding GraphicsContext rendering hint. - Graph2DPrinter: Calling the printer's print method now creates and sets an appropriate GraphicsContext rendering hint.
- Graph2DViewActions.CloseGroupsAction: To fix undo/redo behavior, the states of the group nodes that are closed in closeGroups are now properly backed up using backupRealizers.
- Graph2DViewActions.OpenFoldersAction: To fix undo/redo behavior, the states of the folder nodes that are opened in openFolders are now properly backed up using backupRealizers.
- Graph2DViewActions.OpenFoldersAction: openFolder has been improved to better handle mismatches between the geometry stored in the resulting group node's realizer and the bounding box of the folder node's inner graph.
- Fixed GraphML deserialization problems with rotated free edge labels.
- DropSupport: Fixed bug that prevented drag and drop for nodes/edges from working after a dragged edge/node had been dropped outside the registered drop target.
- EdgeLabel and NodeLabel: Fixed bug in "CroppingLabel" configuration that resulted in top inset being added to bottom inset.
- AbstractSelectionBoxMode: Added dedicated cancelEditing implementation that removes the temporary selection box from the view.
- DelegatingNodePlacer: Overriding getUpperLeftChildren and getLowerRightChildren had no effect.
Improvements
Automatic Layout
- OrientationLayouter: Node insets as well as port constraints are now also translated correctly for each possible orientation.
Viewer/Editor Interaction
- NodeStateChangeEdgeRouter: Improved automatic edge path adjustments for orthogonal edges when group nodes are closed.
Changes in Default Behavior
- OrientationLayouter: Changed behavior for mirrored orientations, i.e., there may be a fixed position offset between the layout results of the old and new version. The new version ensures that the position of elements not changed by the layout algorithm are kept fixed.
yFiles 2.8
Major Features Added
Automatic Layout
- New support for rotated labels in the yFiles label models as well as in the generic labeling algorithms. Two new edge label models, RotatedDiscreteEdgeLabelModel and RotatedSliderEdgeLabelModel, also add new auto-rotation support that enables automatic adjustment of an edge label's rotation angle according to its associated edge segment.
The EdgeLabelingDemo demonstrates how to use generic labeling algorithms in general as well as how to use the new rotation-related features such as automatic rotation and automatic flipping of label display to prevent "upside-down" labels.
[To the corresponding section in the yFiles Developer's Guide...] - PartialLayouter: A new layout algorithm for partial layouts. This layout algorithm changes the coordinates for a given set of graph elements (called partial elements). The location or size of the remaining elements (called fixed elements) is not allowed to change. The layout algorithm aims to place the partial elements such that the resulting drawing (including the fixed elements) has a good quality with respect to common graph drawing aesthetics.
Four new demos present specific setup of the new partial layout support in conjunction with Circular, Hierarchic, Organic, and Orthogonal Layout: CircularPartialLayoutDemo, HierarchicPartialLayoutDemo, OrganicPartialLayoutDemo, and OrthogonalPartialLayoutDemo, respectively.
[To the corresponding section in the yFiles Developer's Guide...] - BusRouter: A new orthogonal bus-style edge routing algorithm. This algorithm combines the large number of edges of complete subgraphs in a concise, tree-like structure that consists only of vertical and horizontal line segments. The positions of the nodes in a graph are not altered by this algorithm.
The BusRouterDemo presents this new edge routing algorithm.
[To the corresponding section in the yFiles Developer's Guide...] - OrthogonalEdgeRouter: Added support for monotonic path restrictions. Such restrictions specify that edges should be routed monotonically in vertical and/or horizontal direction. The restrictions can be set with method setMonotonicPathRestriction.
[To the corresponding section in the yFiles Developer's Guide...] - IncrementalHierarchicLayouter: Added DataProvider key CRITICAL_EDGE_DPKEY that allows to specify a priority value for edges that are part of critical paths. The layouter tries to vertically align each node pair that is connected by such a "critical" edge (an edge that has a non-zero, positive priority value). Conflicts between different critical edges are resolved in favor of the higher priority.
The CriticalPathDemo shows the setup of hierarchic layout in order to emphasize critical paths in a diagram.
[To the corresponding section in the yFiles Developer's Guide...] - SimplexNodePlacer: Added option setEdgeStraighteningOptimizationEnabled which allows to specify whether or not a postprocessing step should be applied that tries to remove some bends. Enabling this option may violate some minimum distances specified by the user.
- OrthogonalEdgeRouter: Added support for PortCandidateSets that allow to specify the available port candidates at a node (see PortCandidateSet).
Viewer/Editor Interaction
- Extensive support for node ports that enable definition of visual areas at nodes where edges can connect.
The NodePortsDemo demonstrates user interaction and visual customization for node ports. The LogicGatesDemo also uses node ports.
[To the corresponding section in the yFiles Developer's Guide...] - NodeScaledPortLocationModel: New predefined implementation of the new port location model interface PortLocationModel. A port location model facilitates the configuration of node port locations at a node.
Minor Features Added
Automatic Layout
- New layout stage class PartitionGridRouterStage enables OrthogonalEdgeRouter to properly route edges within a partition grid.
- RecursiveGroupLayouter: Added DataProvider key GROUP_NODE_LAYOUTER_DPKEY that allows an easier way to specify the layout algorithm used for recursive group nodes. Furthermore, it allows to specify non-recursive group nodes, i.e., group nodes whose contents are laid out using the Layouter instance specified by the nearest predecessor of the group node (with respect to the grouping hierarchy) which is associated with a layouter.
- TreeLayouter: Added new support for child placement policies that can be used to achieve more compact tree layouts. See method setChildPlacementPolicy.
- TreeLayouter: Added new global layering option that ensures that large nodes never span more than their layer. See method setEnforceGlobalLayering.
- OrthogonalEdgeRouter: Added support for considering node labels, see method setConsiderNodeLabelsEnabled.
- CircularLayouter: Added DataProvider key CIRCLE_ID_HOLDER_DPKEY that allows to obtain a mapping between nodes and the corresponding circle IDs.
- OrthogonalEdgeRouter: Added new routing style STYLE_BALANCED which is based on the existing STYLE_PREFERMIDDLE but draws segments between bends of the same direction (U-style turns) the short way.
Viewer/Editor Interaction
- Added new Graph2DViewActions.DuplicateAction action to duplicate selected parts of a graph.
- Added new Graph2DViewActions.AddPredecessorsAction and Graph2DViewActions.AddSuccessorsAction actions to create nodes that are connected to all selected nodes in the graph.
- ImageOutputHandler: Added a setting which determines whether or not the selection state of graph elements should be taken into account when writing an image. Additionally, the described setting was added to new class ImageOutputModule. It is available for all derived image formats.
- YLabel: Added new edge label configuration
AutoFlippingLabel
that supports auto-flipping.
Improvements
Automatic Layout
- OrthogonalEdgeRouter: Enhanced support for port candidates.
- IncrementalHierarchicLayouter: Enhanced support for fixed nodes.
- GroupNodeHider: Several layout algorithms (all tree layouters, circular, all orthogonal layouters, random, the fixed group layout stage) assigned relatively small dimensions to empty group nodes. Some of them also moved these nodes to (0,0). None of these layout algorithms treats groups directly, instead they use the group node hider. The group node hider now optionally does not hide empty groups (setHidingEmptyGroupNodes) enabling that these can be treated like normal nodes. This option is now used where appropriate. Note that some layout algorithms may still shrink empty group nodes depending on the particular choice of parameters, e.g., orthogonal layout with uniform node sizes.
Viewer/Editor Interaction
- Graph2DUndoManager: The one-argument constructor will now correctly register the undo manager as GraphListener and Graph2D.BackupRealizersHandler for all existing inner graphs of the argument root graph.
Note: Client code that used undo manager's one-argument constructor and manually registered the undo manager as listener/backup handler for inner graphs must be changed to do no manual registration. - LineType: The DOTTED line types (DOTTED_1, DOTTED_2, etc.) consist of circles now (previously they used squares).
- PolyLineContainsTest: No longer reports hits for invisible parts of the edge at the source node and target node.
- Graph2DGraphMLHandler: XML content is now possible in shared resource nodes. Upto now only text content was supported. Resources may point to further resources.
- Graph2DViewActions.DeleteSelectionAction: Added an option for keeping the sizes of parent group nodes of deleted nodes (setKeepingParentGroupNodeSizes). By default, these nodes shrink if they have an active auto bounds feature.
- YLabel: In the default configuration the gap set with setIconTextGap is ignored if the text has size (0,0). This avoids, for example, unnecessarily large selection boxes for labels with an icon but without text. Moreover, the gap was already ignored if there was a text but no icon.
- Graph2DView: The label editor provided by openLabelEditor now checks whether there was a concurrent edit when it is about to commit its value to the label. If there was a concurrent edit, i.e. the label text changed since opening the editor, then the editor text is not applied to the label.
- CreateEdgeMode: The edge creation is canceled, if the graph of the view of the CreateEdgeMode gets changed while creating the edge. Previously, changing the graph resulted in an IllegalArgumentException "Both endpoints must reside in this graph." when the create edge gesture was finished.
- AbstractCustomNodePainter: Extracted paintHotSpots and paintText from paint. This eases writing custom node painters in some situations.
- MovePortMode: The editing is canceled, if the graph of the view of the MovePortMode gets changed. Deleting the owning edge of the moved port no longer leads to a NullPointerException.
- OrthogonalMoveBendsMode: The editing is canceled, if the graph of the view of the OrthogonalMoveBendsMode gets changed. Deleting the owning edge of the moved bends no longer leads to a NullPointerException.
- MoveSelectionMode: Added option setIndicatingTargetGroup. If this option is enabled in addition to isGroupReassignmentEnabled, then the current target group for a group reassignment operation is indicated by a customizable drawable.
- YLabel: The selection box is now rendered slightly outside of the label bounds (with the default and cropping label configurations), such that it no longer interferes with labels that have a border or an icon.
- Improved the GraphML (de)serialization support for icons in node labels and edge labels. (De)serialization events are now generated for all kinds of icons, not only icons of type
javax.swing.ImageIcon
orjava.io.Serializable
.
Since unhandled (de)serialization events throw an exception, this constitutes a behavior incompatible change as client code has to register appropriate DeserializationHandler and SerializationHandler implementations when icons in node or edge labels are of types other thanjavax.swing.ImageIcon
.
Demos
- Added new BusRouterDemo that presents the new orthogonal bus-style edge router.
- Four new demos present specific setup of the new partial layout support in conjunction with Circular, Hierarchic, Organic, and Orthogonal Layout: CircularPartialLayoutDemo, HierarchicPartialLayoutDemo, OrganicPartialLayoutDemo, and OrthogonalPartialLayoutDemo, respectively.
- Added new CriticalPathDemo that shows the setup of hierarchic layout in order to emphasize critical paths in a diagram.
- Added two new demos, MixedLayoutDemo and RecursiveLayoutDemo, that show how to apply different layout algorithms to the contents of group nodes, both recursively and non-recursively.
- Added new EdgeLabelingDemo that demonstrates how to use generic labeling algorithms in general as well as how to use the new rotation-related features such as automatic rotation and automatic flipping of label display to prevent "upside-down" labels.
The new NodeLabelingDemo shows how to use the node label models in conjunction with the yFiles generic labeling algorithms.
These demos replace the LabelingDemo application. - Added new NodePortsDemo that demonstrates user interaction and visual customization for node ports. The new LogicGatesDemo also shows how to use the new node ports. These demos replace the PortsDemo application.
- Added demo FlowchartDemo: a comprehensive flowchart demo that shows how to achieve visually rich information presentation.
Bugfixes
- InteractiveOrganicLayouter: Fixed bug that prevented the calculation of any layout before the first call to wakeUp.
- ComponentLayouter: Fixed bug that caused a wrong component assignment if customized component IDs are used.
Incompatible API Changes
- HitInfo: The constructors taking priority parameters
HitInfo(y.view.Graph2D, double, double, boolean, int, int, int, int, int, int)
,HitInfo(y.view.Graph2D, java.util.Iterator, double, double, boolean, int, int, int, int, int, int)
, andHitInfo(y.view.Graph2DView, double, double, boolean, int, int, int, int, int, int)
now require an additional argument to support node ports: HitInfo, HitInfo, and HitInfo, respectively. - YLabel: Abstract method getBox has been made final and can no longer be implemented. It is replaced by new abstract method getOrientedBox that returns an OrientedRectangle.
- EdgeLabelModel: The return type of method getLabelPlacement has changed from YPoint to OrientedRectangle.
- NodeLabelModel: The return type of method getLabelPlacement has changed from YPoint to OrientedRectangle.
- EdgeLabelModel: The signature of method createModelParameter has changed. The first parameter is of type OrientedRectangle instead of YRectangle.
- NodeLabelModel: The signature of method createModelParameter has changed. The first parameter is of type OrientedRectangle instead of YRectangle.
- YLabel: Protected fields
offsetX
andoffsetY
have been replaced by field offsetRectangle to support rotated labels. - YLabel.Painter: Methods
getIconLocation(y.view.YLabel)
andgetTextLocation(y.view.YLabel)
have been replaced by getIconBox and getTextBox to support automatic flipping of rotated labels to prevent "upside-down" content. - FreeNodeLabelModel: Method
setLocation(double, double)
has been removed. setModelParameter and getBestModelParameterForBounds should be used to position a free node label. - YGFIOHandler: The file format YGF has been deprecated. Consequently, the related I/O methods write and read (class YLabel), write and read (class NodeRealizer), write and read (class EdgeRealizer) have been deprecated, too.
- DoubleObjectPQ: Changed the type of parameter
priority
fromint
todouble
for methods decreasePriority, increasePriority and changePriority. - OptionHandler: Changed the return type of method getStringValue from
Object
toString
. - ResourceSerializationHandler: The handler now is also responsible to write registered resources. There is a new method writeResources for this purpose.
- ModelViewManager.Filter: Added methods acceptRetention and acceptRetention that replace acceptInsertion and acceptInsertion when checking whether existing representatives should be kept on synchronizing a model graph to its view graphs (or vice versa).
- NodeCellRendererPainter: Change signature of protected method from
getNodeCellRendererComponent(y.view.Graph2DView, y.view.NodeRealizer)
to getNodeCellRendererComponent.
yFiles 2.7.0.5 - Changes Since 2.7.0.4
Bugfixes
- Fixed JDK 7 only IllegalArgumentException that is triggered by numerical overflow in various comparator or comparable implementations.
- Fixed JDK 7u25 only ImagingOpException that is triggered by BevelNodePainter and ShinyPlateNodePainter with shadow drawing enabled.
yFiles 2.7.0.4 - Changes Since 2.7.0.3
Bugfixes
- Fixed JDK 7 only IllegalArgumentException that is triggered by comparator or comparable implementations that do not define a total order but only a partial order.
yFiles 2.7.0.3 - Changes Since 2.7.0.2
Bugfixes
- YGF deserialization support for JDK 1.6.0_26 as well as JDK 1.6.0_25 (and earlier) versions of
javax.swing.ImageIcon
.Warning: This fix requires all classes and interfaces in package
y.x
and sub-packages thereof to be excluded from obfuscation. - IncrementalHierarchicLayouter: Fixed bug that sometimes caused undesirable large groups when using edge groups.
yFiles 2.7.0.2 - Changes Since 2.7.0.1
Minor Features Added
Viewer/Editor Interaction
- MagnifierViewMode: New double-buffering when drawing the magnifying glass.
- Improved performance of drop shadow rendering for BevelNodePainter and ShinyPlateNodePainter.
Bugfixes
- HierarchyTreeModel: Fixed memory leak. Nodes were stored in the model's internal nesting data structure even after they were removed from their graph.
- Improved label post-processing in generic label placement algorithms.
- ComponentLayouter: Fixed bug that sometimes caused an IndexOutOfBoundsException if the style was set to a "packed"-style.
- AsIsLayerer: Fixed layer assignment bug that occurred when there was a very large first node.
- AsIsLayerer: Fixed setMinimumNodeSize to throw an IllegalArgumentException for values less than
0
. - IncrementalHierarchicLayouter: Fixed method getFromScratchLayeringStrategy. This method erroneously returned the fixed elements layering strategy.
- Fixed regression that affected sequencing results when using sequence constraints in hierarchical layouts.
- ConstraintIncrementalLayerer: Fixed layer assignment for multiple graph components.
- DefaultLayerSequencer: Fixed potential memory leak.
- OrthogonalLayouter: Fixed bug that caused bad results if from sketch mode was enabled (see setUseSketchDrawing).
- EdgeGroupRouterStage: Fixed bug that caused a class cast exception for graphs containing edges which were part of an edge group and also had port constraints/port candidates.
- SmartOrganicLayouter: Fixed bug that caused an out-of-memory exception for graphs with more than 50000 nodes.
- GRIP: Fixed bug that caused an out-of-memory exception for graphs with more than 50000 nodes.
- IncrementalHierarchicLayouter: Fixed layering bug appearing in incremental mode when all nodes were marked as incremental.
- TopLevelGroupToSwimlaneStage: Fixed regression. Top and bottom insets of group nodes were not always considered correctly.
- Arrow: Arrow styles CONCAVE and CONVEX adopted dashed/dotted pattern of their edge.
- EdgeRealizer: Fixed bounds calculation for edges with empty paths.
- Graph2DViewActions.OpenFoldersAction: Fixed empty folder node handling in openFolder. The position of the resulting empty group nodes was often incorrect.
- HotSpotSnapContext: The snap line color setting is no longer ignored.
- LayoutMorpher: Fixed the display of scroll bars after an animation when an 'as needed' policy is set.
- LayoutMorpher: Fixed execute to take newly changed settings into account when invoking the method for the second, third, etc. time on one and the same instance of the morpher.
- MoveLabelMode: Undoing a node label move no longer switches the model of the label to FREE, if it was not FREE before.
- MoveLabelMode: If the mode gets activated, but cannot find a label, it no longer leaves the view in the move selection drawing mode.
- MoveSnapContext: Fixed cropping of snap lines for some corner cases.
- GraphicsSerializationToolkit: Fixed encoding of vertical text position. A centered position was encoded as "bottom".
- HierarchyManagerBasedHierarchySupport: Fixed edge serialization. Edges in folded subgraphs were duplicated when writing GraphML.
- TableGroupNodeRealizerSerializer: Added missing API documentation.
- NodeLabelDeserializer: Fixed bug that prevented deserializing of custom NodeLabelModel implementations and corresponding parameter objects.
yFiles 2.7.0.1 - Changes Since 2.7
Bugfixes
- CreateEdgeMode: Fixed regression. Direct invocation of mouseDraggedLeft caused a NPE. This NPE did not occur when edge creation was initiated by receiving proper MouseEvents.
- AbstractInputHandler: Fixed NPE when trying to create an instance for GraphML scope.
- LayoutModule: Fixed regression. Calling start for graphs that had no associated Graph2DView resulted in a NPE.
- IncrementalHierarchicLayoutModule: Fixed a problem where the port constraints were removed, if backloop routing was enabled.
- DefaultGraph2DRenderer: Fixed possible NPE when rendering a graph.
Improvements
- OrientationLayouter: Added new mirror mask constant MIRROR_NONE which enables explicit prevention of any mirroring of layout orientation.
- ProxyShapeNodeRealizer: If the delegate is changed with setRealizerDelegate a "realizer" Graph2DEvent is fired.
- DefaultNodeChangePropagator: Instances of this class handle the new events fired if the delegate of a proxy node realizer is changed.
- LocalViewCreator: In the layoutViewGraph method, the layouter that is used for the local view is additionally wrapped using layout stage MinNodeSizeStage. This enables to smoothly process graphs that contain zero-sized nodes.
- GraphMLIOHandler: Added graph event brackets for read and read.
- The predefined GenericNodeRealizer.Painter implementations were adjusted to allow for concurrent painting. (For decorator implementations, the decorated painter must support concurrent painting.)
- GraphML and GML parsing have been improved to better support concurrent parsing.
- Improved drag and drop user experience on Mac OS X.
- OrthogonalPatternEdgeRouter: Improved routing for some cases to avoid edge node crossings.
yFiles 2.7 - Changes Since 2.6.1
Major Features Added
New Comprehensive Support for Swimlane Diagrams
- New realizer class TableGroupNodeRealizer provides extensive support for tabular presentation of subgraphs which is well suited for the visual presentation of swimlane layouts.
This new realizer also provides support for user interaction through dedicated mouse input handler implementations.
[To the corresponding section in the yFiles Developer's Guide...] - New dedicated mouse input handler implementations TableLabelEditor, TableSelectionEditor, TableSizeEditor, and TableOrderEditor accompany the TableGroupNodeRealizer class and provide support for user interaction specific to the tabular data representation of an associated node.
[To the corresponding section in the yFiles Developer's Guide...] - Layout algorithm class IncrementalHierarchicLayouter provides enhanced support for swimlane layout through comprehensive new partition grid concept.
The PartitionGrid class enables the definition of grid-like structures (partitions) consisting of rows and columns, and assignment of nodes of a diagram to the grid (partition) cells.
[To the corresponding section in the yFiles Developer's Guide...] - The SwimlaneDemo demonstrates the capabilities of TableGroupNodeRealizer and its mouse input handlers, as well as automatic layout of swimlane diagrams.
New Local Views Feature
- Added local views feature (see LocalViewCreator) that can be used to display or emphasize certain aspects of a given graph structure, typically by filtering the graph elements according to some criterion.
The LocalViewDemo demonstrates the predefined local view implementations as well as how to create, configure, and interact with local views.
[To the corresponding section in the yFiles Developer's Guide...]
GraphML now Integrated and Greatly Improved
- GraphML support is now an integrated part of yFiles for Java, replacing the GraphML extension package. API changes to the extension package are described in the Migration Guide.
[To the corresponding section in the yFiles Developer's Guide...]
New and Improved User Interaction Support for Graph Editing
- Class EditMode and its associated child modes provide new support for interactive snapping of graph elements which enables instant alignment of graph elements and makes editing a diagram easier than ever.
The SnapLineDemo shows how snapping support is set up using the properties of the child modes of the main view mode class EditMode.
[To the corresponding section in the yFiles Developer's Guide...] - Improved support for creating and working with orthogonal edge paths. In conjunction with the snapping support, edges/edge segments can be easily aligned both during creation or when moved.
The OrthogonalEdgeViewModeDemo demonstrates the support for orthogonal edge paths provided by EditMode and CreateEdgeMode.
[To the corresponding section in the yFiles Developer's Guide...]
Minor Features Added
Automatic Layout
- Layout algorithm class IncrementalHierarchicLayouter now features consistent support for layering constraints both for non-incremental as well as incremental layout mode.
Also, specifying layering constraints is now conveniently supported directly by the layout algorithm class through method createLayerConstraintFactory. - IncrementalHierarchicLayouter: Added support for specifying a preferred time limit (in milliseconds) for the layout (see method setMaximalDuration).
- IncrementalHierarchicLayouter: Added support for automatic edge grouping (see method setAutomaticEdgeGroupingEnabled).
- OrthogonalLayouter, OrthogonalGroupLayouter, DirectedOrthogonalLayouter: Added support for considering node labels.
- OrthogonalGroupLayouter: Added integrated edge labeling support.
- OrthogonalLayouter and DirectedOrthogonalLayouter: Added convenience methods for integrated edge labeling:
setIntegratedEdgeLabelingEnabled
. - OrthogonalGroupLayouter: The layouter now also considers minimum sizes for group nodes as given by the DataProvider MINIMUM_NODE_SIZE_DPKEY.
- CircularLayouter: More compact layouts can be obtained by setting setPlaceChildrenOnCommonRadiusEnabled to false.
- CircularLayouter: Node labels can be considered by setting setConsiderNodeLabelsEnabled to true.
- SmartOrganicLayouter: Node labels can be considered by setting setConsiderNodeLabelsEnabled to true.
Graph Analysis Algorithms
- Paths: added methods findAllPaths, findAllPaths, and findAllPathsCursor. These methods can be used to enumerate all directed or undirected paths that connect two nodes.
Realizer and Rendering
Viewer/Editor Interaction
- Graph2DLayoutExecutor: New convenience support for layout invocation on a Graph2D.
- Graph2DView: New convenience methods applyLayout and applyLayoutAnimated support direct invocation of a layout algorithm on the view's Graph2D.
- EditMode: Added special behavior for group nodes that selects a group node only on border hits and allows to create child nodes when clicking into the node's inner area.
- Graph2DClipboard now allows to paste clipboard content into group nodes in the sense that the pasted nodes become descendant nodes of the target group.
- Added Graph2DViewActions.DeleteSelectionAction which supports extensive customization of deletion behavior of selected graph elements in a Graph2DView.
- Added interface NodeStateChangeHandler that allows to perform actions directly before and after hierarchy-related actions (e.g. open folder, close group). Class NodeStateChangeEdgeRouter is a customizable implementation that keeps edge paths as stable as possible during a hierarchy action.
- The following predefined actions have been added to Graph2DViewActions to provide consistent behavior of hierarchy related operations (e.g. open folder, close group, etc.):
- Graph2DViewActions.CloseGroupsAction
- Graph2DViewActions.OpenFoldersAction
- Graph2DViewActions.GroupSelectionAction
- Graph2DViewActions.FoldSelectionAction
- Graph2DViewActions.UngroupSelectionAction
- Graph2DViewActions.UnfoldSelectionAction
- Added Graph2DCopyFactory.RecursiveGraph2DCopyFactory to conveniently copy the contents of Graph2D instances managed by a HierarchyManager recursively through their folder nodes.
Improvements
- OrthogonalLayouter: for layout style NORMAL_TREE_STYLE, the grid size now also controls the distances between tree nodes.
- OrthogonalLayouter, DirectedOrthogonalLayouter: improved integrated edge labeling.
- ComponentLayouter: Improved handling of user-defined components (components defined via the GIVEN_COMPONENT_ID_DPKEY data provider key) when there are edges between the components.
- GenericTreeLayouter: Improved layout runtime of graphs having subtrees with a large number of nodes.
- All implementations of interface Layerer (
y.layout.hierarchic.Layerer
) have been adjusted to implement Layerer (y.layout.hierarchic.incremental.Layerer
) as well, thereby removing the need to wrap these classes in OldLayererWrapper for use with IncrementalHierarchicLayouter. - Selections.SelectionStateObserver adjusted to reduce the amount updateSelectionState callbacks for nested PRE and POST events.
- Cursors: added method concatenate.
- SmartOrganicLayouter: Minimal node distance is now also used for inter component spacing.
- SmartOrganicLayouter: Node subsets can now be used together with output restrictions or GROUP_NODE_MODE_FIX_BOUNDS mode.
- ImageOutputHandler: The width of the surrounding border can be set with setBorder.
- IncrementalHierarchicLayouter: added convenience methods setOrthogonallyRouted and isOrthogonallyRouted, and also setBackloopRoutingEnabled and isBackloopRoutingEnabled.
Demos
- Added new SearchDemo that demonstrates how to find nodes in a graph that match a specific criterion and how to visually present all matching nodes in simple way.
- Added new SwimlaneDemo that demonstrates the interactive capabilities of the new y.view.tabular package.
- Added new TableStyleDemo that demonstrates how to customize the visual representation of table nodes that use TableGroupNodeRealizer and TableNodePainter for visual representation.
- Added new LocalViewDemo that demonstrates the predefined local view implementations as well as how to create, configure, and interact with local views.
- New GroupingDemo presents a simplified version of HierarchyDemo that focusses on essential hierarchy-related functionality using the actions provided by class Graph2DViewActions.
- The new GroupNavigationDemo shows how to create custom hierarchy-related actions to conveniently navigate into and out of group nodes and folder nodes.
- New HierarchyJTreeDemo shows how to use class HierarchyJTree to present a tree-like view of a graph structure where nodes can be nested within other nodes.
- Added new CustomGroupVisualizationDemo that demonstrates customization of the visual representation of group nodes using class GenericGroupNodeRealizer.
- Added new PartitionGridLayoutWithoutAView demo that demonstrates the usage of IncrementalHierarchicLayouter's new partition grid feature.
- Adjusted SwimlaneLayoutWithoutAView demo to use IncrementalHierarchicLayouter's new partition grid to define swimlanes.
- Added new SnapLineDemo that shows how snapping support is set up using the properties of the child modes of the main view mode class EditMode. The demo also shows how to create and add a custom snap line.
- Demos that show how to use the integrated GraphML support have been added in the package demo.io.graphml.
- Refactored HierarchyDemo to use the new hierarchy-related Action implementations from class Graph2DViewActions.
- New Graph2DLayoutExecutorDemo shows how to use class Graph2DLayoutExecutor.
- The demo packages have been reorganized so that all layout-related demos can be found in a common place.
Thedemo.module
package has been moved to demo.layout.module, demos fromdemo.layout
have been moved to a new demo.layout.withoutview subpackage, anddemo.view.layout
with its subpackages have been moved to demo.layout.
Changes in Default Behavior
- BalloonLayouter has a new default policy for placing the children of local roots. The old policy CHILD_ORDERING_POLICY_SYMMETRIC can be set with method setChildOrderingPolicy.
- GroupNodeRealizer's and GenericGroupNodeRealizer's implementations of AutoBoundsFeature method isAutoBoundsEnabled do not depend on whether or not the group node has child nodes anymore.
- ComponentLayouter now considers labels by default (see method setLabelAwarenessEnabled). This prevents overlaps of labels associated with different graph components.
- MouseInputMode's mousePressed method now initiates a focus request for its associated Graph2DView.
- EditMode's setChild method now calls mouseMoved reactivating
EditMode
(i.e. wheneversetChild
'sViewMode
parameter isnull
). - isAntialiasedPainting is set to
true
by default. - The new integrated GraphML support tries to parse as much information as possible when a realizer type is encountered for which there is no realizer serializer registered. Similarly, when writing realizers for which there is no corresponding realizer serializer registered, a fallback realizer is written using as much information from the "unknown" realizer as possible.
- createDefaultInputMap registers additional key bindings for the new grouping actions under the following keys:
Incompatible API Changes
- Removed all hierarchy-related ViewModes in package
y.view.hierarchy
:HierarchyEditMode
,HierarchyMoveSelectionMode
,HierarchyCreateEdgeMode
,HierarchySelectionBoxMode
, andHierarchyHotSpotMode
. The functionality has been placed into the corresponding base classes, which can now correctly deal with Graph2D instances regardless of whether they have a HierarchyManager associated or not. - Removed hierarchy-related
Graph2DHierarchyClipboard
andGraph2DHierarchyUndoManager
. Their functionality is completely integrated into the base classes Graph2DClipboard and Graph2DUndoManager, respectively, which can now correctly deal with Graph2D instances regardless of whether they have a HierarchyManager associated or not. - Graph2DClipboard: The
getGraphFactory()
andsetGraphFactory(GraphFactory)
methods have been replaced by methods getCopyFactor and setCopyFactor due to Graph2DClipboard now using a GraphCopier.CopyFactory instance instead of a GraphFactory for copying parts of a graph to the clipboard. - Replaced integer-precision
java.awt.Insets
parameters and return types with double-precision YInsets parameters and return type: AutoBoundsFeature methods setAutoBoundsInsets and getAutoBoundsInsets, GenericGroupNodeRealizer.GenericAutoBoundsFeature method getAutoBoundsInsets, and GroupFeature methods setBorderInsets and getBorderInsets as well as setMinimalInsets and getMinimalInsets, and finally OrientationLayouter method createOrientedInsets.
The above changes in interfaces manifest in the corresponding methods of the following classes: DefaultGenericAutoBoundsFeature, GenericGroupNodeRealizer, GroupNodeRealizer, and ProxyAutoBoundsNodeRealizer. - Graph2DView: removed obsolete methods
setGridCursorPosition
,gridCursorActive
, andsetSecureDrawingMode
. - Graph2DViewActions' method deleteSelection has been deprecated and made final and therefore can no longer be overwritten in order to customize delete behavior. Dedicated class Graph2DViewActions.DeleteSelectionAction has been added as a replacement (see above).
- OrthogonalMoveBendsMode: a number of methods related to snapping functionality have been removed. Instead, the class now uses a SnapContext, see also method createSnapContext.
- LayoutModule: changed signature of protected method createLayoutMorpher.
- Graph2DViewMouseWheelZoomListener: corrected spelling of method setZoomIndicatorShowing.
Bugfixes
- OrientationLayouter: Fixed wrong handling of mirror mask (see setMirrorMask).
- IncrementalHierarchicLayouter: In some cases edge points could have infinite coordinates.
- OrthogonalEdgeRouter: Fixed bug where in some cases strong port constraints were not taken into account for self-loops when local crossing minimization was enabled.
- IncrementalHierarchicLayouter: Fixed insets of group node being treated incorrectly if non-orthogonal edge routes were used.
- IncrementalHierarchicLayouter: Fixed rare exception about groups being "inconsistent".
- Undo/Redo did not always work properly when group node contents were moved, resized, or moved to different group nodes.
- GMLIOHandler: in some cases parsing empty LabelGraphics elements could cause an exception.
- HierarchyTreeModel: setting a new comparator did not reorder already present elements
- OrganicEdgeRouter: Fixed bug where OrganicEdgeRouter created some extreme edge routes for larger minimal distances (see setMinimalDistance ). Critical edges will now be routed as straight lines.
- Fixed occasional null pointer exceptions when painting shadows in conjunction with BevelNodePainter or ShinyPlateNodePainter.
- DefaultGraph2DRenderer: Fixed problems in paint order/sloppy paint order traversal implementations for layered painting when requesting labels, bends, or ports but no nodes and edges.
- DefaultGraph2DTraversal: Fixed problems when requesting labels, bends, or ports but no nodes and edges.
- IOHandlerModule: When writing, the output URL is now decoded using a java.net.URI. This means that for example a hash mark in the file name is now possible if the URL is encoded. URLs were not decoded previously and a hash mark in the file name resulted in a truncated file name, e.g.
file#123.svg
was saved asfile
. If you do not encode your URL (e.g. using the deprecatedfile.toURL()
method instead offile.toURI().toURL()
) and the URL contained parts which are interpreted as being encoded likefoo%20bar.svg
, this will now be saved asfoo bar.svg
. - Added selection indication for labels that use the "CroppingLabel" configuration.
yFiles 2.6.1 - Changes Since 2.6.0.1
Minor Viewer and Editor Features Added
- Scroller: added several methods that will allow to provide your own Scroller Drawable.
- NavigationMode: added method getScroller that allows to access and configure the Scroller instance used by this class.
- NavigationComponent: minimum and maximum zoom level can now be set for the zoom slider and buttons. A zoom factor for the zoom buttons can now be defined. Added possibility to customize tick timer for zoom buttons via client properties. See CLIENT_PROPERTY_KEY_ZOOM_TIMER_DELAY, CLIENT_PROPERTY_KEY_ZOOM_TIMER_INITIAL_DELAY. Added property to show labels on zoom slider setShowLabelsOnSlider. Improved component layout.
- Graph2DViewMouseWheelZoomListener: now supports an animated zoom indicator that is displayed at the mouse position whenever the zoom level gets changed by this class. See new methods setZoomIndicatorShowing, isZoomIndicatorShowing, paintZoomIndicator, setZoomIndicatorColor, and getZoomIndicatorColor.
- Added ViewCoordDrawableAdapter. This Drawable serves as an adapter for another Drawable that uses the view coordinate space to render itself.
- Graph2DView: added methods that allow to configure the RenderingHints to be used to render the view. For more exact font size calculation, RenderingHint
java.awt.RenderingHints.KEY_FRACTIONALMETRICS
can be used, for example. See setRenderingHints and getRenderingHints. - Graph2DPrinter: added methods that allow to configure the RenderingHints to be used when printing the page. Also, for more exact font size calculation, RenderingHint
java.awt.RenderingHints.KEY_FRACTIONALMETRICS
is now turned on by default. See setRenderingHints and getRenderingHints. - ViewAnimationFactory: added new factory method focusView.
- ViewAnimationFactory: added new factory methods color and color.
- Graph2DPrinter: added methods to control whether or not the contents should be printed centered on the page. See setCenterContentsOnPageEnabled and isCenterContentsOnPageEnabled.
- YLabel: added class methods isFractionMetricsForSizeCalculationEnabled and setFractionMetricsForSizeCalculationEnabled to configure whether or not fractional font metrics shall be used to calculate the size of the label text.
- PopupMode: added new protected methods to ease customization. Also, the methods setSingleNodeSelectionModeEnabled and isSingleNodeSelectionModeEnabled have been added to make it possible to change the default behavior for single node selections.
- EditMode: added new setting allowMovingWithPopup. If it is set to true (default false) the ViewPort can be moved by right dragging even if there is also a popup menu.
Minor Layout and Analysis Features Added
- GraphHider: added methods that unhide specific nodes and edges: unhideNode, unhideNodes, unhideEdge, unhideEdges.
- Added NormalizingGraphElementOrderStage. This layout stage can be used to normalize the order of the elements within a graph.
- Added EdgeReversalStage. This layout stage can be used to temporarily reverse all or some of a graph's edges for layout calculation.
- DefaultNodePlacer: added two new styles for the rootAlignment property (ALIGNMENT_TRAILING_ON_BUS and ALIGNMENT_LEADING_ON_BUS).
- GenericTreeLayouter: added support for a specific node grouping which can be disabled/enabled with method setGroupingSupported. By default, this feature is enabled.
- EdgeGroupConstraintModule: added static method createEdgeGroupsAutomatically
Demos
- Added demo AnimatedStructuralChangesDemo that shows how to highlight structural changes of a graph by means of animation and layout morphing.
- Added demo OrgChartDemo: a comprehensive organization chart demo that shows how to achieve visually rich information presentation.
- CollapsibleTreeDemo: added navigation view mode and improved visual appearance of tree nodes.
Bugfixes
- GroupNodePainter: will no longer overwrite label properties for custom labels. Thus GenericGroupNodeRealizers with custom labels using GroupNodePainter can now be registered e.g. to HierarchyGraphFactory and will keep the label appearance.
- ShapeNodePainter: feature groupDepthFillColor was applied not only to group nodes but also to nodes that belonged to a group.
- SimplexNodePlacer: fixed wrong calculation of the width of the leftmost/rightmost swimlane.
- TreeLayouter: fixed strange edge routes appearing when setPortStyle was set to BORDER_CENTER_PORTS or BORDER_DISTRIBUTED_PORTS and the nodes had non-uniform size.
- TiledImageOutputHandler: depending on the chosen size and number of tiles the exported image could get clipped on the right and bottom border
- Graph2DView: inline label editor was not always visible when using Swing components as nodes
- EditMode: drag gesture over a node led to selecting the node even with MoveSelectionMode disabled.
- ConstraintLayerer: fixed possible NPE when the unconstrained layering would already contain same layer edges.
- GroupNodeRouterStage: fixed bug where edges that end at selected group nodes are not routed when ROUTE_EDGES_AT_SELECTED_NODES was set.
- getBendsToBeMoved: the returned collection of bends no longer contains each selected bend twice.
- EdgeGroupConstraintModule: fixed bug when using the same module instance for different graphs.
- CreateEdgeMode: creating an edge is now gracefully canceled, if the start node gets deleted.
- MovePortMode: improved logic to update HierarchyManager accordingly if the user relocated an inter-edge port.
- ImageNodeRealizer: fixed a memory leak in conjunction with using alpha images.
- ViewAnimationFactory: using APPLY_EFFECT when creating an element removal animation (explode, fadeOut, blurOut, retract, whirlOut) will now reset the visibility property of the element's realizer to its pre-animation state.
- AssistantPlacer: comparators for sorting the child nodes in a (sub)tree are now provided with non-assistant child nodes also.
- OrthogonalPatternEdgeRouter: fixed bug where self loops with weak port candidates at self side might result in edge endpoints outside the node's bounds when grid routing is enabled. This will implicitly also affect ChannelEdgeRouter when using the default settings.
Improvements
- OrganicEdgeRouter: added option setEdgeNodeOverlapAllowed. Setting this option to true often leads to better results if the createNodeEnlargementStage LayoutStage is not used (e.g. because the nodes are not allowed to move) and the distances between some nodes are small.
- TreeLayouter: more suitable handling of large edge labels and multiple edge labels assigned to one edge.
- ShapeNodeRealizer and ShapeNodePainter: anti-aliased painting of elliptical shapes will not get enforced while the rendering occurs while printing the graph.
- Graph2DView: improved rounding of world-coordinates to view coordinates reduces undesired quiver effects when moving the graph.
- Updated bundled yGuard bytecode obfuscator to the current 2.3 release.
- Graph2DView: inline label editor now always displays caret at insertion point during label editing.
- InteractiveOrganicLayouter: added method startLayout and stopAndWait. Adjusted corresponding demos.
- IncrementalHierarchicLayouter: sometimes, if both swimlanes and groups and layers have been defined by the user, the algorithm would place the group nodes into newly created layers in order to avoid group node overlaps, although this might not always be necessary. The algorithm has been improved to better detect overlaps.
- GroupLayoutConfigurator: added method prepareGroupNodeBounds which is now called by the
prepareAll
method to make sure the bounds of the group nodes are in a valid state before the layout starts. If you need to specify custom group nodes sizes before the layout run, you should either disable the AutoBoundsFeature on that group node or override the new method with an empty body. - NavigationMode: the used cursors for the default and navigation state can now be defined by the user, see setDefaultCursor and setNavigationCursor.
- EditMode: method mouseDraggedLeft has been refactored into bendDragged, edgeDragged, hotSpotDragged, labelDragged, labelDragged, nodeDragged, paperDragged, and portDragged to ease customization of dragging behavior.
- NodeRealizer: calling repaint will now repaint all of the realizer's labels, too.
- LayoutMorpher: adding nodes or edges to a
LayoutMorpher
's graph in between creating theLayoutMorpher
instance and starting its animation no longer causes the animation to break withNullPointerException
s. - FixedGroupLayoutStage: it is now possible to have this stage work on selected groups only.
- HierarchyManager: improved API documentation of convertToFolderNode and convertToGroupNode.
- ConstraintLayerer.ConstraintFactory: added method getMemento to to create the factory without an initial graph.
- SequenceConstraintFactory: added method getMemento to to create the factory without an initial graph.
yFiles 2.6.0.1 - Changes Since 2.6
Bugfixes
HierarchyMoveSelectionMode
: Fixed occasional NullPointerException while moving elements to new group nodes nested inside folder nodes.HierarchyMoveSelectionMode
: Fixed bad move and resize behavior where selection of group nodes was not honored correctly if their contents were moved.- OrthogonalEdgeRouter: Fixed bug where edges weren't routed orthogonally if rerouting was enabled ( setReroutingEnabled )
- Fixed bug where wrong minimum size is set when data provider MINIMUM_NODE_SIZE_DPKEY is missing.
- MISLabelingAlgorithm: Fixed calls to getProfit after labeling causing NullPointerException.
- AutoRotationSliderEdgeLabelModel: Fixed bug where NPE was thrown for edges that are totally overlapped by their source and target nodes and therefore have no visible region.
- OrthogonalSegmentDistributionStage: Replaced casts to
java.util.List
withjava.util.Collection
to conform with API documentation for SOURCE_PCLIST_DPKEY and TARGET_PCLIST_DPKEY. - DefaultGraph2DTraversal: Fixed lastToFirst for graphs without an associated HierarchyManager and/or if considering the hierarchic structure of the graph is explicitly turned off. (This fixes also ViewMode's broken hit-testing for graphs without an associated HierarchyManager.)
- DefaultOrderRenderer: Fixed implementation of paint and paint.
- Fixed NPE in EdgeRealizer when the selection stroke is set to
null
. - EditMode: setting showEdgeTips to
false
will now correctly reset any tooltips on the view.
Improvements
- InsetsGroupBoundsCalculator has been enhanced to optionally take node labels of child nodes into account when calculating the bounds of a given group node. See also isConsiderNodeLabelsEnabled and setConsiderNodeLabelsEnabled.
- AreaZoomMode: focusView takes isAnimatedZoomEnabled into account.
- EdgeRealizer: Setting setSelectionColor to
null
disables selection painting of the edge. - Improved factory method createDrawable for edge realizers with non-default ports.
yFiles 2.6 - Changes Since 2.5.0.4
Major Features Added
Automatic Layout
- Layout algorithm IncrementalHierarchicLayouter now supports swimlane layouts of hierarchically grouped graphs.
- Layout algorithm IncrementalHierarchicLayouter now allows to specify placement constraints for nodes that reside in the same layer. A default implementation of new interface SequenceConstraintFactory enables user-defined constrained node sequencing, where nodes can be specified to be placed at the beginning or the end of their respective layer, or can be specified to be placed before/after a given reference node.
- A new domain-specific layout algorithm, FamilyTreeLayouter, has been added that is especially suited for genealogical family trees.
- A new planarity test class, PlanarityTest, has been added. It can be used to test a graph for planarity and to create a planar embedding of a planar graph. Both can be done in linear time.
- Minimum size constraints for group nodes have been added to the major layout algorithms HierarchicGroupLayouter, OrganicLayouter, SmartOrganicLayouter, and IncrementalHierarchicLayouter.
GroupLayoutConfigurator prepares and binds the relevant data to the graph using data provider look-up key MINIMUM_NODE_SIZE_DPKEY. - Significantly improved generic label placement algorithms SALabeling and GreedyMISLabeling. The number of overlapping labels has been drastically reduced. Furthermore, these algorithms now place labels associated with the
FREE
label model. - Added the ability for the organic layout algorithms to deal with elliptical shapes of group nodes, which may themselves contain elliptical node shapes. Class EllipticalGroupBoundsCalculator can be used to add this ability to the algorithms.
- Class SequentialLayouter has been added, that can be used to run several layouters sequentially one after the other.
Realizers and Rendering
- Graph2DView now uses the new GraphicsContext and associates an instance of that class with the
Graphics2D
object via the new rendering hint GRAPHICS_CONTEXT_KEY. This can be used to make the rendering of nodes, edges, and drawables react to different kinds of paint calls, e.g. during printing or image export. - Various new GenericNodeRealizer.Painter implementations are available that can be used with GenericNodeRealizer configurations. New classes ShapeNodePainter, ImageNodePainter, ShinyPlateNodePainter, BevelNodePainter, and GeneralPathNodePainter provide a variety of visual representations for nodes.
Additionally, class ShadowNodePainter is a wrapper that will draw smooth drop shadows. - Group nodes can now be represented by the newly introduced generic node realizer class GenericGroupNodeRealizer. This realizer class allows to configure group nodes using interface implementations just like any other node that is represented by a GenericNodeRealizer.
Viewer/Editor Interaction
- New class ModelViewManager enables multiple views on a common model graph. ModelViewManager establishes and manages all model-view relationships between a distinguished graph, the "model graph," and an arbitrary number of so-called "satellite graphs" that can each be rendered in their own view.
- View mode class HotSpotMode (and also
HierarchyHotSpotMode
) respects minimum size and maximum size constraints for nodes when they are resized interactively.
Size constraints can be specified using interface SizeConstraintProvider which is retrieved from node realizers when being resized. The realizer base classes NodeRealizer and GenericNodeRealizer define an appropriate getter method. - Class HitInfo uses the reverse of the rendering order as established by the graph renderer for traversing the graph elements when collecting hit-testing information.
Demos
- The complete source code of the comprehensive graph editor yEd Lite has been added. The source code is made available as a separate download item that is available through our software download center.
Minor Features Added
Graph Analysis Algorithms
- Cycles: added method findAllCycleEdges
- Class IndependentSets has been added. It provides methods for calculating independent sets of nodes.
Automatic Layout
- Class NodeOrderComparator has been added as a convenience implementation to easily specify the order of child nodes in a tree-like structure. The tree layout algorithms TreeLayouter, HVTreeLayouter, ARTreeLayouter, and BalloonLayouter.
- TopLevelGroupToSwimlaneStage has been added and allows for conveniently doing swimlane layouts for the incremental hierarchic layouter. It interprets top level group nodes as swimlanes and configures the core layouter appropriately. IncrementalHierarchicLayoutModule demonstrates how this can be used.
- IncrementalHierarchicLayouter: By default, edges at group nodes are used for layering even when recursive group layering is disabled and for incremental layering.
- OrientationLayouter: added feature to mirror the graph at the x-axis or y-axis according to the given layout orientation. See method setMirrorMask.
- IncrementalHierarchicLayouter now has an improved port assignment strategy for edges that connect to group nodes.
- ConstraintLayerer.ConstraintFactory: it is possible to specify weights to better enforce preferred layer distances.
- OrthogonalPatternEdgeRouter: added new patterns for selfloops.
- OrthogonalPatternEdgeRouter: improved routing for edges inside group nodes.
- OrthogonalLayouter: now produces drawings with less crossings.
Realizers and Rendering
- YLabel: added the setSelected property to allow for selecting labels individually. Default actions in Graph2DViewActions have been added and EditMode-behavior has been enhanced to make use of the new selection feature. See labelClicked for details. Also convenience methods have been added to Graph2D that deal with and yield the selection state of labels.
- GenericEdgeRealizer: A new implementation of GenericEdgeRealizer.PathCalculator has been added that can be used as a wrapper to other PathCalculators and will smooth the calculated bends as e.g. PolyLineEdgeRealizer does.
- NodeRealizer: getLabel no longer throws an exception, if the realizer has no label. In this case a new label is added and returned. This is the same behavior as already implemented for edge realizers.
- New interface SizeConstraintProvider that allows to specify minimum size and maximum size constraints for node realizers.
- Class DefaultGraph2DRenderer supports collecting hit-testing information based on the reverse of the rendering order.
Viewer/Editor Interaction
- EditMode: added the ability to select labels via mouse clicks. By default, this behavior is enabled, but can be disabled using allowLabelSelection.
- Graph2DView: added method fitContent that allows to fit the content to the view in an animated fashion similar as in focusView.
- HotSpotMode: introduced possibility to cancel node resizing by hitting a key. By default, resizing is canceled when Escape is hit. This can be configured using setCancelKeyCode.
- NavigationComponent: Added new navigation tool that provides several scroll and zoom controls to easily navigate through a Graph2DView.
- Graph2DView: now provides a glass pane getGlassPane. One can add several components onto this pane that will then overlay the graph view. This glass pane can for example easily be used to integrate the Overview or the NavigationComponent into the graph view itself.
- Graph2DView: added methods setFitContentPolicy and getFitContentPolicy along with constants CONTENT_POLICY_GRAPH, CONTENT_POLICY_GRAPH_DRAWABLES, CONTENT_POLICY_FOREGROUND_DRAWABLES, and CONTENT_POLICY_BACKGROUND_DRAWABLES to be able to include foreground and/or background drawables in fitContent's bounding box calculation.
- HitInfo: invisible nodes and edges, ports, and bends belonging to invisible edges as well as invisible labels or labels of invisible nodes and edges are by default no longer included in hit test results.
- AreaZoomMode: added setter and getter methods setAnimatedZoomEnabled and isAnimatedZoomEnabled.
- MoveViewPortMode: upon deactivation (via activate), scroll bar policies and cursor are reset to the previous settings.
- HotSpotMode: introduced new resize policy DISCRETE_BLOCK_POLICY that allows aspect ratio resizing and resizing while keeping the node center location. This new policy is now set by default.
- NodeRealizer: added new getter getMouseInputEditorProvider, which is suitably redefined in subclasses and used by MouseInputMode
- EdgeRealizer: added new getter getMouseInputEditorProvider, which is suitably redefined in subclasses and used by MouseInputMode
- PopupMode: added node label popup, with select subject now a label is selected instead of its realizer
Demos Added
- ModelViewManagerDemo shows how class ModelViewManager can be used to create model-view relationships between graphs.
- FamilyTreeDemo presents the layout algorithm FamilyTreeLayouter.
- SequenceConstraintsDemo allows to experience IncrementalHierarchicalLayouter's support for constrained node sequencing.
- SwimLaneGroupDemo shows swimlane layout with hierarchically grouped graphs.
- FullScreenNavigationDemo features the user interface elements provided by class NavigationComponent that allow convenient navigation in the view.
- RollOverEffectDemo presents a custom view mode implementation that uses the capabilities of the yFiles animation framework.
Changes in Default Behavior
- Due to YLabels being selectable now, some of the operations in EditMode now behave slightly different.
- HotSpotMode: changed default resizing policy from SEMI_BLOCK_UPON_MINIMUM_SIZE to new option DISCRETE_BLOCK_POLICY which will also support aspect ratio resizing and resizing while keeping the node center position. To switch back to the old policy, please use method setResizePolicy with parameter SEMI_BLOCK_UPON_MINIMUM_SIZE.
- HotSpotMode: improved handling of port offsets for edges that are not orthogonally routed.
- CreateEdgeMode: Now, by default the CreateEdgeMode will be left when the source node is not being accepted (acceptSourceNode). This will allow other input modes to become active again instead of being stuck in CreateEdgeMode and waiting for other gestures. To switch back to the old behavior simply overwrite method sourceNodeDeclined.
HierarchyMoveSelectionMode
now usesFIXED_MINIMUM_GROUP_BOUNDS
as group bounds policy instead ofFIXED_AUTOBOUNDS_INSETS
. Thus dragging nodes in and out of group nodes will not resize the group node if not necessary. To go back to the old behavior, simply setFIXED_AUTOBOUNDS_INSETS
using methodsetGroupBoundsPolicy
.- IncrementalHierarchicLayouter: LAYERING_STRATEGY_USER_DEFINED or LAYERING_STRATEGY_FROM_SKETCH disable recursive group layering.
- YModule and LayoutModule: default exception handling has been improved. Now, depending on whether there is a module listener registered, exceptions will not always be immediately shown in a Swing dialog but will continue to bubble through the call stack. See exceptionHappened.
- CopiedLayoutGraph automatically registers a DataProvider under NODE_DP_KEY if not already present on the original graph.
Incompatible API Changes
- IncrementalHintsFactory, ConstraintLayerer.ConstraintFactory, SequenceConstraintFactory: All methods that previously had Node or Edge arguments now take
java.lang.Object
instead. This will require recompilation. In addition, if you manually register a DataProvider under NODE_DP_KEY on the graph, you are now required to use the IDs stored in this DataProvider as arguments for these methods.
Bugfixes
- OrthogonalEdgeRouter: fixed bug where strong PortConstraints as well as fixed PortCandidates were not obeyed.
- IncrementalHierarchicLayouter: LAYERING_STRATEGY_USER_DEFINED did not work as expected for unconnected graphs, since each component was layered and normalized separately. The fix ensures that layer IDs are respected globally.
- IncrementalHierarchicLayouter: Group layer compaction did not always work correctly for for graphs with edges at group nodes.
- OrthogonalSegmentDistributionStage: fixed bug where fixed PortCandidates weren't kept. This also affects ChannelEdgeRouter and in some very uncommon cases OrthogonalEdgeRouter.
- TreeLayouter: fixed incorrect handling of label bounds if a non-default orientation was used.
- Bend: added missing y.view.EdgeRealizer#bendChanged() callback in method setLocation. This will also affect methods setX and setY. This fix can lead to incompatible behavior for code that acts on y.view.EdgeRealizer#bendChanged(), which was previously only called when method moveBy was used and not when using one of the above methods.
- MovePortMode: Fixed a bug that prevented free positioning of a port.
- MouseInputMode: now handles ProxyShapeNodeRealizers correctly, i.e. the current realizer delegate is queried for a mouse input editor provider instead of the proxy realizer itself.
- GroupNodeRealizer /
HierarchyMoveSelectionMode
: Fixed bug that resized group nodes in a strange fashion when moving nodes into an empty group. - DefaultHierarchyGraphFactory: Fixed a bug that resulted in group nodes with an associated parent node being created with the factory's default folder node realizer.
- IncrementalHierarchicLayouter: Fixed incorrect calculation of group node heights for certain cases where edges at group nodes were present.
yFiles 2.5.0.4 - Changes Since 2.5.0.3
Bugfixes
- LayoutMorpher: fixed inconsistent behavior when features
focusNode
andsmoothViewTransform
were used simultaneously. This fix can lead to incompatible behavior for code that works around or otherwise relies on the inconsistent behavior. - HierarchicLayouter: Fixed exception when group layer compaction was used for graphs with edges between group nodes.
- SimplexNodePlacer: Fixed ugly group layout for GROUP_COMPACTION_MAX.
- ConstraintLayerer: Fixed exception when using unconnected graphs.
- EdgeOppositeNodeLabelModel was not serialized to GML
- NodeRealizer: added missing bounds changed callback in method setCenter.
- BorderLine: Fixed possible NullPointerException.
- Fixed: OrthogonalEdgeRouter sometimes did not obey strong port constraints if local crossing minimization was enabled.
- DirectedOrthogonalLayoutModule and TreeLayoutModule: Fixed possible NullPointerExceptions.
- PortConstraintModule and EdgeGroupConstraintModule: Fixed possible exceptions when the module is used for multiple graphs.
- Fixed: InteractiveOrganicLayouter commit position methods requiring nodes to be of type Node.
- EdgeLabel: fixed problematic first call to getBox when using AutoRotationSliderEdgeLabelModel.
- Fixed HierarchicLayouter not cleaning up temporary source and target port constraint maps property.
- Package y.option: fixed minor I18N problems for String and Color option items.
- yEd unnecessarily created empty edge labels for every edge that was inspected.
Improvements
- StringOptionItem: added support for different TextArea size for dialog and table editors.
- CompactOrthogonalLayoutModule: Added options to configure the routing strategy.
yFiles 2.5.0.3 - Changes Since 2.5.0.2
Bugfixes
- SmartOrganicLayouter and OrganicLayouter: incorrect placement of empty group nodes was fixed.
- PortCandidate: static method createCandidate wrongly initialized PortCandidate for PortConstraints of type
ANY_SIDE
. - OrthogonalEdgeRouter: strong port constraints with side constraints
ANY_SIDE
were ignored. - EdgeGroupRouterStage: port constraints at the grouped end of grouped edges were ignored.
- Graph2DPrinter.DefaultFooterDrawable: fixed footer placement for multiple rows (footer was displayed at bottom of first row instead of last row).
- NodeLabel: FreeLabelModel model parameters are no longer ignored for offset calculation.
- IncrementalHierarchicLayouter: recursive layering did not work correctly for inner graphs of folder nodes.
- XGMLEncoder: fixed missing XML prolog.
- XGMLIOHandler: encodings that differ from the platform default were not handled correctly.
- OptionHandler: fixed several focus handling problems in TableEditor view.
Improvements
- YLabel: added support for line breaks in the "CroppingLabel" label configuration.
- IncrementalHierarchicLayouter: distance between groups within different layers now obey minimal layer distance property.
- IncrementalHierarchicLayouter: enhanced group layer compaction support for other layering strategies besides topological layering.
- ImageNodeRealizer: method setAlphaImageUsed now triggers
setEdgesDirty()
to enable path updates of connected edges. - ImageNodeRealizer: feature
alphaImageUsed
didn't work with noimageURL
set.
Minor Features Added
- New OptionItem implementation
IconOptionItem
for generic Java Icons.
yFiles 2.5.0.2 - Changes Since 2.5.0.1
Bugfixes
- OrthogonalEdgeRouter: fixed problem with IllegalStateException that indicated that ports were located outside of nodes. The problem could occur for edges that carried strong port constraints.
- OrthogonalPatternEdgeRouter: Fixed bug where edge routing didn't hold to strong port constraints and fixed port candidates. This did also apply to edges that OrthogonalEdgeRouter could not route orthogonally.
- OrthogonalPatternEdgeRouter: Removed IllegalStateException that was thrown when ports were located outside the according node bounds. Layout will now continue for such cases, although it is highly recommended to use ports that are inside the according node bounds.
- SnapOuterPortsToNodeBorderStage: Fixed bug where in some cases ports weren't snapped to the node border for non square nodes.
- PolyLineEdgeRealizer: Fixed bug leading to some non-smoothed bends for PolyLineEdgeRealizers with smoothed bends enabled. The problem only occurred for special circumstances involving collinear bends.
yFiles 2.5.0.1 - Changes Since 2.5
Bugfixes
- IncrementalHierarchicLayouter: fixed quality regression. The number of edge crossings was often considerably higher than with previous major version.
- IncrementalHierarchicLayouter: certain edges connected to group nodes were not routed correctly.
- IncrementalHierarchicLayouter: in certain situations the bounding boxes of group nodes were not calculated correctly. This could cause group bounds to overlap each other.
- ConstraintLayerer: improved edge weight support.
- MoveSelectionMode: fixed bends being erroneously moved if the Graph2DView was in grid mode.
Minor Features Added
- SimplexNodePlacer: added methods setGroupCompactionStrategy and getGroupCompactionStrategy to allow better control over group bounds compaction behavior for IncrementalHierarchicLayouter.
Demos Added
- yFiles applet demo demo.view.applet.AppletDemo has been added. It demonstrates how to create and deploy yFiles-based applets.
yFiles 2.5 - Changes Since 2.4.0.3
Major Features Added
Incremental Hierarchical Layout Enhanced
- Class IncrementalHierarchicLayouter now supports hierarchically organized graphs. Both incremental as well as non-incremental ("from-scratch") layout mode have been enhanced to handle group nodes and their contents when calculating hierarchical layouts.
[To the corresponding section in the yFiles Developer's Guide...]
Hierarchical Layout Enhanced
- Class HierarchicLayouter now supports the notion of "constrained layering." New layerer implementation ConstraintLayerer enables user-defined constrained layering, where nodes can be specified to be placed into the topmost or bottommost layer, or can be specified to be placed into the same layer or a layer preceding/following that of a given reference node.
[To the corresponding section in the yFiles Developer's Guide...]
New Label Customization Support
- Class YLabel now supports user-defined configurations for node and edge labels. Configurations provide fine-grained control over all aspects of label look and feel, and simplify the implementation of custom painting behavior for labels.
[To the corresponding section in the yFiles Developer's Guide...]
Full Viewer/Editor Support for Orthogonal Edge Paths
- Class EditMode and its associated child modes provide advanced support for edges having orthogonal paths. This includes in particular edge creation, moving edge segments, creating new bends/edge segments, and moving edge ports. Furthermore, resizing nodes and moving nodes/bends have also been modified to take orthogonal edge paths into account.
CreateEdgeMode has been improved to support the creation of orthogonal edges. MovePortMode, HotSpotMode, MoveSelectionMode, and the new OrthogonalMoveBendsMode have been improved to treat orthogonally routed edges specially so that they will always stay orthogonally routed during user interactions.
[To the corresponding section in the yFiles Developer's Guide...]
New Magnifying Glass Tool
- New view mode MagnifierViewMode provides a magnifying glass "tool" which enables local zooming in a Graph2DView.
[To the corresponding section in the yFiles Developer's Guide...]
New Compact Orthogonal Layout Algorithm
- New orthogonal layout class CompactOrthogonalLayouter uses a divide-and-conquer approach to provide compact orthogonal layouts that fit into a specified aspect ratio.
CompactOrthogonalLayouter is an extension of new layout stage class PartitionLayouter which offers general support for a four-phase layout process where node partitions are found according to a customizable scheme, then a layout is calculated for each partition, afterwards the partitions are arranged in a compact manner, and finally their inter-connecting edges are routed.New layout module class CompactOrthogonalLayoutModule demonstrates how to set up compact orthogonal layout.
[To the corresponding section in the yFiles Developer's Guide...]
New Line-Wrapping Layout Algorithm
- New layout stage class GraphLayoutLineWrapper can be used to 'line-wrap' or 'column-wrap' graph layouts. GraphLayoutLineWrapper allows to specify width (height) or aspect ratio for the resulting line-wrapped (column-wrapped) diagram.
[To the corresponding section in the yFiles Developer's Guide...]
Orthogonal Edge Router Enhanced
- In addition to the concept of port constraints, class OrthogonalEdgeRouter now also provides support for PortCandidates, which can be used to specify a set of allowed connection points for an edge end.
[To the corresponding section in the yFiles Developer's Guide...]
New Orthogonal Edge Routing Algorithm
- Class ChannelEdgeRouter has been added to the suite of orthogonal edge routing algorithms. It uses a two step approach to find orthogonal edge routes and nicely exposes bus-like structures, i.e., sets of parallel edges between common nodes.
[To the corresponding section in the yFiles Developer's Guide...]
Minor Features Added
Automatic Layout
- Class ComponentLayouter now supports arranging components from sketch and introduces a new data provider look-up key to allow external declaration of components via a data provider.
- New layout stage class PortConstraintEnforcementStage can be used to enforce that a layout algorithm will not change the relative coordinates of ports that are associated with a strong port constraint.
- Class DefaultLayoutGraph now allows to specify multiple labels per node.
- SmartOrganicLayouter optionally uses a smarter component layouting technique if a subset of nodes should be arranged only.
- ShuffleLayouter introduces a new data provider look-up key to enable specification of nodes that should be pinned to their locations during shuffling.
- Improved handling of port constraints with bad orthogonal edges in OrthogonalEdgeRouter.
Input and Output
- Class Graph2DPrinter optionally adds a footer drawable below a printed graph.
- Improved GML parsing and encoding of numbers and unicode entities in GMLIOHandler.
Viewer/Editor Interaction
- New class HierarchyTreeTransferHandler adds drag-and-drop functionality to HierarchyJTree which allows changing the graph hierarchy using simple mouse drag gestures.
- Graph2DViewActions adds a 'Select All' action that is bound to Ctrl-A, resp. Command-A (on Mac OS X). Also, usage of this class has been simplified.
- Graph2DView introduces new client property "
UnitIncrementPixels
" which allows to specify the unit increment of the scroll bars in view coordinates.
Realizers and Rendering
- Class DefaultGraph2DRenderer provides new methods that allow for partitioning the rendering order into several layers. Sloppy painting now also supports the various painting orders.
- Graph2DView features new client properties and new method paintSelectionBox that enable extensive customization of selection box look. The client properties include selection box stroke, color, fill color, and shape.
- YLabel enables programmatically specifying a label's size along with an option to automatically adjust the size of a (node) label to the size of the node it belongs to.
- Graph2DUndoManager allows to control whether the selection state of realizers should be adjusted via method setSelectionStateAdjusting.
- New view mode class OrthogonalMoveBendsMode that can be used to conveniently edit orthogonally routed edges. It supports moving and creating new bends/edge segments in such a way that an edge's path is always orthogonal.
- Additional getter methods in ViewMode allow to determine the parent and child ViewModes.
- CreateEdgeMode optionally cancels accidental edge creation early on. See method setEarlyEdgeCancelingEnabled.
- Class HierarchyTreeSelectionModel optionally disallows mixed selections of nodes and edges. See method setMixedSelectionAllowed.
- Graph2D uses automatic dirty flagging for edges that were changed using one of the
changeEdge
andreverseEdge
methods. - HitInfo adds new convenient constructors for hit-testing with focus on only a specified type of graph elements.
Graph Structure Functionality
- New utility class GraphCopier makes it easy to copy a graph's contents to another graph or create a copy of a graph.
- YList provides new method getCell to retrieve a list cell by index.
Language Support
- New utility class Generics provides support for Java 5 language features enabling convenient iteration over the graph structure using the enhanced
for
loop construct.
Demos Added
- IncrementalHierarchicGroupDemo shows how IncrementalHierarchicLayouter can be used to fully or incrementally layout hierarchically organized graphs. The demo supports automatic re-layout after expanding folder nodes and collapsing group nodes.
- MagnifierViewModeDemo features the magnifying glass "tool" which enables local zooming in a Graph2DView.
- EdgeConnectorDemo demonstrates edge-to-edge connections (i.e., edges between edges) and connections between nodes and edges in the view.
- DendrogramLayouterDemo demonstrates dendrogram-like tree layout.
- YLabelConfigurationDemo shows how to customize the rendering of labels.
- OrthogonalEdgeViewModeDemo demonstrates the ability of EditMode and its minor view modes to deal with orthogonally routed edges.
Incompatible API Changes
- YLabel: removed method
setSize(double, double)
. Calling this method had not the desired effect and therefore made no sense. setContentSize has been introduced as a replacement that can now be used to specify the size of a label's content. - NodeLabel: static field
AUTOSIZE_CONTENT
has been moved to superclass YLabel - Graph: calls to disposeNodeMap or disposeEdgeMap will now throw IllegalArgumentException if the given map had not been created with this specific instance. Dispose your maps on the correct Graph to avoid those exceptions.
- Graph2DView: corrected method name
getVerticalScrollBarPolicy
to setVerticalScrollBarPolicy - Removed deprecated
listeners
field of class Graph and switched to a better performing internal implementation. - Removed deprecated API in YLabel in favor of setBackgroundColor.
- Graph2DViewActions: now by default includes a new 'Select All' action that is bound to Ctrl-A, resp. Command-A (on Mac OS X)
Bugfixes
- RemoveOverlapsLayoutStage: for certain input graphs the minimum distances between nodes were much larger than necessary
- Fixed a possible ClassCastException when using PCListOptimizer.
yFiles 2.4.0.3 - Changes Since 2.4.0.2
Minor Features Added
- Class HierarchyManager: added convenience methods setParentNode and setParentNode.
- Class AutoRotationSliderEdgeLabelModel: added protected method getPointPath.
- Class InsetsGroupBoundsCalculator: added protected method createEnlargedBounds.
- Class GraphConnectivity: added methods getNeighbors, getSuccessors, and getPredecessors.
- Class TreeLayouter regression: unlike in v2.3 XCoordComparator is not set as default child comparator of this layout algorithm. Changed this to reflect original behavior.
- Class ImageOutputHandler: added method write.
Bugfixes
- Class MovePortMode: improved clip bounds for visible port candidates.
- Class SimplexDrawer: fixed occasional NullPointerException when using custom layering.
- Class CopiedLayoutGraph: using constructor CopiedLayoutGraph raised a ClassCastException under certain circumstances. This is a regression to yFiles 2.3. To fix this problem a small but incompatible API change (see below) was the only proper solution.
- Class ARTreeLayouter: Fixed a rare bug that resulted in bad edge routing if the graph was not a normalized tree.
- Class LabelLayoutDataRefinement: Fixed a bug that resulted in a ClassCastException when using unbuffered layout.
- Class TreeDrawer: switched to using GenericTreeLayouter, since the previous approach sometimes produced node overlaps.
Incompatible API Changes
- Class CopiedLayoutGraph: changed signature of method
createNode(y.base.Node)
to createNode. - Class CopiedLayoutGraph: changed signature of method
createEdge(y.base.Edge)
to createEdge.
Demo Changes
- The free Java bytecode obfuscator and shrinker yGuard 2.0 is now part of the yFiles tutorial demo applications.
It provides Java bytecode shrinking functionality and features new XML syntax.
yEd Improvements
- Improved HTML image map output. HTML
<area>
elements are only generated for nodes and edges that actually have descriptive tooltips and/or links associated.
Also, tooltip visibility in the browser window and behavior in Microsoft Internet Explorer has been improved.
yFiles 2.4.0.2 - Changes Since 2.4.0.1
Bugfixes
Graph2DHierarchyClipboard
did not use the GraphFactory set withsetGraphFactory
to create node and edge copies.- IncrementalHierarchicLayouter: Fixed an edge labeling and edge routing problem for edge labels that are not centered on their edge.
- Class GenericEdgeRealizer: fixed a NullPointerException during copy creation when there were bends in the original edge.
- Class SmartOrganicLayouter: fixed memory leak and possible stack overflow errors when the instance was reused multiple times.
- Class GenericTreeLayouter: fixed NodePlacer implementations that did not always honor PortConstraints at leaf nodes.
- Class OptionHandler: fixed bad display of values in bound double item
- Class OrthogonalLayouter: fixed rare ArrayIndexOutOfBoundsException if nodes had small dimensions.
Features Added
- Class YGFIOHandler: added inner interface YGFIOHandler.DataHandler that allows to serialize additional data for nodes, edges, and graphs.
- Class ColorOptionItem: added attribute ATTRIBUTE_SHOW_ALPHA to allow editing of ARGB colors.
- Class FileOptionItem: added attribute ATTRIBUTE_PREFIX_FILE_PROTOCOL.
Features Added to yEd
- Added module to measure and visualize diverse centrality indices for graphs.
- Added URL and a description property to nodes and edges. The associated URLs can be opened in a web browser.
- Added HTML image map output that supports the display of descriptive tooltips and object linking.
- Improved SVG output that now supports the display of descriptive tooltips and object linking.
yFiles 2.4.0.1 - Changes Since 2.4
Bugfixes
- Class GenericEdgeRealizer: fixed YGF serialization
- Class ViewControl: when using method activateMode the view mode method activate was invoked twice instead of just once
- Class ArrayIntNodePQ: fixed a memory leak which caused some dependent algorithms (most notably IncrementalHierarchicLayouter and HierarchicLayouter) to leak memory in specific situations
Features Added
- Class Cycles: added method findCycleEdges
- Class NodeOrders: added methods st, toNodeMap, and toNodeMap
- Class MovePortMode: improved port highlighting and cursor configurability. Methods drawPortCandidate, getMovePortCursor, and getDefaultCursor have been added.
- Class EditMode: now displays a special hand cursor when the mouse is over a draggable port point
yFiles 2.4 - Changes Since 2.3.1.1
Major Features Added
Animation Framework
- The general animation framework from package y.anim has been reworked to provide high-quality animations and visual effects for node realizers, edge realizers, and also drawables. Predefined, yet customizable animations and effects include moving, resizing, and scaling of nodes, color transformations with nodes and making nodes blink, fading in and out, blurring, and also explosions are supported.
Animations can be arbitrarily combined and be played in parallel or sequentially, new class AnimationFactory provides the means to define the structure of a compound animation process. New class ViewAnimationFactory can be used to create predefined generic animation objects.
[Show me the corresponding section in the yFiles Developer's Guide]
Fully Interactive Swing User Interface Components in the View
- The yFiles library now supports Java Swing User Interface (UI) components to be used inside the view. Similar to the mechanism provided by Swing's cell renderer and corresponding cell editor classes, yFiles interfaces NodeCellRenderer and NodeCellEditor can be used to create proper interactive editors for arbitrary node-related data.
The created editors serve as the visual representation for nodes, they are fully interactive and provide the full range of mouse-based user interaction, i.e., they can be selected, resized, and moved just like regular nodes. Furthermore, they can also be zoomed in and out, and remain editable even when zoomed.
New view mode class CellEditorMode governs proper interaction with such UI components.
[Show me the corresponding section in the yFiles Developer's Guide]
New Directed Orthogonal Layout Algorithm
- Class DirectedOrthogonalLayouter has been added to the suite of orthogonal layout algorithms. It generates drawings with a strong focus on edge routing that satisfies sophisticated edge path-related constraints.
Supported is advanced edge path generation with respect to the diagram's main layout direction and also bus-style edge routing. Together, these features enable sophisticated layout of UML-style class diagrams.
[Show me the corresponding section in the yFiles Developer's Guide]
New Interactive Organic Layout Algorithm
- Class InteractiveOrganicLayouter has been added to the suite of organic layout algorithms. It is capable of generating continuous updates to the layout of a graph during calculation.
Also, it allows a user to seemingly simultaneously modify a graph and have the modifications subsequently being accounted for in the layout calculation.
[Show me the corresponding section in the yFiles Developer's Guide]
Generic Tree Layout Algorithm Enhanced
- Class GenericTreeLayouter now features new NodePlacer implementations that support rotation of subtrees. The new node placers classes are AssistantPlacer, BusPlacer, DoubleLinePlacer, FreePlacer, LeftRightPlacer, and SimpleNodePlacer.
All node placers support port constraints. Also, layout from sketch, which can be used to incrementally add new elements to the current diagram, is supported by the majority of node placers.
[Show me the corresponding section in the yFiles Developer's Guide]
Bridges for Edge Paths
- The ambiguity induced by intersecting edge paths (a.k.a. edge crossings) can be resolved by so-called "bridges," convenient augmentations to the edge path that can be inserted in a number of different styles.
DefaultGraph2DRenderer has been enhanced to use the services of new class BridgeCalculator to have straight line edge segments augmented.
[Show me the corresponding section in the yFiles Developer's Guide]
Minor Features Added
Automatic Layout
- TreeLayouter now supports integrated labeling, which can be enabled using setIntegratedEdgeLabeling and setIntegratedNodeLabeling. Also, new node and edge alignment options are available: setVerticalAlignment and setBusAlignment.
- GenericTreeLayouter now supports integrated labeling, which can be enabled using setIntegratedEdgeLabeling and setIntegratedNodeLabeling.
- CircularLayouter: added new feature to specify customized sets of nodes which will be used to form circles. The sets of nodes can be specified using the DataProvider key CIRCULAR_CUSTOM_GROUPS_DPKEY.
- CircularLayouter provides new "disk" layout styles for node partitions: PARTITION_LAYOUTSTYLE_DISK and PARTITION_LAYOUTSTYLE_ORGANIC, which can be set using method setPartitionLayoutStyle.
- IncrementalHierarchicLayouter now enables nodes to be optimally inserted into a specified layer. Additionally, it now also supports incremental node placement with respect to actual node coordinates. Besides the logical insertion of incrementally added nodes using their location relative to other, already placed nodes, this completes advanced node placement in sketch-driven hierarchical layout.
Specifying nodes for incremental placement with respect to their actual coordinates is done using special hint objects as returned by the default IncrementalHintsFactory object registered with IncrementalHierarchicLayouter. The new hint objects are created by methods createUseExactCoordinatesHint, createUseExactLayerCoordinatesHint, and createUseExactSequenceCoordinatesHint. - Added new so-called port candidates that allow to restrict anchor locations at a node and also associate costs with a given anchor location. Classes PortCandidate and PortCandidateSet can be used to define a set of allowed anchor locations at a node.
- IncrementalHierarchicLayouter now supports the concept of port candidates: PortCandidateSet objects that are registered for the nodes of a graph by means of a data provider using the look-up key NODE_DP_KEY are obeyed for restricting the allowed anchor locations for edges at a given node.
Additionally, the data provider keys SOURCE_PCLIST_DPKEY and TARGET_PCLIST_DPKEY are supported to enable advanced port candidate matching at nodes. - New factory class OutputRestriction allows to create so-called output restrictions that can be used in conjunction with SmartOrganicLayouter and InteractiveOrganicLayouter to restrict the resulting graph layout to fit into a specified region, e.g., a rectangle or a circle.
- New layout stage EdgeGroupRouterStage adds support for edge/port groups, i.e., bus-style edge routing to OrthogonalEdgeRouter.
Realizers and Rendering
- Added flexible EdgeRealizer implementation GenericEdgeRealizer that can be used to easily create customized edge appearances without subclassing.
Utility and convenience classes that can be used in conjunction with this realizer are GenericEdgePainter, SimpleBendHandler, and PolyLinePathCalculator. - Added several static inner interfaces to class GenericNodeRealizer to allow for convenient customization of arbitrary functionality. The new interfaces include: GenericNodeRealizer.BoundsChangedHandler, GenericNodeRealizer.PortCandidateListProvider, and GenericNodeRealizer.GenericMouseInputEditorProvider.
- Added advanced alpha transparency support for class ImageNodeRealizer. Using an image's alpha values allows to modify the behavior of containment testing, which (among other things) is used to calculate edge intersection points. Method setAlphaImageUsed can be used to enable alpha transparency support.
- Added methods repaint and repaint to classes NodeRealizer and EdgeRealizer.
- Improved path calculation support in class EdgeRealizer which also comprises improved rendering in conjunction with graphical decorations at an edge's ends (provided by class Arrow). Static method calculateClippingAndIntersection provides proper clipping support for an edge path.
- Class Arrow allows to define a distance between arrowhead tip and node border: setDefaultClipLength. Also, the position of the edge path's end can be defined relative to an arrowhead's tip, too: getArrowLength.
Viewer/Editor Interaction
- Class EditMode now supports additional child modes: MouseInputMode, and MoveViewPortMode. Support includes creation methods and setter/getter methods, for example: createMouseInputMode, setMouseInputMode, and getMouseInputMode.
Also, a node editing mode such as CellEditorMode can be registered using the corresponding new setter method. - New class MouseInputMode delegates mouse input to implementations of new interface MouseInputEditor using double precision mouse events. The concept of MouseInputEditor enables convenient user interaction with node realizers, edge realizers, and also drawables.
AbstractMouseInputEditor serves as a base implementation. - Class EditMode has been added a number of further setter methods to enable/disable specific functionality, like, e.g., node editing (allowNodeEditing), moving labels (allowMoveLabels), or moving ports (allowMovePorts).
- Other methods added to class EditMode relate to node editing (methods isEditNodeGesture, editNode, startEditor, etc.), controlling the default cursor (methods setDefaultCursor and getDefaultCursor), and also callbacks for convenient bend creation notification (methods createBend and bendCreated).
- Added method updateView to interface View to enable locally confined repaints.
- New view mode class AreaZoomMode allows to zoom a given selected area, i.e., adjusting the view port to show only that part of a graph that is inside a selection rectangle.
Input and Output
- Added class ImageIoOutputHandler: this class allows access to image writer plugins available with Java Image I/O API (enables writing Portable Network Graphics, i.e., PNG image file format, for example).
Note that using the Java Image I/O API functionality depends classes only available in J2SE 1.4 or higher.
Graph Analysis
- Added class Centrality that offers several centrality measures such as nodeBetweenness, edgeBetweenness, or closenessCentrality, for nodes and edges of a graph.
- Added class Groups which provides support for automatic graph clustering, i.e., node grouping, using centrality measures.
Demos Added
The structure of subpackages inside the demo/ package has been changed. Many new subpackages have been created to better match the package/subpackage structure of the classes that are discussed.
Also, DemoBrowser, a "shell" application which allows convenient navigation through all yFiles tutorial demo applications has been added. It features execution of the demos, and also display of both source code and documentation.
- Animation Framework: demos EaseInEaseOutDemo, FadeInFadeOutDemo, LabelAnimationDemo, and AnimationEffectsDemo (together with AnimationEffectsDemoBase) have been added.
They demonstrate usage of the animation framework and also many of the effects provided by factory class ViewAnimations. - SwingRendererDemo presents how to use Java Swing UI components as NodeRealizers.
- DirectedOrthogonalLayouter: UMLClassDiagramLayouterDemo has been added to demonstrate directed orthogonal layout for UML class diagrams.
- GenericTreeLayouter: demos AssistantPlacerDemo, RotatableNodePlacersDemo, and TreeLayoutConfigurationDemo (together with TreeLayoutConfiguration) have been added to show setup and usage of GenericTreeLayouter with NodePlacer implementations that support subtree rotation.
- InteractiveOrganicLayouter: demos InteractiveOrganicDemo, NavigationDemo, and AnimatedNavigationDemo have been added to show setup and usage of InteractiveOrganicLayouter in an interactive environment that allows a user to "live"-drag nodes.
- The demos MouseInputDemo and ScrollingNodeRealizer demonstrate the MouseInputEditor concept, which can be used to conveniently support user interaction with arbitrary (graph) elements in the view.
- GenericEdgeRealizerDemo has been added to present creation and customization of GenericEdgeRealizer configurations.
- BridgeDemo demonstrates how the bridging functionality of DefaultGraph2DRenderer is enabled, BridgeEdgeRealizerDemo shows how to enable so-called "bridges" in conjunction with class GenericEdgeRealizer.
- FlowchartDemo has been added to show port candidate support provided by incremental hierarchical layout.
Features Added to yEd
- "Bridges" can be enabled for all edges to resolve the visual ambiguity induced by intersecting edge paths.
- Added new UML-style orthogonal layout algorithm to the suite of orthogonal layout algorithms.
- Added disk arrangement styles for node partitions in the layout module of circular layout.
- Added automatic clustering capabilities to the grouping tool that support biconnected components and "natural clustering."
Incompatible Changes
- HierarchyTreeSelectionModel: Changed validation of paths. Only done on the last POST_EVENT (with bracket depth==0)
- The rework of package y.anim has lead to a new animation scheme where an animation no longer has an absolute number of frames, but instead returns frames that best match a given relative time.
Also, implementations for interface AnimationListener have to be registered with class AnimationPlayer in order to get properly notified of animation progress. - AnimationObject: Method calcNextFrame(int, int) has been replaced by calcFrame. Methods getAnimationLength() and getAnimationListener() have been removed.
AnimationEvent: Constructor has new signature; removed optimization constants.
AnimationPlayer: Methods setSynchronizedMode(boolean) and getSynchronizedMode() have been replaced by setSynchronized and isSynchronized. - YLabel: The rotation angle for a label is given in double now instead of int, i.e., the signature of getter/setter methods getRotationAngle and setRotationAngle has changed.
- EdgeRealizer: Method calculatePath() has been replaced by calculatePath
yFiles 2.3.1.1 - Changes Since 2.3.1
Bugfixes
- Class GroupNodeRealizer: method GroupNodeRealizer label settings of NodeRealizer argument were ignored.
yFiles 2.3.1 - Changes Since 2.3.0.3
Features Added
Viewer/Editor Interaction
- Class Graph2DView: added method getViewModes.
- Class Graph2DViewMouseWheelZoomListener: added methods setMaximumZoom, setMinimumZoom and calcZoom.
- Class Graph2DViewActions: added new actions SELECT_LEFT_EDGE, SELECT_RIGHT_EDGE, SELECT_TOP_EDGE and SELECT_BOTTOM_EDGE.
- Class ViewMode: added addPropertyChangeListener methods that allow to register PropertyChangeListeners with a view mode. PropertyChangeListeners can listen for changes of the ViewMode properties ACTIVE_PROPERTY, CHILD_MODE_PROPERTY, ACTIVE_VIEW_PROPERTY, GRAB_FOCUS_ENABLED_PROPERTY, PARENT_MODE_PROPERTY, NAME_PROPERTY, MODIFIER_MASK_PROPERTY and EDITING_PROPERTY.
- Class ViewMode: added methods isEditing and setEditing. Changes of the edit property will be propagated to all registered PropertyChangeListeners. Subclasses of ViewMode should set and reset the edit property to signal the start and end of their edit action.
- Class ViewMode: added method cancelEditing that will allow clients to cancel an active edit action of a ViewMode.
- All subclasses of ViewMode have been updated to signal property changes to all registered PropertyChangeListeners.
Data Structures
- Class Graph: various sanity checks have been added to enforce that a graph won't act on elements that do not belong to it.
- Class YList: now implements the Java list interface
java.util.List
.
Automatic Layout
- Class SelfLoopLayouter: now allows to constrain the set of self-loops that should be laid out by this algorithm.
- Added class LayoutMultiplexer: this layout stage delegates its layout calls to a core layout algorithm that is dynamically chosen at runtime by inspecting the nodes of the input graph.
- Added class GroupNodeRouterStage: this layout stage will enable OrthogonalEdgeRouter to properly route edges of hierarchically grouped graphs.
- Added class TreeReductionStage: this layout stage helps to layout non-tree graphs with tree layout algorithms.
- Class OrthogonalLayouter: added new layout styles FIXED_MIXED_STYLE and FIXED_BOX_STYLE. These are node-size-preserving variants of the styles MIXED_STYLE and BOX_STYLE, respectively.
- Class OrthogonalLayouter: feature perceivedBendsOptimization now applicable to all layout styles.
- Class PrintPreviewPanel: added missing getter and setter for the PageFormat used internally.
- Class SALabeling: added methods setDeterministicModeEnabled and isDeterministicModeEnabled.
Modules
- Package y.module: Now contains a flexible module IncrementalHierarchicLayoutModule that configures the new hierarchical layout algorithm.
- Package y.module: Added listener support to module base class YModule. Clients can now register implementations of the newly added interface ModuleListener in order to receive notification of the module state during its execution. Notification will be sent in the form of the newly added event class ModuleEvent.
- Class YModule: improved implementation of method startAsThread.
- Class TreeLayoutModule: added layout support for non-tree graphs.
Settings Framework
- Class ConstraintManager: added a flexible mechanism that allows to trigger arbitrary editor actions whenever a certain condition is met or a property changes value. The newly added classes ConstraintManager.EditorAction and ConstraintManager.Condition can be used to model actions and conditions. Methods performActionOnCondition and performActionOnPropertyChange can be used to associate a condition or property change with an action.
Graph Analysis
- Class Paths: added path-related methods constructNodePath and findAllChains.
- Class NetworkFlows: added method calcMaxFlowMinCut.
yEd Graph Editor Demo
- Added the IncrementalHierarchicLayoutModule to the list of available layout modules.
- Node and edge properties are now presented inside a table editor.
- Layout modules will be launched in a separate thread to allow GUI repaints during layout calculation.
- Auto grouping tool now supports grouping of chains.
Demos Added
- The source code of IncrementalHierarchicLayoutModule has been added for tutorial purposes.
- Demo RecursiveGroupLayouterDemo has been added. It shows how to layout the contents of group nodes each with a different layout style.
Improvements
- Class RecursiveGroupLayouter: improved edge handling.
- Class IntersectionAlgorithm: performance has been considerably improved. This improvement also speeds up SALabeling, GreedyMISLabeling, ShuffleLayouter, and OrthogonalEdgeRouter.
- Class Overview: improved performance and fixed occasional drawing problems.
- Class FixedGroupLayoutStage: previously, strong port constraints were ignored by this stage and port coordinates modified.
- Class YLabel: uses double precision coordinates for background and border painting now.
Bugfixes
- Class ShortestPaths: certain input caused methods kShortestPaths and kShortestPathsCursor to throw an IllegalArgumentException.
- Class Graph2DPrinter: fixed bad return values for getFixedScalingPosterDimension if landscape paper formats were used.
yFiles 2.3.0.3 - Changes Since 2.3.0.2
Bugfixes
- Class OrthogonalEdgeRouter: under certain circumstances edges with strong port constraints could cause a NullPointerException.
- Class ClassicLayerSequencer: If the same layouter instance of HierarchicLayouter was reused with different PortConstraint settings, an ArrayIndexOutOfBoundsException was thrown under certain circumstances.
- Class Transitivity: Method transitiveReduction contained duplicate edges if they were multi-edges before the reduction.
- Class EditMode: If node creation was disallowed, clicking on the canvas would cause the graph to fire empty
PRE_EVENT
s andPOST_EVENT
s. - Class HierarchyManager: fired too many HierarchyEvents when folding or unfolding nodes.
- Class LayoutTool: method getBoundingBox unconditionally included bounding boxes of labels.
- Class Graph2D: method getLabelLayout returned information of first node label only.
- Class HierarchyManager: root graph can now be non-empty at construction time of HierarchyManager.
- Class HierarchyTreeModel: HierarchyManager can now be non-empty at construction time of HierarchyTreeModel.
- Package
y.option
: Fixed bad "ValueUndefined" behavior for items in table view.
Improvements
- Class ObjectStringConversion: added convenience methods and made registerObjectStringConverter
public
.
Demos Added
- Demo NodePropertyEditorDemo has been added. It demonstrates how to create a property editor for nodes.
yFiles 2.3.0.2 - Changes Since 2.3.0.1
Bugfixes
- Classes OrthogonalLayouter and OrthogonalGroupLayouter: fixed embedder problem that could cause a NullPointerException during layout calculation.
- Class CircularLayouter: conflicting settings for maximum deviation angle and preferred child wedge forced the algorithm into an infinite loop.
- Class ShortestPaths: fixed a problem where in certain situations method kShortestPaths did not enumerate all possible paths.
- Class PortCalculator: fixed a problem where in some scenarios bends of certain edges got all moved to the location of the first bend.
- Class NodeRealizerIntersectionCalculator: when in buffered layout mode, intersection points at nodes whose size have changed will not be calculated anymore.
- Class HierarchyManager: removed a possible race condition in getInstance which could lead to a
ConcurrentModificationException
s in multi-threaded environments. - Class LayoutTool: method clipEdgeOnBB caused an exception if there was no visible path.
- Class PopupMode: now uses its own getHitInfo for hit-testing. This allows to customize local hit-testing behavior.
- Class DefaultEditorFactory: fixed bad background color handling in widget for undefined value for ColorOptionItems.
- Class HierarchicLayouter: fixed problem where the minimum slope and minimum length for polyline routing was not respected.
- Default implementations of EdgeLabelModel: implemented a workaround where the default model parameter is used implicitly if none has been set instead of throwing a runtime exception.
- yEd Demo Application: fixed printing problem on non-Windows machines. Fixed problem in ImageNodeRealizer property panel. Improved default node and edge property dialogs.
Improvements
- Class YLabel: added horizontal text position specifiers LEFT_ALIGNED_TEXT_POSITION and RIGHT_ALIGNED_TEXT_POSITION.
- Class AsIsSequencer: improved from sketch parsing of long edge paths.
Documentation Added
- Improved Javadoc comments for many methods from package y.base and for methods relating to the label models in package y.layout.
Also, the Javadoc package descriptions for all yFiles packages have been enhanced and furnished with links to appropriate chapters and sections in the yFiles Developer's Guide.
yFiles 2.3.0.1 - Changes Since 2.3
Bugfixes
- Insets for edge and node labels were wrongly interpreted. This problem caused labels to be painted at a wrong location. For example, labels with default insets were painted a bit too far to the right.
- On Microsoft Windows platforms, when using PrintPreviewPanel the preset and previewed paper format settings were ignored when actually printing a diagram using the print dialog. Instead, a default paper format was used.
- PolyLineEdgeRealizer: rendering and hit test problems could occur when feature smoothedBends was enabled and all control points were covered by either the the source or target node of the represented edge.
Also clipping behavior has been improved if control points lie inside nodes regardless of the configuration of the smoothedBends feature. - OrthogonalEdgeRouterModule: by mistake, the default setting for feature Use Custom Minimum Distance to Node was set to
true
. - ComponentLayouter: resolved problems related to inconsistent and inaccurate bounding box calculation of graph components. Method getBoundingBox of y.layout.LayoutGraph is not used anymore. Also, new methods calcBoundingBox, setLabelAwarenessEnabled and isLabelAwarenessEnabled were added to have more control on the bounding box calculation.
- AnimationPlayer: fixed some problems with "synchronized mode" which resulted in code execution outside the event dispatch thread.
Improvements
- The print and page format dialogs within PrintPreviewPanel are now opened in a separate thread. This ensures that the print preview panel will be properly repainted while these dialogs are open.
- DefaultGraph2DRenderer: added an option that uses a special node and edge ordering for the drawing of nested graphs.
- IncrementalHierarchicLayouter: added convenience methods for configuring the algorithm's awareness of node labels (setConsiderNodeLabelsEnabled).
- Added possibility to specify the positioning of the help panel in the table view of the OptionHandler classes. Additionally it is now possible to customize the colors of the table component easily.
yFiles 2.3 - Changes Since 2.2.1.3
Major Features Added
New Hierarchical Layout Algorithm
- A new implementation of the hierarchical layout algorithm has been added to the suit of layout algorithms. IncrementalHierarchicLayouter complements the classic hierarchical layout algorithm and offers a wealth of new features.
The most outstanding improvement of the new implementation is its ability to both parse the current layout from the sketch and apply different styles to it, as well as incrementally add new elements to an existing layout or mark certain elements in the current diagram to be optimized without changing the rest of the layout structurally.
The new algorithm can be configured and customized in great detail: it is, e.g., possible to define separate styles and parameters for each node and each edge in the graph.
Additionally, the algorithm can be configured to produce more space-efficient layouts. The routing model of edges as well as the crossing minimization algorithms have been improved.
The new algorithm is one of the first to consider node labels that occupy space outside the node's bounds.
The new algorithm also offers built-in support for swim lane layouts.
Like the classic algorithm the new one supports port constraints and bus-like edge routing.
Generic Tree Layout Algorithm
- A new layout algorithm for tree-like structures has been added to the suit of tree layout algorithms. GenericTreeLayouter complements the existing tree layout algorithms and offers some advanced features.
The algorithm can be customized in great detail, each major part sub-task can easily be replaced by custom implementations. A great number of default implementations is already included in the current version.
The algorithm allows for very fine-grained configurations. Each subtree in the graph can have its own style and style settings. The algorithm is the first tree layout algorithm to support yFiles' port constraints.
The default implementation offers mechanisms to read the current layout from sketch and incrementally add new elements to the current diagram.
Refactored Settings Dialogs and Components
- The OptionHandler class and utility classes have been refactored. They now support the MVC paradigm by implementing event-listening methods and allow for more than one open editor instance.
A factory is now used to create the actual GUI for the OptionHandler instances. Two default factories are provided in the current version of yFiles. The first one generates a dialog similar to the one in older yFiles versions, while the second one creates a tree-table-like view. While the first one is especially suited for dialogs, the second one can be used to directly integrate into the GUI of an application and display the settings of the currently focused elements in a non-modal fashion.
Many of the default items have been improved. All of them are supported by the default factories and many of them offer additional features.
Documentation Added
- The yFiles Developer's Guide (formerly known as yFiles Userguide) has been massively improved in many ways. Most notably, it now contains detailed information about the yFiles viewer package and many new details about the algorithms and architecture of the yFiles layout package. Since the Developer's Guide has grown so much in size we have decided not to distribute it with the yFiles library itself anymore. Instead it is available as a separate download unit now.
Minor Features Added
Automatic Layout
- OrthogonalLayouter: added optimization that reduces the number of perceived bends. New methods are setPerceivedBendsOptimizationEnabled and getPerceivedBendsOptimizationEnabled.
- Class ComponentLayouter: added many new strategies to arrange the separate components of an input graph. Also, by using the DataProvider key LAYOUT_NODE_DPKEY it is now possible to specify which of the detected graph components should be arranged by ComponentLayouter's core layouter. Also, the new layout module ComponentLayoutModule can now be used to launch and configure ComponentLayouter.
- Class ParallelEdgeLayouter: added new layout option setJoinEndsEnabled that, when enabled, will join the ends of all parallel edges at a single point.
- GroupNodeHider: added methods setGroupBoundsCalculator and getGroupBoundsCalculator.
- Added interface IntersectionCalculator and LayoutStage PortCalculator. In a graph layout process these classes can be used to calculate the intersection point between an edge and the actual visual representation of its source or target node. In case the source and target nodes are represented by NodeRealizer one can use class NodeRealizerIntersectionCalculator to elongate a target or source segment of an edge path so that its port points lie on the border of the realizer shapes.
- OrthogonalEdgeRouter: refactored code to avoid possible StackOverflowErrors when routing edges in huge graphs.
- LayoutTool: added method applyGraphLayout.
Realizers and Rendering
- ShapeNodeRealizer: added new protected methods that are responsible for painting certain parts of the realizer. These methods will be invoked by paintNode and can be selectively overridden by subclasses to customize the appearance of the realizer.
- Added flexible NodeRealizer implementation GenericNodeRealizer that can be used to easily create customized node appearances without subclassing.
Utility and convenience classes that can be used in conjunction with this realizer are AbstractCustomNodePainter, AbstractCustomHotSpotPainter, and SimpleUserDataHandler. - Added EdgeRealizer QuadCurveEdgeRealizer that represents the path of an edge as a sequence of quadratic curves.
- Added Drawable implementations CompositeDrawable and ShapeDrawable.
- Added ViewMode CreateChildEdgeMode that can be used to quickly create graphs.
- Added ViewMode PortAssignmentMoveSelectionMode that can be used to interactively assign PortConstraints to the edges of a graph.
- ShapeNodeRealizer: added support for drop shadow rendering. Relevant new methods are setDropShadowColor, getDropShadowColor, setDropShadowOffsetX, getDropShadowOffsetX, setDropShadowOffsetY and getDropShadowOffsetY.
- YLabel: added methods that control the placement of text relative to the displayed icon. Relevant new methods are setVerticalTextPosition, getVerticalTextPosition, setHorizontalTextPosition, getHorizontalTextPosition, setIconTextGap and getIconTextGap. Also, the query method getIconPosition has been added.
- YLabel: added the possibility to display underlined text in a label. The relevant new methods are setUnderlinedTextEnabled and isUnderlinedTextEnabled.
- EdgeRealizer: added methods setReversedPathRenderingEnabled and isReversedPathRenderingEnabled.
- Added Drawable implementations CompositeDrawable and ShapeDrawable.
- Graph2D: changed method signatures of fireGraph2DEvent and fireGraph2DSelectionEvent from protected to public.
- Graph2DView: added query methods getDrawables and getBackgroundDrawables.
Viewer/Editor Interaction
- Added MouseWheelListener Graph2DViewMouseWheelZoomListener that allows to use the mouse wheel to change the zoom level of Graph2DView.
- Added new ViewMode AutoDragViewMode that will automatically adjust the visible clip of the view when dragging the mouse outside of the view.
- Added ViewMode CreateChildEdgeMode that can be used to quickly create graphs. It automatically creates a new node at the end of a newly created edge.
- CreateChildEdgeMode: a new ViewMode that automatically creates a new node at the end of a newly created edge.
- Added ViewMode PortAssignmentMoveSelectionMode that can be used to interactively assign PortContraints to the edges of a graph.
- Added alternative group bounds auto-resizing behavior to view modes
HierarchyMoveSelectionMode
andHierarchyHotSpotMode
. Setter and getter for the group bounds policy aresetGroupBoundsPolicy
andgetGroupBoundsPolicy
. - Edges can now optionally be created and connected when starting or ending an edge at the location of the main label of a group node. Effected classes are
HierarchyEditMode
andHierarchyCreateEdgeMode
. Added methods aresetConnectOnGroupNodeLabelEnabled
,isConnectOnGroupNodeLabelEnabled
,setConnectOnGroupNodeLabelEnabled
andisCreateEdgeOnGroupNodeLabelEnabled
.
Application Logic
- Added clipboard functionality that makes it easy to cut, copy and paste parts of a diagram. The classes Graph2DClipboard and
Graph2DHierarchyClipboard
have been added to this purpose. - Graph2DUndoManager: added methods that allow to register UndoListeners that get informed when new commands are added to the undoable command queue. See addUndoListener and removeUndoListener.
Printing
- Added the customizable print preview panel PrintPreviewPanel.
- Graph2DPrinter: a title bar can now be added to diagrams when being printed.
Input and Output
- Support for the XML-based variant XGML of the graph format GML has been added. XGMLIOHandler produces structurally the same output as GMLIOHandler but is based on XML syntax. Other new classes related to this graph format are XGMLTokenizer, XGMLEncoder, XGMLInput and XGMLOutput. Note, that using the XGML functionality depends on XML-related classes only available in J2SE 1.4 or higher.
- ImageMapOutputHandler: added support for hyper-linked edge paths in generated image maps.
Graph Analysis
- ShortestPaths: added powerful shortest-path variant kShortestPaths.
- Class Dfs has been refactored. Recursion was removed from the implementation to avoid StackOverflowErrors on huge graphs. Performance has been considerably improved.
Miscellaneous
- Interface DataMap was introduced that extends both DataProvider and DataAcceptor. The main interfaces NodeMap and EdgeMap now implement
DataMap
. - YModule: added ability to disable the automatic backup of a graph's realizers before acting upon it. Added methods are isBackupRealziersEnabled and setBackupRealizerEnabled. The graph export modules in package y.module.io have been changed to not automatically backup realizers anymore.
Demos Added
- The demo package
demo.view.incremental
has been added. It provides tutorial source code demos that show how to use the new incremental layout capabilities of yFiles:- demo.view.incremental.SimpleIncrementalHierarchicLayouterDemo gives a short introduction to the incremental feature of the new hierarchical layout algorithm.
- demo.view.incremental.SimpleSwimLaneLayouterDemo demonstrates the swim lane layout capabilities of the new hierarchical layout algorithm.
- demo.view.incremental.IncrementalHierarchicLayouterDemo is a more complex application that uses the incremental features of the new hierarchical layout algorithm.
- demo.view.incremental.IncrementalTreeLayouterDemo is a complex application that uses the features found in the new tree generic tree layout algorithms.
- Added source code demo demo.layout.IncrementalLayoutWithoutAView that demonstrates the usage of the incremental layout facility without the yFiles viewer classes.
- Added source code demo demo.layout.SwimlaneLayoutWithoutAView that demonstrates the usage of the swim lane layout facility without the yFiles viewer classes.
- Added source code demo demo.io.TiledImageDemo.
- Added source code demo demo.view.GenericNodeRealizerDemo that demonstrates how to use the new GenericNodeRealizer class.
- Added source code demo demo.view.PrintPreviewDemo that illustrates the new print preview GUI.
- Added source code demo demo.option.OptionHandlerDemo that illustrates the features of the OptionHandler classes.
- Updated the demos that show how to use the yFiles layout algorithms without the yFiles viewer package to nevertheless display a rudimentary graphical sketch version of the diagram.
Features Added to yEd
- Added print preview
- Added module for laying out the separate components of a graph.
- Added rudimentary Japanese GUI localization.
Bugfixes
- LayoutTool: method pathIntersectsRect returned incorrect results. The intersection test was only performed on the first segment of an edge path.
- Graph: method removeGraphListener could cause a NullPointerException upon removal of non-registered listeners.
- PopupMode: resolved compatibility problems with J2SE 5.0. Method reactivateParent was invoked before the final mouse release event had been received.
- GroupNodeRealizer: property displayInnerGraph was not properly copied.
- ImageOutputHandler: corrected html output for the poly areas of edges. A dispensable comma was removed.
- GroupNodeRealizer: alpha component for fill color was ignored.
- Overview: fixed some repaint problems.
- YLabel: fixed a problem where the size of a label was not properly taking insets into account.
- ArcEdgeRealizer: fixed
NaN
bounding box problem and height/ratio conversion. - BezierEdgeRealizer: fixed a bug in contains which prevented the user from selecting the first segment and a bug in calcUnionRect which resulted in repaint problems.
- ImageMapOutputHandler: fixed order of <area> tags.
- BoundedQueue: fixed constructors BoundedQueue, BoundedQueue, BoundedQueue, and BoundedQueue.
- OrganicLayouter: pluggable instance of GroupBoundsCalculator was ignored.
- HierarchicGroupLayouter: fixed a problem that occurred when both global sequencing, memento mode, and component layouting was enabled.
- OrthogonalEdgeRouter: fixed a problem that occurred with self-loops having strong port constraints set. Also fixed a problem with edges having strong port constraints set at its end node, where the end node lies completely within the bounds of another node. Reactivated port constraints in local crossing minimization.
- OptionHandler: fixed a problem that occurred when adding new items after method clear had been called.
Improvements
- Improved accuracy of clipping for curved edges paths.
- Improved performance of contains.
Incompatible Changes
- Starting with this release it is the responsibility of the EdgeRealizer to render its selected bends. The new protected method paintBends was introduced for that purpose. Overriding this method will allow customization of the bend rendering process. In prior releases, selected bends were rendered by DefaultGraph2DRenderer.
yFiles 2.2.1 - Changes Since 2.2.0.4
Features Added
- The graph formats GML and GraphML now support colors that have an alpha component. Use #RRGGBBAA to specify (semi-)transparent colors.
- ShortestPaths: added method findUniformShortestPaths to efficiently find multiple shortest paths between many nodes.
- LayoutGraphWriter: added class that serializes instances of Graph or LayoutGraph to GML format. Useful for debugging and testing.
- YLabel: added support for rotated labels. See new methods setRotationAngle and getRotationAngle.
- FileOptionItem: property editor improved.
- Graph2DView: custom JTooltip classes can now be used by overriding its method createToolTip.
- LayoutTool: added method pathIntersectsRect
- OrthogonalEdgeRouter: added ability to route self-loop edges.
- OrthogonalEdgeRouter: added crossing reduction functionality. New methods setCrossingCost and setReroutingEnabled have been added that allow to configure orthogonal edge router to avoid edge crossings.
- Added performance optimization stage ReducedSphereOfActionStage for OrthogonalEdgeRouter.
Documentation Added
- Added massively improved and extended version of yFiles Developer's Guide.
Demos Added
- Added demo.io.ImageMapDemo that shows to create hyper-linked HTML maps for a diagram.
Bugfixes
- Improved GML support for GroupNodeRealizer. Border insets will now be serialized correctly.
- OrthogonalEdgeRouter: fixed problems that occurred when edge segments were forced to lie on top of each other. These situations occurred when some edges had strong port constraints and other edges where not part of the edge selection.
- OrganicLayouter: activating tree beautifier option caused problems when layouter was used in unbuffered mode.
- OrganicLayouter: deterministic behaviour was broken when using the same instance of OrganicLayouter for multiple layout runs.
yFiles 2.2.0.4 - Changes Since 2.2.0.3
Bugfixes
- HierarchyTreeSelectionModel: The selection state of nodes that were reinserted in the graph was not considered by the selection model. This caused the selection of the tree view and the graph to be out of sync.
- HierarchyTreeModel: Nodes that were moved from one hierarchy level automatically were deselected.
- PortConstraintConfigurator: fixed a bug in
createPortConstraintsFromSketch
methods that was introduced in 2.2.0.3.
yFiles 2.2.0.3 - Changes Since 2.2.0.2
Features Added
- Graph2DView: besides "Ctrl-Enter" the key combination "Shift-Enter" now also triggers line breaks in the inline label editor.
- HotSpotMode: added the alternative resize policies BLOCK_UPON_MINIMUM_SIZE and FLIP_SIDES_UPON_MINIMUM_SIZE.
- yEd Graph Editor: shows page format dialog before printing on Windows platforms.
- CreateEdgeMode: Added method getSourcePortOffset. This method can be used as a hook to adjust the source port when edge creation is initiated.
Bugfixes
- Graph2DView: On some look and feel implementations there were repaint problems when both scrollbars were visible and the view was laid out using a
java.awt.CardLayout
. This has been fixed.
Demos Added
- Added yFiles obfuscation demo, that shows how to obfuscate yFiles using yGuard.
yFiles 2.2.0.2 - Changes Since 2.2.0.1
Features Added
- Added class PatchRouterStage. Using this stage improves the performance and peak memory consumption of OrthogonalEdgeRouter. This will allow to route the edges of big graphs, efficiently.
- Class ComponentLayouter. Added methods arrangeComponents, setComponentArrangementEnabled and isComponentArrangementEnabled. These methods allow to configure the component layout behaviour of this class.
- Class Arrow. Added static method addCustomArrow. This makes it possible to create custom arrows with specific line color and stroke.
- GML format: added support for custom arrows.
Bugfixes
- NodeRealizer and EdgeRealizer: visibility feature of realizer was not serialized and not copied. Fixed both problems.
- Graph2DView: Method openLabelEditor did not properly disable all registered ViewModes during the display of the editor.
- EditMode: the creation of a bend is now a single undoable unit.
- yEd Graph Editor: displaying the property settings dialog for edges or nodes caused exceptions when certain conditions where matched.
yFiles 2.2.0.1 - Changes Since 2.2
Bugfixes
- GML Format: GML attribute type of isGroup has been corrected to be boolean. In the former release it was of type String.
- GML Format: in the absence of a graphics block the GML attribute "label" got ignored for group nodes.
- Class EdgeOppositeNodeLabelModel: NPE occurred when no node was bound to this model.
Improvements
- Faster startup time of yEd Graph editor due to improved resource handling.
yFiles 2.2 - Changes Since 2.1
Major Features Added
Hierarchically Grouped Graphs
- Viewer and editor support for hierarchically grouped graphs has been added. This new feature naturally extends the nested graph capabilities of yFiles. Unlike before, it is now possible to connect edges to the nodes that reside inside a group. Group nodes can be considered as opened folder nodes that make it possible to freely manipulate the contents of a group node. See our extensive Graph Hierarchy source code demo, on how to make use of this new feature in your own application. Also, see package y.view.hierarchy for the classes that implement this new feature.
- Automatic layout support for hierarchically grouped graphs has been added. The following layout algorithms are now able to layout graphs according to their grouping information: for hierarchic layout style HierarchicGroupLayouter, for orthogonal layout style OrthogonalGroupLayouter and for organic layout style both main algorithms OrganicLayouter and SmartOrganicLayouter. The organic layout family even supports the additional feature of calculating an overall layout while keeping the relative positions of nodes within a group fixed. Also, a new layout package y.layout.grouping has been added that provides interfaces and utility classes for laying out hierarchically grouped graphs.
Orthogonal Edge Router
- A sophisticated edge router has been added that routes the edges of a graph using vertical and horizontal segments only, while keeping the positions of the nodes of the graph fixed. Using an intelligent path finding strategy, it avoids crossing through any nodes, while keeping the number of bends low.
Improved Hierarchical Layouter
- HierarchicLayouter now supports the notion of edge groups. This feature allows to layout certain edges in a bus-like fashion. The source code demo demo.view.HierarchicLayouterDemo shows how to use this feature.
- Port constraints for same layer edges will now be obeyed.
- More compact orthogonal edge routing.
- Added methods to easily specify different layering policies. See setLayeringStrategy
- Improved crossing minimization in the presence of strong or weak port constraints
- Improved automatic port assignment in the presence of strong and weak port constraints
More Pluggable Modules
- Package y.module.io has been added. It provides pluggable modules for diverse yFiles input and output formats. Some of these modules provide option dialogs that offer the possibility to modify the settings interactively.
- The layout constraint configuration modules PortConstraintModule and EdgeGroupConstraintModule. Also, an interactive module for the new layouter OrthogonalEdgeRouter has been added.
- The source code of the most important layout modules has been added to the demo section
demo.module
. This will make it very easy to write your own customized layout modules.
Minor Features Added
Layout Related
- Added internal edge labeling capabilities to OrthogonalLayouter.
- The generic labeling algorithms are now aware of edge groups.
Input/Output Related
- Added class TiledImageOutputHandler to handle tiled output of images.
- Added class ViewPortConfigurator to ease the viewport configuration for image output handlers like GIFIOHandler or JPGIOHandler.
- The human readable GML Format now supports additional features. Here are some of them:
- Definition of hierarchically grouped graphs
- Specification of Unicode label text
- Specification of more than one label per node or edge
- Advanced label graphics and layout features
- The human readable Trivial Graph Format TGF has been refactored and is now even more trivial.
Viewer Related
- Added new NodeRealizer GroupNodeRealizer that can be used to represent group and folder nodes.
- New class Graph2DViewActions provides pluggable actions like keyboard navigation or label editing to the graph view.
- Class CreateEdgeMode: added possibility to suppress the creation of self loops. Also, it is now possible to cancel the creation of an edge by pressing the escape key.
- Class DefaultGraph2DRenderer: uses a modified rendering order of nodes when a hierarchically grouped graph is present.
- Class HitInfo: uses a modified hit-test order of nodes when a hierarchically grouped graph is present.
- Class Graph2DView:
- grid color feature has been added.
- grid marks are not scaled anymore when zooming the view
- Class ViewMode: view modes are now able to pass on the keyboard focus to the underlying Graph2DView. This feature can be toggled by using method setGrabFocusEnabled.
- Class SelectionBoxMode: now provides more accurate edge selection capabilities.
- Class Graph2DUndoManager: added method resetQueue that allows flushing the undo stack.
- Class YLabel: added features insets, lineColor and method getTextLocation.
- Class NodeLabel: added feature autoSizePolicy. Also, the new internal position specifiers TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT and BOTTOM_RIGHT have been added.
- Class LineType: added predefined line types for dotted lines. Also, it is now possible to create custom LineType objects.
- Class Bend: changed the appearance of the bend selection mark.
- Class HotSpotMode: when resizing a node, the port locations of adjacent edges will now be adjusted in a way that they will stay inside of the node.
- Class ColorOptionItem: improved option editor that allows choosing amongst the most recently used colors. Also, it offers the absence of color as an option. Class OptionHandler comes with the new methods addColor and addColor.
- Instances of NodeRealizer, EdgeRealizer and YLabel can now handle
null
values for their line- and fill colors. This makes it possible to draw labels or nodes with no border or no fill color at all. - Class EdgeRealizer: added sophisticated edge-path intersection test in method pathIntersects.
- Added new child-node comparators useful for sorting the nodes residing in HierarchyTreeModel.
Algorithm Related
- Class Bfs: added method getLayers that additionally allows calculating the bfs layers of undirected graphs.
- Class Paths: added method findAllPaths.
- Class ShortestPaths: added method findShortestUniformPaths.
Performance Improvements
- Graph's memory consumption (specifically Node and Edge) has been significantly improved, while at the same time iterations over the graph's elements has become noticeably faster.
- Amount of performed repaints in the Overview has have been dramatically reduced
- Performance of bounds calculation of realizers and labels has been significantly improved.
- Class HierarchyTreeModel: considerable performance improvement in the case that a child comparator is set.
- Considerable performance improvements when loading and creating graphs in yEd.
- Reduced memory consumption for yEd clipboard operations.
- YGFIOHandler now uses compressed streams internally during the serialization of the graph, thus reducing the size of .ygf files greatly. Older .ygf files can still be read back in successfully.
Documentation
- Updated the yFiles User Guide to reflect the new layout features incorporated into yFiles 2.2.
- Added a new section about NodeMaps, EdgeMaps, and DataProviders to the yFiles User Guide
- Added a new section about edge routers to the yFiles User Guide
Demos
- Added a lot of new functionality to demo.view.hierarchy.HierarchyDemo that explains how to use the new grouping features and shows off the grouping awareness of the HierarchicGroupLayouter.
- Added possibility to specify edge groups constraints in demo.view.HierarchicLayoutDemo
- The new demo.view.EdgeRouterDemo shows how to use the orthogonal edge router.
- The new demo.view.MazeRouterDemo shows how orthogonal edge router can be used to find a way through of a maze.
- Added the source code of the most important yFiles layout modules to the demo.module package.
yEd Enhancements
- Integrated support for hierarchically grouped graphs
- Added orthogonal edge router
- Added group layout support for the layout styles orthogonal, hierarchical and organic
- Integrated settings dialogs for import and export of diagrams
- Added tools that make it possible to specify PortConstraints and edge group IDs. (not available in public yEd version)
Bugfixes
- Class ShortestPaths: fixed a bug in the Single Sink Single Source methods that occurred on graph instances
g
, whereg.N() > g.E()
. - Fixed calcMaxFlow. Calling this method caused a stack overflow.
- Class OrthogonalLayouter: the infamous "Unknown Predecesor Type" Bug has been finally tracked down and fixed.
- Class DiscreteEdgeLabelModel and SliderEdgeLabelModel: fixes NaN problem that occurred in some very special cases.
- Class Graph2DView: occasional incorrect repaints in the presence of clipping have been corrected.
- Class Graph2DUndoManager: sometimes enabled-state of undo actions was not updated correctly.
- Class HierarchyTreeModel: when a child comparator was set, the selection state of nodes was reset whenever the nodes changed.
- Faulty view cursor updates for standard view modes have been fixed.
- Class EdgeRealizer: Non-displaying edge label icons when empty label text was set now get displayed correctly.
Incompatible API Changes
- DefaultHierarchyGraphFactory now binds instances of GroupNodeRealizer to created group and folder nodes. In the former release instances of Graph2DNodeRealizer have been bound to newly created folder nodes.
- ViewMode: By default view modes pass on the focus to the underlying Graph2DView when pressing the mouse on the view. For compatibility with former yFiles versions disable focus passing by calling method setGraphFocusEnabled.
- ViewMode: the default implementations of the methods mouseShiftPressedLeft, mouseShiftPressedMiddle, mouseShiftPressedRight, mouseShiftReleasedLeft, mouseShiftReleasedMiddle, and mouseShiftReleasedRight now invoke the un-shifted versions of these methods. In earlier versions, the default implementations of these methods performed no actions.
- When using getLocation as coordinate for Graph2DView's label editor methods openLabelEditor the editor may not be positioned at the actual location of the label text anymore, since label insets have been introduced. It is recommended to open up the label editor at the location returned by method getTextLocation.
- Class DefaultGraph2DRenderer: for graphs that are managed by a HierarchyManager the rendering order of nodes has been changed. Formerly the internal ordering of nodes in the graph has been used. This version uses the rendering order defined by the method preTraverse
- Class HitInfo: for graphs that are managed by a HierarchyManager the hit-test order of nodes has been changed. Formerly the internal ordering of nodes in the graph has been used. This version uses the hit-test order defined by the method postTraverse
yFiles 2.1 - Changes Since 2.0.1
Features Added
- Added organic style layout module SmartOrganicLayouter to package y.layout.organic. This module is very versatile and can be used for both huge graph structures and high quality layouts.
- Added organic style layout algorithm GRIP to package y.layout.organic. This algorithm is extremely fast and is especially suited for large mesh-like graph structures.
- Added an experimental edge routing module that routes edges organically given an initial node placement. OrganicEdgeRouter will try to route edges given a minimal distance between nodes and edges. This layout stage will produce very nice results for suitable graph topologies.
- Added tree layouter ARTreeLayouter to package y.layout.tree. This layout algorithm obeys a given aspect ratio of width and height and produces much more compact layouts than standard tree layout algorithms.
- All tree layout algorithms in the y.layout.tree package can now produce much nicer layouts for near-tree-like structures (undirected, reversed).
- TreeLayouter now supports the
portStyle
attribute. Using setPortStyle one can now specify the drawing style of the ports. - Added a layout algorithm that takes any given layout and removes possibly existing node overlaps by rescaling and shuffling overlapping nodes. The algorithm is especially well-suited for organic layouts and is implemented as a layout stage in the RemoveOverlapsLayoutStage class.
- Class TreeLayouter: added port-style option to layouter. See setPortStyle.
- Class OrthogonalLayouter: added new layout styles MIXED_STYLE, BOX_STYLE and the tree optimizing style NORMAL_TREE_STYLE.
- Package y.layout.orthogonal: added an optimization for subtrees for the orthogonal layout.
- HierarchicLayouter: Many improvements and new features concerning this layout algorithm have been included in the y.layout.hierarchic package:
- Added grouping feature that allows to group nodes within a layer. See demo demo.view.HierarchicLayouterDemo on how to use this feature.
- Added methods setPortBorderGap and getPortBorderGap. This feature adds additional flexibility to the port distribution style.
- Added support for strong port constraints, i.e. the layouter now can obey and keep previously set port coordinates when layouting a graph. See demos demo.view.HierarchicLayouterDemo and demo.layout.LayoutWithoutAView on how to use this feature.
- Improved the edge labeling algorithm for this style of layout. Specifying edge label constraints leads to much more pleasing results now.
- Improved execution time of Rank Assignment and added new Rank Assignment variant WeightedLayerer, which produces optimal rankings quickly.
- Improved execution time and quality for the layer sequencer implementation ClassicLayerSequencer. Port constraints will now be taken into account to a certain degree and multiple edges will be routed in a better way.
- Improved drawings based on the MedianLinearSegmentDrawer implementation.
- Added a new drawing implementation SimplexDrawer which produces nice results in short time.
- LabelLayoutDataRefinement contains a new algorithm which can be used to improve the placement of edge labels in order to better obey the preferred placement of these labels.
- Package y.module contains a couple of new modules which can be used to interact with the new algorithms:
- GRIPModule can be used as a graphical frontend to the GRIP layout algorithm.
- SmartOrganicLayoutModule can be used as a graphical frontend to the SmartOrganicLayouter algorithm.
- ShuffleLayoutModule can be used as a graphical frontend to the ShuffleLayouter algorithm.
- OrganicEdgeRouterModule can be used as a graphical frontend to the OrganicEdgeRouter algorithm.
- Package y.util. added new classes for serialization and object persistency management. See ObjectStore, ObjectStringConverter, BeanSerializer, ObjectStringConversion, ReflectionStringConverter. Also, property persistency management has been added to class GlobalProperties.
- Package y.module: internationalized option dialogs for all YModule implementations.
- GMLIOHandler: added new attributes in graph scope that allow node sizes to automatically fit the specified label text. See GML Comments for more details.
- Graph2DView: method openLabelEditor has been improved. Escape key cancels editor now, Ctrl-Enter or Enter key closes editor now.
- Package y.algo contains a couple of new classes. Sorting can be used to efficiently sort nodes by different criteria. Transitivity can be used to determine the transitive closure or the transitive reduction of a graph structure.
- Package y.view now contains the Graph2DUndoManager class which can be used to easily include undoability in any application. UndoRedoDemo contains an example of how to use this class.
Improvements
- Drastically improved the performance and the versatility of the OrganicLayouter layout algorithm. The algorithm can now deal with much larger graph structures, produces better results for the given settings and has two more settings which control the outcome of the layout. setRepulsion and setAttraction were introduced and can now be used to control the exponents of the formulas used to compute the layout.
Results are much better now, using the setSphereOfAction option for this algorithm. - SliderEdgeLabelModel now generates better label candidates.
- Automatic labeling for HierarchicLayouter now can place edges left or right of the corresponding edges. Added new preferred placement constants to LabelLayoutConstants that express the new placement variants.
- ChannelRouter: more compact channel assignment
- HierarchicLayouter: decreased execution time
- ChannelRouter: improved drawings based on this router, e.g. HierarchicLayouter drawings using orthogonal edge routing style.
- Graph: metho changeEdge now deals with
null
references correctly. - WrongGraphStructure: now extends
java.lang.IllegalArgumentException
which describes the nature of the exception in a more appropriate way. - YList: added missing methods addFirstCell(y.base.ListCell), insertCellBefore(y.base.ListCell, y.base.ListCell) and insertCellAfter(y.base.ListCell, y.base.ListCell).
Improved performance of retainAll(java.util.Collection) and removeAll(java.util.Collection). YList now supportsnull
elements. - Package y.geom:
- YPoint now implements
java.util.Comparable
and implements hashCode and equals(java.lang.Object) according to the specification. x and y are now declared aspublic final
fields for greater performance and convenience. - YCircle now implements
java.util.Comparable
and implements hashCode and equals(java.lang.Object) according to the specification. center and radius are now declared aspublic final
fields for greater performance and convenience. - YRectangle now implements
java.util.Comparable
and implements hashCode and equals(java.lang.Object) according to the specification. x and y are now declared aspublic final
fields for greater performance and convenience. - YDimension now implements
java.util.Comparable
and implements hashCode and equals(java.lang.Object) according to the specification. width and height are now declared aspublic final
fields for greater performance and convenience.
- YPoint now implements
- LayoutModule now supports the
morphingEnabled
attribute which can be triggered through the setMorphingEnabled(boolean) method even if buffering is enabled. - Package y.option and all of its OptionItem implementations are now ready for internationalzation respectively localization and serialization. See the DiagonalLayoutModule demo on how to use these new features. All major modules in the y.module package have been modified to make use of these new features. They have been localized for the German and the English language.
- Graph2DView: The view now supports the antialiasedPainting attribute. Using the setAntialiasedPainting(boolean) method, antialiased painting can be enabled which produces high quality drawings.
The inline labeleditor has been improved and now supports a number of different editing modes, which can be specified using the openLabelEditor method! - CreateEdgeMode now is far more flexible and can be customized easily using the new factory methods.
- DefaultGraph2DRenderer has been refactored and now contains a number of different callback methods which makes it far easier to customize.
- EdgeLabel now uses a sophisticated caching-mechanism, which speeds up repaints.
- Package y.io in conjunction with the classes in package y.view now uses the new BadVersionException when reading .ygf files with a mismatching version number back in.
- Graph2DPrinter now supports automatic scaling which allows for large poster prints.
- HierarchyTreeModel now supports sorting of the children using a specifiable Comparator, which can be specified using the new setChildComparator method.
- Graph2D can now be equipped with a special Graph2D.BackupRealizersHandler implementation to ease undo implementation. Implementations can be registered using the setBackupRealizersHandler method.
Features Added to yEd
- Session management added to yEd. Editor settings will now be saved upon termination and reapplied in the next session.
- yEd is now internationalized! Alle GUI elements and help pages are available in multiple languages. Currently the languages 'German' and 'English' are supported.
- It is now possible to specify the default appearance of yEd using the preferences dialog in the File menu. One can choose between the classic version and the version which supports nested graph hierarchies.
- All module dialogs now offer a help button that readily displays information about the available options.
- The Select Graph Elements tool has greatly been improved and can now be used to select and find many more types of nodes, edges and bends.
Demos Added
- Added lots of features to HierarchicLayouterDemo . This includes the new grouping feature and a demonstration of the use of weak and strong port constraints.
- Added many different organic layout styles to OrganicLayouterDemo including GRIP, Smart and Organic Edge Routing.
- Added support for internationalization and serialization to demo DiagonalLayoutModule . This shows how to serialize and internationalize options displayed in an option dialog.
- Added UndoRedoDemo which demonstrates the integrated undoability features of yFiles.
- Added
PortsDemo
. It shows how to write applications that use nodes that have a fixed set of connection points. - Added InactiveLayerDemo . This demonstrates how to put a part of a graph in an inactive background layer of the view.
- Added DragAndDropDemo . This demo shows how to drag different node types from a list and how to drop them on a Graph2DView using the standard drag and drop mechanism.
Documentation Added
Apart from the new features and classes, the following documentation has been added, too:
- Added advanced feature section to description of hierarchic layouter in userguide
- Added section to description of orthogonal layouter in userguide
- Added new description of smart organic layouter in userguide
Bugfixes
- Fixed a rendering bug in Graph2DView that occasionally caused clipped regions within the view to be painted with a slightly wrong offset.
- Class Trees sometimes returned bad results from methods getLeafNodes and getRoot.
- Class OptionHandler reintroduced functionality of setPreferredEditorWidth.
- Fixed bad label placement that occurred when edge paths were rather short.
- Class EditMode: callback method nodeClicked was not invoked correctly.
- Fixed a bug in ComponentLayouter that caused layouters to crash on empty graphs
- Fixed a bug in GivenLayersLayerer which made this class completely useless.
- Several minor bugs, which hardly ever occurred.
Incompatible changes
- DefaultNodeLayout does not extend YRectangle anymore since the latter is now truly immutable. Therefor it cannot be cast to a YRectangle any longer (which would not have made much sense in almost all cases anyway).
- IntersectionAlgorithm has been refactored with static methods. If you were using these methods directly, this is a compile-time compatible change.
- YLabel contains two badly named methods setBackground(boolean) and isBackgroundOn which have been declared
deprecated
. The new methods setBackgroundPainted(boolean) and isBackgroundPainted have been added as a future replacement. - OrthogonalLayouter: marked feature nodeModel as deprecated. Use feature layoutStyle instead.
yFiles 2.0.1 - Changes Since 2.0
Features Added
- The SVG and SVGZ export formats can now easily be activated in yEd, by putting the ySVG extension package jar files in the same directory where yed.jar resides. The graph format converter demo is also prepared to export diverse graph formats to SVG and SVGZ.
- Class MovePortMode added methods drawPortCandidate and getPortCandidates.
- class ComponentLayouter: added features gridSpacing and componentSpacing
- Improved paint method of Graph2DNodeRealizer. Switches between normal and sloppy paint mode more cleverly.
- Class EditMode: added methods setMoveLabelMode, getMoveLabelMode, setMovePortMode, getMovePortMode, setHotSpotMode and getHotSpotMode.
- Class HierarchyEvent: added new event types BEGIN_BLOCK and END_BLOCK.
Bugfixes
- Class HierarchicLayouter: layout style TREE fixed.
- Class HierarchicLayouter: problem related to crashes when run in unbuffered mode have been fixed.
- Fixed problems that involved IndexOutOfBoundsExceptions with NodeMaps and EdgeMaps that were created by the factory methods createNodeMap and createEdgeMap of a graph.
- Class ImageOutputHandler and all subclasses: Fixed problems with exporting graphs that have no current view.
- Demo demo.io.GraphFormatConverter: Suppress less detail mode when converting graphs to GIF or JPG format.
- Fixed performance problems related to selection changes when HierarchyTreeSelectionModel is being used. Bugfix effects performance of yEd.
- Fixed memory leak problems related to undisposed nodemaps. Affected layouters were HierarchicLayouter and OrthogonalLayouter.
- Fixed performance problems related to graph change events when HierarchyTreeModel is being used. Bugfix effects performance of yEd.
- Fixed problems with mnemonic and accelerator keys in yEd menus that did not appear when using JDK-1.3.x.
- Class ParallelEdgeLayouter: fixed problem that produced NaN bend coordinates for parallel edges.
- Class GraphTransformer: fixed broken port assignment for operations MIRROR_XAXIS and MIRROR_YAXIS.
- Class OrthogonalLayouter: fixed incorrect view ratio handling in Component Layouter.
- Class LayoutMorpher: feature coordinates where rounded incorrectly by layout morpher.
- Fixed compile problems that occurred when using yFiles library with JBuilder7 on Windows platforms.
Demo additions
- Added new tutorial demo code that shows how to write custom node realizers.
- UMLClassNodeRealizer
- NoteNodeRealizer
- RoundRectNodeRealizer
- CircleNodeRealizer
yFiles 2.0 - Changes Since yFiles 1.4.0.3
Major Features Added
- HierarchicLayouter now handles port constraints
- HierarchicLayouter obeys edge labels in the layout process
- Incremental layout capabilities have been added to OrthogonalLayouter. This layouter can now "orthogonalize" a given layout sketch.
- Package y.io.gml has been added. It provides parser and encoder classes used GMLIOHandler. Use of this package allows to customize and extend the GML Graph format
- Package y.view.hierarchy has been added. It provides classes for managing and viewing a nested hierarchy of graphs. Most prominent class of this package is HierarchyManager.
- Extended graph file formats YGF and GML. They are now able to read and write nested hierarchies of graphs.
- Powerful and efficient graph algorithms and network analysis tools have been added to package y.algo.
- Many tutorial demo programs have been added that show how to use essential yFiles features.
- Added many new features to the yEd Graph Editor application. It's really swinging now!
- Introduction of Graph2DEvent that signals property changes of Graph2D.
- YList now implements the java.util.Collection interface
- The layout of the OptionHandler editor component has been improved significantly.
Incompatible Changes
- The graph algorithm package y.algo has been completely refactored. All algorithms from previous yFiles versions are still available but the API to invoke them has most likely changed.
- The behaviour of the read methods of the IOHandler classes has changed. The given Graph2D object will not get cleared before the new content gets added to it.
- The read and write methods of the IOHandler classes now throw IOExceptions. It is necessary to catch them externally.
- A Graph2D now fires Graph2DSelectionEvents after the selection state of the subject has changed. In previous versions the state changed after the event got fired.
- GraphEvent has changed. New event type specifiers have been introduced, obsolete type specifiers have been removed.
- The signature of method add in YList has been changed to be conform with the java.util.Collection interface
- The new default layout style for HierarchicLayouter is Linear Segments. Previous versions used Pendulum as default style.
- The API of GraphInterface has been changed. The methods nodeObjects and edgeObjects now return java.util.Iterator instead of a y.base.YCursor.
Minor Features, Bugfixes and Minor Changes
Hundreds of them.
yFiles 1.4.0.3 - Changes since 1.4.0.2
Features Added
- Package y.view:
- Class Graph2DView
added support for Drawables that are drawn underneath the displayed graph.
added method addBackgroundDrawable
added method removeBackgroundDrawable
- Class Graph2DView
- Demo package demo.view:
- added demo DrawablesDemo .
yFiles 1.4.0.2 - Changes since 1.4.0.1
Bugfixes
- HierarchicLayouter sometimes crashes when a Layerer yields a layering where edges within the same layer were present. This happens when AsIsLayerer is being used.
API Changes
- Spell corrected method names of classes belonging to the labeling machinery. Methods names that contained the substring overlapp where renamed. Overlap is written with only one p. Sorry for the inconvenience.
yFiles 1.4.0.1 - Changes since 1.4
Bugfixes
- In some cases the DefaultEdgeRealizer settings were ignored, when creating an edge interactively.
- View mode CreateEdgeMode that did not behave properly when being used as a major mode (opposed to being used as a child mode called from edit mode)
Features Added
- Package y.view:
- Class Graph2DView
added method closeLabelEditor - Class CreateEdgeMode
added method sourceNodeDeclined
added method targetNodeDeclined
added method acceptSourceNode
added method acceptTargetNode
added method cancelEdgeCreation
- Class Graph2DView
- Package y.layout:
- Class CanonicMultiStageLayouter:
added method setSubGraphLayouter
added method setOrientationLayouter - Class OrientationLayouter:
added orientation specifier RIGHT_TO_LEFT
- Class CanonicMultiStageLayouter:
- Package y.layout.organic:
- Class OrganicLayouter:
added field PREFERRED_EDGE_LENGTH_DATA. This feature allows to specify a different preferred edge length for each edge in the layout graph.
- Class OrganicLayouter: