diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-10 21:46:48 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-10 21:46:48 +0000 |
commit | ce57ab760f69de6db452def7ffbf5b114a2d8694 (patch) | |
tree | ea38c56431c5d4528fb54254c3f8e50f517bede3 /libjava/classpath/javax/swing/SpringLayout.java | |
parent | 50996fe55769882de3f410896032c887f0ff0d04 (diff) | |
download | gcc-ce57ab760f69de6db452def7ffbf5b114a2d8694.tar.gz |
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/SpringLayout.java')
-rw-r--r-- | libjava/classpath/javax/swing/SpringLayout.java | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/libjava/classpath/javax/swing/SpringLayout.java b/libjava/classpath/javax/swing/SpringLayout.java index 592cc0e02a9..8d46a736a58 100644 --- a/libjava/classpath/javax/swing/SpringLayout.java +++ b/libjava/classpath/javax/swing/SpringLayout.java @@ -1,5 +1,5 @@ /* SpringLayout.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -150,6 +150,25 @@ public class SpringLayout implements LayoutManager2 } /** + * Create a new Constraints object which tracks the indicated + * component. The x and y positions for this Constraints object + * are constant Springs created with the component's location at + * the time this constructor is called. The width and height + * of this Constraints are Springs created using + * {@link Spring#width(Component)} and {@link Spring#height(Component)}, + * respectively. + * @param component the component to track + * @since 1.5 + */ + public Constraints(Component component) + { + this(Spring.constant(component.getX()), + Spring.constant(component.getY()), + Spring.width(component), + Spring.height(component)); + } + + /** * Returns the constraint for the edge with the <code>edgeName</code>. * This is expected to be one of * {@link #EAST}, {@link #WEST}, {@link #NORTH} or {@link #SOUTH}. @@ -343,8 +362,8 @@ public class SpringLayout implements LayoutManager2 /** * Adds a layout component and a constraint object to this layout. - * This method is usually only called by a {@java.awt.Container}s add - * Method. + * This method is usually only called by a {@link java.awt.Container}s add + * method. * * @param component the component to be added. * @param constraint the constraint to be set. @@ -357,8 +376,8 @@ public class SpringLayout implements LayoutManager2 /** * Adds a layout component and a constraint object to this layout. - * This method is usually only called by a {@java.awt.Container}s add - * Method. This method does nothing, since SpringLayout does not manage + * This method is usually only called by a {@link java.awt.Container}s add + * method. This method does nothing, since SpringLayout does not manage * String-indexed components. * * @param name the name. |