Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| SWIXML 1.6 (#161)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.swixml.layoutconverters
Class GridBagLayoutConverter

    java.lang.Object
      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:

  - `layout="GridBagLayout"`
  - `layout="GridBagLayout(rowWeights(0,0,1.0,0))"`
  - `layout="GridBagLayout(columnWeights(0.5, 0.5, 1.0, 99.9))"`
  - `layout="GridBagLayout(columnWidths(5, 5, 10, 33))"`
  - `layout="GridBagLayout(rowHeights(5, 5, 10, 33))"`

  Specified by:
    `convertLayoutAttribute` in interface `LayoutConverter`

### convertLayoutElement

    public LayoutManager convertLayoutElement(Element element)

  Creates a GridBagLayout instance.

  Attributes:

  - `columnWidths` (optional): The minimum column widths.
  - `rowHeights` (optional): The minimum row heights.
  - `columnWeights` (optional): The column weights.
  - `rowWeights` (optional): The row weights.

  Examples for Valid XML element notations:

  - `<layout type="GridBagLayout"/>`
  - `<layout type="GridBagLayout" columnWidths="5, 5, 10, 33" rowWeights="0,0,1.0,0"/>`

  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| SWIXML 1.6 (#161)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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