本文整理了Java中edu.uci.ics.jung.visualization.renderers.Renderer.setVertexLabelRenderer
方法的一些代码示例,展示了Renderer.setVertexLabelRenderer
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Renderer.setVertexLabelRenderer
方法的具体详情如下:
包路径:edu.uci.ics.jung.visualization.renderers.Renderer
类名称:Renderer
方法名:setVertexLabelRenderer
暂无
代码示例来源:origin: net.sf.jung/jung-samples
vv.getRenderer().setVertexLabelRenderer(vlasr);
代码示例来源:origin: hcoles/highwheel
public void export(final DirectedGraph<ElementName, Dependency> g)
throws IOException {
final Dimension d = new Dimension(this.width, this.height);
final Layout<ElementName, Dependency> layout = pickLayout(g, d);
final VisualizationImageServer<ElementName, Dependency> viz = new VisualizationImageServer<ElementName, Dependency>(
layout, d);
final RenderContext<ElementName, Dependency> context = viz
.getRenderContext();
context.setEdgeLabelTransformer(new EdgeLabeller());
context.setVertexLabelTransformer(new VertexLabeller());
final VertexRenderer vertexRenderer = new VertexRenderer(
viz.getRenderContext());
viz.getRenderContext().setVertexShapeTransformer(vertexRenderer);
viz.getRenderer().setVertexLabelRenderer(vertexRenderer);
context.setVertexFillPaintTransformer(fillVertex());
context.setEdgeDrawPaintTransformer(fillEdge(g));
context.setEdgeLabelClosenessTransformer(closenessTransformer());
context.setEdgeStrokeTransformer(edgeWeight());
context.setEdgeArrowStrokeTransformer(edgeWeight());
context.setArrowFillPaintTransformer(fillEdge(g));
context.setArrowDrawPaintTransformer(fillEdge(g));
viz.setPreferredSize(new Dimension(this.width, this.height));
viz.setBackground(new Color(1, 1, 1, 0));
final SVGGraphics2D svgGenerator = new SVGGraphics2D(this.out, d);
svgGenerator.writeHeader();
viz.paintAll(svgGenerator);
svgGenerator.writeTrailer();
svgGenerator.dispose();
}
代码示例来源:origin: org.pitest/highwheel-core
public void export(final DirectedGraph<ElementName, Dependency> g)
throws IOException {
final Dimension d = new Dimension(this.width, this.height);
final Layout<ElementName, Dependency> layout = pickLayout(g, d);
final VisualizationImageServer<ElementName, Dependency> viz = new VisualizationImageServer<ElementName, Dependency>(
layout, d);
final RenderContext<ElementName, Dependency> context = viz
.getRenderContext();
context.setEdgeLabelTransformer(new EdgeLabeller());
context.setVertexLabelTransformer(new VertexLabeller());
final VertexRenderer vertexRenderer = new VertexRenderer(
viz.getRenderContext());
viz.getRenderContext().setVertexShapeTransformer(vertexRenderer);
viz.getRenderer().setVertexLabelRenderer(vertexRenderer);
context.setVertexFillPaintTransformer(fillVertex());
context.setEdgeDrawPaintTransformer(fillEdge(g));
context.setEdgeLabelClosenessTransformer(closenessTransformer());
context.setEdgeStrokeTransformer(edgeWeight());
context.setEdgeArrowStrokeTransformer(edgeWeight());
context.setArrowFillPaintTransformer(fillEdge(g));
context.setArrowDrawPaintTransformer(fillEdge(g));
viz.setPreferredSize(new Dimension(this.width, this.height));
viz.setBackground(new Color(1, 1, 1, 0));
final SVGGraphics2D svgGenerator = new SVGGraphics2D(this.out, d);
svgGenerator.writeHeader();
viz.paintAll(svgGenerator);
svgGenerator.writeTrailer();
svgGenerator.dispose();
}
代码示例来源:origin: com.github.fburato/highwheel-core
public void export(final DirectedGraph<ElementName, Dependency> g)
throws IOException {
final Dimension d = new Dimension(this.width, this.height);
final Layout<ElementName, Dependency> layout = pickLayout(g, d);
final VisualizationImageServer<ElementName, Dependency> viz = new VisualizationImageServer<ElementName, Dependency>(
layout, d);
final RenderContext<ElementName, Dependency> context = viz
.getRenderContext();
context.setEdgeLabelTransformer(new EdgeLabeller());
context.setVertexLabelTransformer(new VertexLabeller());
final VertexRenderer vertexRenderer = new VertexRenderer(
viz.getRenderContext());
viz.getRenderContext().setVertexShapeTransformer(vertexRenderer);
viz.getRenderer().setVertexLabelRenderer(vertexRenderer);
context.setVertexFillPaintTransformer(fillVertex());
context.setEdgeDrawPaintTransformer(fillEdge(g));
context.setEdgeLabelClosenessTransformer(closenessTransformer());
context.setEdgeStrokeTransformer(edgeWeight());
context.setEdgeArrowStrokeTransformer(edgeWeight());
context.setArrowFillPaintTransformer(fillEdge(g));
context.setArrowDrawPaintTransformer(fillEdge(g));
viz.setPreferredSize(new Dimension(this.width, this.height));
viz.setBackground(new Color(1, 1, 1, 0));
final SVGGraphics2D svgGenerator = new SVGGraphics2D(this.out, d);
svgGenerator.writeHeader();
viz.paintAll(svgGenerator);
svgGenerator.writeTrailer();
svgGenerator.dispose();
}
代码示例来源:origin: girtel/Net2Plan
vv.getRenderer().setVertexLabelRenderer(new NodeLabelRenderer());
vv.setVertexToolTipTransformer(node -> node.getToolTip());
内容来源于网络,如有侵权,请联系作者删除!