java.awt
Class CardLayout
java.lang.Object
|
+--java.awt.CardLayout
- public class CardLayout
- extends Object
- implements LayoutManager
A card layout displays the content of the container as
a stack of cards, where only one card (Componet) is visible,
the other cards are hidden. The show method moves a Component
to the top of the stack hiding the other Components.
CardLayout
public CardLayout()
addLayoutComponent
public void addLayoutComponent(String name,
Component card)
- Specified by:
- addLayoutComponent in interface LayoutManager
first
public void first(Container parent)
- Shows the first child component.
last
public void last(Container parent)
- Shows the last child component
layoutContainer
public void layoutContainer(Container parent)
- Specified by:
- layoutContainer in interface LayoutManager
minimumLayoutSize
public Dimension minimumLayoutSize(Container parent)
- Returns the minimum layout size. The minimum layout size of a
card layout is the maximum width and height of the minimum
layout sizes of all child components
- Specified by:
- minimumLayoutSize in interface LayoutManager
next
public void next(Container parent)
- Shows the next card
previous
public void previous(Container parent)
- Shows the previous card
show
public void show(Container parent,
String name)
- Shows the card with the given name (assigned in Container.add)
removeLayoutComponent
public void removeLayoutComponent(Component card)
- Specified by:
- removeLayoutComponent in interface LayoutManager