[multiple changes]

2002-03-24  Eric Blake  <ebb9@email.byu.edu>

        * java/beans/IntrospectionException.java: Update to 1.4.
        * java/beans/PropertyVetoException.java: Ditto.

2002-03-24  Eric Blake  <ebb9@email.byu.edu>

        * gnu/java/beans/BeanInfoEmbryo.java (hasMethod): Use
        Arrays.equals instead of ArrayHelper.equalsArray.

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: added new static final fields
        introduced in 1.2, lots of other updates remain to be done

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: reformatting

2002-03-24  C. Brian Jones <cbj@gnu.org>

        * java/beans/Introspector.java: default beanInfoSearchPath will
        not include sun.beans.infos given we provide no such package and
        the API doesn't really require it; gnu.java.beans.info is the
        default.

2002-03-24  Mark Wielaard  <mark@klomp.org>

        Thanks to Orp developers
        * gnu/java/beans/editors/NativeBooleanEditor.java (setAsText(String)):
        switch TRUE and FALSE return values.

From-SVN: r51273
This commit is contained in:
Mark Wielaard 2002-03-24 21:32:14 +00:00
parent 3ddbb8a977
commit c9be3825b3
6 changed files with 594 additions and 438 deletions

View file

@ -1,5 +1,5 @@
/* gnu.java.beans.BeanInfoEmbryo
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -130,14 +130,15 @@ public class BeanInfoEmbryo {
}
public boolean hasMethod(MethodDescriptor m) {
for(int i=0;i<methods.size();i++) {
Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod();
if(m.getMethod().getName().equals(thisMethod.getName())
&& ArrayHelper.equalsArray(m.getMethod().getParameterTypes(), thisMethod.getParameterTypes())) {
return true;
}
}
return false;
for(int i=0;i<methods.size();i++) {
Method thisMethod = ((MethodDescriptor)methods.elementAt(i)).getMethod();
if(m.getMethod().getName().equals(thisMethod.getName())
&& Arrays.equals(m.getMethod().getParameterTypes(),
thisMethod.getParameterTypes())) {
return true;
}
}
return false;
}
public void addMethod(MethodDescriptor m) {
methods.addElement(m);

View file

@ -1,5 +1,5 @@
/* gnu.java.beans.editors.NativeBooleanEditor
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -54,12 +54,15 @@ import java.beans.*;
public class NativeBooleanEditor extends PropertyEditorSupport {
String[] tags = {"true","false"};
/** setAsText for boolean checks for true or false or t or f. "" also means false. **/
/**
* setAsText for boolean checks for true or false or t or f.
* "" also means false.
**/
public void setAsText(String val) throws IllegalArgumentException {
if(val.equalsIgnoreCase("true") || val.equalsIgnoreCase("t")) {
setValue(Boolean.FALSE);
} else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
setValue(Boolean.TRUE);
} else if(val.equalsIgnoreCase("false") || val.equalsIgnoreCase("f") || val.equals("")) {
setValue(Boolean.FALSE);
} else {
throw new IllegalArgumentException("Value must be true, false, t, f or empty.");
}