CardLayout (Java Platform SE 7 )

Methods

 

Modifier and Type
Method and Description

void
addLayoutComponent(Component comp,
Object constraints)

Adds the specified component to this card layout’s internal
table of names.

void
addLayoutComponent(String name,
Component comp)

Deprecated. 

replaced by
addLayoutComponent(Component, Object).

void
first(Container parent)

Flips to the first card of the container.

int
getHgap()

Gets the horizontal gap between components.

float
getLayoutAlignmentX(Container parent)

Returns the alignment along the x axis.

float
getLayoutAlignmentY(Container parent)

Returns the alignment along the y axis.

int
getVgap()

Gets the vertical gap between components.

void
invalidateLayout(Container target)

Invalidates the layout, indicating that if the layout manager
has cached information it should be discarded.

void
last(Container parent)

Flips to the last card of the container.

void
layoutContainer(Container parent)

Lays out the specified container using this card layout.

Dimension
maximumLayoutSize(Container target)

Returns the maximum dimensions for this layout given the components
in the specified target container.

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)

Determines the preferred size of the container argument using
this card layout.

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
setHgap(int hgap)

Sets the horizontal gap between components.

void
setVgap(int vgap)

Sets the vertical gap between components.

void
show(Container parent,
String name)

Flips to the component that was added to this layout with the
specified name, using addLayoutComponent.

String
toString()

Returns a string representation of the state of this card layout.