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

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

本文整理了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

/**
 * 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.
 * @param group the data group name for the visualized graph. The nodes
 * and edges will be available in the "group.nodes" and "group.edges"
 * subgroups.
 * @param graph the graph to visualize
 */
public synchronized VisualGraph addGraph(String group, Graph graph) {
  return addGraph(group, graph, null);
}

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

/**
 * 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.
 * @param group the data group name for the visualized graph. The nodes
 * and edges will be available in the "group.nodes" and "group.edges"
 * subgroups.
 * @param graph the graph to visualize
 * @param filter a filter Predicate determining which data Tuples in the
 * input graph are visualized
 */
public synchronized VisualGraph addGraph(
    String group, Graph graph, Predicate filter)
{
  return addGraph(group, graph, filter, VisualItem.SCHEMA, VisualItem.SCHEMA);
}

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

/**
 * Add a data set 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.
 * @param group the data group name for the visualized data
 * @param data the data to visualize
 * @param filter a filter Predicate determining which data Tuples in the
 * input data set are visualized
 * @return a visual abstraction of the input data, a VisualTupleSet
 * instance
 */
public synchronized VisualTupleSet add(
    String group, TupleSet data, Predicate filter)
{
  if ( data instanceof Table ) {
    return addTable(group, (Table)data, filter);
  } else if ( data instanceof Tree ) {
    return addTree(group, (Tree)data, filter);
  } else if ( data instanceof Graph ) {
    return addGraph(group, (Graph)data, filter);
  } else {
    throw new IllegalArgumentException("Unsupported TupleSet type.");
  }
}

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

/**
 * Loads data into the visualization.
 * @param data data to load.
 */
public void setVisualizationData(Data data) {
 if (data instanceof Table) {
  vis.addTable(groupName, getPrefuseTable());
 } else if (data instanceof Network) {
  vis.addGraph(groupName, ((prefuse.data.Graph) ((Network) data)
    .getUnderlyingImpl(prefuse.data.Graph.class)));
 }
}

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

/**
 * Inits a standard prefuse visualization.
 * @param param param of the visualization.
 */
protected void initVisualization(Map<String, Object> param) {
 groupName = "tupleset";
 if (param != null) {
  if (param.containsKey(GROUP_NAME)) {
   groupName = (String) param.get(GROUP_NAME);
  }
  if (param.containsKey(DIRECTED)) {
   directed = (Boolean) param.get(DIRECTED);
  }
  if (param.containsKey(NODE_KEY)) {
   nodeKey = (String) param.get(NODE_KEY);
  }
 }
 vis = new prefuse.Visualization();
 if (this.getData() instanceof Table) {
  vis.addTable(groupName, getPrefuseTable());
 } else if (this.getData() instanceof Network) {
  vis.addGraph(groupName, getPrefuseNetwork());
 }
}

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

/**
 *  Updating the graph
 */
public void setGraph(Graph g){
 vis.cancel("layout");
 vis.removeGroup(GRAPH);
 vis.getGroup(Visualization.SEARCH_ITEMS).clear();
 this.remove(spanel);
 vis.addGraph(GRAPH, g);
 addSearchPanel();
 vis.setInteractive(EDGES, null, false);
 setFocus(0);
 stop.setText("Stop");
 vis.run("layout");
 
}

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

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

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

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

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

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

相关文章