You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by IvanLatysh <Iv...@yahoo.ca> on 2002/11/20 16:45:18 UTC
org.apache.fop.viewer.PreviewDialog
Hi all.
I am using FOP with my application and for better performance I did a singleton which have an instance of the Driver, Renderer and etc.
It seens working fine, each time before I run a new report I am reset the Driver.
But I found problems with PreviewDialog it seems that dialog didn't release all resources and next time when I am creating it shows me a picture from the previous report.
No exceptions was reported but in the log file I got:
[DEBUG] Memory use is indicative; no GC was performed
[DEBUG] These figures should not be used comparatively
Am I doing something wrong ?
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
IvanLatysh wrote:
> Yes, reload method will call "starter.run();"
> And page in the renderer will be altered with a new one.
> Try to comment "starter.run();" in PreviewDialog and see what happened.
But why? starter.run() runs clean formatting, isn't it what you want?
> Scale image are mandatory. Without scaling all working Ok.
> I could send you mine "previewPanel.java"
Sure. Mail it to me privately. Or alternatively file it to bugzilla as feature
request. But explain first, what's wrong with starter.run() ?
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by IvanLatysh <iv...@yourmail.com>.
Hello, Oleg!
You wrote to <fo...@xml.apache.org> on Fri, 22 Nov 2002 20:22:27 +0200:
OT> IvanLatysh wrote:
OT>>> Why? awt viewer succesfully reuse it while reloading fo document,
OT>>> it just cleans renderer by removing all rendered pages.
>> It does work only in a case when you didn't change scale, if you did,
>> even after removing pages you got the last page in a renderer :-)
OT> Hmmmmm, cannot reproduce. I open fo document, run fop -awt, scale it
OT> upto 200%, change the document completely in the editor, press
OT> Reload and get new one rendered.
Yes, reload method will call "starter.run();"
And page in the renderer will be altered with a new one.
Try to comment "starter.run();" in PreviewDialog and see what happened.
Scale image are mandatory. Without scaling all working Ok.
I could send you mine "previewPanel.java"
---
Yours sincerely, Ivan Latysh.
IvanLatysh[a]yahoo.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
IvanLatysh wrote:
> OT> Why? awt viewer succesfully reuse it while reloading fo document, it
> OT> just cleans renderer by removing all rendered pages.
> It does work only in a case when you didn't change scale, if you did, even after removing pages you got the last page in a renderer :-)
Hmmmmm, cannot reproduce. I open fo document, run fop -awt, scale it
upto 200%, change the document completely in the editor, press Reload
and get new one rendered.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by IvanLatysh <iv...@yourmail.com>.
Hello, Oleg!
You wrote to <fo...@xml.apache.org> on Fri, 22 Nov 2002 18:37:32 +0200:
OT> IvanLatysh wrote:
>> I wrote panelPreview which I am going to use instead of
>> PreviewDialog.
OT> What is the difference? Actually awt viewer redesign task to get it
OT> reusable is in our todo list [1], so if you can help - share you
OT> ideas.
>> And I am experience a major problem with AWTRenderer, this renderer
>> couldn't be reused.
OT> Why? awt viewer succesfully reuse it while reloading fo document, it
OT> just cleans renderer by removing all rendered pages.
It does work only in a case when you didn't change scale, if you did, even after removing pages you got the last page in a renderer :-)
---
Yours sincerely, Ivan Latysh.
IvanLatysh[a]yahoo.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
IvanLatysh wrote:
> I wrote panelPreview which I am going to use instead of PreviewDialog.
What is the difference? Actually awt viewer redesign task to get it
reusable is in our todo list [1], so if you can help - share you ideas.
> And I am experience a major problem with AWTRenderer, this renderer couldn't be reused.
Why? awt viewer succesfully reuse it while reloading fo document, it
just cleans renderer by removing all rendered pages.
[1] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14349
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by IvanLatysh <iv...@yourmail.com>.
Hello, Oleg!
You wrote to <fo...@xml.apache.org> on Wed, 20 Nov 2002 18:02:59 +0200:
>> Just curious - why you recreate the dialog? You can use 1 instance
>> and to show/hide it by setVisible(boolean) method.
>> But you maight be right, because PreviewDialog is not designed to be
>> reusable and recreatable.
OT> Anyway, look at reload functionality, it solves the same problem by
OT> cleaning up renderer, internal counters, page image etc.
I didn't answer because I decide to go dipper into the code.
And I did figure out, that there are no way to reuse PreviewDialog.
I wrote panelPreview which I am going to use instead of PreviewDialog.
And I am experience a major problem with AWTRenderer, this renderer couldn't be reused.
I have to recreate it each time. It is terrific.
If someone interesting in my code, let me know.
---
Yours sincerely, Ivan Latysh.
IvanLatysh[a]yahoo.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Oleg Tkachenko wrote:
> Just curious - why you recreate the dialog? You can use 1 instance and
> to show/hide it by setVisible(boolean) method.
> But you maight be right, because PreviewDialog is not designed to be
> reusable and recreatable.
Anyway, look at reload functionality, it solves the same problem by cleaning
up renderer, internal counters, page image etc.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
IvanLatysh wrote:
> I am using FOP with my application and for better performance I did a singleton which have an instance of the Driver, Renderer and etc.
> It seens working fine, each time before I run a new report I am reset the Driver.
> But I found problems with PreviewDialog it seems that dialog didn't release all resources and next time when I am creating it shows me a picture from the previous report.
Just curious - why you recreate the dialog? You can use 1 instance and to
show/hide it by setVisible(boolean) method.
But you maight be right, because PreviewDialog is not designed to be reusable
and recreatable.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org
Re: org.apache.fop.viewer.PreviewDialog
Posted by Oleg Tkachenko <ol...@multiconn.com>.
IvanLatysh wrote:
> Hi all.
>
> I am using FOP with my application and for better performance I did a singleton which have an instance of the Driver, Renderer and etc.
> It seens working fine, each time before I run a new report I am reset the Driver.
> But I found problems with PreviewDialog it seems that dialog didn't release all resources and next time when I am creating it shows me a picture from the previous report.
> No exceptions was reported but in the log file I got:
> [DEBUG] Memory use is indicative; no GC was performed
> [DEBUG] These figures should not be used comparatively
>
> Am I doing something wrong ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org