yFiles for Java Release Notes
yFiles for Java version 2.6 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.5 series.
The latest release is version 2.6.1.
Technical Requirements
- Sun Microsystems J2SDK 1.4 or higher is needed for software development with yFiles.
- Sun Microsystems J2RE 1.4 or higher is needed to execute programs using yFiles.
- In order to browse the documentation use Microsoft Internet Explorer 6.0 or higher or Mozilla Firefox 2.0 or higher.
- You need an operating system that supports Java 2.
yFiles 2.6 - Changes Since 2.5.0.4
Major Features Added
|
|
|
|
|
| Swimlane layout for grouped graphs |
New stylish node painters |
Family tree layout | Comprehensive yEd Lite source code demo |
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
FREElabel 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
Graphics2Dobject 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.
|
|
|
|
|
| Swimlane layout for grouped graphs |
New stylish node painters |
Family tree layout | Comprehensive yEd Lite source code demo |
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 smoothen 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 implemention 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 uses FIXED_MINIMUM_GROUP_BOUNDS as group bounds policy instead of FIXED_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 set FIXED_AUTOBOUNDS_INSETS using method setGroupBoundsPolicy.
- 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.Objectinstead. 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.









