Developing with the SDK > Using and Adding Renderers > Predefined Renderers > The Blinking Renderer

The Blinking renderer allows you to obtain color or visibility blinking on graphic objects. It must be enabled to get the blinking effect in a diagram view.

The blinking can be defined in CSS in two different ways:

  1. Toggling between two colors
  2. A CSS function defines two blinking colors that can be used for a property of type Color. The following example shows a general node, with its main shape changing colors between red and black.

node.particular {
    class : "ilog.views.sdm.graphic.IlvGeneralNode" ;
    label : "@name" ;
    fillColor1 : "@|blinkingColor(red,black)" ; // toggles from red to 
black
}

Code Sample 4.10 Color Blinking
  1. Toggling the visibility
  2. The renderer property ToggleVisibility switches the visibility of the whole object. The following example toggles the visibility of some nodes:

node.particular {
    class : "ilog.views.sdm.graphic.IlvGeneralNode" ;
    label : "@name" ;
    ToggleVisibility :  "true";
}

Code Sample 4.11 Visibility Blinking

Table 4.3 lists the global properties of the Blinking renderer

Table 4.3 Global Properties of the Blinking Renderer
Property 
Type 
Default 
Description 
onPeriod 
int 
1000 
The duration, in milliseconds, of the first color specified in the blinkingColor function, or of the visible period when ToggleVisibility is set to true.  
offPeriod 
int 
1000 
The duration, in milliseconds, of the second color specified in the blinkingColor function, or of the invisible period when ToggleVisibility is set to true.  

Table 4.4 lists the per-object properties of the Blinking renderer

Table 4.4 Per-Object Properties of the Blinking Renderer
Property 
Type 
Default 
Description 
ToggleVisibility 
boolean 
false 
If the value of this property is true, the graphic representation will toggle the visibility.  

The blinkingColor CSS function takes two arguments of type Color. These arguments can be specified as a color name, or as a raw RGB/RGBA string (like #30FA6B, or #30FA6B80, where the last byte, 80, represents the alpha level (= transparency)). The function returns an ilog.views.sdm.renderer.IlvBlinkingColor, which subclasses java.awt.Color.

See the class ilog.views.sdm.renderer.IlvBlinkingRenderer for more details.