Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

Usage


    1  Setting a background color
    2  Adding additional processing to Nodes
    3  Drivers
    4  Supported Nodes and CSS properties

The following code serialize the content of a Node (including its children) in a Graphics2D context:

      JFXConverter converter = new JFXConverter();
      converter.convert(node, graphics2D);

The Graphics2D does not need to be the Swing Graphics2D implementation. It can be any class which implements its interface (though Graphics2D is an abstract class).

Setting a background color

It is possible to set a background color to the converted result by calling one of the following methods on the JFXConverter instance:

Adding additional processing to Nodes

It is possible to add custom processing to Nodes and handle Node effects. To do that, you must implement the ConverterListener interface, and set the listener to the converter.

The default DefaultConverterListener class is a particular ConverterListener which: For example:

      JFXConverter converter = new JFXConverter();
      converter.setListener(new DefaultConverterListener());
      converter.convert(node, graphics2D);

Drivers

Several specific drivers are provided with the project. See drivers for more information.

Supported Nodes and CSS properties



Categories: general

Copyright 2016-2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence