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 Abraham Rodriguez Mota <ab...@gmail.com> on 2008/07/04 19:32:16 UTC

Cursor attribute in batik

Hi Guys,

I am trying to change the cursor attribute for a rectangle but appears that
Batik doesn't display the cursor (or at least I can not see any change) in a
file simple like this:

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<g id="case1">
<!--<circle cx="50" cy="50" r="50" fill="green" onclick="showFrame()"/>-->
<rect x="50" y="20" width="50" height="80" fill="red" stroke="black"/>

<rect x="70" y="30" width="50" height="80" fill="moccasin"
stroke="midnightblue" stroke-width="5" id="rectangle"
onmousemove="showFrame();" cursor="wait"/>
</g>
<script type="text/ecmascript">
    function showFrame() {
     evt.target.setAttribute('fill', 'blue')
    }
  </script>
</svg>

I tried in Opera and it works.
Any advice?

Thanks a lot

Abraham

Re: Cursor attribute in batik

Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Right! Sorry for the mistake!


thanks Thomas. Your answer was really helpful.


Abraham

On Thu, Jul 10, 2008 at 9:45 PM, Helder Magalhães <
helder.magalhaes@gmail.com> wrote:

> > Hi Helder,
> > Not sure, but It looks that you are right [...]
> > [...] Thanks for the hint.
>
> Sorry but full credit goes to Thomas DeWeese! :-P My reply didn't even
> have to do with the (apparent) answer. ;-)
>
> Best regards,
>
>  Helder Magalhães
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>

Re: Cursor attribute in batik

Posted by Helder Magalhães <he...@gmail.com>.
> Hi Helder,
> Not sure, but It looks that you are right [...]
> [...] Thanks for the hint.

Sorry but full credit goes to Thomas DeWeese! :-P My reply didn't even
have to do with the (apparent) answer. ;-)

Best regards,

 Helder Magalhães

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


Re: Cursor attribute in batik

Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Hi Helder,

Not sure, but It looks that you are right about the fact that wrapping the
JSVGCanvas in a Composite creates problems. But it also looks that some
cursor's id (e.g. "wait") are not implemented by eclipse or could have
different names.

I got a better result wrapping the Canvas in a panel that is contained in a
SWT_AWT frame, and  testing with the "move" cursor id. Thanks for the hint.

All the best


On Tue, Jul 8, 2008 at 1:20 AM, <th...@kodak.com> wrote:

>
> Hi Abraham,
>
> "Abraham Rodriguez Mota" <ab...@gmail.com> wrote on 07/07/2008
> 04:31:54 AM:
>
> > I am using a JSVGCanva in Eclipse 3.3 (Europa) running on Windows
> > 2000 Professional.
>
>     You say 'in Eclipse' does this mean that you are using some
> sort of SWT bridge for Swing?  If so I would think that might
> be the source of trouble.
>
>     If this is not the case I would suspect that it would be
> related to the 'container' for the canvas.  Can you outline
> how the canvas is used?
>
> > On Sun, Jul 6, 2008 at 11:32 AM, Helder Magalhães <
> helder.magalhaes@gmail.com
> > > wrote:
> > > I am trying to change the cursor attribute for a rectangle but appears
> that
> > > Batik doesn't display the cursor (or at least I can not see any change)
> in a
> > > file simple like this:
> > [...]
> > > Any advice?
> >
> > Weird, no problem here - wait cursor is shown when mouse is over the
> > rectangle, as expected.
>
>    Right, this is well established functionality for Batik, it
> most likely some sort of environmental conflict (Someone else is setting
> the cursor or something).
>

Re: Cursor attribute in batik

Posted by th...@kodak.com.
Hi Abraham,

"Abraham Rodriguez Mota" <ab...@gmail.com> wrote on 07/07/2008 
04:31:54 AM:

> I am using a JSVGCanva in Eclipse 3.3 (Europa) running on Windows 
> 2000 Professional.

    You say 'in Eclipse' does this mean that you are using some
sort of SWT bridge for Swing?  If so I would think that might
be the source of trouble.

    If this is not the case I would suspect that it would be
related to the 'container' for the canvas.  Can you outline
how the canvas is used?

> On Sun, Jul 6, 2008 at 11:32 AM, Helder Magalhães 
<helder.magalhaes@gmail.com
> > wrote:
> > I am trying to change the cursor attribute for a rectangle but appears 
that
> > Batik doesn't display the cursor (or at least I can not see any 
change) in a
> > file simple like this:
> [...]
> > Any advice?
> 
> Weird, no problem here - wait cursor is shown when mouse is over the
> rectangle, as expected.

   Right, this is well established functionality for Batik, it
most likely some sort of environmental conflict (Someone else is setting
the cursor or something).

Re: Cursor attribute in batik

Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Hi Helder,

I am using a JSVGCanva in Eclipse 3.3 (Europa) running on Windows 2000
Professional.

Thanks

On Sun, Jul 6, 2008 at 11:32 AM, Helder Magalhães <
helder.magalhaes@gmail.com> wrote:

> > I am trying to change the cursor attribute for a rectangle but appears
> that
> > Batik doesn't display the cursor (or at least I can not see any change)
> in a
> > file simple like this:
> [...]
> > Any advice?
>
> Weird, no problem here - wait cursor is shown when mouse is over the
> rectangle, as expected. Are you using a custom Batik-based canvas or
> using Squiggle directly? May you possibly bumped into an OS-specific
> issue? I've tried in Windows, using Batik (Squiggle) 1.7 (latest
> release) [1] and 1.8pre (nightly build) [2] and it worked as expected.
> Opened SVG test suite's cursor test [3] just to confirm.
>
> Please provide further details such as OS and JRE version. Mine:
> Operating system: Windows XP SP3
> JRE: 1.6.0_05
>
> Hope this helps,
>
>  Helder Magalhães
>
> [1]
> http://xmlgraphics.apache.org/batik/download.cgi#Download+a+distribution
> [2] http://arc.mcc.id.au/batik-nightly/
> [3]
> http://www.w3.org/Graphics/SVG/Test/20030813/svggen/interact-cursor-01-f.svg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>

Re: Cursor attribute in batik

Posted by Helder Magalhães <he...@gmail.com>.
> I am trying to change the cursor attribute for a rectangle but appears that
> Batik doesn't display the cursor (or at least I can not see any change) in a
> file simple like this:
[...]
> Any advice?

Weird, no problem here - wait cursor is shown when mouse is over the
rectangle, as expected. Are you using a custom Batik-based canvas or
using Squiggle directly? May you possibly bumped into an OS-specific
issue? I've tried in Windows, using Batik (Squiggle) 1.7 (latest
release) [1] and 1.8pre (nightly build) [2] and it worked as expected.
Opened SVG test suite's cursor test [3] just to confirm.

Please provide further details such as OS and JRE version. Mine:
Operating system: Windows XP SP3
JRE: 1.6.0_05

Hope this helps,

 Helder Magalhães

[1] http://xmlgraphics.apache.org/batik/download.cgi#Download+a+distribution
[2] http://arc.mcc.id.au/batik-nightly/
[3] http://www.w3.org/Graphics/SVG/Test/20030813/svggen/interact-cursor-01-f.svg

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