diff options
author | Michael Koch <mkoch@gcc.gnu.org> | 2004-04-20 11:13:09 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-04-20 11:13:09 +0000 |
commit | 23f0ecff4a6e9c554e4ddddf59d022e632810a72 (patch) | |
tree | 3d1d46584dcbc5ef07de3e01050fdd01c2d9563e /libjava/java/awt/image/SampleModel.java | |
parent | 2c4d54e6d07a0b3aab74c0a5bafe55f49dabb86d (diff) | |
download | gcc-23f0ecff4a6e9c554e4ddddf59d022e632810a72.zip gcc-23f0ecff4a6e9c554e4ddddf59d022e632810a72.tar.gz gcc-23f0ecff4a6e9c554e4ddddf59d022e632810a72.tar.bz2 |
[multiple changes]
2004-04-20 Ingo Proetel <proetel@aicas.com>
* java/awt/FontMetrics.java:
(charsWidth): fixed accumulation of total_width
(getWidth): simple default implementation
* java/awt/Polygon.java (getBoundingBox): Use correct y-coordinate
in Rectangle constructor.
* java/awt/image/Raster.java (toString): Added method.
* java/awt/image/SampleModel.java (<init>): Added error cause
information to thrown exception.
* java/awt/image/SinglePixelPackedSampleModel.java (getDataElements):
New method.
(setDataElements): New method.
(setPixels): New method.
(toString): New method.
2004-04-20 Sascha Brawer <brawer@dandelis.ch>
* java/awt/image/ComponentColorModel.java
(createCompatibleSampleModel): Return PixelInterleavedSampleModel
for TYPE_BYTE and TYPE_USHORT transferTypes, in order to pass the
Mauve tests on this method. Improved documentation.
From-SVN: r80894
Diffstat (limited to 'libjava/java/awt/image/SampleModel.java')
-rw-r--r-- | libjava/java/awt/image/SampleModel.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/java/awt/image/SampleModel.java b/libjava/java/awt/image/SampleModel.java index 219a871..a5d65ff 100644 --- a/libjava/java/awt/image/SampleModel.java +++ b/libjava/java/awt/image/SampleModel.java @@ -58,7 +58,9 @@ public abstract class SampleModel public SampleModel(int dataType, int w, int h, int numBands) { - if ((w<=0) || (h<=0)) throw new IllegalArgumentException(); + if ((w <= 0) || (h <= 0)) + throw new IllegalArgumentException((w <= 0 ? " width<=0" : " width is ok") + +(h <= 0 ? " height<=0" : " height is ok")); // FIXME: How can an int be greater than Integer.MAX_VALUE? // FIXME: How do we identify an unsupported data type? @@ -68,7 +70,7 @@ public abstract class SampleModel this.height = h; this.numBands = numBands; } - + public final int getWidth() { return width; |