public class IlvBlinkingRenderer extends IlvFilterSDMRenderer
IlvBlinkingRenderer is a
filtering renderer that makes the grapher objects
blinking. It works together the classes
IlvBlinkingColor,
IlvBlinkingPaint,
IlvBlinkingMultiColor, and
IlvBlinkingMultiPaint.
This example shows how to toggle the colors of the grapher objects every seconds.
SDM {
Blinking : "true";
}
Blinking {
onPeriod : 1000; // Every second
offPeriod : 1000; // Every second
}
node {
class : "ilog.views.sdm.graphic.IlvGeneralNode" ;
label : "@name" ;
// toggles from red to black (2 states):
fillColor1 : "B1000/1000[red/black]" ;
// toggles from black to transparent red to yellow (3 states):
labelColor : "B500[black/#aaff0000/yellow]" ;
}
An alternative way to specify blinking 2-state colors is by using the
blinkingColor function:
node {
class : "ilog.views.sdm.graphic.IlvGeneralNode" ;
label : "@name" ;
// toggles from red to black:
fillColor1 : "@|blinkingColor(red,black)" ;
// toggles from black to fully transparent (that is, invisible):
labelColor : "@|blinkingColor(black,#00000000)" ;
}
This example extract shows how to specify a more complex blinking paint that
toggles between two paints every seconds.
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";
}
Besides blinking colors and paints, the rendering property
ToggleVisibility
switches the visibility of the objects. For instance:
SDM {
Blinking: "true";
}
Blinking {
onPeriod: 1000; // Every second
offPeriod: 1000; // Every second
}
node {
ToggleVisibility : "true";
class : "ilog.views.sdm.graphic.IlvGeneralNode";
label : @Name;
}
CSS example:ilvBlinkingRenderer {
class : "ilog.views.sdm.renderer.IlvBlinkingRenderer";
alias : "<value>";
enabled : "false";
offPeriod : "2";
onPeriod : "2";
parameter : "<value>";
}
| Modifier and Type | Property and Description |
|---|---|
java.lang.String |
alias
Sets the alias of this renderer. |
java.lang.String |
class
Default constructor. |
boolean |
enabled
Sets whether blinking is enabled. |
int |
offPeriod
Sets the off period. |
int |
onPeriod
Sets the on period CSS example: onPeriod : "2"; |
java.lang.String |
parameter
This method gives access to a privileged parameter of the renderer, and allows this parameter to be specified quickly in the main option rule of the style sheet. |
public java.lang.String class
class : "ilog.views.sdm.renderer.IlvBlinkingRenderer";public java.lang.String alias
SubGraph or GraphLayout.
alias : "<value>";public boolean enabled
enabled : "false";public int offPeriod
offPeriod : "2";public int onPeriod
onPeriod : "2";public java.lang.String parameter
For example, the main parameter of the
ilog.views.sdm.renderer.maps.IlvMapRenderer is the name
of the map file. You can specify that you want to display a
map of the USA by the single declaration:
SDM {
Map : "usa.ivl";
}
The default implementation does nothing. Subclasses should
override this method to give access to their main parameter.
CSS example:
parameter : "<value>";
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.