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 bu...@apache.org on 2006/07/06 19:31:53 UTC

DO NOT REPLY [Bug 39983] New: - AWTRenderer should not call System.exit().

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983

           Summary: AWTRenderer should not call System.exit().
           Product: Fop
           Version: 0.92
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: awt renderer
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: mark_z@charter.net


I'm attempting to reuse the AWTRenderer from within a Swing application.  It
works great, until the preview window is closed, at which point it forces my
application closed.

AWTRenderer.createPreviewDialog() adds a WindowListener to the PreviewDialog
(JFrame) to call System.exit(0) on windowsClosed.  As the PreviewDialog class
already calls setDefaultCloseOperation(DISPOSE_ON_CLOSE), I don't see why this
System.exit(0) call is needed.

Thanks!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39983] - AWTRenderer should not call System.exit().

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983





------- Additional Comments From mark_z@charter.net  2006-07-07 16:27 -------
Actually, just calling this before I open the AWTRenderer works, too.  I still
think it's a hack, but it's a better hack.  :-)

System.setProperty("swing.systemlaf", UIManager.getLookAndFeel().getName());

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39983] - AWTRenderer should not call System.exit().

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983


mark_z@charter.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED




------- Additional Comments From mark_z@charter.net  2006-07-10 20:53 -------
You rock!  Thanks!!  (Marking as verified.)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39983] - AWTRenderer should not call System.exit().

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983





------- Additional Comments From mark_z@charter.net  2006-07-06 22:28 -------
Also, please see http://forum.java.sun.com/thread.jspa?threadID=750578.  I wrote
a quick extension to AWTRenderer which overrides setUserAgent(), calls super,
then removes all the WindowListener's from the frame to get around the
System.exit() part.  However, the text on disabled JButton's on my original
Swing form no longer appears after displaying and closing the AWTRenderer.  Any
ideas?  (I can file this as a separate bug if desired.)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39983] - AWTRenderer should not call System.exit().

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983


jeremias@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jeremias@apache.org  2006-07-10 20:15 -------
Thanks for the hints. I've taken care of everything (I think). Tell us if it's
better now. Change in FOP Trunk: http://svn.apache.org/viewvc?rev=420626&view=rev

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39983] - AWTRenderer should not call System.exit().

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39983





------- Additional Comments From mark_z@charter.net  2006-07-07 16:22 -------
Regarding my comment #1, I found the issue is with the UIManager.setLookAndFeel(
               UIManager.getSystemLookAndFeelClassName()) call in the
PreviewDialog constructor.  Removing it eliminates the issue.  My current
work-around is to save the current LAF before opening the AWTRenderer, then
restoring after the AWTRenderer is closed.

I don't agree with this being called from within the constructor.  Shouldn't it
be up to the caller to specify the LAF?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.