Control source creation?

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

Control source creation?

Postby mkornatzki » Sat Jun 12, 2010 9:21 am

Hi,

i have an extended JComponent and add a property editable (boolean).
In the property editor i can see the new attribute.
If i set the property to true then an entry in the source is created.
If i set the property to false the entry gets deleted.

I want it in the other way.
If i set the property to false i want the entry in source.

Is this possible to configure in the wbp-component.xml?

thanks, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Control source creation?

Postby Konstantin.Scheglov » Sat Jun 12, 2010 10:08 am

Property gets deleted when you try to set it to its default value.
You probably have method getEditable() which returns false.

If you don't have get() method, you still can specify default value using wbp-component.xml.
<property id="setShowGrid(boolean)">
<defaultValue value="true"/>
</property>
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Control source creation?

Postby mkornatzki » Sun Jun 13, 2010 1:49 am

thank you very much. it works :)

cheers, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Control source creation?

Postby Eric Clayberg » Sun Jun 13, 2010 5:41 pm

Glad that works for you.
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