*/
public void propertiesChanged(CSSEngineEvent evt) {
Element elem = evt.getElement();
SVGContext ctx = getSVGContext(elem);
if (ctx == null) {
GraphicsNode pgn = getGraphicsNode
((Element)elem.getParentNode());
if ((pgn == null) || !(pgn instanceof CompositeGraphicsNode)) {
// Something changed in this element but we really don't
// care since it's parent isn't displayed either.
return;
}
CompositeGraphicsNode parent = (CompositeGraphicsNode)pgn;
// Check if 'display' changed on this element.
int [] properties = evt.getProperties();
for (int i=0; i < properties.length; ++i) {
if (properties[i] == SVGCSSEngine.DISPLAY_INDEX) {
if (!CSSUtilities.convertDisplay(elem)) {
// (Still) Not displayed
break;
}
// build the graphics node
GVTBuilder builder = getGVTBuilder();
GraphicsNode childNode = builder.build
(BridgeContext.this, elem);
if (childNode == null) {
// the added element is not a graphic element?
break;
}
int idx = -1;
for(Node ps = elem.getPreviousSibling(); ps != null;
ps = ps.getPreviousSibling()) {
if (ps.getNodeType() != Node.ELEMENT_NODE)
continue;
Element pse = (Element)ps;
GraphicsNode gn = getGraphicsNode(pse);
if (gn == null)
continue;
idx = parent.indexOf(gn);
if (idx == -1)
continue;