Package edu.uci.ics.jung.visualization

Examples of edu.uci.ics.jung.visualization.PickedState.pick()


               
                vertex = pickSupport.getVertex(ip.getX(), ip.getY());
                if(vertex != null) {
                    if(pickedState.isPicked(vertex) == false) {
                        pickedState.clearPickedVertices();
                        pickedState.pick(vertex, true);
                        vv.fireStateChanged();
                    }
                    // layout.getLocation applies the layout transformer so
                    // q is transformed by the layout transformer only
                    Point2D q = layout.getLocation(vertex);
View Full Code Here


                    offsetx = (float) (gp.getX()-q.getX());
                    offsety = (float) (gp.getY()-q.getY());
                } else if(isPickingEdges() &&
                        (edge = pickSupport.getEdge(ip.getX(), ip.getY())) != null) {
                    pickedState.clearPickedEdges();
                    pickedState.pick(edge, true);
                } else {
                    pickedState.clearPickedEdges();
                    pickedState.clearPickedVertices();
                    vv.fireStateChanged();
                }
View Full Code Here

                Point2D p = e.getPoint();
                // remove view transform
                Point2D ip = vv.inverseViewTransform(p);
                vertex = pickSupport.getVertex(ip.getX(), ip.getY());
                if(vertex != null) {
                    boolean wasThere = pickedState.pick(vertex, !pickedState.isPicked(vertex));
                    if(wasThere) {
                        vertex = null;
                    } else {
                        // layout.getLocation applies the layout transformer so
                        // q is transformed by the layout transformer only
View Full Code Here

                        offsetx = (float) (gp.getX()-q.getX());
                        offsety = (float) (gp.getY()-q.getY());
                    }
                } else if(isPickingEdges() &&
                        (edge = pickSupport.getEdge(ip.getX(), ip.getY())) != null) {
                    pickedState.pick(edge, !pickedState.isPicked(edge));
                }
            }
        }
       if(vertex != null) e.consume();
View Full Code Here

        for (Object o: verts) {
            if (o instanceof Vertex) {
                switch (searchtype) {
                    case 1:
                        if (getLabel((Vertex)o).endsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 2:
                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
View Full Code Here

                        if (getLabel((Vertex)o).endsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 2:
                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 3:
                        if (getLabel((Vertex)o).contains(theHost))
                            pickedstate.pick((Vertex)o, true);                       
                        break;
View Full Code Here

                        if (getLabel((Vertex)o).startsWith(theHost))
                            pickedstate.pick((Vertex)o, true);
                        break;
                    case 3:
                        if (getLabel((Vertex)o).contains(theHost))
                            pickedstate.pick((Vertex)o, true);                       
                        break;
                }
            }
        }
        pickedVertices = pickedstate.getPickedVertices();
View Full Code Here

    public void selectAllVertices(String key) {
        PickedState pickedstate = getVV(key).getPickedState();
        Set vertices = _myGraph.getVertices();
        for (Object o: vertices) {
            if (o instanceof Vertex) {
                pickedstate.pick((Vertex)o, true);
            }
        }
    }
   
    public void hideSelectedVerticesOrEdges(String key) {
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.