yFiles for Java Release Notes
yFiles for Java version 2.7 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.6 series.
The latest release is version 2.7.0.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 1.5 or higher.
- You need an operating system that supports Java 2.
yFiles 2.7 - Changes Since 2.6.1
Major Features Added
|
|
|
|
|
| Extensively enhanced swimlane support |
Local views | GraphML integrated | New snap lines and improved orthogonal edge path support |
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 a 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...]
|
|
|
|
|
| Extensively enhanced swimlane support |
Local views | GraphML integrated | New snap lines and improved orthogonal edge path support |
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.modulepackage has been moved to demo.layout.module, demos fromdemo.layouthave been moved to a new demo.layout.withoutview subpackage, anddemo.view.layoutwith 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'sViewModeparameter isnull). -
isAntialiasedPainting is set to
trueby 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
Graph2DHierarchyClipboardandGraph2DHierarchyUndoManager. 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.Insetsparameters 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 straightline.
- 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.svgwas 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.









