org.wings
Class SCardLayout

java.lang.Object
  extended by org.wings.SAbstractLayoutManager
      extended by org.wings.SCardLayout
All Implemented Interfaces:
Serializable, Renderable, SConstants, SLayoutManager

public class SCardLayout
extends SAbstractLayoutManager

Swing-like card layout.

Author:
Armin Haaf
See Also:
Serialized Form

Field Summary
protected  HashMap tab
           
 
Fields inherited from class org.wings.SAbstractLayoutManager
border, cg, container, preferredSize
 
Fields inherited from interface org.wings.SConstants
BASELINE, BLOCK_ALIGN, BOTTOM, BOTTOM_ALIGN, CENTER, CENTER_ALIGN, HORIZONTAL, JUSTIFY, LEFT, LEFT_ALIGN, NO_ALIGN, RIGHT, RIGHT_ALIGN, TOP, TOP_ALIGN, UID_DIVIDER, VERTICAL
 
Constructor Summary
SCardLayout()
          Creates a new card layout
 
Method Summary
 void addComponent(SComponent c, Object constraint, int index)
          Adds a component to the layout manager
 void first(SContainer parent)
          Flips to the first card of the container.
 SComponent getVisibleComponent()
           
 Object getVisibleConstraint()
           
 void last(SContainer parent)
          Flips to the last card of the container.
 void next(SContainer parent)
          Flips to the next card of the specified container.
 void previous(SContainer parent)
          Flips to the previous card of the specified container.
 void removeComponent(SComponent c)
          Removes a component from the layout manager
 void show(Object constraint)
          Flips to the component
 void show(SComponent comp)
          Flips to the component
 void show(SContainer parent, Object name)
          Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
 
Methods inherited from class org.wings.SAbstractLayoutManager
getBorder, getCG, getContainer, getPreferredSize, setBorder, setCG, setContainer, setPreferredSize, updateCG, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tab

protected HashMap tab
Constructor Detail

SCardLayout

public SCardLayout()
Creates a new card layout

Method Detail

addComponent

public void addComponent(SComponent c,
                         Object constraint,
                         int index)
Description copied from interface: SLayoutManager
Adds a component to the layout manager

Parameters:
c - The new component
constraint - A (sometimes optional) constraint object

removeComponent

public void removeComponent(SComponent c)
Description copied from interface: SLayoutManager
Removes a component from the layout manager

Parameters:
c - The new component

first

public void first(SContainer parent)
Flips to the first card of the container.

Parameters:
parent - the name of the parent container in which to do the layout.

next

public void next(SContainer parent)
Flips to the next card of the specified container. If the currently visible card is the last one, this method flips to the first card in the layout.

Parameters:
parent - the name of the parent container in which to do the layout.

previous

public void previous(SContainer parent)
Flips to the previous card of the specified container. If the currently visible card is the first one, this method flips to the last card in the layout.

Parameters:
parent - the name of the parent container in which to do the layout.

last

public void last(SContainer parent)
Flips to the last card of the container.

Parameters:
parent - the name of the parent container in which to do the layout.

show

public void show(SComponent comp)
Flips to the component


show

public void show(Object constraint)
Flips to the component


show

public void show(SContainer parent,
                 Object name)
Flips to the component that was added to this layout with the specified name, using addLayoutComponent. If no such component exists, then nothing happens.

Parameters:
parent - the name of the parent container in which to do the layout.
name - the component name.

getVisibleComponent

public SComponent getVisibleComponent()

getVisibleConstraint

public Object getVisibleConstraint()


wingS Swings ;-)