Examples of PopupVertexEdgeMenuMousePlugin


Examples of trust.jfcm.gui.popupVertexEdgeMenuMousePlugin.PopupVertexEdgeMenuMousePlugin

    EditingModalGraphMouse gm =  new EditingModalGraphMouse(vv.getRenderContext(),
      this.vertexFactory, this.edgeFactory);
    gm.setMode(Mode.EDITING);
   
    // Trying out our new popup menu mouse plugin...
        PopupVertexEdgeMenuMousePlugin myPlugin = new PopupVertexEdgeMenuMousePlugin();
        // Add some popup menus for the edges and vertices to our mouse plugin.
        JPopupMenu edgeMenu = new MyMouseMenus.EdgeMenu(MapEditor.jFrame);
        JPopupMenu vertexMenu = new MyMouseMenus.VertexMenu();
        myPlugin.setEdgePopup(edgeMenu);
        myPlugin.setVertexPopup(vertexMenu);
        gm.remove(gm.getPopupEditingPlugin())// Removes the existing popup editing plugin
        gm.add(myPlugin);   // Add our new plugin to the mouse
   
    vv.setGraphMouse(gm);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.