diff options
| author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2004-02-03 17:10:56 +0000 |
|---|---|---|
| committer | Thomas Fitzsimmons <fitzsim@gcc.gnu.org> | 2004-02-03 17:10:56 +0000 |
| commit | b6d3cb37ef676c2439fdf9498e4dbe8042fb3c6a (patch) | |
| tree | 69b793f3808108f9a710a0f4875efb2e7eea8892 /libjava/java/awt/BorderLayout.java | |
| parent | 5a98fa7bdb847dc92fdbeddf4dfcff51835aca48 (diff) | |
GtkListPeer.java, [...]: Fix handling of alias methods...
2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java,
java/awt/BorderLayout.java, java/awt/CardLayout.java,
java/awt/CheckboxGroup.java, java/awt/Choice.java,
java/awt/Component.java, java/awt/Container.java,
java/awt/FontMetrics.java, java/awt/GridBagLayout.java,
java/awt/LayoutManager2.java, java/awt/List.java,
java/awt/Menu.java, java/awt/MenuBar.java,
java/awt/MenuItem.java, java/awt/Polygon.java,
java/awt/Rectangle.java, java/awt/ScrollPane.java,
java/awt/Scrollbar.java, java/awt/TextArea.java,
java/awt/TextField.java,
java/awt/image/renderable/RenderContext.java,
javax/swing/JApplet.java: Fix handling of alias methods, where a
method has been deprecated in favour of a new one with the same
funtion but a different name. Put the method implementation in
the deprecated method and have the new method call the
deprecated one. Make all other code call the new method.
From-SVN: r77178
Diffstat (limited to 'libjava/java/awt/BorderLayout.java')
| -rw-r--r-- | libjava/java/awt/BorderLayout.java | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/libjava/java/awt/BorderLayout.java b/libjava/java/awt/BorderLayout.java index 930773f0142..5033bcf7ab2 100644 --- a/libjava/java/awt/BorderLayout.java +++ b/libjava/java/awt/BorderLayout.java @@ -349,7 +349,28 @@ addLayoutComponent(Component component, Object constraints) if (constraints != null && ! (constraints instanceof String)) throw new IllegalArgumentException("Constraint must be a string"); - String str = (String)constraints; + addLayoutComponent((String) constraints, component); +} + +/*************************************************************************/ + +/** + * Adds a component to the layout in the specified constraint position, + * which must be one of the string constants defined in this class. + * + * @param constraints The constraint string. + * @param component The component to add. + * + * @exception IllegalArgumentException If the constraint object is not + * one of the specified constants in this class. + * + * @deprecated This method is deprecated in favor of + * <code>addLayoutComponent(Component, Object)</code>. + */ +public void +addLayoutComponent(String constraints, Component component) +{ + String str = constraints; if (str == null || str.equals(CENTER)) center = component; @@ -376,27 +397,6 @@ addLayoutComponent(Component component, Object constraints) /*************************************************************************/ /** - * Adds a component to the layout in the specified constraint position, - * which must be one of the string constants defined in this class. - * - * @param constraints The constraint string. - * @param component The component to add. - * - * @exception IllegalArgumentException If the constraint object is not - * one of the specified constants in this class. - * - * @deprecated This method is deprecated in favor of - * <code>addLayoutComponent(Component, Object)</code>. - */ -public void -addLayoutComponent(String constraints, Component component) -{ - addLayoutComponent(component, constraints); -} - -/*************************************************************************/ - -/** * Removes the specified component from the layout. * * @param component The component to remove from the layout. |
