[SOLVED] Adding extra variables to NodeData, can it be done?
Posted: 07 Nov 2010 05:21
Hello!
I am trying to add a extra variable to the NodeData class, along with appropriate get/set functions. However Gephi crashes the moment such a function is called. Netbeans does not indicate any errors with recognizing the method, and the following code snippet inside DHNSEventBridge compiles fine.
What would cause Gephi to crash from this? Does it have something to do with the nature of metaModelImpl?
Thank you
I am trying to add a extra variable to the NodeData class, along with appropriate get/set functions. However Gephi crashes the moment such a function is called. Netbeans does not indicate any errors with recognizing the method, and the following code snippet inside DHNSEventBridge compiles fine.
Code: Select all
public void simulate() // called when selected from the right click menu
{
this.graph = graphController.getModel().getHierarchicalGraphVisible();
ModelImpl[] selectedNodeModels = engine.getSelectedObjects(AbstractEngine.CLASS_NODE);
for (ModelImpl metaModelImpl : selectedNodeModels)
{
NodeData nodeData = (NodeData) metaModelImpl.getObj();
nodeData.setColor(0, 1, 0);
nodeData.setDiseased(true); // Causes Gephi to crash
}
}
Thank you