本文整理了Java中prefuse.Visualization.getVisualGroup()
方法的一些代码示例,展示了Visualization.getVisualGroup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Visualization.getVisualGroup()
方法的具体详情如下:
包路径:prefuse.Visualization
类名称:Visualization
方法名:getVisualGroup
[英]Retrieve the visual data group of the given group name. Only primary visual groups will be considered.
[中]检索给定组名的可视数据组。只考虑初级视觉群体。
代码示例来源:origin: de.sciss/prefuse-core
/**
* Get the TupleSet associated with the given data group name.
* @param group a visual data group name
* @return the data group TupleSet
*/
public TupleSet getGroup(String group) {
TupleSet ts = getVisualGroup(group);
if ( ts == null )
ts = getFocusGroup(group);
return ts;
}
代码示例来源:origin: com.googlecode.obvious/obvious-prefuse
@Override
public ArrayList<Integer> pickAll(Rectangle2D hitBox, Rectangle2D bounds) {
ArrayList<Integer> ids = new ArrayList<Integer>();
VisualTupleSet visTuples = (VisualTupleSet) vis.getVisualGroup(groupName);
Iterator<?> it = visTuples.tuples();
while (it.hasNext()) {
VisualItem item = (VisualItem) it.next();
if (hitBox.intersects(item.getBounds())) {
ids.add(item.getRow());
}
}
return ids;
}
代码示例来源:origin: de.sciss/prefuse-core
ts = getVisualGroup(group);
if ( ts == null ) {
代码示例来源:origin: de.sciss/prefuse-core
/**
* Get the VisualItem associated with a source data tuple, if it exists.
* @param group the data group from which to lookup the source tuple,
* only primary visual groups are valid, focus groups will not work
* @param t the source data tuple
* @return the associated VisualItem from the given data group, or
* null if no such VisualItem exists
*/
public VisualItem getVisualItem(String group, Tuple t) {
TupleSet ts = getVisualGroup(group);
VisualTable vt;
if ( ts instanceof VisualTable ) {
vt = (VisualTable)ts;
} else if ( ts instanceof Graph ) {
Graph g = (Graph)ts;
vt = (VisualTable)(t instanceof Node ? g.getNodeTable()
: g.getEdgeTable());
} else {
return null;
}
int pr = t.getRow();
int cr = vt.getChildRow(pr);
return cr<0 ? null : vt.getItem(cr);
}
代码示例来源:origin: com.googlecode.obvious/obvious-prefuse
/**
* Ediflow dedicated method.
* @param tuple an obvious tuple
* @param alias an alias
* @return an attribute value
*/
public Object getAttributeValueAtOptimized(Tuple tuple, String alias) {
prefuse.data.tuple.TupleSet tupleSet = vis.getVisualGroup(groupName);
prefuse.visual.VisualTable visualTable;
if (tupleSet instanceof prefuse.visual.VisualTable) {
visualTable = (prefuse.visual.VisualTable) tupleSet;
} else if (tupleSet instanceof prefuse.data.Graph) {
prefuse.data.Graph g = (prefuse.data.Graph) tupleSet;
visualTable = (VisualTable) (tuple instanceof Node ? g.getNodeTable()
: g.getEdgeTable());
} else {
return null;
}
if (visualTable.getSchema().getColumnIndex(getAliasMap().get(alias))
!= -1) {
return visualTable.get(tuple.getRow(), alias);
} else {
return null;
}
}
代码示例来源:origin: com.googlecode.obvious/obvious-prefuse
@Override
public Object getAttributeValuetAt(Tuple tuple, String alias) {
prefuse.data.tuple.TupleSet tupleSet = vis.getVisualGroup(groupName);
prefuse.visual.VisualTable visualTable;
if (tupleSet instanceof prefuse.visual.VisualTable) {
内容来源于网络,如有侵权,请联系作者删除!