本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}