Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling drop shadow on JWindows?



FWIW, since it was relatively quick to try, I tried Josh's suggested trick with setting a transparent background color. This works more of the time than using standard popup factory, but once a window has been used once, it will have a drop shadow thereafter. Disposing the window after a use and creating a new one makes it show up without a drop shadow *most* of the time, but if popups are used in rapid succession, the drop shadow will appear (some caching of the native window resource on the JDK side?). So I'll try your technique next.

Thanks,

-Tim

On Jul 12, 2005, at 10:39 AM, Matt Drance wrote:

Actually, Scott is correct.  Doing the magic after pack and before setVisible/show works without flickering.  Just make sure you also move any setSize calls after pack if that messes with your window.

----------------------------------------------
Matt Drance
DTS Engineer
Java - Dashboard - Address Book
email@hidden


On Jul 12, 2005, at 6:10 AM, Scott Palmer wrote:


On 11-Jul-05, at 12:34 PM, Matt Drance wrote:


Hi Tim,

There's no clean way to get a Cocoa-Java NSWindow that corresponds to the one you want, but you can write a very light JAWT library that will give you the NSView/Window corresponding to your popup and then call setHasShadow:NO. Other developers have done this in the past, however, because of how JAWT works the call won't work until the component is first shown. That means there will be a slight flicker as the shadow appears for the split second before your setHasShadow call goes through.


I'm curious about this flicker issue.

As I understood things, a components native peer is "realized" when you call pack(). The javadoc for pack() indicates that "If the window and/or it's owne are not yet displayable, both are made displayable before calculating the preferred size."

Generally I was under the impression that JAWT just needs to have the native peer *displayable*, it doesn't have to be showing.

Is this not the case on the Mac?

Scott



_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Disabling drop shadow on JWindows? (From: Tim Boudreau <email@hidden>)
 >Re: Disabling drop shadow on JWindows? (From: Scott Palmer <email@hidden>)
 >Re: Disabling drop shadow on JWindows? (From: Tim Boudreau <email@hidden>)
 >Re: Disabling drop shadow on JWindows? (From: Matt Drance <email@hidden>)
 >Re: Disabling drop shadow on JWindows? (From: Scott Palmer <email@hidden>)
 >Re: Disabling drop shadow on JWindows? (From: Matt Drance <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.