NodeDataType nodeDataType = getNodeDataType(di);
switch (nodeDataType) {
case SCALAR:
icon = ICONS.getIcon("NodeScalar");
Label textLabel = new Label();
textLabel.switchDAOFactory(DummyDAOFactory.class.getName());
try {
IArray data = di.getData();
// instead we could use getIndexIterator and get the first value
// Index index = data.getIndex();
// index.set(0);
// String value = getNodeName(gtn) + " = " +
// data.getObject(index);
IArrayIterator iterator = data.getIterator();
String value = getNodeName(gtn) + " = "
+ iterator.getObjectNext();
textLabel.setData(value);
}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
viewer = (JComponent) textLabel.getComponent();
break;
case SPECTRUM:
icon = ICONS.getIcon("NodeSpectrum");