当前位置: 首页>>代码示例>>Java>>正文


Java DecoratorItem.getDecoratedItem方法代码示例

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


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

示例1: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@Override
public void run( double frac )
{
	Iterator<?> iter = m_vis.items( m_group );

	while ( iter.hasNext() ) {
		DecoratorItem decorator = (DecoratorItem)iter.next();
		VisualItem decoratedItem = decorator.getDecoratedItem();
		Rectangle2D bounds = decoratedItem.getBounds();

		double x = bounds.getCenterX();
		double y = bounds.getCenterY();

		setX( decorator, null, x );
		setY( decorator, null, y );
	}
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:18,代码来源:NodeLabelLayout.java

示例2: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
public void run(double frac) {
    Iterator iter = m_vis.items(m_group);
    
    int count = 0;
    while ( iter.hasNext() ) {
        DecoratorItem item = (DecoratorItem)iter.next();
        VisualItem node = item.getDecoratedItem();
        if (node.isVisible()) {
          	  item.setVisible(true);
              count++;
        	  Rectangle2D bounds = node.getBounds();
              setX(item, null, bounds.getCenterX());
              setY(item, null, bounds.getCenterY());
        } else {
        	item.setVisible(false);
        }
        
    }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:GraphView.java

示例3: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
public void run(double frac) {
    Iterator iter = m_vis.items(m_group);
    while ( iter.hasNext() ) {
        DecoratorItem decorator = (DecoratorItem)iter.next();
        VisualItem decoratedItem = decorator.getDecoratedItem();
        Rectangle2D bounds = decoratedItem.getBounds();
        double x = bounds.getCenterX();
        double y = bounds.getCenterY();
        /* modification to move edge labels more to the arrow head
        double x2 = 0, y2 = 0;
        if (decoratedItem instanceof EdgeItem){
        	VisualItem dest = ((EdgeItem)decoratedItem).getTargetItem(); 
        	x2 = dest.getX();
        	y2 = dest.getY();
        	x = (x + x2) / 2;
        	y = (y + y2) / 2;
        }
        */
        setX(decorator, null, x);
        setY(decorator, null, y);
    }
}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:23,代码来源:AggregateDecoratorDemo.java

示例4: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@Override
public void run(double frac) {
          Iterator<?> iter = m_vis.items(m_group);
          while ( iter.hasNext() ) {
              DecoratorItem item = (DecoratorItem)iter.next();
              VisualItem node = item.getDecoratedItem();                
              //Dbg.printMsg("--> " + node, LogLvl.Normal);
              Rectangle2D bounds = node.getBounds();
              setX(item, null, bounds.getCenterX());
              setY(item, null, bounds.getCenterY());                
           if (((String)node.get(m_group)).equals("FAKE")) {
               item.setTextColor(ColorLib.alpha(0));	                
           }
           else if (((String)node.get(m_group)).equals("LBUB")) {
               item.setTextColor(ColorLib.alpha(0));	                
           }
          }
      }
 
开发者ID:FedericoPecora,项目名称:meta-csp-framework,代码行数:19,代码来源:PlotSTPTemporalModule.java

示例5: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public void run(double frac) {
    Iterator iter = super.m_vis.items(super.m_group);
    while (iter.hasNext()) {
        DecoratorItem item = (DecoratorItem) iter.next();
        VisualItem node = item.getDecoratedItem();
        Rectangle2D bounds = node.getBounds();     
        double x = node.getDouble("labelX");
        double y = node.getDouble("labelY");
        if (x != 0 && y != 0 && m_vis.getDisplay(0).contains((int)x,(int)y)) {
        	setX(item, null, x);
        	setY(item, null, y);
            item.setVisible(node.isVisible());
        } else
            item.setVisible(false);
    }
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:19,代码来源:POTSBLITZDemo.java

示例6: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@Override
public void run( double frac )
{
    Iterator iter = m_vis.items( m_group );
    while( iter.hasNext() )
    {
        DecoratorItem item = (DecoratorItem) iter.next();
        VisualItem node = item.getDecoratedItem();
        Rectangle2D bounds = node.getBounds();
        setX( item, node, bounds.getX() + StackedLayout.INSET );
        setY( item, node, bounds.getY() + StackedLayout.INSET + 12 );
    }
}
 
开发者ID:apache,项目名称:polygene-java,代码行数:14,代码来源:StackedGraphDisplay.java

示例7: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
public void run(double frac) {
    Iterator iter = m_vis.items(m_group);
    while ( iter.hasNext() ) {
        DecoratorItem item = (DecoratorItem)iter.next();
        VisualItem node = item.getDecoratedItem();
        Rectangle2D bounds = node.getBounds();
        setX(item, null, bounds.getCenterX());
        setY(item, null, bounds.getCenterY());
    }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:11,代码来源:PrefuseRenderer.java

示例8: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public void run(double frac) {
    System.out.println("###########");
    Iterator iter = super.m_vis.items(super.m_group);
    while (iter.hasNext()) {
        DecoratorItem item = (DecoratorItem) iter.next();
        VisualItem node = item.getDecoratedItem();
        Rectangle2D bounds = node.getBounds();
        setX(item, null, bounds.getX());
        setY(item, null, bounds.getCenterY() + bounds.getHeight() + 0);
        System.out.println("#" + item.getString(COL_CAPTION));
    }
}
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:15,代码来源:GanttDemo.java

示例9: run

import prefuse.visual.DecoratorItem; //导入方法依赖的package包/类
@SuppressWarnings("rawtypes")
        @Override
        public void run(double frac) {
//            System.out.println("###########");
            Iterator iter = super.m_vis.items(super.m_group);
            while (iter.hasNext()) {
                DecoratorItem item = (DecoratorItem) iter.next();
                VisualItem node = item.getDecoratedItem();
                Rectangle2D bounds = node.getBounds();
                setX(item, null, bounds.getX());
                setY(item, null, bounds.getCenterY() + bounds.getHeight() + 0);
//                System.out.println("#" + item.getString(COL_CAPTION));
            }
        }
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:15,代码来源:PlanningLinesDemo.java


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