> How do they actually handle the layouts, if they're not 
> generating code? 

Voodoo. :)

It's a black box... I visually created a .form in "XY space" (creates an XML
file but "do not edit the file"), then you slap a "grid" on the components,
bind the form to a class, add bindings for each component, create a Jframe
and add the Form contentPane, and then during compile, et voila -- magic
fairies create the UI bits.


> Some kind of configuration file that gets interpreted at runtime?
I recall seeing at JavaOne2003 a demo... and I thought they were doing some
bytecode manipulation post-compile. But honestly, I'm ignorant of what is
happening under the covers.

Heres an example of a simple form, one label, one text field, one button,
some spacers, seems like they have a Grid layout, perhaps custom:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/"; version="1"
bind-to-class="com.cisco.hrit.Preferences">
  <grid id="29ae7" row-count="3" column-count="3"
same-size-horizontally="false" same-size-vertically="false" hgap="-1"
vgap="-1">
    <margin top="0" left="0" bottom="0" right="0"/>
    <constraints>
      <xy x="35" y="40" width="354" height="90"/>
      <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3"
hsize-policy="3" anchor="0" fill="3"/>
    </constraints>
    <properties/>
    <border type="none"/>
    <children>
      <component id="65ed1" class="javax.swing.JTextField"
binding="nametext">
        <constraints>
          <xy x="62" y="0" width="186" height="21"/>
          <grid row="0" column="1" row-span="1" col-span="1"
vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
            <preferred-size width="150" height="-1"/>
          </grid>
        </constraints>
        <properties/>
      </component>
      <component id="a0d38" class="javax.swing.JButton" binding="Apply">
        <constraints>
          <xy x="258" y="66" width="96" height="24"/>
          <grid row="2" column="2" row-span="1" col-span="1"
vsize-policy="0" hsize-policy="3" anchor="0" fill="1"/>
        </constraints>
        <properties>
          <text value="Apply"/>
        </properties>
      </component>
      <component id="2e73" class="javax.swing.JLabel">
        <constraints>
          <xy x="0" y="3" width="52" height="14"/>
          <grid row="0" column="0" row-span="1" col-span="1"
vsize-policy="0" hsize-policy="0" anchor="8" fill="0"/>
        </constraints>
        <properties>
          <text value="Item Name"/>
        </properties>
      </component>
      <hspacer id="64a7c">
        <constraints>
          <xy x="258" y="5" width="96" height="11"/>
          <grid row="0" column="2" row-span="1" col-span="1"
vsize-policy="1" hsize-policy="6" anchor="0" fill="1"/>
        </constraints>
      </hspacer>
      <vspacer id="535de">
        <constraints>
          <xy x="300" y="26" width="11" height="40"/>
          <grid row="1" column="2" row-span="1" col-span="1"
vsize-policy="6" hsize-policy="1" anchor="0" fill="2"/>
        </constraints>
      </vspacer>
    </children>
  </grid>
</form>


Cheers,
Timo




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to