|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.CardLayout
A layout manager for a container that contains several 'cards'. Only one card is visible at a time, allowing you to flip through the cards.
Constructor Summary | |
CardLayout()
Creates a new card layout. |
|
CardLayout(int hgap,
int vgap)
Creates a card layout with the specified gaps. |
Method Summary | |
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component with the specified name to the layout. |
void |
first(Container parent)
Flip to the first card. |
void |
last(Container parent)
Flips to the last card of the specified container. |
void |
layoutContainer(Container parent)
Performs a layout in the specified panel. |
Dimension |
minimumLayoutSize(Container parent)
Calculates the minimum size for the specified panel. |
void |
next(Container parent)
Flips to the next card of the specified container. |
Dimension |
preferredLayoutSize(Container parent)
Calculates the preferred size for the specified panel. |
void |
previous(Container parent)
Flips to the previous card of the specified container. |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout. |
void |
show(Container parent,
String name)
Flips to the specified component name in the specified container. |
String |
toString()
Returns the String representation of this CardLayout's values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CardLayout()
public CardLayout(int hgap, int vgap)
hgap
- the horizontal gapvgap
- the vertical gapMethod Detail |
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- the name of the componentcomp
- the component to be addedpublic void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to be removedpublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
parent
- the name of the parent container
minimumLayoutSize(java.awt.Container)
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- the name of the parent container
preferredLayoutSize(java.awt.Container)
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- the name of the parent containerpublic void first(Container parent)
parent
- the name of the parent containerpublic void next(Container parent)
parent
- the name of the containerpublic void previous(Container parent)
parent
- the name of the parent containerpublic void last(Container parent)
parent
- the name of the parent containerpublic void show(Container parent, String name)
parent
- the name of the parent containername
- the component namepublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |