SWIXML
1.6 (#161)

org.swixml.layoutconverters
Class GridBagLayoutConverter

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

public class GridBagLayoutConverter
extends Object
implements LayoutConverter

A layout converter for java.awt.GridBagLayout.

Examples:

 <panel layout="GridBagLayout">
   <button>
     <gridbagconstraints
         gridx="1" gridy="2" gridwidth="3" gridheight="4" weightx="0.1" weighty="1"
         anchor="GridBagConstraints.NORTH" fill="GridBagConstraints.HORIZONTAL"
         insets="1,2,3,4" ipadx="5" ipady="6"/>
   </button>
   <button>
     <gridbagconstraints gridx="2" gridy="3"/>
   </button>
 </panel>
 
 <panel>
   <layout type="GridBagLayout" columnWidths="200, 400, 150">
   <button>
     <gridbagconstraints gridx="1" gridy="2"/>
   </button>
   <button>
     <gridbagconstraints gridx="2" gridy="3"/>
   </button>
 </panel>
 

Author:
Karl Tauber, Wolf Paulus

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

Constructor Detail

GridBagLayoutConverter

public GridBagLayoutConverter()
Method Detail

getID

public String getID()
Returns "gridbaglayout".

Specified by:
getID in interface LayoutConverter

convertLayoutAttribute

public LayoutManager convertLayoutAttribute(Attribute attr)

Creates a GridBagLayout instance.

Examples for Valid XML attribute notations:

Specified by:
convertLayoutAttribute in interface LayoutConverter

convertLayoutElement

public LayoutManager convertLayoutElement(Element element)

Creates a GridBagLayout instance.

Attributes:

Examples for Valid XML element notations:

Specified by:
convertLayoutElement in interface LayoutConverter

convertConstraintsAttribute

public Object convertConstraintsAttribute(Attribute attr)
Returns always null.

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.