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

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

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

Visualization.setRendererFactory介绍

[英]Set the RendererFactory used by this Visualization. The RendererFactory is responsible for providing the Renderer instances used to draw the VisualItems.
[中]

代码示例

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

@Override
public void setRenderer(Renderer renderer) {
 if (renderer.getUnderlyingImpl(prefuse.render.RendererFactory.class)
   != null) {
  vis.setRendererFactory((prefuse.render.RendererFactory)
    renderer.getUnderlyingImpl(prefuse.render.RendererFactory.class));
 } else {
  throw new ObviousRuntimeException("The following renderer : "
    + renderer.toString() + " is not supported");
 }
}

代码示例来源:origin: apache/chukwa

protected void setupRenderer() {
 this.viz.setRendererFactory(new RendererFactory(){
  AbstractShapeRenderer sr = new ShapeRenderer();
  ShapeRenderer sr_big = new ShapeRenderer(BOXWIDTH);
  LabelRenderer lr = new LabelRenderer("label");
  LabelRenderer lr_legend = new LabelRenderer("label");
     
  public Renderer getRenderer(VisualItem item) {
   lr_legend.setHorizontalAlignment(Constants.LEFT);
   lr_legend.setVerticalAlignment(Constants.CENTER);
   lr.setHorizontalAlignment(Constants.CENTER);
   lr.setVerticalAlignment(Constants.CENTER);
   if (item.isInGroup(maingroup)) {
    return sr_big;
   } else if (item.isInGroup(legendgroup)) {
    return lr_legend;
   } else if (item.isInGroup(addinfogroup)) {
    return lr;
   }
   return sr;
  }
 });
}

代码示例来源:origin: apache/chukwa

protected void setupRenderer() {
 this.viz.setRendererFactory(new RendererFactory(){
  AbstractShapeRenderer sr = new ShapeRenderer();
  ShapeRenderer sr_big = new ShapeRenderer(20);

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

drf.add("ingroup('aggregates')", polyR);
vis.setRendererFactory(drf);

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

m_vis.setRendererFactory(setupRenderer());

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

m_vis.setRendererFactory(new DefaultRendererFactory(tr));

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

m_vis.setRendererFactory(rf);

代码示例来源:origin: org.qi4j.tool/org.qi4j.tool.envisage

rf.add( new InGroupPredicate( LABELS ), labelRenderer );
rf.add( usesPredicate, usesRenderer );
m_vis.setRendererFactory( rf );

代码示例来源:origin: org.qi4j.tool/org.qi4j.tool.envisage

rf.add( edgesPredicate, edgeRenderer );
rf.add( usesPredicate, usesRenderer );
m_vis.setRendererFactory( rf );

相关文章