Eric Delacroix wrote:
Hi,

I try to go a little bit further in using Batik libraries. My aim now is to create an interface that allow to handle some graphical components and create some links between them. The elements are rectangles, with a title label at the top and a line that cuts the rectangle in 2 parts. I would like to create an object that have this properties, if possible even an Element, in order to add it to the document I create for the visualisation of the graphic.
So the question is, is it possible to, lets say, create a class, thats extends SVGRectangle, and that would have an attribute for the title label, and one for the line that separate the Rectangle in two parts?
Otherwise, somebody could give an exemple for creating a complex shape that could be added to a document simply by the addchild() function, or something like this?
Thanks in advance

The Batik architecture is extensible so you can certainly construct your custom element. It is a little more complex than what you outline because we keep rendering behaviour out of the DOM tree. There are examples of how to extend Batik in batik.extension.svg. There is also some documentation on how this is done on the batik web site.

        In particular you need to implement a DOM element
and a Brige class to construct the rendering tree.  For
your case you probably want to constuct a 'fake' DOM tree
and use the bridge to construct the rendering tree (the
multi-image element does essentially this).



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to