Re: SwiXML and FormLayout

[email protected] Wed, 23 Mar 2005 10:40:49 +0100
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Hello Nandan,

Swixml (and other XUL tools) lets you create your UI by describing the 
hierarchy (structure) of UI objects.

The xml code is not another (procedural) interpreted language, rather it 
  merely describes the structure of your UI.

To answer your question, swixml-forms does not generate a simple flow of 
corresponding java statements (FormBuilder) to create the UI. (The goal 
is not to make an "xml version" of java).

Now, if you still have issues using the swixml-form lib, let me know, I 
will post detailed instructions.

Cheers, Ozb.
< http://jroller.com/page/ozeebee >

[email protected] wrote:
> SwiX is really great! Kudos to Wolf Paulus and team, and to all contributors..
> SwixNG and swixml-forms.
> 
> I'm an absolute newbie to gui design, so I really don't like muckimg with code,
> recompilimg to see results etc. I aso find the JGoodies Formlayout a bit hard,
> but I liked the Formbuilder. I would have liked to write XML as below, so I
> wrote a few dirty hacks to accomplish it.  I couldn't get your code to run (Ozeebee)
> but I will give it another try, does your usage of JGoodies look something like
> this?
> 
> <panel id='operandspanel' preferredSize='300,290' layout='BorderLayout'>
> 
>         <jgoodiesforms builder='yes' buildername='FormBuilder' debug='yes'>
>         <layout>
>                 <rowspec str=""/>
>                 <colspec str='12dlu, right:min(20dlu;pref):grow, 4dlu, min(20dlu;pref), 7dlu, right:max(40dlu;p), 4dlu, max(20dlu;pref), 80dlu'  />
>                 <offset cols='1'/>
>         </layout>
> 
>         <appendseparator name = 'Operands '/>
>         <appendlabelcomp prompt='Numbers' comp='operandsarea' colspan='6'/>
>         <nextline/>
>         <appendlabelcomp prompt='' comp='operandsinstr' colspan='6'/>
> 
>         <appendseparator name = 'Options '/>
>         <appendlabelcomp prompt="Decimals" comp='ops_ckone' />
>         <nextline/>
> 
>         <swingobjects>
>         <textfield id='operandsarea' text=''   />
>         <label id='operandsinstr' text='(Enter numbers separated by space)'   />
>         <checkbox id='ops_ckone'/>
>         </swingobjects>
> 
>         </jgoodiesforms>
> 
> </panel>
> 
> Basically the XML calls are translated to FormBuilder class methods, and the swingobjects element subtree
> is parsed by the regular SwiX parser. Perhaps the only advantage is not dealing with CellConstraints..
> 
> -- nandan.
> 
> On Tue, 1 Mar 2005 [email protected] wrote:
> 
> 
>>[email protected] wrote:
>>
>>>Does the code handle the FormBuilder class of JGoodies?
>>
>>Hi, I'm not sure to understand your question ...
>>
>>In any case, the current swixml-form version does not use any
>>FormBuilder class to create/layout the components.
>>
>>The only jgoodies classes used are :
>>
>>	com.jgoodies.forms.factories.DefaultComponentFactory
>>	com.jgoodies.forms.layout.CellConstraints
>>	com.jgoodies.forms.layout.FormLayout
>>
>>Hope this helps
>>
>>Ozeebee.
>> < http://jroller.com/page/ozeebee >
>>
>>
>