ySVG - yFiles SVG Extension
Release Notes
Next-generation yFiles for Java (Swing)
Java 8
or higher
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.
ySVG 2.6 is the latest version of the yFiles SVG extension package.
Technical Requirements
- Graph visualization library yFiles for Java 2.18 and Oracle JDK 1.7 or higher is needed for software development.
- A browser to view the HTML documentation.
ySVG 2.6 - Changes Since 2.5
Improvements
- SVGModel: Added new policy SVG_BOUNDS_POLICY_VIEWPORT that takes SVG attributes
width
,height
, andviewBox
of the root svg element into account. - SVGModel: Added new method deserializeSVGContent for reading SVG documents from input streams.
- SVGModel: Relaxed SVG version parsing to accept
version="1"
as a synonym forversion="1.0"
. - Upgraded from Batik 1.8 to Batik 1.14. See the SVG Batik page for a list of improvements.
Changes in Technical Requirements
- Building and running ySVG based applications now requires at least Java 1.7 (due to upgrading to Batik 1.14).
ySVG 2.5 - Changes Since 2.4.0.1
Improvements
- SVGModel: Added policies for handling broken links in displayed SVG documents, see BROKEN_LINK_POLICY_THROW_EXCEPTION, BROKEN_LINK_POLICY_IGNORE, and BROKEN_LINK_POLICY_SHOW_PLACEHOLDER.
- SVGModel: Added method equalsSVGContent that tests for textual equality of SVG documents represented by two SVGModel instances.
- SVGIconSerializer: Added protected methods deserializeNode and serializeItem to simplify customization and reuse.
- SVGIOHandler: Added GraphicsContext as a default rendering hint when exporting to SVG.
- Upgraded from Batik 1.7 to Batik 1.8. See the SVG Batik page for a list of improvements.
Bugfixes
- SVGModel: Fixed
SAXIOException: Content is not allowed in prolog.
that is triggered when reading UTF-16 encoded SVG documents with byte order marks. - SVGIOHandler: Corrected
text-rendering
values for KEY_FRACTIONALMETRICS in Batik. - Fixed
NoClassDefFoundError
that is triggered in BATIK when reading data URIs for embedded JPEG images on non-Oracle Java Runtime Environments.
Incompatible API Changes
- OutputModule: Removed
description
argument from constructor OutputModule.
Changes in Technical Requirements
- Building and running ySVG based applications now requires at least Java 1.6 (due to upgrading to Batik 1.8).
ySVG 2.4.0.1 - Changes Since 2.4
Bugfixes
- Fixed JDK 7u25 only
ImagingOpException
that is triggered byjava.awt.image.BufferedImageOp.filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
operations in Batik. - SVGModel: Fixed lenient handling of SVG 1.2 specific elements in SVG documents declared to be conforming to the SVG 1.0 or SVG 1.1 standards which sometimes resulted in
org.w3c.dom.DOMException
for valid SVG 1.0 and SVG 1.1 documents.
ySVG 2.4 - Changes Since 2.3
Features Added
- Added SVGBackgroundRenderer that can be used to display Scalable Vector Graphics in the background of a Graph2DView.
- SVGIconSerializer provides GraphML (de-)serialization support for SVGIcon instances.
- SVGNodeRealizer: Added support for rendering hints KEY_NODE_LABEL_PAINTING and KEY_NODE_PORT_PAINTING.
Improvements
- SVGNodeRealizer: Improved contains implementation to work with visible bounds of the displayed graphic instead of the rectangular node bounds. This improvement has to be enabled using setUsingVisualBounds and affects hit testing and edge clipping.
- OutputModule: Added option to create SVG documents with transparent background.
- SVGIOHandler: Added support for SVG nodes that display radial gradients.
- Added option to ignore selection markers when exporting to SVG in one of the demos.
Bugfixes
- SVGNodeRealizer: Method paintNode now correctly calls paintPorts to display existing node ports.
ySVG 2.3 - Changes Since 2.2.0.1
Features Added
- Added support for ignoring selection state when exporting to SVG using modules SVGOutput and SVGZOutput.
- SVGNodeRealizer: Added support for new yFiles for Java 2.8 rendering hint KEY_SELECTION_PAINTING.
- SVGDOMEnhancer: Added new label detection strategy LABEL_DETECTION_BY_RECONFIGURING that works by replacing label configurations.
Improvements
- SVGModel: SVG 1.2 specific elements in SVG documents declared to be conforming to the SVG 1.0 or SVG 1.1 standards are ignored and no longer result in a
org.apache.batik.dom.util.SAXIOException
.
Bugfixes
- SVGModel: Reading a SVG definition from an URL now tries to determine the appropriate character encoding from the document identified by the URL instead of using the platform default encoding.
ySVG 2.2.0.1 - Changes Since 2.2
Bugfixes
- Class SVGDOMEnhancer:
- Fixed "rendering" of nodes and edges when using a label detection strategy other than LABEL_DETECTION_NONE.
- Fixed problems with custom label models (i.e. NodeLabel.CUSTOM_LABEL_MODEL) and label detection strategy LABEL_DETECTION_BY_WRAPPING.
- Removed obsolete dependencies to GraphML extension package in the demo build script build.xml.
ySVG 2.2 - Changes Since 2.1.0.1
Improvements
- ySVG GraphML support no longer depends on the yFiles for Java GraphML extension package but uses the GraphML support that comes with yFiles for Java 2.7.
- Class SVGModel:
- Improved rendering for printing in landscape orientation.
- Improved robustness regarding invalid SVG documents.
- Class SVGDOMEnhancer:
- Added new label detection strategy LABEL_DETECTION_NONE to allow to turn off label detection.
- Improved robustness of cleanup code in label detection strategies with regard to exceptions.
- Upgraded from Batik 1.6 to Batik 1.7. See the SVG Batik page for a list of improvements.
ySVG 2.1.0.1 - Changes Since 2.1
Bugfixes
- Class SVGModel
- added synchronization to image cache to prevent infinite loops in multithreaded environments
- estimating image sizes for image caches no longer causes integer overflows
ySVG 2.1 - Changes Since 2.0
Features Added
- Class SVGDOMEnhancer
- added new default label detection strategy LABEL_DETECTION_BY_WRAPPING
- Class SVGIOHandler
- added public methods getSVGRenderingHintValue and setSVGRenderingHintValue to allow for user preferences when exporting SVG enhanced content
- added property
useCSS
to provide a means to switch between SVG element attributes compacted into a single CSS style attribute and default XML attribute listings
- Class SVGModel
- substantial rendering performance improvement; see setImageCacheEnabled, setImageCacheSize, setMaximumImageSize, setMinimumRelativeImageSize for related documentation
- enhanced the internal SVG DOM generating mechanism to accept slightly invalid SVG definitions (e.g. unbound namespaces)
- added public methods deserializeSVGContent and serializeSVGContent to allow for custom programmatic serialization/deserialization of SVG contents
- Class SVGNodeRealizer
- YGF serialization now includes SVG content to allow for deserialization without original/external SVG resource file.
- Class SVGNodeRealizerSerializer provides GraphML serialization support for SVGNodeRealizers
Demos
- added several icons derived from the Nuvola 1.0 SVG icon set to
src/demo/yext/svg/resources/svg
- source code demo RenderingPerformanceDemo has been added
- source code demo GraphMLDemo has been added
- source code demo SVGNodeRealizerDemo has been added
- source code demo SVGNodeDemo has been renamed to SimpleSVGNodeRealizerDemo
Incompatible API Changes
- Class SVGDOMEnhancer: changed visibility of public field
labelDetectionStrategy
toprivate