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

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

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

Visualization.addGraph介绍

[英]Adds a graph to this visualization, using the given data group name. A visual abstraction of the data will be created and registered with the visualization. An exception will be thrown if the group name is already in use.
[中]使用给定的数据组名称将图形添加到此可视化中。将创建数据的可视化抽象,并在可视化中注册。如果组名已在使用中,将引发异常。

代码示例

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

  1. /**
  2. * Adds a graph to this visualization, using the given data group
  3. * name. A visual abstraction of the data will be created and registered
  4. * with the visualization. An exception will be thrown if the group name
  5. * is already in use.
  6. * @param group the data group name for the visualized graph. The nodes
  7. * and edges will be available in the "group.nodes" and "group.edges"
  8. * subgroups.
  9. * @param graph the graph to visualize
  10. */
  11. public synchronized VisualGraph addGraph(String group, Graph graph) {
  12. return addGraph(group, graph, null);
  13. }

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

  1. /**
  2. * Adds a graph to this visualization, using the given data group
  3. * name. A visual abstraction of the data will be created and registered
  4. * with the visualization. An exception will be thrown if the group name
  5. * is already in use.
  6. * @param group the data group name for the visualized graph. The nodes
  7. * and edges will be available in the "group.nodes" and "group.edges"
  8. * subgroups.
  9. * @param graph the graph to visualize
  10. * @param filter a filter Predicate determining which data Tuples in the
  11. * input graph are visualized
  12. */
  13. public synchronized VisualGraph addGraph(
  14. String group, Graph graph, Predicate filter)
  15. {
  16. return addGraph(group, graph, filter, VisualItem.SCHEMA, VisualItem.SCHEMA);
  17. }

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

  1. /**
  2. * Add a data set to this visualization, using the given data group name.
  3. * A visual abstraction of the data will be created and registered with
  4. * the visualization. An exception will be thrown if the group name is
  5. * already in use.
  6. * @param group the data group name for the visualized data
  7. * @param data the data to visualize
  8. * @param filter a filter Predicate determining which data Tuples in the
  9. * input data set are visualized
  10. * @return a visual abstraction of the input data, a VisualTupleSet
  11. * instance
  12. */
  13. public synchronized VisualTupleSet add(
  14. String group, TupleSet data, Predicate filter)
  15. {
  16. if ( data instanceof Table ) {
  17. return addTable(group, (Table)data, filter);
  18. } else if ( data instanceof Tree ) {
  19. return addTree(group, (Tree)data, filter);
  20. } else if ( data instanceof Graph ) {
  21. return addGraph(group, (Graph)data, filter);
  22. } else {
  23. throw new IllegalArgumentException("Unsupported TupleSet type.");
  24. }
  25. }

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

  1. /**
  2. * Loads data into the visualization.
  3. * @param data data to load.
  4. */
  5. public void setVisualizationData(Data data) {
  6. if (data instanceof Table) {
  7. vis.addTable(groupName, getPrefuseTable());
  8. } else if (data instanceof Network) {
  9. vis.addGraph(groupName, ((prefuse.data.Graph) ((Network) data)
  10. .getUnderlyingImpl(prefuse.data.Graph.class)));
  11. }
  12. }

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

  1. /**
  2. * Inits a standard prefuse visualization.
  3. * @param param param of the visualization.
  4. */
  5. protected void initVisualization(Map<String, Object> param) {
  6. groupName = "tupleset";
  7. if (param != null) {
  8. if (param.containsKey(GROUP_NAME)) {
  9. groupName = (String) param.get(GROUP_NAME);
  10. }
  11. if (param.containsKey(DIRECTED)) {
  12. directed = (Boolean) param.get(DIRECTED);
  13. }
  14. if (param.containsKey(NODE_KEY)) {
  15. nodeKey = (String) param.get(NODE_KEY);
  16. }
  17. }
  18. vis = new prefuse.Visualization();
  19. if (this.getData() instanceof Table) {
  20. vis.addTable(groupName, getPrefuseTable());
  21. } else if (this.getData() instanceof Network) {
  22. vis.addGraph(groupName, getPrefuseNetwork());
  23. }
  24. }

代码示例来源:origin: es.ucm.fdi.gaia/jCOLIBRI

  1. /**
  2. * Updating the graph
  3. */
  4. public void setGraph(Graph g){
  5. vis.cancel("layout");
  6. vis.removeGroup(GRAPH);
  7. vis.getGroup(Visualization.SEARCH_ITEMS).clear();
  8. this.remove(spanel);
  9. vis.addGraph(GRAPH, g);
  10. addSearchPanel();
  11. vis.setInteractive(EDGES, null, false);
  12. setFocus(0);
  13. stop.setText("Stop");
  14. vis.run("layout");
  15. }

代码示例来源:origin: es.ucm.fdi.gaia/jCOLIBRI

  1. vg = vis.addGraph(GRAPH, graph);
  2. vis.setInteractive(EDGES, null, false);

代码示例来源:origin: nz.ac.waikato.cms.weka/prefuseGraph

  1. VisualGraph vg = m_vis.addGraph(GRAPH, graph);
  2. m_vis.setValue(GRAPH_EDGES, null, VisualItem.INTERACTIVE, Boolean.FALSE);
  3. VisualItem f = (VisualItem)vg.getNode(0);

代码示例来源:origin: neueda/jetbrains-plugin-graph-database-support

  1. graph.addColumn(TITLE, String.class);
  2. m_vis.addGraph(GRAPH, graph, null, SchemaProvider.provideNodeSchema(), SchemaProvider.provideEdgeSchema());
  3. m_vis.setInteractive(EDGES, null, false);
  4. m_vis.setValue(NODES, null, VisualItem.SHAPE, SHAPE_ELLIPSE);

相关文章