skip to main content
Maps > Programmer's documentation > Developing with the JViews Diagrammer SDK > Using CSS syntax in the style sheet > Overview
 
Overview
The style sheet syntax conforms to the CSS2 (Cascading Style Sheet level 2) specification with a few divergences.
The general format of a style rule in a style sheet is therefore:
 
selector {
  declaration1;
  declaration2;
...
}
For visualization purposes, the selector applies to objects in the data model, and is used for pattern-matching; the declarations apply to the corresponding graphic objects, and are used for rendering.
A declaration has the form:
 
propertyName : value ;
An example of a style rule is:
 
node.person[sex="female"]{
        fillColor2 : "red";
        personLegend : "Female";
}
This rule makes all nodes representing female persons red, and sets the legend for such nodes to the word Female.
This section introduces and describes CSS briefly and then explains in more detail the version of CSS used in Rogue Wave® JViews Diagrammer and typical uses of CSS for customizing nodes and links.

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