Bean visualization

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Bean visualization

Postby iduman » Tue Nov 18, 2008 5:57 am

Hello
I am trying to use Java Beans with custom Swing widgets, I can succesfully connect the bean to the widget, but can not see and determine the connection between the bean and the widget visually. Is there a way of seeing this connection visually?
Thank you
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Tue Nov 18, 2008 6:42 am

I'm not entirely sure what "connection' you are trying to see "visually".
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Bean visualization

Postby iduman » Tue Nov 18, 2008 7:58 am

Let me explain this; I used a JTextField on my window and I added a Java bean. When I used the bean (by selecting from the palette), the bean is displayed somewhere out of my window and there was no indication such as a line or a connector that shows any relation between the bean and the widget. How can I see or understand that a bean is connected/related with a widget?
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Tue Nov 18, 2008 9:02 am

Look at its properties, events and/or source.

There are no "lines" to connect anything and I'm not sure what such a line would represent.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Bean visualization

Postby iduman » Tue Nov 25, 2008 6:36 am

I added a non-visual JavaBean by using "Choose Bean" option and the bean is displayed below "my" GUI in designer but I don't want to see it (see attachment). How can make it?

How can I make it (exampleBean1) disappear from below my GUI in designer?

A Visual Connection would be nice for displaying the relation/connection between the bean and the widget.
Attachments
Bean_Visulization_2.PNG
beans below the GUI
Bean_Visulization_2.PNG (68.35 KiB) Viewed 1104 times
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Tue Nov 25, 2008 8:46 am

iduman wrote:I added a non-visual JavaBean by using "Choose Bean" option and the bean is displayed below "my" GUI in designer

That is quite intentional.

iduman wrote:but I don't want to see it (see attachment). How can make it?

Don't use "Choose Bean". Just add the bean by hand.

iduman wrote:How can I make it (exampleBean1) disappear from below my GUI in designer?

For the existing bean, remove the @wb:location comment generated next to the bean.

iduman wrote:A Visual Connection would be nice for displaying the relation/connection between the bean and the widget.

Please be more specific. What exactly would the visual connection show or indicate?

What constitutes a "relation/connection" from your point of view and how should it look in the designer?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Bean visualization

Postby iduman » Tue Nov 25, 2008 11:03 pm

A visual connection is displayed in the attachment as a red thin line (with a question mark). A line could be used for an indication of a relation between the bean and the widget.
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Wed Nov 26, 2008 5:36 am

iduman wrote:A visual connection is displayed in the attachment as a red thin line (with a question mark). A line could be used for an indication of a relation between the bean and the widget.

The line in your attachment doesn't mean anything to me.

Again, be specific. What "relation between the bean and the widget" is that intended to show?

Does that line correspond to some specific source code? What code pattern should be represented by that line?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Bean visualization

Postby iduman » Wed Nov 26, 2008 8:28 am

Relation could be a "part of" relation; i.e. a JTextField could have more than one
JavaBeans such as MyDataBean, MyColorBean, etc. But I can not see this relation in the designer.

If you have many widgets and many beans related with each other in a many-to-one (many bean to one widget) or in a many-to-many relation, you can not understand anything by just looking at the GUI because you will just see a GUI and a bunch of beans displayed below the GUI.

The intension of the red line in the GUI is to show these kind of relations.
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby iduman » Wed Nov 26, 2008 8:36 am

I removed the @wb:location and the bean is disappeared, but now I lost the automatic (or built in) editing capability of the bean of the property editor. How can I do "for not seeing the bean below the GUI but having the editing capability of the property editor" without writing a special property editor for that bean ?
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Wed Nov 26, 2008 9:34 am

iduman wrote:I removed the @wb:location and the bean is disappeared, but now I lost the automatic (or built in) editing capability of the bean of the property editor.

Yes. If you no longer want it managed as a non-visual bean, you won't be able to edit its properties using the property editor. Those two capabilities are tied together.

Why do you even care whether the bean is shown on the design surface like that? Why not move it down and out of the way, if you don't want to see it?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Bean visualization

Postby iduman » Wed Nov 26, 2008 11:11 am

As I have told you before I am trying to use Java Beans within custom Swing widgets. Seeing many beans on "design surface" will not be usefull when you are developing complicated GUIs.

Putting them out of the view may not be a good solution but it can be considered as "a solution" when the user of the customized widget can not change the location of the bean in the widget.
iduman
 
Posts: 21
Joined: Tue Nov 18, 2008 5:46 am

Re: Bean visualization

Postby Eric Clayberg » Thu Nov 27, 2008 9:53 am

At the moment, you can either manage beans visually in the design view or manually in source code.

If you want to be able to click on a bean and edit its properties in the property pane, it will also show up in the design view.

You can also ceate custom editors to manage any properties of your custom components (using standard JavaBean techniques).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest