Ignore:
Timestamp:
06/05/08 10:11:18 (16 years ago)
Author:
ra33
Message:

Added DebugFrame action
Added GetCometStats
Lots of bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/AttributeUtils.java

    r80 r86  
    7777                        _AllowNull = new LinkedList<Method>();
    7878                        _AllowNull.add(Item.class.getMethod("getColor", param));
     79                        _AllowNull.add(Item.class.getMethod("getBackgroundColor", param));
    7980
    8081                        _AllowNull.add(Frame.class.getMethod("getBackgroundColor", param));
     
    273274
    274275                        // Make sure the classes of the methods match the item
    275                         if (m.getDeclaringClass() == toExtract.getClass()
    276                                         || m.getDeclaringClass() == toExtract.getClass()
    277                                                         .getSuperclass()) {
     276                        if (m.getDeclaringClass().isAssignableFrom(toExtract.getClass())) {
    278277                                try {
    279278                                        Object o = m.invoke(toExtract, (Object[]) null);
     
    440439                // if no paris exist, we are done
    441440                if (values.size() == 0
    442                                 || (values.size() == 1 && values.get(0).length() == 0))
     441                                || (values.size() == 1 && values.get(0).length() == 0)) {
    443442                        return false;
     443                }
    444444
    445445                // loop through all attribute: value pairs
     
    553553                int i = 0;
    554554                while (_SetMethods.containsKey(attribute + i)) {
    555                         if (_SetMethods.get(attribute + i).getDeclaringClass() == toSet
    556                                         .getClass()
    557                                         || _SetMethods.get(attribute + i).getDeclaringClass() == toSet
    558                                                         .getClass().getSuperclass())
     555                        if (_SetMethods.get(attribute + i).getDeclaringClass().isAssignableFrom(toSet.getClass()))
    559556                                possibles.add(_SetMethods.get(attribute + i));
    560557                        i++;
     
    564561                        Object current = null;
    565562                        Object[] param = {};
    566                         Class toSetClass = toSet.getClass();
    567                         Class toSetSuperClass = toSetClass.getSuperclass();
    568563                        // find the corresponding get method for this set method
    569564                        // and get the current value of the attribute
    570565                        for (Method m : _GetMethods) {
    571                                 if ((m.getDeclaringClass() == toSetClass || m
    572                                                 .getDeclaringClass() == toSetSuperClass)
     566                                if (m.getDeclaringClass().isAssignableFrom(toSet.getClass())
    573567                                                && m.getName().substring(GET_LENGTH).equals(
    574568                                                                possible.getName().substring(SET_LENGTH))) {
Note: See TracChangeset for help on using the changeset viewer.