Creating plug-ins / hook into designer

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

Creating plug-ins / hook into designer

Postby flangel » Fri Jul 02, 2004 10:37 am

Hello team,

i wrote:

==>

Designer is a plug-in for Eclipse. As a newbie to Designer/Eclipse, allow the following - dump - question:

Is it possible to write my own plug-ins for Designer ? For instance, i would like to enhance Designer with the following functionality:

1. I have a special purposes database that is accessed using Java API, not JDBC or JDO

2. I would like to write my own plug-in for Designer that allows me to browse the data objects in this special database and grahically wire fields/arrays from the data objects to jtextfields, dropdownlists, jtables etc.

Therefore, i might need to extend Designer in some way and would like to know if and how this would be possible.

Any feedback would be highly appreciated!
Frank

<==

You answered :

-->
So, you want to "wire" your data objects to Swing controls. But what code do you want to produce, can you give example? In theory we could provide you extension point that allows to add button on toolbar and receive for example list of controls. Your plugin could open your database and pass some Java code to add to Designer. But this is just in theory, so provide more info.
<--

More info:


Basically, i would like to create a reference between n data object attributes and n java swing gui components graphically

Mapping Table A:

DataObject1.Subobject.Field1 <---> JTextfield1
DataObject1.Subobject.Field1 <---> JTextfield2 ...

For instance, i would do sth like this:

1. I browse the data objects in my plugin
2. I select a field in my plugin
3. I drap and drop a field on a Swing control, for instance JTextfield
4. The reference to this field is stored in a mapping table

or

1. I select a SWING component, for instance JTextfield
2. I go to properties panel. It has an additional property X with a button on it.
3. I press the button and a user defined GUI appears. I select my data objects/ field from my special database
4. The field reference is stored in the mapping table A

Based on the mapping table, i could generate some code that set the values of the Swing compoments at startup and Get the results when closing the dialog.

All i need is a way to hook into Designer to create this mapping between the SWING components and the data object fields.

Best regards
Frank
flangel
 
Posts: 2
Joined: Fri Jul 02, 2004 6:29 am
Location: New York

Postby admin » Fri Jul 02, 2004 12:31 pm

I more like way with additional property.

So, you don't need from Designer ability to generate code based on your extension, you just need to be invoked with Swing component description, right? You will save some information in some place, but this will have nothing with Designer, right?

What information do you want to receive in your property about selected Swing component - class, variable/field name, may be something other?
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am


Return to Swing Designer

Who is online

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