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

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

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

Visualization.addDecorators介绍

[英]Add a group of decorators to an existing visual data group. Decorators are VisualItem instances intended to "decorate" another VisualItem, such as providing a label or dedicated interactive control, and are realized as prefuse.visual.DecoratorItem instances that provide access to the decorated item in addition to the standard VisualItem properties. The generated table is created using the #addDerivedTable(String,String,Predicate,Schema) method, but with no VisualItem properties inherited from the source group.
[中]向现有可视数据组添加一组装饰器。decorator是VisualItem实例,旨在“装饰”另一个VisualItem,例如提供标签或专用交互控件,并作为预使用实现。视力的DecoratorItem实例,除了标准VisualItem属性外,还提供对装饰项的访问。生成的表是使用#addDerivedTable(String、String、Predicate、Schema)方法创建的,但没有从源组继承的VisualItem属性。

代码示例

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

  1. /**
  2. * Add a group of decorators to an existing visual data group. Decorators
  3. * are VisualItem instances intended to "decorate" another VisualItem,
  4. * such as providing a label or dedicated interactive control, and are
  5. * realized as {@link prefuse.visual.DecoratorItem} instances that provide
  6. * access to the decorated item in addition to the standard VisualItem
  7. * properties. The generated table is created using the
  8. * {@link #addDerivedTable(String, String, Predicate, Schema)} method,
  9. * but with no VisualItem properties inherited from the source group.
  10. * @param group the data group to use for the decorators
  11. * @param source the source data group to decorate
  12. * @return the generated VisualTable of DecoratorItem instances
  13. */
  14. public synchronized VisualTable addDecorators(String group,String source) {
  15. return addDecorators(group, source, (Predicate)null);
  16. }

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

  1. /**
  2. * Add a group of decorators to an existing visual data group. Decorators
  3. * are VisualItem instances intended to "decorate" another VisualItem,
  4. * such as providing a label or dedicated interactive control, and are
  5. * realized as {@link prefuse.visual.DecoratorItem} instances that provide
  6. * access to the decorated item in addition to the standard VisualItem
  7. * properties.
  8. * @param group the data group to use for the decorators
  9. * @param source the source data group to decorate
  10. * @param schema schema indicating which variables should <b>not</b> be
  11. * inherited from the source data group and instead be managed locally
  12. * by the generated VisualTable
  13. * @return the generated VisualTable of DecoratorItem instances
  14. */
  15. public synchronized VisualTable addDecorators(
  16. String group, String source, Schema schema)
  17. {
  18. return addDecorators(group, source, null, schema);
  19. }

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

  1. @Override
  2. public void run( Graph graph )
  3. {
  4. // add the GRAPH to the visualization
  5. m_vis.add( GRAPH, graph );
  6. // hide edges
  7. Predicate edgesPredicate = (Predicate) ExpressionParser.parse( "ingroup('graph.edges') AND [" + USES_EDGES + "]==false", true );
  8. m_vis.setVisible( GRAPH_EDGES, edgesPredicate, false );
  9. m_vis.setInteractive( GRAPH_EDGES, null, false );
  10. // make node interactive
  11. m_vis.setInteractive( GRAPH_NODES, null, true );
  12. // add LABELS to the visualization
  13. Predicate labelP = (Predicate) ExpressionParser.parse( "VISIBLE()" );
  14. m_vis.addDecorators( LABELS, GRAPH_NODES, labelP, LABEL_SCHEMA );
  15. run();
  16. }

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

  1. m_vis.setValue(NODES, null, VisualItem.SHAPE, SHAPE_ELLIPSE);
  2. m_vis.addDecorators(NODE_LABEL, NODES, SchemaProvider.provideFontSchema());

相关文章