I have coded the following code(some excerpts of the code) to display a node as rectangle but it is no working. It is just displaying a simple node.
Code excerpts:
...
ShapeAction nodeShape = new NodeShapeAction(treeNodes); // treeNodes is a datagroup representing the tree nodes
m_vis.putAction("nodeShape", nodeShape); // m_vis is referring the visualization object
m_vis.run(nodeShape);
....
/**
* Set node shapes
*/
public static class NodeShapeAction extends ShapeAction {
public NodeShapeAction(String group) {
super(group);
add("type == 'APPLICATION'", Constants.SHAPE_RECTANGLE);
add("type == 'DATABASE'", Constants.SHAPE_STAR);
add("type == 'INTERFACE'", Constants.SHAPE_ELLIPSE);
}
} // end of inner class NodeShapeAction