本文整理汇总了Java中edu.uci.ics.jung.visualization.picking.MultiPickedState类的典型用法代码示例。如果您正苦于以下问题:Java MultiPickedState类的具体用法?Java MultiPickedState怎么用?Java MultiPickedState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MultiPickedState类属于edu.uci.ics.jung.visualization.picking包,在下文中一共展示了MultiPickedState类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setPositions
import edu.uci.ics.jung.visualization.picking.MultiPickedState; //导入依赖的package包/类
/**
* Sets the positions of the GraphNodes as configured in the HashMap.
* @param nodes2Move the nodes2 move
*/
private void setPositions(HashMap<String, Point2D> nodes2Move) {
PickedState<GraphNode> ps = new MultiPickedState<GraphNode>();
this.visViewer.setPickedVertexState(ps);
for(String nodeID : nodes2Move.keySet()) {
GraphNode node = (GraphNode) this.graphController.getNetworkModel().getGraphElement(nodeID);
if (node!=null) {
node.setPosition(nodes2Move.get(nodeID));
this.visViewer.getGraphLayout().setLocation(node, node.getPosition());
ps.pick(node, true);
}
}
this.sendNodesMovedNotification();
}
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:21,代码来源:MoveGraphNodes.java
示例2: BasicVisualizationServer
import edu.uci.ics.jung.visualization.picking.MultiPickedState; //导入依赖的package包/类
/**
* Create an instance with passed parameters.
*
* @param model
* @param renderer
* @param preferredSize initial preferred size of the view
*/
@SuppressWarnings("unchecked")
public BasicVisualizationServer(VisualizationModel<V,E> model,
Dimension preferredSize) {
this.model = model;
// renderContext.setScreenDevice(this);
model.addChangeListener(this);
setDoubleBuffered(false);
this.addComponentListener(new VisualizationListener(this));
setPickSupport(new ShapePickSupport<V,E>(this));
setPickedVertexState(new MultiPickedState<V>());
setPickedEdgeState(new MultiPickedState<E>());
renderContext.setEdgeDrawPaintTransformer(new PickableEdgePaintTransformer<E>(getPickedEdgeState(), Color.black, Color.cyan));
renderContext.setVertexFillPaintTransformer(new PickableVertexPaintTransformer<V>(getPickedVertexState(),
Color.red, Color.yellow));
setPreferredSize(preferredSize);
renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
renderContext.getMultiLayerTransformer().addChangeListener(this);
}
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:30,代码来源:BasicVisualizationServer.java
示例3: SetPickedStates
import edu.uci.ics.jung.visualization.picking.MultiPickedState; //导入依赖的package包/类
public void SetPickedStates(Set<String> vertexes) {
PickedState<String> ps = new MultiPickedState<String>();
Iterator it = vertexes.iterator();
while (it.hasNext()) {
Object element = it.next();
ps.pick(element.toString(), true);
}
vv.setPickedVertexState(ps);
}
开发者ID:iTransformers,项目名称:netTransformer,代码行数:10,代码来源:GraphViewerPanel.java
示例4: SetPickedState
import edu.uci.ics.jung.visualization.picking.MultiPickedState; //导入依赖的package包/类
public void SetPickedState(String vertex) {
PickedState<String> ps = new MultiPickedState<String>();
ps.pick(vertex, true);
vv.setPickedVertexState(ps);
}
开发者ID:iTransformers,项目名称:netTransformer,代码行数:6,代码来源:GraphViewerPanel.java
示例5: SetEdgePickedState
import edu.uci.ics.jung.visualization.picking.MultiPickedState; //导入依赖的package包/类
public void SetEdgePickedState(String edge) {
PickedState<String> ps = new MultiPickedState<String>();
ps.pick(edge, true);
vv.setPickedEdgeState(ps);
}
开发者ID:iTransformers,项目名称:netTransformer,代码行数:6,代码来源:GraphViewerPanel.java
注:本文中的edu.uci.ics.jung.visualization.picking.MultiPickedState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论