prefuse.Visualization.getVisualGroup()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中prefuse.Visualization.getVisualGroup()方法的一些代码示例,展示了Visualization.getVisualGroup()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Visualization.getVisualGroup()方法的具体详情如下:
包路径:prefuse.Visualization
类名称:Visualization
方法名:getVisualGroup

Visualization.getVisualGroup介绍

[英]Retrieve the visual data group of the given group name. Only primary visual groups will be considered.
[中]检索给定组名的可视数据组。只考虑初级视觉群体。

代码示例

代码示例来源:origin: de.sciss/prefuse-core

  1. /**
  2. * Get the TupleSet associated with the given data group name.
  3. * @param group a visual data group name
  4. * @return the data group TupleSet
  5. */
  6. public TupleSet getGroup(String group) {
  7. TupleSet ts = getVisualGroup(group);
  8. if ( ts == null )
  9. ts = getFocusGroup(group);
  10. return ts;
  11. }

代码示例来源:origin: com.googlecode.obvious/obvious-prefuse

  1. @Override
  2. public ArrayList<Integer> pickAll(Rectangle2D hitBox, Rectangle2D bounds) {
  3. ArrayList<Integer> ids = new ArrayList<Integer>();
  4. VisualTupleSet visTuples = (VisualTupleSet) vis.getVisualGroup(groupName);
  5. Iterator<?> it = visTuples.tuples();
  6. while (it.hasNext()) {
  7. VisualItem item = (VisualItem) it.next();
  8. if (hitBox.intersects(item.getBounds())) {
  9. ids.add(item.getRow());
  10. }
  11. }
  12. return ids;
  13. }

代码示例来源:origin: de.sciss/prefuse-core

  1. ts = getVisualGroup(group);
  2. if ( ts == null ) {

代码示例来源:origin: de.sciss/prefuse-core

  1. /**
  2. * Get the VisualItem associated with a source data tuple, if it exists.
  3. * @param group the data group from which to lookup the source tuple,
  4. * only primary visual groups are valid, focus groups will not work
  5. * @param t the source data tuple
  6. * @return the associated VisualItem from the given data group, or
  7. * null if no such VisualItem exists
  8. */
  9. public VisualItem getVisualItem(String group, Tuple t) {
  10. TupleSet ts = getVisualGroup(group);
  11. VisualTable vt;
  12. if ( ts instanceof VisualTable ) {
  13. vt = (VisualTable)ts;
  14. } else if ( ts instanceof Graph ) {
  15. Graph g = (Graph)ts;
  16. vt = (VisualTable)(t instanceof Node ? g.getNodeTable()
  17. : g.getEdgeTable());
  18. } else {
  19. return null;
  20. }
  21. int pr = t.getRow();
  22. int cr = vt.getChildRow(pr);
  23. return cr<0 ? null : vt.getItem(cr);
  24. }

代码示例来源:origin: com.googlecode.obvious/obvious-prefuse

  1. /**
  2. * Ediflow dedicated method.
  3. * @param tuple an obvious tuple
  4. * @param alias an alias
  5. * @return an attribute value
  6. */
  7. public Object getAttributeValueAtOptimized(Tuple tuple, String alias) {
  8. prefuse.data.tuple.TupleSet tupleSet = vis.getVisualGroup(groupName);
  9. prefuse.visual.VisualTable visualTable;
  10. if (tupleSet instanceof prefuse.visual.VisualTable) {
  11. visualTable = (prefuse.visual.VisualTable) tupleSet;
  12. } else if (tupleSet instanceof prefuse.data.Graph) {
  13. prefuse.data.Graph g = (prefuse.data.Graph) tupleSet;
  14. visualTable = (VisualTable) (tuple instanceof Node ? g.getNodeTable()
  15. : g.getEdgeTable());
  16. } else {
  17. return null;
  18. }
  19. if (visualTable.getSchema().getColumnIndex(getAliasMap().get(alias))
  20. != -1) {
  21. return visualTable.get(tuple.getRow(), alias);
  22. } else {
  23. return null;
  24. }
  25. }

代码示例来源:origin: com.googlecode.obvious/obvious-prefuse

  1. @Override
  2. public Object getAttributeValuetAt(Tuple tuple, String alias) {
  3. prefuse.data.tuple.TupleSet tupleSet = vis.getVisualGroup(groupName);
  4. prefuse.visual.VisualTable visualTable;
  5. if (tupleSet instanceof prefuse.visual.VisualTable) {

相关文章