Hi Thomas,

I am using version 1.6, so I think this is not the issue.

I use the setURI method to load a new SVG - should I do it another way? If so, how?

Thanks,

Irene

 


[email protected] schrieb am 30.06.05 11:38:45:


Hi Irene,

What version of Batik are you using?
Version 1.5.1 had a 'bug' in the file loader which in certain
uses caused it never to drop it's reference to any document ever
loaded.

How do you move from one document to another?
Do you change the DOM or do you simply call some version
of 'setURI'?

Irene Heinz wrote:
> If it is of any help, here is the error message:
>
> java.lang.Exception: Java heap space
> at org.apache.batik.swing.svg.SVGDocumentLoader.run(Unknown Source)
>
> When I use the refresh-button of IE, the heap is cleared and I can start
> viewing a new series of SVGs.
>
> Here is a shortened version of my code:
>
> public class gv extends JApplet
> implements ActionListener
> {
> String graphic; //beinhaltet vollständige Adresse
> JPanel panel;
> SVGView svgCanvas;
> JSVGScrollPane spane;
>
> public void init()
> {
> graphic = getParameter("graphic");
> svgCanvas = new SVGView(this);
>
> svgCanvas.addLinkActivationListener(new LinkActivationListener ()
> {
> public void linkActivated(LinkActivationEvent e)
> {
> //Do something
> }
> });
>
>
> //Layout Hauptframe
> BorderLayout mainLayout = new BorderLayout ();
> setLayout (mainLayout);
>
> spane = new JSVGScrollPane(svgCanvas);
> spane.setBackground(Color.WHITE);
>
> add( spane,BorderLayout.CENTER );
>
> svgCanvas.setEnableZoomInteractor( true );
> svgCanvas.setEnablePanInteractor( true );
>
> // Bild laden
> try {
> svgCanvas.setAutoscrolls(true);
> svgCanvas.setURI(graphic);
> }
> catch(Exception ex) {
> showStatus("Error opening connection to " + graphic);
> }
> }
> }
> }
>
> class SVGView extends JSVGCanvas
> {
> gv view;
> public SVGView( gv v ){
> view = v;
> }
> public class UAgent extends CanvasUserAgent
> {
> //Event auslösen bei Click auf Link
> public void openLink(SVGAElement elt)
> {
> grundrissviewer.globalname = elt.getLocalName();
> String show = XLinkSupport.getXLinkShow(elt);
> String href = "">> fireLinkActivatedEvent(elt, href);
> }
> }
>
> // neuer UserAgent, um zu verhindern, dass Link automatisch geöffnet wird
> protected UserAgent createUserAgent()
> {
> UAgent agent = new UAgent();
> return agent;
> }
>
> }
>
> Has anybody any suggestions?
>
> Irene
>
>
>
>
> Irene Heinz <[EMAIL PROTECTED]> schrieb am 29.06.05 13:36:06:
>
> Hi all,
>
> as described in this email
> http://www.archivum.info/[email protected]/2005-06/msg00004.html I
> get an out of Memory error after closing and opening svg with batik
> several times. Unfortunately, the answer does not help me much - what is
> GC? And how to make sure that it knows the listeners?
>
> Our svg application is run in an applet. In another applet, you can
> choose between several files to be displayed, and so several SVG can be
> displayed one after the other. I have no idea how to remove the
> listeners before the next SVG is opened. Can anybody help?
>
> Thanks,
>
> Irene
>
>
>
> Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
> Freunde gleichzeitig schicken:
> *http://freemail.web.de/features/?mc=021179*
>
>
>
>
>
>
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193*
>
> --------------------------------------------------------------------- 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]



Verschicken Sie romantische, coole und witzige Bilder per SMS!   
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193  
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to