本文整理汇总了Java中edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin类的典型用法代码示例。如果您正苦于以下问题:Java PickingGraphMousePlugin类的具体用法?Java PickingGraphMousePlugin怎么用?Java PickingGraphMousePlugin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PickingGraphMousePlugin类属于edu.uci.ics.jung.visualization.control包,在下文中一共展示了PickingGraphMousePlugin类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configVisualizationViewer
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
@Override
public void configVisualizationViewer(final LayerViewer<V, E> vv) {
PluggableGraphMouse mouse = new PluggableGraphMouse();
mouse.add(new ScalingGraphMousePlugin(
new CrossoverScalingControl(), Event.CTRL_MASK, 1 / 1.1f,
1.1f));
mouse.add(new PickingGraphMousePlugin<V, E>());
mouse.add(new MyEditingPopupGraphMousePlugin<T, V, E, N>(vv, scenario));
vv.setGraphMouse(mouse);
vv.getRenderContext().setVertexFillPaintTransformer(
new NodeFillPaintTransformer<V>(vv.getPickedVertexState()));
vv.setVertexToolTipTransformer(nodeTTT);
vv.getRenderContext().setVertexLabelTransformer(nodeLT);
vv.getRenderer().getVertexLabelRenderer()
.setPosition(Position.AUTO);
vv.setEdgeToolTipTransformer(linkTTT);
vv.getRenderContext().setEdgeLabelTransformer(linkLT);
vv.getRenderContext().getEdgeLabelRenderer()
.setRotateEdgeLabels(true);
vv.getRenderContext().setEdgeDrawPaintTransformer(
new LinkDrawPaintTransformer<E>(vv.getPickedEdgeState()));
}
示例2: setUpView
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
private void setUpView(Graph graph)
{
// layout = new SpringLayout2(graph);
layout = new KKLayout(graph);
//layout.setSize(new Dimension(700,700));
vv = new VisualizationViewer(layout);
vv.setPreferredSize(new Dimension(900,900));
vv.setBackground( Color.white );
// Tell the renderer to use our own customized label rendering
vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller());
vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
getContentPane().add(new GraphZoomScrollPane(vv), BorderLayout.CENTER);
/*Mouse controller plugins*/
PluggableGraphMouse gm = new PluggableGraphMouse();
gm.add(new TranslatingGraphMousePlugin(MouseEvent.BUTTON3_MASK));
gm.add(new ScalingGraphMousePlugin(new CrossoverScalingControl(), 0, 1.1f, 0.9f));
gm.add(new PickingGraphMousePlugin());
vv.setGraphMouse(gm);
}
示例3: configVisualizationViewer
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
@Override
public void configVisualizationViewer(final LayerViewer<V, E> vv) {
PluggableGraphMouse mouse = new PluggableGraphMouse();
mouse.add(new ScalingGraphMousePlugin(
new CrossoverScalingControl(), Event.CTRL_MASK, 1 / 1.1f,
1.1f));
mouse.add(new PickingGraphMousePlugin<V, E>());
mouse.add(new MyEditingPopupGraphMousePlugin<T, V, E, N>(vv));
vv.setGraphMouse(mouse);
vv.getRenderContext().setVertexFillPaintTransformer(
new NodeFillPaintTransformer<V>(vv.getPickedVertexState()));
vv.setVertexToolTipTransformer(nodeTTT);
vv.getRenderContext().setVertexLabelTransformer(nodeLT);
vv.getRenderer().getVertexLabelRenderer()
.setPosition(Position.AUTO);
vv.setEdgeToolTipTransformer(linkTTT);
vv.getRenderContext().setEdgeLabelTransformer(linkLT);
vv.getRenderContext().getEdgeLabelRenderer().setRotateEdgeLabels(
true);
vv.getRenderContext().setEdgeDrawPaintTransformer(
new LinkDrawPaintTransformer<E>(vv.getPickedEdgeState()));
}
示例4: MyMouseContext
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
public MyMouseContext(GraphPanel<MyL, LayerViewer<MyV, MyE>> owner) {
super(owner);
mouse = new PluggableGraphMouse();
mouse.add(new ScalingGraphMousePlugin(
new CrossoverScalingControl(), Event.CTRL_MASK, 1 / 1.1f,
1.1f));
mouse.add(new PickingGraphMousePlugin<MyV, MyE>());
}
示例5: loadPlugins
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
/**
* create the plugins, and load the plugins for TRANSFORMING mode
*
*/
@Override
protected void loadPlugins() {
pickingPlugin = new PickingGraphMousePlugin<String,String>();
scalingPlugin = new ScalingGraphMousePlugin(new CrossoverScalingControl(), 0, in, out);
editingPlugin = new RoleGraphEditingPlugin();
add(scalingPlugin);
setMode(Mode.EDITING);
}
示例6: MyMouseContext
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
public MyMouseContext(GraphPanel<MyL, LayerViewer<MyV, MyE>> owner) {
super(owner);
mouse = new PluggableGraphMouse();
mouse.add(new ScalingGraphMousePlugin(
new CrossoverScalingControl(), Event.CTRL_MASK, 1 / 1.1f,
1.1f));
mouse.add(new PickingGraphMousePlugin<MyV, MyE>());
}
示例7: loadPlugins
import edu.uci.ics.jung.visualization.control.PickingGraphMousePlugin; //导入依赖的package包/类
/**
* create the plugins, and load the plugins for TRANSFORMING mode
*
*/
@Override
protected void loadPlugins() {
this.pickingPlugin = new PickingGraphMousePlugin<V,E>();
this.animatedPickingPlugin = new AnimatedPickingGraphMousePlugin<V,E>();
this.translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
this.scalingPlugin = new ScalingGraphMousePlugin(new CrossoverScalingControl(), 0, in, out);
this.rotatingPlugin = new RotatingGraphMousePlugin();
this.shearingPlugin = new ShearingGraphMousePlugin();
add(scalingPlugin);
setMode(Mode.TRANSFORMING);
}