use of prefuse.visual.VisualItem in project qi4j-sdk by Qi4j.
the class TreeGraphDisplay method setSelectedValue.
/**
* select the specified object
*
* @param object the object to select eg: Descriptor
*/
@Override
public void setSelectedValue(Object object) {
if (object == null) {
return;
}
VisualItem item = null;
Iterator iter = m_vis.items(GRAPH_NODES);
while (iter.hasNext()) {
VisualItem tItem = (VisualItem) iter.next();
Object tObj = tItem.get(USER_OBJECT);
if (tObj.equals(object)) {
item = tItem;
break;
}
}
if (item != null) {
TupleSet ts = m_vis.getFocusGroup(Visualization.FOCUS_ITEMS);
ts.setTuple(item);
m_vis.run(FILTER_ACTION);
}
}
Aggregations