SWIXML
1.6 (#161)

org.swixml.layoutconverters
Class FormLayoutConverter

java.lang.Object
  extended by org.swixml.layoutconverters.FormLayoutConverter
All Implemented Interfaces:
LayoutConverter

public class FormLayoutConverter
extends Object
implements LayoutConverter

A layout converter for com.jgoodies.forms.layout.FormLayout.

Examples:

 <panel>
   <layout type="FormLayout"
       columns="p, 3dlu, p:grow"
       rows="p, 3dlu, p"/>

   <label     constraints="1,1" text="Company"/>
   <textfield constraints="3,1"/>
   <label     constraints="1,3" text="Contact"/>
   <textfield constraints="3,3"/>
 </panel>
 
 <panel>
   <layout type="FormLayout"
       columns="right:max(40dlu;pref), 3dlu, d:grow, 7dlu, right:pref, 3dlu, d:grow"
       rows="p, 3dlu, p, 9dlu, p, 3dlu, p"
       columnGroups="1,5; 3,7"/>

   <label     constraints="1,1" text="Company"/>
   <textfield constraints="3,1,5,1"/>
   <label     constraints="1,3" text="Contact"/>
   <textfield constraints="3,3,5,1"/>

   <label     constraints="1,5" text="PTI [kW]"/>
   <textfield constraints="3,5"/>
   <label     constraints="5,5" text="Power [kW]"/>
   <textfield constraints="7,5"/>
   <label     constraints="1,7" text="R [mm]"/>
   <textfield constraints="3,7"/>
   <label     constraints="5,7" text="D [mm]"/>
   <textfield constraints="7,7"/>
 </panel>
 

Author:
Karl Tauber

Constructor Summary
FormLayoutConverter()
           
 
Method Summary
 Object convertConstraintsAttribute(Attribute attr)
          Creates a CellConstraints instance.
 Object convertConstraintsElement(Element element)
          Returns always null.
 LayoutManager convertLayoutAttribute(Attribute attr)
          Returns always null.
 LayoutManager convertLayoutElement(Element element)
          Creates a FormLayout instance.
 String getID()
          Returns "formlayout".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormLayoutConverter

public FormLayoutConverter()
Method Detail

getID

public String getID()
Returns "formlayout".

Specified by:
getID in interface LayoutConverter

convertLayoutAttribute

public LayoutManager convertLayoutAttribute(Attribute attr)
Returns always null.

Specified by:
convertLayoutAttribute in interface LayoutConverter

convertLayoutElement

public LayoutManager convertLayoutElement(Element element)

Creates a FormLayout instance.

Attributes:

Examples for Valid XML element notations:

Specified by:
convertLayoutElement in interface LayoutConverter

convertConstraintsAttribute

public Object convertConstraintsAttribute(Attribute attr)

Creates a CellConstraints instance.

Allowed syntaxes of attribute value:

See JGoodies FormLayout for details.

Examples for Valid XML attribute notations:

Specified by:
convertConstraintsAttribute in interface LayoutConverter

convertConstraintsElement

public Object convertConstraintsElement(Element element)
Returns always null.

Specified by:
convertConstraintsElement in interface LayoutConverter

SWIXML
1.6 (#161)

Copyright © 2002 - 2011 - Wolf Paulus - wolfpaulus.com. All rights reserved.