SWIXML
1.6 (#161)

org.swixml.layoutconverters
Class CardLayoutConverter

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

Specified by:
convertLayoutAttribute in interface LayoutConverter

convertLayoutElement

public LayoutManager convertLayoutElement(Element element)

Creates a CardLayout instance.

Attributes:

Examples for Valid XML element notations:

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:

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.