yFiles for Java Release Notes
yFiles for Java version 2.11 is the newest major release available.
It contains many exciting new features compared to older versions and is almost
completely API compatible with the 2.10 series.
(See also the entire yFiles for Java change log.) The latest release is version 184.108.40.206.
- Oracle J2SDK 1.4 or higher is needed for software development with yFiles.
- Oracle J2RE 1.4 or higher is needed to execute programs using yFiles.
- A browser to view the HTML documentation.
|New radial layout algorithm||New compact node
in balloon layout algorithm
|New integrated node label
placement in balloon
Major Features Added
- 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
The following layout algorithms have at least rudimentary support for immediate termination: Layout Algorithms Routing Algorithms Other Algorithms
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'
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
- 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.
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.
- Added new package y.io.graphml.layout for reading and writing a LayoutGraph's geometry data from/to GraphML.
- 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.
- 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.
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
- 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
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
- 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.
- 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.
IncrementalHierarchicLayouter: Fixed possible
IndexOutOfBoundsExceptionif 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.
NullPointerExceptionthat 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
NullPointerExceptioncaused 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.
Changes in Technical Requirements
- All yFiles for Java distributions now require Java 1.4 for building and running yFiles for Java based applications.
- 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.
Method doLayout now throws an
IllegalArgumentExceptionif 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.
Method setPreferredLayoutSize now throws an
IllegalArgumentExceptionwhen 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)with
g2being top-level group nodes and
n1being a top-level normal node. Prior to 2.11, closing group
g2changed 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.ImageIconnow 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.
check(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.incrementalto package y.layout.grid.
- ItemFactory: Added method createRedirectedGroupEdge.
LayeredNodePlacer: Removed data provider key
DP_KEY_DISTANCE_TO_PARENT_MAPfrom 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 method
yGuard bytecode obfuscator
to version 2.5.2 which has support for renaming
META-INF/servicesentries 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.