• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AggregateTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中prefuse.visual.AggregateTable的典型用法代码示例。如果您正苦于以下问题:Java AggregateTable类的具体用法?Java AggregateTable怎么用?Java AggregateTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AggregateTable类属于prefuse.visual包,在下文中一共展示了AggregateTable类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handleAggregate

import prefuse.visual.AggregateTable; //导入依赖的package包/类
public static void handleAggregate(Visualization vis, int id, String nodeType, String edgeType, boolean enable) {
	
	AggregateTable at = (AggregateTable) vis.getGroup("aggregates");
	
	System.out.println("Aggregate: " + nodeType + ":" + enable);
	
	Iterator iter = vis.items(new FieldMatchGroupPredicate("graph.nodes", "type", nodeType));
	while(iter.hasNext()) {
		VisualItem item = (VisualItem) iter.next();
		Iterator aggregates = at.getAggregates(item);
		if (!aggregates.hasNext()) {
			addAggregate(id, (NodeItem)item, (AggregateItem) at.addItem(), enable);
		} else {
			while(aggregates.hasNext()) {
				addAggregate(id, (NodeItem)item, (AggregateItem) aggregates.next(), enable);
			}
		}
	}
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:AggregateControl.java


示例2: initDataGroups

import prefuse.visual.AggregateTable; //导入依赖的package包/类
private void initDataGroups() {
	// create sample graph
	// 9 nodes broken up into 3 interconnected cliques
	Graph g = new Graph();
	for ( int i=0; i<3; ++i ) {
		Node n1 = g.addNode();
		Node n2 = g.addNode();
		Node n3 = g.addNode();
	}

	// add visual data groups
	VisualGraph vg = m_vis.addGraph(GRAPH, g);
	m_vis.setInteractive(EDGES, null, false);
	m_vis.setValue(NODES, null, VisualItem.SHAPE,
			new Integer(Constants.SHAPE_ELLIPSE));

	AggregateTable at = m_vis.addAggregates(AGGR);
	at.addColumn(VisualItem.POLYGON, float[].class);
	at.addColumn("id", int.class);

}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:22,代码来源:CodyTestWindow.java


示例3: initBands

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * Initializes the colored polygon (called aggregates).
 * 
 * @param visualGraph
 *            the visualGraph used by the visualization
 * @param bandsCount
 *            the count of bands, e.g. _settings.BandsCount
 * @param variableSet
 *            a set of the different variables (e.g. { "insulin-dose",
 *            "glucose" })
 */
private void initBands(Object[] variableSet) {
    m_vis.removeGroup(groupBands);
    AggregateTable aggregates = m_vis.addAggregates(groupBands);

    aggregates.addColumn(VisualItem.POLYGON, float[].class);
    aggregates.addColumn(COL_BAND_ID, int.class);
    aggregates.addColumn(COL_COLOR_INDEX, int.class);

    for (Object variable : variableSet) {
        for (int bandId = 1; bandId <= settings.BandsCount; bandId++) {
            addAggregate(aggregates, variable, bandId);
            addAggregate(aggregates, variable, -bandId);
        }

        addAggregate(aggregates, variable,
                BAND_ID_POSITIVE_EXTREME_VALUES);
        addAggregate(aggregates, variable,
                BAND_ID_NEGATIVE_EXTREME_VALUES);
        addAggregate(aggregates, variable, BAND_ID_NULL_VALUES);
    }
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:33,代码来源:HorizonGraphAction.java


示例4: initDataGroups

import prefuse.visual.AggregateTable; //导入依赖的package包/类
private void initDataGroups() {
    // create sample graph
    // 9 nodes broken up into 3 interconnected cliques
    Graph g = new Graph();
    for ( int i=0; i<3; ++i ) {
        Node n1 = g.addNode();
        Node n2 = g.addNode();
        Node n3 = g.addNode();
        g.addEdge(n1, n2);
        g.addEdge(n1, n3);
        g.addEdge(n2, n3);
    }
    g.addEdge(0, 3);
    g.addEdge(3, 6);
    g.addEdge(6, 0);
    
    // add visual data groups
    VisualGraph vg = m_vis.addGraph(GRAPH, g);
    m_vis.setInteractive(EDGES, null, false);
    m_vis.setValue(NODES, null, VisualItem.SHAPE,
            new Integer(Constants.SHAPE_ELLIPSE));
    
    AggregateTable at = m_vis.addAggregates(AGGR);
    at.addColumn(VisualItem.POLYGON, float[].class);
    at.addColumn("id", int.class);
    
    // add nodes to aggregates
    // create an aggregate for each 3-clique of nodes
    Iterator nodes = vg.nodes();
    for ( int i=0; i<3; ++i ) {
        AggregateItem aitem = (AggregateItem)at.addItem();
        aitem.setInt("id", i);
        for ( int j=0; j<3; ++j ) {
            aitem.addItem((VisualItem)nodes.next());
        }
    }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:38,代码来源:AggregateDemo.java


示例5: initDataGroups

import prefuse.visual.AggregateTable; //导入依赖的package包/类
private void initDataGroups() {
    // create sample graph
    // 9 nodes broken up into 3 interconnected cliques
    Graph g = new Graph();
    for ( int i=0; i<3; ++i ) {
        Node n1 = g.addNode();
        Node n2 = g.addNode();
        Node n3 = g.addNode();
        g.addEdge(n1, n2);
        g.addEdge(n1, n3);
        g.addEdge(n2, n3);
    }
    g.addEdge(0, 3);
    g.addEdge(3, 6);
    g.addEdge(6, 0);
    
    // add visual data groups
    VisualGraph vg = m_vis.addGraph(GRAPH, g);
    m_vis.setInteractive(EDGES, null, false);
    m_vis.setValue(NODES, null, VisualItem.SHAPE,
            new Integer(Constants.SHAPE_ELLIPSE));
    
    AggregateTable at = m_vis.addAggregates(AGGR);
    at.addColumn(VisualItem.POLYGON, float[].class);
    at.addColumn("id", int.class);
    
    // add nodes to aggregates
    // create an aggregate for each 3-clique of nodes
    Iterator<?> nodes = vg.nodes();
    for ( int i=0; i<3; ++i ) {
        AggregateItem aitem = (AggregateItem)at.addItem();
        aitem.setInt("id", i);
        for ( int j=0; j<3; ++j ) {
            aitem.addItem((VisualItem)nodes.next());
        }
    }
}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:38,代码来源:AggregateDemo.java


示例6: initDataGroups

import prefuse.visual.AggregateTable; //导入依赖的package包/类
private void initDataGroups() {
      // create sample graph
      // 9 nodes broken up into 3 interconnected cliques
      Graph g = new Graph();
      for ( int i=0; i<3; ++i ) {
          Node n1 = g.addNode();
          Node n2 = g.addNode();
          Node n3 = g.addNode();
          g.addEdge(n1, n2);
          g.addEdge(n1, n3);
          g.addEdge(n2, n3);
      }
      g.addEdge(0, 3);
      g.addEdge(3, 6);
      g.addEdge(6, 0);
      // add labels for nodes and edges
      g.addColumn(VisualItem.LABEL, String.class);
      for (int i = 0; i < 9; i++) {
	g.getNode(i).setString(VisualItem.LABEL, ""+i);
	g.getEdge(i).setString(VisualItem.LABEL, ""+i);
}
      // add visual data groups
      VisualGraph vg = m_vis.addGraph(GRAPH, g);
      m_vis.setInteractive(EDGES, null, false);
      m_vis.setValue(NODES, null, VisualItem.SHAPE,
              new Integer(Constants.SHAPE_ELLIPSE));
      AggregateTable at = m_vis.addAggregates(AGGR);
      at.addColumn(VisualItem.POLYGON, float[].class);
      at.addColumn("id", int.class);
      // add nodes to aggregates
      // create an aggregate for each 3-clique of nodes
      Iterator nodes = vg.nodes();
      for ( int i=0; i<3; ++i ) {
          AggregateItem aitem = (AggregateItem)at.addItem();
          aitem.setInt("id", i);
          for ( int j=0; j<3; ++j ) {
              aitem.addItem((VisualItem)nodes.next());
          }
      }
  }
 
开发者ID:codydunne,项目名称:netgrok,代码行数:41,代码来源:AggregateDecoratorDemo.java


示例7: getAggregateSize

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#getAggregateSize()
 */
public int getAggregateSize() {
    return ((AggregateTable)m_table).getAggregateSize(m_row);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例8: containsItem

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#containsItem(prefuse.visual.VisualItem)
 */
public boolean containsItem(VisualItem item) {
    return ((AggregateTable)m_table).aggregateContains(m_row, item);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例9: addItem

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#addItem(prefuse.visual.VisualItem)
 */
public void addItem(VisualItem item) {
    ((AggregateTable)m_table).addToAggregate(m_row, item);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例10: removeItem

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#removeItem(prefuse.visual.VisualItem)
 */
public void removeItem(VisualItem item) {
    ((AggregateTable)m_table).removeFromAggregate(m_row, item);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例11: removeAllItems

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#removeAllItems()
 */
public void removeAllItems() {
    ((AggregateTable)m_table).removeAllFromAggregate(m_row);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例12: items

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * @see prefuse.visual.AggregateItem#items()
 */
public Iterator items() {
    return ((AggregateTable)m_table).aggregatedTuples(m_row);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:7,代码来源:TableAggregateItem.java


示例13: addAggregates

import prefuse.visual.AggregateTable; //导入依赖的package包/类
/**
 * Add a group of aggregates to this visualization. Aggregates are
 * used to visually represent groups of VisualItems.
 * @param group the data group name for the aggregates.
 * @param schema the data schema to use for the AggregateTable
 * @return the generated AggregateTable
 * @see prefuse.visual.AggregateTable
 */
public synchronized AggregateTable addAggregates(String group,
                                                 Schema schema)
{
    AggregateTable vat = new AggregateTable(this, group, schema);
    addDataGroup(group, vat, null);
    return vat;
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:16,代码来源:Visualization.java



注:本文中的prefuse.visual.AggregateTable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Path类代码示例发布时间:2022-05-23
下一篇:
Java Testing类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap