Skip navigation links

Package ilog.views.symbology

Provides support for symbols and palettes of symbols.

See: Description

Package ilog.views.symbology Description

Provides support for symbols and palettes of symbols. Symbols can be dropped from palettes into a diagrammer, creating composite graphic objects at runtime (see IlvCompositeGraphic).

In the palette, a symbol is essentially a CSS specification of a composite graphic. The palette contains also all resources (e.g., images, SVG files) that are referenced by this symbol CSS specification. The symbol specification hides the internals of the symbol from the outside world by a definition of a set of formal parameters of the symbol.

In the diagrammer, a symbol instance is the composite graphic that was created from the symbol CSS specification. Additionally, the composite graphic has a symbol descriptor (class IlvSymbolDescriptor) that describes the formal parameters of the symbol at runtime. The symbol is created by a CSS specification of the following form:

  node {
    class: "@|symbolResource(symbolPath, symbolName)"
    param1 : value1;
    param2 : value2;
    ...
 }
Here, param1, param2 ... are the formal parameters of the symbol.

To illustrate the concept of a symbol, consider a traffic light symbol. Assume the traffic light object contains of (at least) 3 pieces, one piece representing the red light, another one representing the orange light and another one representing the green light. The traffic light has a formal parameter "state" which can have the values "wait", "attention" and "go". In state "wait" the symbol must show a bright red color on the red piece, and dark colors on the orange and green piece, while in state "go", the symbol shows a bright green color on the green piece while the other pieces have darker color. The CSS of the symbol specifies the 3 pieces in detail and implements this logic, but the logic is hidden from the outside world. The traffic light symbol has only one formal parameter, the state parameter, which can have the values "wait", "attention" and "go". Therefore, using the symbol in an application CSS is as simple as this:

  node {
    class: "@|symbolResource(mypackage/symbols/trafficLight.css, trafficLight)";
    state : "go";
 }
The symbol itself makes sure that the right pieces have the right color in this case.

For experts: The Diagrammer Designer creates a lightly longer specification for symbols:

  node {
    class: "@|symbolResource(mypackage/symbols/trafficLight.css, trafficLight,
                             mypackage/palette.xml, roadsigns.jar)";
    state : "go";
 }
This specification contains additional optional information about the location of the palette. The longer specification is generated by using IlvPaletteSymbol.createClassDeclarationValue().

 

Main classes

Symbols are organized as palettes in jar files. The definition of the symbol is inside the palette. From the definition of the symbol, you can create multiple instances of the symbol at runtime by specifying via CSS which symbol should be used to render an SDM model node. These instances are composite graphics. Here is an overview over the main classes:

More details about all classes related to palettes can be found in ilog.views.symbology.palettes.
Skip navigation links

© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.