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


Java Action类代码示例

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


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

示例1: disposeAction

import prefuse.action.Action; //导入依赖的package包/类
/**
 * Disposes the specified action and its member actions recursively (if it is a {@link CompositeAction}).
 * 
 * @param action
 *            the action to dispose
 */
public static void disposeAction( Action action )
{
	if ( action == null )
		return;
	action.cancel();
	action.setEnabled( false );
	action.setVisualization( null );

	if ( action instanceof CompositeAction ) {
		CompositeAction ca = (CompositeAction)action;

		for ( int i = ca.size() - 1; i >= 0; --i ) {
			disposeAction( ca.remove( i ) );
		}
	}
}
 
开发者ID:kartoFlane,项目名称:hiervis,代码行数:23,代码来源:HierarchyProcessor.java

示例2: animate

import prefuse.action.Action; //导入依赖的package包/类
public void animate(boolean enable) {
  	Action a = m_vis.getAction("layout");
  	if (a != null) {
  		a.setEnabled(enable);
  	}
  	if (!enable) {
  		try {
		Thread.sleep(100);
	} catch (InterruptedException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
  }
 
开发者ID:luox12,项目名称:onecmdb,代码行数:15,代码来源:GraphView.java

示例3: getZoomToFitAction

import prefuse.action.Action; //导入依赖的package包/类
private Action getZoomToFitAction() {
   	return(new Action() {

		@Override
		public void run(double frac) {
			Rectangle2D bounds = m_vis.getBounds(Visualization.ALL_ITEMS);
			Display display = m_vis.getDisplay(0);
	        GraphicsLib.expand(bounds, 50 + (int)(1/display.getScale()));
	        DisplayLib.fitViewToBounds(display, bounds, 2000);
		}
   		
   	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:14,代码来源:GraphView.java

示例4: InstanceGraph

import prefuse.action.Action; //导入依赖的package包/类
public InstanceGraph() {
	gControl = new InstanceGraphControl();
	gView = new GraphView(gControl.getGraph(), "name", null);
	gView.getVisualization().putAction("updateGraph", new Action() {

		@Override
		public void run(double frac) {
			gControl.updateGraph();
		}
		
	});
	add(gView);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:14,代码来源:InstanceGraph.java

示例5: setCurrentLayout

import prefuse.action.Action; //导入依赖的package包/类
public void setCurrentLayout(LayoutInfo currentLayout) {
	// 切换布局管理器
	currentLayout.getLayout().setLayoutBounds(new Rectangle(this.display.getWidth(), this.display.getHeight()));
	Action treeLayout = this.display.getVisualization().getAction("treeLayout");
	this.display.getVisualization().putAction("treeLayout", currentLayout.getLayout());
	ActionList filter = (ActionList) this.display.getVisualization().getAction("filter");
	filter.remove(treeLayout);
	filter.add(currentLayout.getLayout());

	this.currentLayout = currentLayout;
	
	this.deleteSpecifiedPosition();
}
 
开发者ID:jdepend,项目名称:cooper,代码行数:14,代码来源:LayoutMgr.java

示例6: run

import prefuse.action.Action; //导入依赖的package包/类
/**
     * @see prefuse.action.Action#run(double)
     */
    public void run(double frac) {
        Object[] actions = m_activities.getArray();
        for ( int i=0; i<actions.length; ++i ) {
            Action a = (Action)actions[i];
            try {
                if ( a.isEnabled() ) a.run(frac);
            } catch ( Exception e ) {
//                s_logger.warning(e.getMessage() + '\n'
//                        + StringLib.getStackTrace(e));
            }
        }
    }
 
开发者ID:ieg-vienna,项目名称:TimeBench,代码行数:16,代码来源:ActivityList.java

示例7: findRelevantParameters

import prefuse.action.Action; //导入依赖的package包/类
public synchronized void findRelevantParameters(ArrayList<Integer> axes,ArrayList<ValuedRangeModel> rangeModels,
		ArrayList<Integer> axisTypes,ArrayList<Double> minPositions,ArrayList<Double> maxPositions) {

	for(String iKey : relevantActionLists) {
		Activity iAc = m_vis.getAction(iKey);
		if (iAc instanceof ActionList) {
			for (int i=0; i<((ActionList)iAc).size(); i++) {
				Action iAc2  = ((ActionList)iAc).get(i);
				if(iAc2 instanceof AxisLayout && axes.contains(((AxisLayout)iAc2).getAxis())) {
					if (!rangeModels.contains(((AxisLayout)iAc2).getRangeModel())) {
						rangeModels.add(((AxisLayout)iAc2).getRangeModel());
						axisTypes.add(((AxisLayout)iAc2).getAxis());
						minPositions.add(((AxisLayout)iAc2).getAxis() == Constants.X_AXIS ? ((AxisLayout)iAc2).getLayoutBounds().getMinX() : ((AxisLayout)iAc2).getLayoutBounds().getMinY());
						maxPositions.add(((AxisLayout)iAc2).getAxis() == Constants.X_AXIS ? ((AxisLayout)iAc2).getLayoutBounds().getMaxX() : ((AxisLayout)iAc2).getLayoutBounds().getMaxY());
					}
				} else if(iAc2 instanceof RangeModelTransformationProvider) {
					for(int iAx : ((RangeModelTransformationProvider)iAc2).getAxes()) {
						if (!rangeModels.contains(((RangeModelTransformationProvider)iAc2).getRangeModel(iAx))) {
							rangeModels.add(((RangeModelTransformationProvider)iAc2).getRangeModel(iAx));
							axisTypes.add(iAx);
							minPositions.add(((RangeModelTransformationProvider)iAc2).getMinPosition(iAx));
							maxPositions.add(((RangeModelTransformationProvider)iAc2).getMaxPosition(iAx));
						}
					}
				}
			}
		}				
	}
}
 
开发者ID:ieg-vienna,项目名称:ieg-prefuse,代码行数:30,代码来源:RangeModelTransformationDisplay.java

示例8: animate

import prefuse.action.Action; //导入依赖的package包/类
public void animate(boolean enable) {
	Action a = m_vis.getAction("layout");
	if (a != null) {
		a.setEnabled(enable);
	}
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:7,代码来源:GraphView.java

示例9: getLockAction

import prefuse.action.Action; //导入依赖的package包/类
public Action getLockAction()
{
	return new LockAction(this);
}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:5,代码来源:Data.java

示例10: getUnlockAction

import prefuse.action.Action; //导入依赖的package包/类
public Action getUnlockAction()
{
	return new UnlockAction(this);
}
 
开发者ID:codydunne,项目名称:netgrok,代码行数:5,代码来源:Data.java

示例11: removeAction

import prefuse.action.Action; //导入依赖的package包/类
/**
 * Remove a data processing Action registered with this visualization.
 * If the removed action is currently running, it will be canceled.
 * The visualization reference held by the removed Action will be set to
 * null.<br/>
 * <strong>NOTE:</strong> Errors may occur if the removed Action is 
 * included in an "always run after" relation with another registered
 * Action that has not been removed from this visualization. It is the
 * currently the responsibility of clients to avoid this situation. 
 * @param name the name of the Action
 * @return the removed Action, or null if no action was found
 */
public Action removeAction(String name) {
    // TODO: create registry of always run after relations to automatically
    // resolve action references?
    Action a = getAction(name);
    if ( a != null ) {
        a.cancel();
        m_actions.remove(name);
        a.setVisualization(null);
    }
    return a;
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:24,代码来源:Visualization.java

示例12: putAction

import prefuse.action.Action; //导入依赖的package包/类
/**
 * Add a data processing Action to this Visualization. The Action will be
 * updated to use this Visualization in its data processing.
 * @param name the name of the Action
 * @param action the Action to add
 */
public Action putAction(String name, Action action) {
    action.setVisualization(this);
    m_actions.put(name, action);
    return action;
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:12,代码来源:Visualization.java

示例13: getAction

import prefuse.action.Action; //导入依赖的package包/类
/**
 * Get the data processing Action with the given name.
 * @param name the name of the Action
 * @return the requested Action, or null if the name was not found
 */
public Action getAction(String name) {
    return (Action)m_actions.get(name);
}
 
开发者ID:dritanlatifi,项目名称:AndroidPrefuse,代码行数:9,代码来源:Visualization.java


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