Balloons not appearing out of window bounds

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Balloons not appearing out of window bounds

Postby javawizard2539 » Mon Aug 18, 2008 10:32 pm

One thing I noticed is that balloons do not show outside of the boundaries of the window that they are in. This gets kind of annoying, especially where I'm using it, which is to notify the user that they have caps lock on and that they should turn it off in a tiny login window. It shouldn't be too hard to fix this. A while back, I wrote my own implementation of a popup menu by converting the location that the user clicked, relative to the component, to screen coordinates (there is a method in SwingUtilities for doing this), creating a modeless, always-on-top, undecorated JDialog at the screen point specified, and drawing a popup menu inside it. A focus listener was then added to the dialog that hid it when it lost focus, or when a menu item was clicked. Perhaps something similar could be done with balloons. The portion of the balloon that is within the parent frame could be rendered as-is, and a JDialog that starts at the edge of the frame could render the rest. The balloon would probably have to be forced to use straight corners to avoid having to make portions of the dialog itself transparent.

Just a suggestion, albeit one I would really like to see happen.
javawizard2539
 
Posts: 10
Joined: Mon Aug 18, 2008 10:22 pm

Re: Balloons not appearing out of window bounds

Postby JIDE Support » Mon Aug 18, 2008 10:41 pm

I guess you already knew this is the limitation from Swing that there was no transparent Window in Swing. So there is no way to implement an irregullar shape window as BalloonPopup. I heard JDK6u10 fixed this issue but we haven't got a chance to try it. We will find out and try to improve this.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Balloons not appearing out of window bounds

Postby javawizard2539 » Tue Aug 19, 2008 6:40 pm

They are working on it. There's more about it at http://java.sun.com/developer/community ... jl0707.jsp , namely at the second question You call com.sun.awt.AWTUtilities.setWindowOpaque(frame, false); to make the window non-opaque, and then you only paint pixels in the window that you want to be there. In Java 7, this will be made into a public API under the java.awt package (I would guess as a method of Window), but they're not allowed to modify the public API during an update or minor release. Anyway, you could add this functionality to balloons and then just not allow it to be enabled unless that class and that method that I mentioned are present, or the balloon has straight corners. Just a suggestion.
javawizard2539
 
Posts: 10
Joined: Mon Aug 18, 2008 10:22 pm


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 8 guests

cron