skip to main content
Defense > Developing with design tools > Using the Symbol Compiler > Using compiled symbols in applications > Using compiled symbols in a runtime dashboard
 
Using compiled symbols in a runtime dashboard
A dashboard diagram edited with the Dashboard Editor can be loaded by an IlvDashboardDiagram into your application. However, if you do not need any SDM feature, you can have your runtime dashboard instantiated as an IlvGrapher containing compiled symbols. Rogue Wave® JViews Diagrammer provides you with a Compiled Symbol Dashboard Reader that allows you to read a dashboard binary file and create instances of compiled symbol classes in a given grapher, without using SDM and symbol CSS. This is faster than creating symbols and customizing them with their CSS in an IlvDashboardDiagram. Furthermore, when you use compiled symbols in a lightweight grapher, the animation can be more than 3 times faster than with an IlvDashboardDiagram containing symbols customized by CSS, especially for dashboards that make use of complex symbols.
Reading a dashboard binary file in a grapher
Typical steps to build a dashboard diagram using compiled symbols in a grapher:
1. Create your symbols using the Symbol Editor.
2. Create your dashboard diagram using the Dashboard Editor.
3. Compile your palette symbols using the Symbol Compiler.
4. Integrate the compiled symbol classes in your application class path.
5. Use the Compiled Symbol Dashboard Reader to read your dashboard binary file in an IlvGrapher object.
The following function loads a dashboard binary file in a grapher using the compiled symbols:
 static void readDashboard(URL dashboardURL, IlvGrapher targetGrapher)
  {
    IlvCompiledSymbolDashboardReader reader =
      new IlvCompiledSymbolDashboardReader(targetGrapher);
    try {
      reader.read(dashboardURL);
    } catch (IlvDashboardReaderException e) {
      // Do something
    } catch (IOException e) {
      // Do something
    }
  }
Parameter accessors and mappings
In addition to the direct parameter getter and setter functions, the generated symbol class allows you to access your parameters through their IDs and mappings.
For a String parameter named label, you can either call:
 
mySymbol.setLabelParameter(“My label”);
or
 
mySymbol.setParameterValue(“label”, “My label”);
If you have defined mapping names for your symbol parameters in the Dashboard Editor, you will have to call the setParameterValue function with the mapping name instead of the parameter ID.
For example, if the label parameter of your symbol is mapped to name in the Dashboard Editor, you will write:
 
mySymbol.setParameterValue(“name”, “My label”);

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