Search |
||
Making your components work nicer inside MatissePosted by mister__m on February 20, 2008 at 7:20 AM PST
A co-worker had been developing some nice-looking custom components for a customer project. It was tightly integrated with the backend logic, though, so he tried to use it with Matisse, there were several issues, from class loading errors to slowness, since the component was trying to do its "real task" inside the designer. So, when he told me that, I immediately recalled a trick I came to know way back in 1999, while I was struggling with Java and Swing for the first time. The He changed the component constructor to check for design time and skip the "black magic" section. It worked like a charm and he said it was the best tip I gave him last year. So now I've finally had the time to blog again, I thought it would be an interesting tip to share :-) »
Related Topics >>
Java Desktop Comments
Comments are listed in date ascending order (oldest first)
Submitted by mbien on Wed, 2008-02-20 11:00.
I would not recommend this as best practice. Remember the matisse module sets Beans.setDesignTime(true) when it is loaded and this flag may be read from other modules too.
Just use this trick if you are sure your GUI component will never be used _inside the IDE since it will think it is in design time.... this flag causes us with the NetBeans OpenGL Pack (JOGL components) a lot of problems ;-) https://netbeans-opengl-pack.dev.java.net/ (but this could be probably solved if matisse would load the Beans class in its own classloader...)
Submitted by mbien on Sun, 2008-03-02 06:18.
second try ;-)
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6669869 |
||
|
|
Regards.