Skip to content

Commit

Permalink
MONDRIAN: some working to make the Workbench a full editor.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 616]
  • Loading branch information
ebengtso committed Jun 25, 2003
1 parent ac334c5 commit ece724e
Show file tree
Hide file tree
Showing 5 changed files with 1,105 additions and 815 deletions.
21 changes: 17 additions & 4 deletions src/main/mondrian/gui/PropertyTableModel.java
Expand Up @@ -6,9 +6,7 @@

package mondrian.gui;

import java.lang.reflect.*;
import java.beans.*;
import java.util.*;
import java.lang.reflect.Field;

/**
*
Expand Down Expand Up @@ -82,12 +80,27 @@ public Object getValueAt(int rowIndex, int columnIndex) {
} else {
try {
Field f = target.getClass().getField(propertyNames[rowIndex]);
return f.get(target);

Object obj = f.get(target);
return obj;
} catch (Exception ex) {
ex.printStackTrace();
return "#ERROR";
}
}
}

public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
try {
Field f = target.getClass().getField(propertyNames[rowIndex]);
f.set(target,aValue);
} catch (Exception ex) {
ex.printStackTrace();
}
}

public Object getValue() {
return target;
}

}

0 comments on commit ece724e

Please sign in to comment.