From 64089cc9f030d8ef7972adb5d117e0b23f47d62b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 18 May 2006 17:29:21 +0000 Subject: Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113887 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../javax/swing/border/AbstractBorder.java | 55 ++++++++++++++-------- .../classpath/javax/swing/border/BevelBorder.java | 18 +++++++ .../javax/swing/border/CompoundBorder.java | 4 ++ .../classpath/javax/swing/border/EtchedBorder.java | 10 ++++ .../classpath/javax/swing/border/LineBorder.java | 16 +++++-- .../classpath/javax/swing/border/MatteBorder.java | 4 ++ .../classpath/javax/swing/border/TitledBorder.java | 10 +++- 7 files changed, 92 insertions(+), 25 deletions(-) (limited to 'libjava/classpath/javax/swing/border') diff --git a/libjava/classpath/javax/swing/border/AbstractBorder.java b/libjava/classpath/javax/swing/border/AbstractBorder.java index 7cbbcdaa83b..c995de1c202 100644 --- a/libjava/classpath/javax/swing/border/AbstractBorder.java +++ b/libjava/classpath/javax/swing/border/AbstractBorder.java @@ -1,5 +1,5 @@ /* AbstractBorder.java -- - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -68,7 +68,7 @@ public abstract class AbstractBorder implements Border, Serializable * Performs nothing, because the default implementation provided by * this class is an invisible, zero-width border. Subclasses will * likely want to override this method, but they are not required - * for doing so. + * to do so. * * @param c the component whose border is to be painted. * @param g the graphics for painting. @@ -87,9 +87,11 @@ public abstract class AbstractBorder implements Border, Serializable } /** - * Measures the width of this border. + * Returns the insets required for drawing this border around the specified + * component. * - * @param c the component whose border is to be measured. + * @param c the component that the border applies to (ignored here, + * subclasses may use it). * * @return an Insets object whose left, right, * top and bottom fields indicate the @@ -104,16 +106,23 @@ public abstract class AbstractBorder implements Border, Serializable } /** - * Determines the insets of this border. The implementation provided - * by AbstractButton sets the left, right, - * top and bottom fields of the passed - * insets parameter to zero. + * Returns the insets required for drawing this border around the specified + * component. The default implementation provided here sets the + * left, right, top and + * bottom fields of the passed insets parameter to + * zero. * - * @param c the component whose border is to be measured + * @param c the component that the border applies to (ignored here, + * subclasses may use it). + * @param insets an instance that will be overwritten and returned as the + * result (null not permitted). * - * @return the same object that was passed for insets + * @return The border insets (the same object that was passed as the + * insets argument). * * @see #getBorderInsets(Component) + * + * @throws NullPointerException if insets is null. */ public Insets getBorderInsets(Component c, Insets insets) { @@ -126,7 +135,7 @@ public abstract class AbstractBorder implements Border, Serializable * fills every pixel in its area when painting. Partially * translucent borders must return false, or ugly * artifacts can appear on screen. The default implementation - * provided by AbstractBorder always returns false. + * provided here always returns false. * * @return false. */ @@ -136,9 +145,9 @@ public abstract class AbstractBorder implements Border, Serializable } /** - * Returns a rectangle that covers the specified area minus this - * border. Components that wish to determine an area into which - * they can safely draw without intersecting with a border might + * Returns a rectangle that covers the specified area minus the insets + * required to draw this border. Components that wish to determine an area + * into which they can safely draw without intersecting with a border might * want to use this helper method. * * @param c the component in the center of this border. @@ -146,24 +155,30 @@ public abstract class AbstractBorder implements Border, Serializable * @param y the vertical position of the border. * @param width the width of the available area for the border. * @param height the height of the available area for the border. + * + * @return The interior rectangle. */ public Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height) { - return getInteriorRectangle (c, this, x, y, width, height); + return getInteriorRectangle(c, this, x, y, width, height); } /** - * Returns a rectangle that covers the specified area minus a - * border. Components that wish to determine an area into which - * they can safely draw without intersecting with a border might - * want to use this helper method. + * Returns a rectangle that covers the specified area minus the insets + * required to draw the specified border (if the border is null, + * zero insets are assumed). Components that wish to determine an area into + * which they can safely draw without intersecting with a border might want + * to use this helper method. * * @param c the component in the center of this border. + * @param b the border (null permitted). * @param x the horizontal position of the border. * @param y the vertical position of the border. * @param width the width of the available area for the border. * @param height the height of the available area for the border. + * + * @return The interior rectangle. */ public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) @@ -172,7 +187,7 @@ public abstract class AbstractBorder implements Border, Serializable if (b != null) { - borderInsets = b.getBorderInsets (c); + borderInsets = b.getBorderInsets(c); x += borderInsets.left; y += borderInsets.top; width -= borderInsets.left + borderInsets.right; diff --git a/libjava/classpath/javax/swing/border/BevelBorder.java b/libjava/classpath/javax/swing/border/BevelBorder.java index 45b758cae41..403c35c045e 100644 --- a/libjava/classpath/javax/swing/border/BevelBorder.java +++ b/libjava/classpath/javax/swing/border/BevelBorder.java @@ -305,6 +305,8 @@ public class BevelBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The color. + * * @see #getHighlightInnerColor(java.awt.Component) * @see java.awt.Color#brighter() */ @@ -326,6 +328,8 @@ public class BevelBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The color. + * * @see java.awt.Component#getBackground() * @see java.awt.Color#brighter() */ @@ -347,6 +351,8 @@ public class BevelBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The color. + * * @see java.awt.Component#getBackground() * @see java.awt.Color#darker() */ @@ -367,6 +373,8 @@ public class BevelBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The color. + * * @see #getShadowInnerColor(java.awt.Component) * @see java.awt.Color#darker() */ @@ -384,6 +392,8 @@ public class BevelBorder extends AbstractBorder * highlighted edges when painting the border, or null * if that color will be derived from the background of the enclosed * Component. + * + * @return The color (possibly null). */ public Color getHighlightOuterColor() { @@ -396,6 +406,8 @@ public class BevelBorder extends AbstractBorder * highlighted edges when painting the border, or null * if that color will be derived from the background of the enclosed * Component. + * + * @return The color (possibly null). */ public Color getHighlightInnerColor() { @@ -408,6 +420,8 @@ public class BevelBorder extends AbstractBorder * shadowed edges when painting the border, or null if * that color will be derived from the background of the enclosed * Component. + * + * @return The color (possibly null). */ public Color getShadowInnerColor() { @@ -420,6 +434,8 @@ public class BevelBorder extends AbstractBorder * shadowed edges when painting the border, or null if * that color will be derived from the background of the enclosed * Component. + * + * @return The color (possibly null). */ public Color getShadowOuterColor() { @@ -430,6 +446,8 @@ public class BevelBorder extends AbstractBorder /** * Returns the appearance of this border, which is either {@link * #RAISED} or {@link #LOWERED}. + * + * @return The bevel type ({@link #RAISED} or {@link #LOWERED}). */ public int getBevelType() { diff --git a/libjava/classpath/javax/swing/border/CompoundBorder.java b/libjava/classpath/javax/swing/border/CompoundBorder.java index 998a9bab3bd..a69c5e20aeb 100644 --- a/libjava/classpath/javax/swing/border/CompoundBorder.java +++ b/libjava/classpath/javax/swing/border/CompoundBorder.java @@ -224,6 +224,8 @@ public class CompoundBorder extends AbstractBorder * Returns the outside border, which is painted outside both the * bordered Component and the inside border. It is valid for the * result to be null. + * + * @return The outside border (possibly null). */ public Border getOutsideBorder() { @@ -234,6 +236,8 @@ public class CompoundBorder extends AbstractBorder * Returns the inside border, which is painted between the bordered * Component and the outside border. It is valid for the result to * be null. + * + * @return The inside border (possibly null). */ public Border getInsideBorder () { diff --git a/libjava/classpath/javax/swing/border/EtchedBorder.java b/libjava/classpath/javax/swing/border/EtchedBorder.java index 22882b78cb1..cd48b18dad3 100644 --- a/libjava/classpath/javax/swing/border/EtchedBorder.java +++ b/libjava/classpath/javax/swing/border/EtchedBorder.java @@ -281,6 +281,8 @@ public class EtchedBorder extends AbstractBorder /** * Returns the appearance of this EtchedBorder, which is either * {@link #RAISED} or {@link #LOWERED}. + * + * @return The type ({@link #RAISED} or {@link #LOWERED}). */ public int getEtchType() { @@ -297,6 +299,8 @@ public class EtchedBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The color. + * * @see java.awt.Component#getBackground() * @see java.awt.Color#brighter() */ @@ -312,6 +316,8 @@ public class EtchedBorder extends AbstractBorder * Returns the color that will be used for highlighted parts when * painting the border, or null if that color will be * derived from the background of the enclosed Component. + * + * @return The highlight color (possibly null). */ public Color getHighlightColor() { @@ -328,6 +334,8 @@ public class EtchedBorder extends AbstractBorder * * @param c the component enclosed by this border. * + * @return The shadow color. + * * @see java.awt.Component#getBackground() * @see java.awt.Color#darker() */ @@ -344,6 +352,8 @@ public class EtchedBorder extends AbstractBorder * Returns the color that will be used for shadowed parts when * painting the border, or null if that color will be * derived from the background of the enclosed Component. + * + * @return The shadow color (possibly null). */ public Color getShadowColor() { diff --git a/libjava/classpath/javax/swing/border/LineBorder.java b/libjava/classpath/javax/swing/border/LineBorder.java index 36abddd915d..31e19fe1f2e 100644 --- a/libjava/classpath/javax/swing/border/LineBorder.java +++ b/libjava/classpath/javax/swing/border/LineBorder.java @@ -162,8 +162,10 @@ public class LineBorder extends AbstractBorder /** - * Returns a black, one pixel thick, plain LineBorder. The method - * may always return the same (singleton) LineBorder instance. + * Returns a black, one pixel thick, plain {@link LineBorder}. The method + * may always return the same (singleton) {@link LineBorder} instance. + * + * @return The border. */ public static Border createBlackLineBorder() { @@ -178,8 +180,10 @@ public class LineBorder extends AbstractBorder /** - * Returns a gray, one pixel thick, plain LineBorder. The method - * may always return the same (singleton) LineBorder instance. + * Returns a gray, one pixel thick, plain {@link LineBorder}. The method + * may always return the same (singleton) {@link LineBorder} instance. + * + * @return The border. */ public static Border createGrayLineBorder() { @@ -295,6 +299,8 @@ public class LineBorder extends AbstractBorder /** * Returns the color of the line. + * + * @return The line color (never null). */ public Color getLineColor() { @@ -304,6 +310,8 @@ public class LineBorder extends AbstractBorder /** * Returns the thickness of the line in pixels. + * + * @return The line thickness (in pixels). */ public int getThickness() { diff --git a/libjava/classpath/javax/swing/border/MatteBorder.java b/libjava/classpath/javax/swing/border/MatteBorder.java index 4d5b8c25360..114cac62338 100644 --- a/libjava/classpath/javax/swing/border/MatteBorder.java +++ b/libjava/classpath/javax/swing/border/MatteBorder.java @@ -299,6 +299,8 @@ public class MatteBorder extends EmptyBorder * Returns the color that is used for filling the border, or * null if the border is filled with repetitions of a * tile icon. + * + * @return The color (possibly null). */ public Color getMatteColor() { @@ -310,6 +312,8 @@ public class MatteBorder extends EmptyBorder * Returns the icon is used for tiling the border, or * null if the border is filled with a color instead of * an icon. + * + * @return The icon (possibly null). */ public Icon getTileIcon() { diff --git a/libjava/classpath/javax/swing/border/TitledBorder.java b/libjava/classpath/javax/swing/border/TitledBorder.java index 8d3ee13d4bb..38b57542334 100644 --- a/libjava/classpath/javax/swing/border/TitledBorder.java +++ b/libjava/classpath/javax/swing/border/TitledBorder.java @@ -912,8 +912,10 @@ public class TitledBorder extends AbstractBorder * Calculates the minimum size needed for displaying the border * and its title. * - * @param c the Component for which this TitledBorder consitutes + * @param c the Component for which this TitledBorder constitutes * a border. + * + * @return The minimum size. */ public Dimension getMinimumSize(Component c) { @@ -980,6 +982,10 @@ public class TitledBorder extends AbstractBorder /** * Performs various measurements for the current state of this TitledBorder * and the given Component. + * + * @param c the component (null not permitted). + * + * @return Various measurements. */ private Measurements getMeasurements(Component c) { @@ -1172,6 +1178,8 @@ public class TitledBorder extends AbstractBorder /** * Calculates the minimum size needed for displaying the border * and its title. Used by {@link TitledBorder#getMinimumSize(Component)}. + * + * @return The minimum size. */ public Dimension getMinimumSize() { -- cgit v1.2.1