iDesktopX java插件开发时
目前想用IFormTabular展示三维缓存图层中的属性值,但尝试失败,我应该怎么进行处理才对?代码如下:
FieldInfos infos = newLayer.getFieldInfos();
ArrayList<Integer> fieldIndexList = new ArrayList<Integer>();
for (int j = 0, k = 0; j < infos.getCount(); j++, k++) {
FieldInfo field = infos.get(j);
if (field.isSystemField() || field.isSystemFieldName(field.getName())) {
infos.remove(j--);
continue;
}
fieldIndexList.add(k);
BaseUtil.output("字段: ", field.getName(), field.getType().name());
}
Selection3D selection3D = newLayer.getSelection();
int f = 1;
Boolean run = true;
Recordset recordset1 = new MemRecordset(infos);
HashMap map = new HashMap();
while (run) {
selection3D.add(1);
for (int t : fieldIndexList) {
String name = infos1.get(t).getName();
Object value = newLayer.getFieldValueOfSelectedObject(t);
map.put(name, value);
}
recordset1.addNew(new GeoModel3D(), map);
break;
}
IFormTabular iFormTabular = (IFormTabular) FormUtilities.fireNewWindowEvent(WindowType.TABULAR);
iFormTabular.setRecordset(recordset1);
报错内容: