Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to exploit JavaBeans in Eclipse with a GUI builder?
How to exploit JavaBeans in Eclipse with a GUI builder? [message #180969] Mon, 20 November 2006 18:38 Go to next message
Eclipse UserFriend
Originally posted by: siegfried.heintze.com

Allow me to quote from a company document:
"ABC provided what amounted to a JavaBeans adapter for XYZ. XYZ is not
JavaBeans compliant (i.e., it does not fully or correctly following
JavaBeans conventions). ABC was written to be JavaBeans complient so that
GUI builders (such as NetBeans) could be used to construct applications."

I would like to understand the relationship between JavaBeans and
GUIBuilders better.

Assuming that eclipse has all the necessary features of netBeans, can
someone point me to a tutorial and a plugin (or some other example) so I may
experience writing a JavaBean to be used by a GUI builder? Apparently
GUIBuilders use reflection to interrogate a javabean I might write so the
GUIBuilder user can build a GUI. What plugin to eclipse would best
demonstrate this for me?
Thanks,
siegfried
Re: How to exploit JavaBeans in Eclipse with a GUI builder? [message #180976 is a reply to message #180969] Mon, 20 November 2006 20:03 Go to previous message
Eclipse UserFriend
Originally posted by: wayne.beaton._NOSPAM_eclipse.org

Siegfried Heintze wrote:
> Allow me to quote from a company document:
> "ABC provided what amounted to a JavaBeans adapter for XYZ. XYZ is not
> JavaBeans compliant (i.e., it does not fully or correctly following
> JavaBeans conventions). ABC was written to be JavaBeans complient so that
> GUI builders (such as NetBeans) could be used to construct applications."
>
> I would like to understand the relationship between JavaBeans and
> GUIBuilders better.
>
> Assuming that eclipse has all the necessary features of netBeans, can
> someone point me to a tutorial and a plugin (or some other example) so I may
> experience writing a JavaBean to be used by a GUI builder? Apparently
> GUIBuilders use reflection to interrogate a javabean I might write so the
> GUIBuilder user can build a GUI. What plugin to eclipse would best
> demonstrate this for me?
> Thanks,
> siegfried
>
>

Basically, it amounts to ensuring three things with the Java classes you
create:

1) Must be serializable
2) Must have a zero-argument constructor
3) Must have get*/set*/is* methods for each property.

The get*/set*/is* methods are used to introspect the properties.
Optionally, you can define bound properties. Bound properties fire
events that you can listen for and respond to (to do things like update
a user interface). There is also a mechanism by which you can provide
more metadata for your JavaBeans by providing an extra class. But I
haven't seen one of these metadata classes in a long, long time (I'm not
sure if anybody still uses them).

As for support in Eclipse, The Eclipse Visual Editor provides the
functionality for laying out user interfaces, and does provide some
rudimentary support for JavaBeans.

http://www.eclipse.org/ve

I built a little screen cam demonstrating basic screen layout features
that might be a good start:

http://www.eclipse.org/downloads/download.php?r=1&file=/ technology/phoenix/demos/install-ve/install-ve.html

The Eclipse Data Binding Framework is useful for managing changes
between a JavaBean and screen widgets:

http://wiki.eclipse.org/index.php/JFace_Data_Binding

I believe that there is work underway to exploit the Data Binding stuff
from the VE, but I don't think they're very far along yet (no releases,
anyway).

HTH,

Wayne
Previous Topic:Java App Packaging with RCP tools
Next Topic:installing eclipse
Goto Forum:
  


Current Time: Thu Sep 26 05:09:52 GMT 2024

Powered by FUDForum. Page generated in 0.50010 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top