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

## org.swixml.layoutconverters
Class CardLayoutConverter

    java.lang.Object
      org.swixml.layoutconverters.CardLayoutConverter

All Implemented Interfaces:
  LayoutConverter

    public class CardLayoutConverter

extends Object
implements LayoutConverter

A layout converter for `java.awt.CardLayout`.

Examples:

     <panel layout="CardLayout">
       <panel constraints="card1" />
       <panel constraints="card2" />
     </panel>

     <panel layout="CardLayout(10,20)">
       <panel constraints="firstCard" />
       <panel constraints="secondCard" />
     </panel>

     <panel>
       <layout type="CardLayout" hgap="10" vgap="20"/>
       <panel constraints="firstCard" />
       <panel constraints="secondCard" />
     </panel>

Here is how to access the card layout manager of a component installed by SwixML `(CardLayout)((Container)swingEngine.find("id_of_my_CLed_comp")).getLayout()`

Author:
  Karl Tauber, Wolf Paulus

Constructor Summary
`CardLayoutConverter()`

Method Summary
`Object` | `convertConstraintsAttribute(Attribute attr)` Converts CardLayout constraints.
`Object` | `convertConstraintsElement(Element element)` Returns always `null`.
`LayoutManager` | `convertLayoutAttribute(Attribute attr)` Creates a CardLayout instance.
`LayoutManager` | `convertLayoutElement(Element element)` Creates a CardLayout instance.
`String` | `getID()` Returns "cardlayout".

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CardLayoutConverter

    public CardLayoutConverter()

Method Detail

### getID

    public String getID()

  Returns "cardlayout".

  Specified by:
    `getID` in interface `LayoutConverter`

### convertLayoutAttribute

    public LayoutManager convertLayoutAttribute(Attribute attr)

  Creates a CardLayout instance.

  Examples for Valid XML attribute notations:

  - `layout="CardLayout"`
  - `layout="CardLayout(int hgap, int vgap)"`

  Specified by:
    `convertLayoutAttribute` in interface `LayoutConverter`

### convertLayoutElement

    public LayoutManager convertLayoutElement(Element element)

  Creates a CardLayout instance.

  Attributes:

  - `hgap` (optional): The horizontal gap.
  - `vgap` (optional): The vertical gap.

  Examples for Valid XML element notations:

  - `<layout type="CardLayout"/>`
  - `<layout type="CardLayout" hgap="10" vgap="20"/>`

  Specified by:
    `convertLayoutElement` in interface `LayoutConverter`

### convertConstraintsAttribute

    public Object convertConstraintsAttribute(Attribute attr)

  Converts CardLayout constraints. The attribute value is used as card name.

  Examples for Valid XML attribute notations:

  - `constraints="cardname"`

  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 2.0 beta 1 (#201)
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.