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


Java ScalingGraphMousePlugin类代码示例

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


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

示例1: configVisualizationViewer

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的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.ScalingGraphMousePlugin; //导入依赖的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.ScalingGraphMousePlugin; //导入依赖的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: loadPlugins

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
protected void loadPlugins() {
    	pickingPlugin = new HecataeusPickingGraphMousePlugin();
    	animatedPickingPlugin = new AnimatedPickingGraphMousePlugin<VisualNode,VisualEdge>();
    	// add an additional translating plugin 
    	// for middle mouse button that is never removed by other modes 
    	translatingPluginMiddleButton = new TranslatingGraphMousePlugin(InputEvent.BUTTON2_MASK);
    	popupEditingPlugin = new HecataeusPopupGraphMousePlugin();
    	translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
    	scalingPlugin = new ScalingGraphMousePlugin(new CrossoverScalingControl(), 0, in, out);
    	rotatingPlugin = new RotatingGraphMousePlugin();
    	shearingPlugin = new ShearingGraphMousePlugin();
    	add(scalingPlugin);
    	add(translatingPluginMiddleButton);
    	add(popupEditingPlugin);
/** @author pmanousi changed from Mode.TRANSFORMING to Mode.PICKING */
    	setMode(Mode.PICKING);
    }
 
开发者ID:pmanousis,项目名称:Hecataeus,代码行数:18,代码来源:HecataeusModalGraphMouse.java

示例5: createPluggableGraphMouse

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
protected PluggableGraphMouse createPluggableGraphMouse(RenderContext<NubiSaveVertex,NubiSaveEdge> rc,
                Factory<AbstractNubisaveComponent> vertexFactory, Factory<? extends NubiSaveEdge> edgeFactory, DataVertexEdgeFactory dataVertexEdgeFactory) {
    PluggableGraphMouse graphMouse = new PluggableGraphMouse();
    VertexPicker<NubiSaveVertex, NubiSaveEdge> pickingPlugin = new VertexPicker<NubiSaveVertex, NubiSaveEdge>();
    TranslatingGraphMousePlugin translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
    ScalingGraphMousePlugin scalingPlugin = new ScalingGraphMousePlugin(new ViewScalingControl(), 0, 1.1f, 1/1.1f);
    PopupEditor popupEditingPlugin = new PopupEditor(edgeFactory);
    StorageServicePicker<NubiSaveVertex, NubiSaveEdge> storageServicePickingPlugin = new StorageServicePicker<NubiSaveVertex, NubiSaveEdge>();

    ExtensibleNubisaveComponentMousePlugin extendablePlugin = new ExtensibleNubisaveComponentMousePlugin(vertexFactory, edgeFactory);
    extendablePlugin.addEventListener(new AbstractNubiSaveComponentCreator(vv, graph, vertexFactory));
    extendablePlugin.addEventListener(new ToggleActivateNubisaveComponentOnDoubleClick(vv, graph));
    extendablePlugin.addEventListener(new PreventEdgeCreationForRestrictedPorts(vv, graph));
    extendablePlugin.addEventListener(new DataVertexEdgeCreator(vv, graph, dataVertexEdgeFactory));
    extendablePlugin.addEventListener(new AbstractNubisaveComponentEdgeCreator(vv, graph, (WeightedNubisaveVertexEdgeFactory) edgeFactory));

    graphMouse.add(scalingPlugin);
    graphMouse.add(extendablePlugin);
    graphMouse.add(storageServicePickingPlugin);
    graphMouse.add(translatingPlugin);
    graphMouse.add(popupEditingPlugin);
    return graphMouse;
}
 
开发者ID:joe42,项目名称:nubisave,代码行数:24,代码来源:NubisaveEditor.java

示例6: MyMouseContext

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的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

