diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 17:48:57 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 17:48:57 +0000 |
commit | 7eca7250251383a82960d3a74bbccfc92074f146 (patch) | |
tree | bfe1c97257f1ae4056d3070f59ee9592c29432f0 /libjava/gnu | |
parent | 6b9d2769c968b617009094864bbe4e6e03b621e2 (diff) | |
download | gcc-7eca7250251383a82960d3a74bbccfc92074f146.tar.gz |
2004-10-16 Michael Koch <konqueror@gmx.de>
* gnu/java/beans/ExplicitBeanInfo.java:
Explicitely import java.awt.Image.
(getIcon): Fixed off-by-one error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu')
-rw-r--r-- | libjava/gnu/java/beans/ExplicitBeanInfo.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libjava/gnu/java/beans/ExplicitBeanInfo.java b/libjava/gnu/java/beans/ExplicitBeanInfo.java index 410be70cd2c..6746bd8ccae 100644 --- a/libjava/gnu/java/beans/ExplicitBeanInfo.java +++ b/libjava/gnu/java/beans/ExplicitBeanInfo.java @@ -1,5 +1,5 @@ -/* gnu.java.beans.ExplicitBeanInfo - Copyright (C) 1998 Free Software Foundation, Inc. +/* ExplicitBeanInfo.java -- + Copyright (C) 1998, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -38,6 +38,7 @@ exception statement from your version. */ package gnu.java.beans; +import java.awt.Image; import java.beans.BeanDescriptor; import java.beans.BeanInfo; import java.beans.EventSetDescriptor; @@ -84,7 +85,7 @@ public class ExplicitBeanInfo implements BeanInfo { protected BeanInfo[] additionalBeanInfo; /** The set of icons. **/ - protected java.awt.Image[] icons; + protected Image[] icons; public ExplicitBeanInfo(BeanDescriptor beanDescriptor, BeanInfo[] additionalBeanInfo, @@ -93,7 +94,7 @@ public class ExplicitBeanInfo implements BeanInfo { EventSetDescriptor[] eventSetDescriptors, int defaultEventIndex, MethodDescriptor[] methodDescriptors, - java.awt.Image[] icons) { + Image[] icons) { this.beanDescriptor = beanDescriptor; this.additionalBeanInfo = additionalBeanInfo; this.propertyDescriptors = propertyDescriptors; @@ -142,7 +143,7 @@ public class ExplicitBeanInfo implements BeanInfo { /** Get Bean icons. ** @param iconType the type of icon **/ - public java.awt.Image getIcon(int iconType) { - return icons != null ? icons[iconType] : null; + public Image getIcon(int iconType) { + return icons != null ? icons[iconType - 1] : null; } } |