skip to main content
Diagrammer > Developing with design tools > Using the Symbol Editor > Next steps after the Symbol Editor > Generating symbols as Java source code
 
Generating symbols as Java source code
Symbols created with the Symbol Editor can be used directly in JViews Diagrammer applications for dashboards and diagrams. Internally, the symbol definition is based on CSS directives that can be dynamically interpreted at run time.
In some cases, it is interesting to select a slightly different approach which is to generate Java™ source code from the symbols you have created with the Symbol Editor. This Java code uses simple graphics primitives managed by the JViews Framework APIs. Each symbol becomes a JavaBean™ that you can instantiate and manage from your JViews application. Every single parameter you defined in the Symbol Editor becomes a bean property, accessible through traditional set/get methods. The tool that allows you to produce this Java code is the Symbol Compiler.
The Rogue Wave JViews Symbol Compiler
What are the benefits of using compiled symbols:
*Performance is usually better with compiled symbols. The time to create the symbol is slightly improved and the initial display time of a diagram or a dashboard is reduced. The animation time can be reduced too, and sometimes quite significantly. As a consequence, you may experience faster animation or save CPU for other important tasks. Lastly, memory footprint can be reduced which makes your application more responsive. Since performance improvements can vary depending on the kind of symbols you design, it is recommended to perform some dedicated tests to decide whether this approach is suitable for your particular case.
*You can generate and compile your symbols at the end of your development. For example, you can tell SDM to use compiled symbols, if they exist, rather than CSS-based symbols. In the same way, you can dynamically load and animate dashboards using either interpreted or compiled symbols.
*When symbols are available as source code and usable as regular beans, you can specialize them by adding specific Java code. You can also create derived classes implementing domain-specific logic.
These cases are further discussed in Using the Symbol Compiler.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.