<snip>

Ive managed to fix resizing on the scrollpane by setting the viewBox on
a GVTTreeRenderingCompleted event notification. But I have to do it
explicitly.


On Tue, 22 Jun 2004, Nikhil Dinesh wrote:

> Hi,
>
> I was trying to use the JSVGScrollPane and it kept throwing
> NullPointerExceptions. After tracing the execution I found that it seems
> to check the viewBox before setting it. I hacked around this doing the
> following:
>
> public class MySVGScrollPane extends JSVGScrollPane{
>
>  public MySVGScrollPane(JSVGCanvas canvas){
>      super(canvas);
>      super.viewBox = new java.awt.geom.Rectangle2D.Float(0,0,10000,10000);
>      super.ignoreScrollChange = false;
>  }
> }
>
> This keeps the scrollbars constant which is again weird it be resizing
> according to changes in the document, right?
>
>
> The code which uses the scroll pane is something like:
>
> JPanel panel = new JPanel(layout...)
> JSVGCanvas myCanvas = new JSVGCanvas();
> myCanvas.setDocumentState(JSVGCanvas.ALWAYS_STATIC) [other options produce
> the same results]
>
> panel.add(new JVGScrollPane(myCanvas));
>
> .....(the document is set by some user initiated action)
>
>
> Am I using this the wrong way?
>
> Thanks,
> -Nikhil
>
>

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

Reply via email to