Blinking
renderer offers
a convenient API to obtain color or visibility blinking on graphic
objects. It allows you to specify a uniform timing for all graphic
objects with visibility blinking:SDM { Blinking : "true"; } Blinking { onPeriod : 1000; // Every second offPeriod : 1000; // Every second }
@|blinkinColor(color1,color2) @|blinkinColor(color1,color2,color1Timing,color2Timing) Bcolor1Timing/color2Timimg[color1/color2] Btiming[color1/color2/color3/...]
Blinking
renderer
is installed. The first line creates a blinking color with the timings
for the color taken from the Blinking
renderer.
The second and third lines are essentially equivalent. The fourth
line creates a blinking color with multiple subcolors. Note that the Blinking
renderer
only enables the appropriate syntax, but it is not necessary for the
blinking effect. The third and the fourth lines work even when no Blinking
renderer
is installed. node { class: "ilog.views.sdm.graphic.IlvGeneralNode"; label: "@name"; // toggles from red to black (2 states) fillColor1: "B1000/1000[red/black]"; // toggles from red to yellow (2 states) fillColor2: "@|blinkingColor(red,yellow)"; // toggles from black to transparent red to yellow (3 states) labelColor: "B500[black/#aaff0000/yellow]"; }
Blinking
renderer
is installed.node { class: "ilog.views.graphic.IlvGeneralPath"; fillPaint: "@=fillPaint"; fillOn: "true"; } Subobject#fillPaint { class: "ilog.views.util.java2d.IlvBlinkingPaint(onPaint,offPaint,onPeriod,offPeriod)"; onPaint: "@#onPaint"; offPaint: "@#offPaint"; onPeriod: "1000"; offPeriod: "1000"; } Subobject#onPaint { class: "java.awt.GradientPaint(point1,color1,point2,color2)"; point1: "0.0,0.0"; color1: "white"; point2: "72.0,72.0"; color2: "255,0,51"; } Subobject#offPaint { class: "java.awt.GradientPaint(point1,color1,point2,color2)"; point1: "0.0,0.0"; color1: "255,0,51"; point2: "72.0,72.0"; color2: "white"; }
ToggleVisibility
switches the visibility of the whole object periodically. The blinking
timings are taken from the Blinking
renderer,
therefore this specification works only when the Blinking
renderer
is installed and enabled. node { class: "ilog.views.sdm.graphic.IlvGeneralNode"; ToggleVisibility: "true"; }
Blinking
renderer
to be installed. It is illustrated in the following example:node { class: "ilog.views.sdm.graphic.IlvGeneralNode"; blinkingOnPeriod: 1000; blinkingOffPeriod: 1000; }
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 . |
Blinking
renderer. Property |
Type |
Default |
Description |
---|---|---|---|
ToggleVisibility |
boolean |
false |
If the value of this property is true ,
the graphic representation will toggle the visibility. |