You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "De Winne, Joris" <jo...@barco.com> on 2005/03/01 11:09:28 UTC

Q: how to handle new tags in batik

Hello,

I'm having the following (extended) tag in an SVG file:
....
<me:video source="10.10.0.1" posx="0" posy="0" posWidth="100"
posHeight="100"/>
...

To handle this I thought I had to write a new bridge extension, but it looks
like those only support Java Graphical things. What I need to do is opening
a socket and sending commands. So this has nothing to do with Java2D. Does
somebody know what I have to do, in order to handle this extra tag?

What I have in mind is something like the following class:

VideoExtension extends ... implements ... {

	... some code that calls showVideo for each video tag it finds
	
	public void showVideo(XMLAttributes, ....) {
		//here comes my own specific code
	}

	... some other handling code

}

Any help is welcome!

Joris
- - - - - - - DISCLAIMER- - - - - - - -
Unless indicated otherwise, the information contained in this message is
privileged and confidential, and is intended only for the use of the
addressee(s) named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this message and/or
attachments is strictly prohibited. The company accepts no liability for any
damage caused by any virus transmitted by this email. Furthermore, the
company does not warrant a proper and complete transmission of this
information, nor does it accept liability for any delays. If you have
received this message in error, please contact the sender and delete the
message. Thank you.

Re: Q: how to handle new tags in batik

Posted by Thomas DeWeese <Th...@Kodak.com>.
De Winne, Joris wrote:

> I'm having the following (extended) tag in an SVG file:
> <me:video [...]
> 
> To handle this I thought I had to write a new bridge extension, but it 
> looks like those only support Java Graphical things. 

    I'm not sure why you think that video wouldn't qualify as a
'Java Graphical' thing.

> What I need to do is opening a socket and sending commands. So this 
> has nothing to do with Java2D. Does somebody know what I have to do, 
> in order to handle this extra tag?

    There is a subclass of Bridge called 'GenericBridge' that does
not create a GraphicsNode but is still called during the building
of the document.  It has one method 'handleElement'.  This will
get you called for each video tag.  I still think that you probably
_do_ want a GraphicsNode to display the video even if most of the
work of the GraphicsNode is deferred to other classes.

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