Daniel Noll wrote:


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. :-/


It's called by the JSVGComponent when it knows what size the SVG document is.




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



Reply via email to