< prev index next >

src/java.desktop/share/classes/java/awt/CardLayout.java

Print this page

        

*** 34,52 **** import java.io.ObjectOutputStream; import java.io.ObjectStreamField; import java.io.IOException; /** ! * A <code>CardLayout</code> object is a layout manager for a * container. It treats each component in the container as a card. * Only one card is visible at a time, and the container acts as * a stack of cards. The first component added to a ! * <code>CardLayout</code> object is the visible component when the * container is first displayed. * <p> * The ordering of cards is determined by the container's own internal ! * ordering of its component objects. <code>CardLayout</code> * defines a set of methods that allow an application to flip * through these cards sequentially, or to show a specified card. * The {@link CardLayout#addLayoutComponent} * method can be used to associate a string identifier with a given card * for fast random access. --- 34,52 ---- import java.io.ObjectOutputStream; import java.io.ObjectStreamField; import java.io.IOException; /** ! * A {@code CardLayout} object is a layout manager for a * container. It treats each component in the container as a card. * Only one card is visible at a time, and the container acts as * a stack of cards. The first component added to a ! * {@code CardLayout} object is the visible component when the * container is first displayed. * <p> * The ordering of cards is determined by the container's own internal ! * ordering of its component objects. {@code CardLayout} * defines a set of methods that allow an application to flip * through these cards sequentially, or to show a specified card. * The {@link CardLayout#addLayoutComponent} * method can be used to associate a string identifier with a given card * for fast random access.
*** 186,199 **** this.vgap = vgap; } /** * Adds the specified component to this card layout's internal ! * table of names. The object specified by <code>constraints</code> * must be a string. The card layout stores this string as a key-value * pair that can be used for random access to a particular card. ! * By calling the <code>show</code> method, an application can * display the component with the specified name. * @param comp the component to be added. * @param constraints a tag that identifies a particular * card in the layout. * @see java.awt.CardLayout#show(java.awt.Container, java.lang.String) --- 186,199 ---- this.vgap = vgap; } /** * Adds the specified component to this card layout's internal ! * table of names. The object specified by {@code constraints} * must be a string. The card layout stores this string as a key-value * pair that can be used for random access to a particular card. ! * By calling the {@code show} method, an application can * display the component with the specified name. * @param comp the component to be added. * @param constraints a tag that identifies a particular * card in the layout. * @see java.awt.CardLayout#show(java.awt.Container, java.lang.String)
*** 212,222 **** } } /** * @deprecated replaced by ! * <code>addLayoutComponent(Component, Object)</code>. */ @Deprecated public void addLayoutComponent(String name, Component comp) { synchronized (comp.getTreeLock()) { if (!vector.isEmpty()) { --- 212,222 ---- } } /** * @deprecated replaced by ! * {@code addLayoutComponent(Component, Object)}. */ @Deprecated public void addLayoutComponent(String name, Component comp) { synchronized (comp.getTreeLock()) { if (!vector.isEmpty()) {
*** 363,373 **** } /** * Lays out the specified container using this card layout. * <p> ! * Each component in the <code>parent</code> container is reshaped * to be the size of the container, minus space for surrounding * insets, horizontal gaps, and vertical gaps. * * @param parent the parent container in which to do the layout * @see java.awt.Container#doLayout --- 363,373 ---- } /** * Lays out the specified container using this card layout. * <p> ! * Each component in the {@code parent} container is reshaped * to be the size of the container, minus space for surrounding * insets, horizontal gaps, and vertical gaps. * * @param parent the parent container in which to do the layout * @see java.awt.Container#doLayout
*** 513,523 **** } } /** * Flips to the component that was added to this layout with the ! * specified <code>name</code>, using <code>addLayoutComponent</code>. * If no such component exists, then nothing happens. * @param parent the parent container in which to do the layout * @param name the component name * @see java.awt.CardLayout#addLayoutComponent(java.awt.Component, java.lang.Object) */ --- 513,523 ---- } } /** * Flips to the component that was added to this layout with the ! * specified {@code name}, using {@code addLayoutComponent}. * If no such component exists, then nothing happens. * @param parent the parent container in which to do the layout * @param name the component name * @see java.awt.CardLayout#addLayoutComponent(java.awt.Component, java.lang.Object) */
< prev index next >