xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com.au>
Subject Re: AW: JSVGCanvas inside JScrollPane
Date Wed, 09 Jul 2003 00:00:45 GMT

Hi.  Thanks for your response, Jan.

Lolling, Jan wrote:

>    /**
>     * this method will be called from constructor of JGVTComponent
>     */
>    protected Listener createListener() {
>        return new ScrollableCanvasSVGListener();
>    }
>  
>
They've changed CanvasSVGListener recently to take the canvas in the 
constructor.  Easy fix.
Something I still don't understand though, here...

>    /**
>	 * This method avoid the problem, that the original methode in CanvasSVGListener 
>	 * use pack() methode to rearrange the Swing componentes
>     */
>    protected class ScrollableCanvasSVGListener extends CanvasSVGListener {
>
>        public void setMySize(Dimension d) {
>            setPreferredSize(d);
>            invalidate();
>            Container p = getParent();
>            while (p != null) {
>                if (p instanceof Window) {
>                    Window w = (Window) p;
>                    w.validate(); // im Orignial wurde hier pack() aufgerufen
>                    break;
>                }
>                p = p.getParent();
>            }
>        }
>
>    }
>  
>
I don't see who's supposed to call the setMySize method. :-/

Daniel



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


Mime
View raw message