示例7: MapperEngine

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
public MapperEngine() {
    graph = new SparseMultigraph<Room, Exit>();
    mapperLayout = new MapperLayout( graph );
    mapperLayout.setSize( new Dimension( 500, 500 ) ); //????
    vv = new VisualizationViewer<Room, Exit>( mapperLayout );
    pickedState = vv.getPickedVertexState();
    pickedState.addItemListener( this );
    vv.setPreferredSize( new Dimension( 500, 500 ) ); //????
    RenderContext<Room, Exit> rc = vv.getRenderContext();

    rc.setEdgeLabelTransformer( new ToStringLabeller<Exit>() );
    rc.setEdgeLabelRenderer( new ExitLabelRenderer() );
    rc.setEdgeShapeTransformer( new EdgeShape.QuadCurve<Room, Exit>() );
    rc.setEdgeShapeTransformer( new EdgeShape.Wedge<Room, Exit>( 30 ) );
    rc.setEdgeFillPaintTransformer( new ExitPaintTransformer( vv ) );

    rc.setVertexShapeTransformer( new RoomShape( graph ) );
    rc.setVertexIconTransformer( new RoomIconTransformer() );

    vv.getRenderContext().setLabelOffset( 5 );

    PluggableGraphMouse pgm = new PluggableGraphMouse();
    pgm.add( new MapperPickingGraphMousePlugin<Room, Exit>( MouseEvent.BUTTON1_MASK, MouseEvent.BUTTON3_MASK ) );
    pgm.add( new TranslatingGraphMousePlugin( MouseEvent.BUTTON1_MASK ) );
    scaler = new ScalingGraphMousePlugin( new CrossoverScalingControl(), 0, 1 / 1.1f, 1.1f );
    pgm.add( scaler );
    mousePlugin = new MapperEditingGraphMousePlugin( this );
    pgm.add( mousePlugin );
    vv.setGraphMouse( pgm );
    panel = new MapperPanel( this );
}
 
开发者ID:lauriholmas,项目名称:batmapper,代码行数:32,代码来源:MapperEngine.java

示例8: loadPlugins

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
/**
 * Create and load the plugins to use.
 *
 */
protected void loadPlugins() {
	pickingPlugin = new ExtendedPickingGraphMousePlugin<V, E>();
	pickingPlugin.setRectangleSelectionEnabled(false);
	translatingPlugin = new TranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
	scalingPlugin = new ScalingGraphMousePlugin(new CrossoverScalingControl(), 0, in, out);

	add(pickingPlugin);
	add(translatingPlugin);
	add(scalingPlugin);
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:15,代码来源:SingleDefaultGraphMouse.java

示例9: loadPlugins

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的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

示例10: MyMouseContext

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的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

示例11: loadPlugins

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的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

示例12: getScaler

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
public ScalingGraphMousePlugin getScaler() {
    return scaler;
}
 
开发者ID:lauriholmas,项目名称:batmapper,代码行数:4,代码来源:MapperEngine.java

示例13: restore

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
/** Restores parameters which are not recorded in the view/layout transforms, from the supplied XML stream
 *
 * @param decode XML decoder to use
 */
public void restore(XMLDecoder decoder) {
    ((ScalingGraphMousePlugin) scalingPlugin).setIn((Float) decoder.readObject());
    ((ScalingGraphMousePlugin) scalingPlugin).setOut((Float) decoder.readObject());
}
 
开发者ID:kirilluk,项目名称:statechum,代码行数:9,代码来源:Visualiser.java

示例14: store

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
/** Stores parameters which are not recorded in the view/layout transforms, to the supplied XML stream
 *
 * @param encoder XML encoder to use
 */
public void store(XMLEncoder encoder) {
    encoder.writeObject(((ScalingGraphMousePlugin) scalingPlugin).getIn());
    encoder.writeObject(((ScalingGraphMousePlugin) scalingPlugin).getOut());
}
 
开发者ID:kirilluk,项目名称:statechum,代码行数:9,代码来源:Visualiser.java

示例15: ZoomPanGraphMouse

import edu.uci.ics.jung.visualization.control.ScalingGraphMousePlugin; //导入依赖的package包/类
public ZoomPanGraphMouse(float in, float out) {
    translatingPlugin = new TranslatingGraphMousePlugin();
    scalingPlugin = new ScalingGraphMousePlugin(new LayoutScalingControl(), 0, in, out);
    add(translatingPlugin);
    add(scalingPlugin);
}
 
开发者ID:markus1978,项目名称:clickwatch,代码行数:7,代码来源:ZoomPanGraphMouse.java


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