API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. CardLayout View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.42 03/28/06
Serial
Hierarchy
 Object
      CardLayout
Implements
 LayoutManager2
 Serializable
Subclasses
Description
public class CardLayout
  A CardLayout object is a layout manager for a container.
See also:    Container
Constructors
public CardLayout ()
Creates a new card layout with gaps of size zero.
public CardLayout (int hgap, int vgap)
  Creates a new card layout with the specified horizontal and vertical gaps.
Methods
Hide/Show inherited methods
public void addLayoutComponent (Component comp, Object constraints) [Specified in LayoutManager2]
  Adds the specified component to this card layout's internal table of names.
@Deprecated
public void addLayoutComponent (String name, Component comp)
pack-private void checkLayout (Container parent)
  Make sure that the Container really has a CardLayout installed.
public void first (Container parent)
  Flips to the first card of the container.
public int getHgap ()
  Gets the horizontal gap between components.
public float getLayoutAlignmentX (Container parent) [Specified in LayoutManager2]
  Returns the alignment along the x axis.
public float getLayoutAlignmentY (Container parent) [Specified in LayoutManager2]
  Returns the alignment along the y axis.
public int getVgap ()
  Gets the vertical gap between components.
public void invalidateLayout (Container target) [Specified in LayoutManager2]
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
public void last (Container parent)
  Flips to the last card of the container.
public void layoutContainer (Container parent)
  Lays out the specified container using this card layout.
public Dimension maximumLayoutSize (Container target) [Specified in LayoutManager2]
  Returns the maximum dimensions for this layout given the components in the specified target container.
public Dimension minimumLayoutSize (Container parent)
  Calculates the minimum size for the specified panel.
public void next (Container parent)
  Flips to the next card of the specified container.
public Dimension preferredLayoutSize (Container parent)
  Determines the preferred size of the container argument using this card layout.
public void previous (Container parent)
  Flips to the previous card of the specified container.
public void removeLayoutComponent (Component comp)
  Removes the specified component from the layout.
public void setHgap (int hgap)
  Sets the horizontal gap between components.
public void setVgap (int vgap)
  Sets the vertical gap between components.
public void show (Container parent, String name)
  Flips to the component that was added to this layout with the specified name, using addLayoutComponent.
pack-private void showDefaultComponent (Container parent)
public String toString ()
  Returns a string representation of the state of this card layout.
Fields
Hide/Show inherited fields
pack-private int currentCard
pack-private int hgap
pack-private Vector vector
pack-private int vgap
Nested Classes
  CardLayout.Card
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar