Mark Claassen wrote:
I was working with the about the scroll pane issues some more, and the
more I think about the more I think all I need to do is to get batik to
ignore the component size when drawing the form.

So, here is what I did to the updateRenderingTransform() method.  What
do you think?  The flag a refer to might be nice to have as a
getter/setter property.

The code below seems good, and is probably a good way to proceed.


    However it also occured to me that some of your problems with the
scrollbars not being 'synchronized' with the view might be alieviated
by using the rendering Transform to set the scroll bar thumb size/location.
So when the scroll thumbs move you would update the rendering transform
and then catch the componentTransformChanged event and update the scroll
thumbs.  This way they can't get out of sync.  This would also allow for
the current pan method to play nice.

-----------------
protected boolean updateRenderingTransform() {
        if ((svgDocument == null) || (gvtRoot == null))
                return false;
        
        try {
                SVGSVGElement elt = svgDocument.getRootElement();
                Dimension d;
                if (false)  //Some settable flag
                        d = getSize();
                else {
                        Dimension2D d2 = getSVGDocumentSize();
                        d = new
Dimension((int)d2.getWidth(),(int)d2.getHeight());
                }
                Dimension oldD = prevComponentSize;
                if (oldD == null) oldD = d;
                prevComponentSize = d;
                
                if (d.width  < 1) d.width  = 1;
                if (d.height < 1) d.height = 1;
                AffineTransform at = ViewBox.getViewTransform
                (fragmentIdentifier, elt, d.width, d.height);
                CanvasGraphicsNode cgn = getCanvasGraphicsNode();
                AffineTransform vt = cgn.getViewingTransform();
                if (at.equals(vt)) {
                        // No new transform
                        // Only repaint if size really changed.
                        return ((oldD.width != d.width) || (oldD.height
!= d.height));
                }



---------------------
"Nonviolence is the answer to the crucial political and moral questions
of our time; the need for man to overcome oppression and violence
without resorting to oppression and violence. "
-- Martin Luther King Jr.

Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203 South Bend, IN 46617
E-mail: mailto:[EMAIL PROTECTED]
Voice: (574)232-3784
Fax: (574)232-4014



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






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



Reply via email to