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


Java PickingGraphMousePlugin类代码示例

本文整理汇总了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()));
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:25,代码来源:MyGraphPanel.java

示例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);
    }
 
开发者ID:sinantie,项目名称:Generator,代码行数:22,代码来源:VisualiseHypergraph.java

示例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()));
}
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:25,代码来源:MyGraphPanel.java

示例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>());
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:9,代码来源:SampleGraphPanel.java

示例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);
}
 
开发者ID:iig-uni-freiburg,项目名称:SEWOL,代码行数:13,代码来源:RoleGraphMouse.java

示例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>());
}
 
开发者ID:liruixpc11,项目名称:crucian,代码行数:9,代码来源:SampleGraphPanel.java

示例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);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:16,代码来源:AnnotatingModalGraphMouse.java


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