diff options
| author | Michael Koch <konqueror@gmx.de> | 2004-11-17 08:03:59 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2004-11-17 08:03:59 +0000 |
| commit | 9b79876c3f0a5e48e374413abeddcbcf71a993f9 (patch) | |
| tree | de98ad21803ae35eceeda3b194657d098bbf566c /java/awt/CardLayout.java | |
| parent | 7994a5e601f22e229434cf486f672647ede9020e (diff) | |
| download | classpath-9b79876c3f0a5e48e374413abeddcbcf71a993f9.tar.gz | |
2004-11-17 Michael Koch <konqueror@gmx.de>
* java/awt/CardLayout.java,
java/awt/Component.java,
java/awt/Font.java,
java/awt/image/SinglePixelPackedSampleModel.java:
Fixed javadocs and argument names all over.
Diffstat (limited to 'java/awt/CardLayout.java')
| -rw-r--r-- | java/awt/CardLayout.java | 100 |
1 files changed, 78 insertions, 22 deletions
diff --git a/java/awt/CardLayout.java b/java/awt/CardLayout.java index 6e17daab1..85999aab4 100644 --- a/java/awt/CardLayout.java +++ b/java/awt/CardLayout.java @@ -42,12 +42,13 @@ import java.io.Serializable; import java.util.Enumeration; import java.util.Hashtable; -/** This class implements a card-based layout scheme. Each included +/** + * This class implements a card-based layout scheme. Each included * component is treated as a card. Only one card can be shown at a * time. This class includes methods for changing which card is * shown. * - * @author Tom Tromey <tromey@redhat.com> + * @author Tom Tromey (tromey@redhat.com) * @author Aaron M. Renn (arenn@urbanophile.com) */ public class CardLayout implements LayoutManager2, Serializable @@ -66,6 +67,7 @@ public class CardLayout implements LayoutManager2, Serializable /** * Create a new <code>CardLayout</code> object with the specified * horizontal and vertical gaps. + * * @param hgap The horizontal gap * @param vgap The vertical gap */ @@ -76,11 +78,14 @@ public class CardLayout implements LayoutManager2, Serializable this.tab = new Hashtable (); } - /** Add a new component to the layout. The constraint must be a + /** + * Add a new component to the layout. The constraint must be a * string which is used to name the component. This string can * later be used to refer to the particular component. + * * @param comp The component to add * @param constraints The name by which the component can later be called + * * @exception IllegalArgumentException If `constraints' is not a * <code>String</code> */ @@ -92,10 +97,13 @@ public class CardLayout implements LayoutManager2, Serializable addLayoutComponent ((String) constraints, comp); } - /** Add a new component to the layout. The name can be used later + /** + * Add a new component to the layout. The name can be used later * to refer to the component. + * * @param name The name by which the component can later be called * @param comp The component to add + * * @deprecated This method is deprecated in favor of * <code>addLayoutComponent(Component, Object)</code>. */ @@ -109,7 +117,9 @@ public class CardLayout implements LayoutManager2, Serializable comp.setVisible(false); } - /** Cause the first component in the container to be displayed. + /** + * Cause the first component in the container to be displayed. + * * @param parent The parent container */ public void first (Container parent) @@ -117,43 +127,63 @@ public class CardLayout implements LayoutManager2, Serializable gotoComponent (parent, FIRST); } - /** Return this layout manager's horizontal gap. */ + /** + * Return this layout manager's horizontal gap. + * + * @return the horizontal gap + */ public int getHgap () { return hgap; } - /** Return this layout manager's x alignment. This method always + /** + * Return this layout manager's x alignment. This method always * returns Component.CENTER_ALIGNMENT. + * * @param parent Container using this layout manager instance + * + * @return the x-axis alignment */ public float getLayoutAlignmentX (Container parent) { return Component.CENTER_ALIGNMENT; } - /** Returns this layout manager's y alignment. This method always + /** + * Returns this layout manager's y alignment. This method always * returns Component.CENTER_ALIGNMENT. + * * @param parent Container using this layout manager instance + * + * @return the y-axis alignment */ public float getLayoutAlignmentY (Container parent) { return Component.CENTER_ALIGNMENT; } - /** Return this layout manager's vertical gap. */ + /** + * Return this layout manager's vertical gap. + * + * @return the vertical gap + */ public int getVgap () { return vgap; } - /** Invalidate this layout manager's state. */ + /** + * Invalidate this layout manager's state. + */ public void invalidateLayout (Container target) { // Do nothing. } - /** Cause the last component in the container to be displayed. + /** + * Cause the last component in the container to be displayed. + * * @param parent The parent container */ public void last (Container parent) @@ -189,8 +219,12 @@ public class CardLayout implements LayoutManager2, Serializable } } - /** Get the maximum layout size of the container. + /** + * Get the maximum layout size of the container. + * * @param target The parent container + * + * @return the maximum layout size */ public Dimension maximumLayoutSize (Container target) { @@ -199,17 +233,23 @@ public class CardLayout implements LayoutManager2, Serializable return getSize (target, MAX); } - /** Get the minimum layout size of the container. + /** + * Get the minimum layout size of the container. + * * @param target The parent container + * + * @return the minimum layout size */ public Dimension minimumLayoutSize (Container target) { return getSize (target, MIN); } - /** Cause the next component in the container to be displayed. If + /** + * Cause the next component in the container to be displayed. If * this current card is the last one in the deck, the first * component is displayed. + * * @param parent The parent container */ public void next (Container parent) @@ -217,17 +257,23 @@ public class CardLayout implements LayoutManager2, Serializable gotoComponent (parent, NEXT); } - /** Get the preferred layout size of the container. - * @param target The parent container + /** + * Get the preferred layout size of the container. + * + * @param parent The parent container + * + * @return the preferred layout size */ public Dimension preferredLayoutSize (Container parent) { return getSize (parent, PREF); } - /** Cause the previous component in the container to be displayed. + /** + * Cause the previous component in the container to be displayed. * If this current card is the first one in the deck, the last * component is displayed. + * * @param parent The parent container */ public void previous (Container parent) @@ -235,7 +281,9 @@ public class CardLayout implements LayoutManager2, Serializable gotoComponent (parent, PREV); } - /** Remove the indicated component from this layout manager. + /** + * Remove the indicated component from this layout manager. + * * @param comp The component to remove */ public void removeLayoutComponent (Component comp) @@ -254,7 +302,9 @@ public class CardLayout implements LayoutManager2, Serializable } } - /** Set this layout manager's horizontal gap. + /** + * Set this layout manager's horizontal gap. + * * @param hgap The new gap */ public void setHgap (int hgap) @@ -262,7 +312,9 @@ public class CardLayout implements LayoutManager2, Serializable this.hgap = hgap; } - /** Set this layout manager's vertical gap. + /** + * Set this layout manager's vertical gap. + * * @param vgap The new gap */ public void setVgap (int vgap) @@ -270,8 +322,10 @@ public class CardLayout implements LayoutManager2, Serializable this.vgap = vgap; } - /** Cause the named component to be shown. If the component name is + /** + * Cause the named component to be shown. If the component name is * unknown, this method does nothing. + * * @param parent The parent container * @param name The name of the component to show */ @@ -306,7 +360,9 @@ public class CardLayout implements LayoutManager2, Serializable return getClass ().getName () + "[" + hgap + "," + vgap + "]"; } - /** This implements first(), last(), next(), and previous(). + /** + * This implements first(), last(), next(), and previous(). + * * @param parent The parent container * @param what The type of goto: FIRST, LAST, NEXT or PREV */ |
