Overlayble Components on NetBeans/Matisse

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Overlayble Components on NetBeans/Matisse

Postby andrednasoftware » Tue Aug 16, 2011 12:51 pm

Hi,

Is there any way to use DefaultOverlayable to wrap an existing component on Swing when using Matisse (Netbeans GUI builder) ?
andrednasoftware
 
Posts: 18
Joined: Fri Jul 01, 2011 4:42 pm

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Tue Aug 16, 2011 1:06 pm

It should work. Please use JIDE OverlayableDemo as a start point to create a demo to verify.

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

Re: Overlayble Components on NetBeans/Matisse

Postby andrednasoftware » Wed Aug 17, 2011 5:41 am

Thanks for the reply.
The example above is very interesting and serves as the basis for several projects, however, with the problem using NetBeans (Matisse), is that it generates code that organizes components (JTextField, JComboBox, etc) depending on the chosen layout (BorderLayout, GroupLayout, etc.). In the example of using DefaultOverlayble, notes that instantiation depends on the actualComponent and overlayComponent instantiation, and then add the DefaultOverlayble in a Container. It is not possible using Matisse.
Another possibility is to drag the DefaultIOverlayble component from the palette to design area, since it extends the JPanel component, and then add the actualComponent dragging it into the DefaultOverlayble, but a NullPointerException is thrown in overridden method setBounds() of DefaultOverlayble. Following is the StackTrace:

java.lang.NullPointerException
at com.jidesoft.swing.DefaultOverlayable.setBounds(Unknown Source)
at org.jdesktop.layout.GroupLayout$ComponentInfo.setBounds(Unknown Source)
at org.jdesktop.layout.GroupLayout.layoutContainer(Unknown Source)
at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.createLayout(SwingLayoutBuilder.java:203)
at org.netbeans.modules.form.layoutdesign.support.SwingLayoutBuilder.setupContainerLayout(SwingLayoutBuilder.java:110)
[catch] at org.netbeans.modules.form.VisualReplicator.setupContainerLayout(VisualReplicator.java:819)
at org.netbeans.modules.form.VisualReplicator.updateContainerLayout(VisualReplicator.java:329)
at org.netbeans.modules.form.FormDesigner$LayoutMapper.rebuildLayout(FormDesigner.java:2262)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateCurrentState(LayoutDesigner.java:117)
at org.netbeans.modules.form.FormDesigner.updateComponentLayer(FormDesigner.java:585)
at org.netbeans.modules.form.FormDesigner.access$2000(FormDesigner.java:107)
at org.netbeans.modules.form.FormDesigner$FormListener.run(FormDesigner.java:2531)
at org.netbeans.modules.form.FormLAF$3.run(FormLAF.java:329)
at org.openide.util.Mutex.doEventAccess(Mutex.java:1361)
at org.openide.util.Mutex.readAccess(Mutex.java:271)
at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:312)
at org.netbeans.modules.form.FormDesigner$FormListener.processEvents(FormDesigner.java:2377)
at org.netbeans.modules.form.FormDesigner$FormListener.formChanged(FormDesigner.java:2343)
at org.netbeans.modules.form.FormModel.fireEvents(FormModel.java:1296)
at org.netbeans.modules.form.FormModel.fireEventBatch(FormModel.java:1269)
at org.netbeans.modules.form.FormModel.firePendingEvents(FormModel.java:1232)
at org.netbeans.modules.form.FormModel.access$000(FormModel.java:68)
at org.netbeans.modules.form.FormModel$2.run(FormModel.java:1212)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

What I need to know is whether it is possible to create the layout using Matisse, especially using the tool Free Design, which uses a GroupLayout, and after initComponents() replace the instances of components by DefaultOverlayble or is there another way to create the layout using the Matisse and then add the overlay function.
andrednasoftware
 
Posts: 18
Joined: Fri Jul 01, 2011 4:42 pm

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Wed Aug 17, 2011 2:22 pm

Will fix the NPE issue in next regular release. However, I'm afraid you have to ask NetBeans for help to solve the UI design issue. Otherwise, I'm afraid DefaultOverlayable won't be able to take effect correctly.

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

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Tue Aug 23, 2011 6:34 pm

Just so you know, this is fixed in 3.2.1 just released.

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

Re: Overlayble Components on NetBeans/Matisse

Postby Conan » Tue Sep 13, 2011 2:27 am

Hi,
Im new to JIde software and I'm evaluating the usage of your software. I'm impressed but we are having the same problem as andrednasoftware. Netbeans is our main development IDE and we are struggling to incorporate the validation package into swing applications build by the Matisse GUI builder. We trying to add the DefaultOverlayable to the gui with no luck.

Have any body done this successfully? If yes, could you please show us how?

To JIde developers: How about you creating a tutorial on this issue? There are allot of people using Netbeans :)


Best Regards
Conan
Conan
 
Posts: 3
Joined: Tue Sep 13, 2011 1:44 am

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Tue Sep 13, 2011 8:20 am

DefaultOverlayable is designed to be used in code, not through GUI builder. If you look at the APIs such as addOverlayComponent, unless we create our own GUI designer to use these APIs, there is no way (at least I don't NB team will do the customization for us) to expect the NB GUI builder will work. We would like our components work in any GUI builder but in reality, there is no standard way of doing things (unlike the .NET world) so we will have to left out some components.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Overlayble Components on NetBeans/Matisse

Postby Conan » Wed Sep 14, 2011 12:16 am

Many thanks for the reply. I understand your argumentation and partially agree with you, I mean you should have some support for the most popular IDE out there (Eclipse and Netbeans). Since DefaultOverlayable is designed to be used in code, is it possible to use it inside the application code after creating the gui in Netbeans Matisse? Could you please show us how?

Is it possible to add overlayable components to existing gui components made by the gui builder inside the generated code? If yes could you please show us how? (a small tutorial would be appreciated).

I have tried to incorporate the DefaultOverlayable and other Overlayable components inside the code of our application after building the gui in Matisse with no luck.

Conan
Conan
 
Posts: 3
Joined: Tue Sep 13, 2011 1:44 am

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Wed Sep 14, 2011 9:00 am

The only way you can do it is to design the layout using gui designer without considering the DefaultOverlayable then you finish the gui layout, you modify the generated code to add DefaultOverlayable. After that, I am not sure if the gui designer can still read the generated code as it has been modified. All I can say at the moment is DefaultOverlayable is not designed for gui designers. Maybe we should look for a better alternative that works with gui designers.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Overlayble Components on NetBeans/Matisse

Postby JIDE Support » Wed Sep 14, 2011 2:05 pm

BTW, eventually DefaultOverlayable will be replaced by JLayer (http://download.oracle.com/javase/tutor ... html#using) which is only available only in JDK7. For JDK6, you would need to use JXLayer. Not sure if NB GUI designer supports JLayer/JXLayer yet. If yes, you would have a better alternative.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Overlayble Components on NetBeans/Matisse

Postby Conan » Thu Sep 15, 2011 1:18 am

Many thanks. Your comments were very helpful. I think we will try out the JLayer. We hope that you come up with a version of your Overlayable components which are easy to integrate into application build by gui builders. We will be more than happy to use them :).
Conan
 
Posts: 3
Joined: Tue Sep 13, 2011 1:44 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 7 guests

cron