diff options
Diffstat (limited to 'libjava/java/awt/Scrollbar.java')
-rw-r--r-- | libjava/java/awt/Scrollbar.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libjava/java/awt/Scrollbar.java b/libjava/java/awt/Scrollbar.java index 1f1875955bf..4bdc3166ad9 100644 --- a/libjava/java/awt/Scrollbar.java +++ b/libjava/java/awt/Scrollbar.java @@ -1,5 +1,5 @@ /* Scrollbar.java -- AWT Scrollbar widget - Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,9 +40,10 @@ package java.awt; import java.awt.peer.ScrollbarPeer; import java.awt.peer.ComponentPeer; - import java.awt.event.AdjustmentListener; import java.awt.event.AdjustmentEvent; +import java.io.Serializable; +import javax.accessibility.Accessible; /** * This class implements a scrollbar widget. @@ -50,8 +51,9 @@ import java.awt.event.AdjustmentEvent; * @author Aaron M. Renn (arenn@urbanophile.com) * @author Tom Tromey <tromey@cygnus.com> */ -public class Scrollbar extends Component implements Adjustable, - java.io.Serializable +public class Scrollbar extends Component implements Accessible, + Adjustable, + Serializable { // FIXME: Serialization readObject/writeObject @@ -126,7 +128,9 @@ private AdjustmentListener adjustment_listeners; /** * Initializes a new instance of <code>Scrollbar</code> with a - * veritical orientation and default values for all other parameters. + * vertical orientation and default values for all other parameters. + * + * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true, */ public Scrollbar() @@ -145,6 +149,7 @@ Scrollbar() * * @param orientation The orientation of this scrollbar. * + * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true, * @exception IllegalArgumentException If the orientation value is not valid. */ public @@ -168,12 +173,16 @@ Scrollbar(int orientation) throws IllegalArgumentException * @param minimum The minimum value of the scrollbar. * @param maximum The maximum value of the scrollbar. * + * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true, * @exception IllegalArgumentException If the orientation value is not valid. */ public Scrollbar(int orientation, int value, int visibleAmount, int minimum, int maximum) throws IllegalArgumentException { + if (GraphicsEnvironment.isHeadless()) + throw new HeadlessException (); + if ((orientation != HORIZONTAL) && (orientation != VERTICAL)) throw new IllegalArgumentException("Bad orientation value: " + orientation); |