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 Sarala Dissanayake <sa...@gmail.com> on 2006/08/23 08:46:18 UTC

Problem with handling JSVGScrollPane

Hi,

How do I get JSVGScrollPane to be visible when the visible part of the
JSVGCanvas is too small to view all the content in a SVG file. Is it
possible to have the JSVGScrollPane visible at all times. This is what I
have written so far.

JSVGCanvas canvas = new JSVGCanvas();
canvas = setSVGDocument(svgfile);
JSVGScrollPane scrollPane = new JSVGScrollPane(canvas);
getContentPane().add(scrollPane,BorderLayout.CENTER);

Cheers,
Sarala

Re: Problem with handling JSVGScrollPane

Posted by Sarala Dissanayake <sa...@auckland.ac.nz>.
Hi Thomas,

Thanks, it works. I didn't have the width/height set.

Cheers,
Sarala

Quoting thomas.deweese@kodak.com:

> Hi Sarala,
>
> "Sarala Dissanayake" <sa...@gmail.com> wrote on 08/23/2006
> 02:46:18 AM:
>
> > How do I get JSVGScrollPane to be visible when the visible part of the
> > JSVGCanvas is too small to view all the content in a SVG file. Is it
> possible
> > to have the JSVGScrollPane visible at all times. This is what I have
> written so far.
>
>    I'm not entirely sure I understand what you want.
> If you just want the scrollbars to show all the time you
> can use:
>         scrollPane.setScrollbarsAlwaysVisible(true);
>
>    If the problem is that your SVG content is getting clipped
> then most likely you need to adjust the parameters on the
> root SVG element (in particular the width/height and
> viewBox attributes)
>
> > JSVGCanvas canvas = new JSVGCanvas();
> > canvas = setSVGDocument(svgfile);
> > JSVGScrollPane scrollPane = new JSVGScrollPane(canvas);
> > getContentPane().add(scrollPane,BorderLayout.CENTER);
>
>    This looks fine.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

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


Re: Problem with handling JSVGScrollPane

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

"Sarala Dissanayake" <sa...@gmail.com> wrote on 08/23/2006 
02:46:18 AM:

> How do I get JSVGScrollPane to be visible when the visible part of the 
> JSVGCanvas is too small to view all the content in a SVG file. Is it 
possible 
> to have the JSVGScrollPane visible at all times. This is what I have 
written so far. 

   I'm not entirely sure I understand what you want.
If you just want the scrollbars to show all the time you
can use:
        scrollPane.setScrollbarsAlwaysVisible(true);

   If the problem is that your SVG content is getting clipped
then most likely you need to adjust the parameters on the
root SVG element (in particular the width/height and
viewBox attributes)

> JSVGCanvas canvas = new JSVGCanvas();
> canvas = setSVGDocument(svgfile);
> JSVGScrollPane scrollPane = new JSVGScrollPane(canvas);
> getContentPane().add(scrollPane,BorderLayout.CENTER);

   This looks fine.


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