-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebPopup setCloseOnFocusLoss doesn't work #122
Comments
Good point. I guess I will add three options:
And generally - I am trying to do make WebLaF code developer-friendly, so you would be able to access/override/improve as much things as there are available in the library. So if you find any other issues in WebLaF which force your code to be inconvenient - just notify me and I will deal with it :) That also includes any missing methods you might want to see in components and such. |
By the way - if you like to use Reflection from time to time - ReflectUtils might be really useful for you. final ShadeLayer layer = ReflectUtils.callStaticMethodSafely ( PopupManager.class, "getShadeLayer" );
layer.setBlockClose ( true ); This won't even require any try-catch blocks. And yes, it always makes the method accessible. |
I need reflection more than I like it, but it's good to be aware of ReflectUtils. Thank you. :) |
One more thing... the callStaticMethodSafely() doesn't work here because the getMethods() on ReflectUtils.java:859 returns only the public methods. The private methods are accessible only with getDeclaredMethods(). |
Nice one, it is actually a bug. If you look further into a similar method Thanks for noting this one :) |
Why I have created methods like For example if you have a class with method: public class MyClass
{
public void doSomething ( Object object )
{
//
}
} And you will try to find it using non-object class type: myClass.getMethod ( "doSomething", String.class ) You will simply find nothing since you have to provide exact method argument type, supertypes simply won't work. Here is the only way it will work: myClass.getMethod ( "doSomething", Object.class ) And basically the same applies to constructors. |
#121 - Small fix for FileUtils.getDiskRoots() method WebDocumentPane custom component added (will be completed in v1.28 release) DragManager preview added PopupMenuGenerator preview added Main README updated with more screenshots Screenshots moved into a separate directory
I have committed all of the changes, you can build temporary library version from sources if you want to test it out right away or wait for v1.28 release which will include it. |
Changes are now available in v1.28 update: |
The closeOnFocusLoss property on WebPopup is ignored because the ShadeLayer has its own way to hideAllPopups: the blockClose property, which is inaccessible without manually instantiating a ShadeLayer and doing what PopupManager does.
My nasty workaround for a real modal WebPopup:
The text was updated successfully, but these errors were encountered: