diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-07-23 00:24:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-07-23 00:24:14 +0000 |
commit | 8039a4ea734415951af932bb5dc93a9cbc5f13dc (patch) | |
tree | 015eb01267de18f0f0507f24597797582f311e45 /libjava/java/awt/Label.java | |
parent | 4eb00163ad2a600403a9b36fdc7a47fd79ce98e6 (diff) | |
download | gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.zip gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.tar.gz gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.tar.bz2 |
Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Updated for new files.
* java/awt/Adjustable.java (HORIZONTAL, VERTICAL): Set values.
* java/awt/Label.java: New file.
* java/awt/Rectangle.java (Rectangle): Extend Rectangle2D.
(createIntersection, createUnion, getBounds2D): New methods.
* java/awt/Scrollbar.java: New file.
* java/awt/Shape.java: Updated to 1.2.
* java/awt/geom/AffineTransform.java: New file.
* java/awt/geom/Ellipse2D.java: New file.
* java/awt/geom/NoninvertibleTransformException.java: New file.
* java/awt/geom/PathIterator.java: New file.
* java/awt/geom/Rectangle2D.java: New file.
* java/awt/geom/RectangularShape.java: New file.
* java/awt/geom/Point2D.java (Double, Float): New inner classes.
* java/awt/geom/IllegalPathStateException.java: New file.
From-SVN: r35195
Diffstat (limited to 'libjava/java/awt/Label.java')
-rw-r--r-- | libjava/java/awt/Label.java | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/libjava/java/awt/Label.java b/libjava/java/awt/Label.java new file mode 100644 index 0000000..230e568 --- /dev/null +++ b/libjava/java/awt/Label.java @@ -0,0 +1,76 @@ +/* Copyright (C) 2000 Free Software Foundation + + This file is part of libjava. + +This software is copyrighted work licensed under the terms of the +Libjava License. Please consult the file "LIBJAVA_LICENSE" for +details. */ + +package java.awt; + +/** + * @author Tom Tromey <tromey@cygnus.com> + * @date April 12, 2000 + */ + +/* Status: addNotify() not written. */ + +public class Label extends Component +{ + public static final int CENTER = 1; + public static final int LEFT = 0; + public static final int RIGHT = 2; + + public Label () + { + this ("", LEFT); + } + + public Label (String text) + { + this (text, LEFT); + } + + public Label (String text, int alignment) + { + if (alignment != CENTER && alignment != LEFT && alignment != RIGHT) + throw new IllegalArgumentException (); + this.text = text; + this.alignment = alignment; + } + + public void addNotify () + { + // FIXME + } + + public int getAlignment () + { + return alignment; + } + + public String getText () + { + return text; + } + + protected String paramString () + { + return "Label[" + alignment + "," + text + "]"; + } + + public void setAlignment (int alignment) + { + if (alignment != CENTER && alignment != LEFT && alignment != RIGHT) + throw new IllegalArgumentException (); + this.alignment = alignment; + } + + public void setText (String text) + { + this.text = text; + } + + private String text; + private int alignment; +} |