xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Huang" <shu...@xperient.net>
Subject RE: How can I use line spacing with FlowText?
Date Tue, 07 Jan 2003 22:00:35 GMT
I am trying to use switch element for tabpane functionality. That is, to
dynamically switch the displayed elements using a variable other than
systemLanguage, requireExtensions, and requiredFeatures. I made a new
attribute contant SWITCH_ATTRIBUTE and modified the
SVGSwitchElementBridge. The static display is fine. But it does not in
the dynamic way. When I modified the DOM tree in Javascript (modify
SWITCH_ATTRIBUTE), the Switch element won't refresh and display another

I modified SVGSwitchElementBridge to extend SVGShapeElementBridge and
added the following methods:

    protected void buildShape(BridgeContext ctx,
                              Element e,
                              ShapeNode shapeNode) {
        ShapeNode showNode = (ShapeNode) createGraphicsNode(ctx, e);

     * Invoked when an MutationEvent of type 'DOMAttrModified' is fired.
    public void handleDOMAttrModifiedEvent(MutationEvent evt) {
        String attrName = evt.getAttrName();
        System.out.println("SVGSwitchElementBridge: event"+evt+"
        buildShape(ctx,e, (ShapeNode) node);

But the content still won't be refreshed. It didn't print out the
message so the handleDomAttrModifiedEvent is not called. I found
handleDOMNodeInsertedEvent and other events are also not called. How
could I let the JavaScript event trigger DOM tree update, then refresh
display? Thanks a lot.

With best regards,

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message