xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helder Magalhães <helder.magalh...@gmail.com>
Subject Re: Re: Append JTextArea in SVG Document
Date Tue, 14 Apr 2009 11:07:20 GMT
Hi Gregorio,

(Thomas)
>>    Do you really need a JTextArea or do you need editable text?

(Gregorio)
> Basically, I need ad editable text.
[...]
> Every other tested implementations are welcome, as long as they have a full
> implemented text area and I can read/set all its options.

I believe Thomas has already (indirectly) hinted towards this but...
Are you aware that SVG 1.2 already foresees such functionality? Just
set the "editable" property [1] and you are good to go. Note that
(unfortunately) a quick test showed that this isn't supported by Batik
yet -- currently only seems to work in Opera... Nevertheless, you may
consider contributing this interesting feature, as already suggested
in related threads [2] [3] (where some implementation ideas are also
present).

In the meantime, you may also want to consider using scripting:
 * If you only require simple text editing, you may simply use a
"prompt" (extension which Batik supports [4]) -- I've just marsh up an
example, attached (see the source for more information);
 * If you require more advanced (and stylish) text editing, you'll
definitely want to look at SVG Textbox [5] (I recall a couple of other
text box implementation for SVG using script so if you aren't happy
with these ones you may crawl the Web for more). ;-)

Hope this helps,
 Helder Magalhães

[1] http://www.w3.org/TR/SVGTiny12/text.html#text-edit
[2] http://www.nabble.com/Editable-Text-Fields-td7433284.html
[3] http://www.nabble.com/Text-entry-field--td20012025.html
[4] http://xmlgraphics.apache.org/batik/status.html#ecmascript
[5] http://www.carto.net/papers/svg/gui/textbox/

Mime
View raw message