Package edu.uci.ics.jung.graph

Examples of edu.uci.ics.jung.graph.Vertex


     * Returns the UserDatum 'servicesstatus' for the vertex specified by hostname
     * @param hostname The vertex's name to get the 'servicesstatus' UserDatum from
     * @return The Map<String, ServiceStatus> for the UserDatum servicesstatus
     */
    public Map<String,ServiceStatus> getVertex_Services(String hostname) {
        Vertex v = getVertex(hostname);
        if (v != null)
            return getVertex_Services(v);
        else
            return null;
    }
View Full Code Here


     *
     * @see HostStatus
     *
     */
    public void setVertexState(String host, HostStatus status) {
        Vertex x = getVertex(host);
        // according to doc the setUserDatum is equivalent to
        // addUserDatum if the key doesn't exist already otherwise
        // it changes the datum
        if (x != null) {
            x.setUserDatum("hoststatus", status, UserData.CLONE);
            x.setUserDatum("state", status.getCurrentState(), UserData.CLONE);
        }
    }
View Full Code Here

     * Returns the UserDatum 'hoststatus' for the vertex specified by hostname
     * @param hostname The vertex's name to get the 'hoststatus' UserDatum from
     * @return The HostStatus for the UserDatum host
     */
    public HostStatus getVertexHostStatus(String hostname) {
        Vertex v = getVertex(hostname);
        if (v != null)
            return getVertexHostStatus(v);
        else
            return null;
    }
View Full Code Here

     * Returns the UserDatum 'host' for the vertex specified by hostname
     * @param hostname The vertex's name to get the host UserDatum from
     * @return The Host for the UserDatum host
     */
    public Host getVertexHost(String hostname) {
        Vertex v = getVertex(hostname);
        if (v != null)
            return getVertexHost(v);
        else
            return null;
    }
View Full Code Here

    }
   
    public void moveToNextHost(String key) {
        final VisualizationViewer vv = (VisualizationViewer) getVV(key);
        if (pickedVerticesIt != null && pickedVerticesIt.hasNext()) {
            Vertex vertex = (Vertex)pickedVerticesIt.next();
            if (vertex != null) {
                Layout layout = vv.getGraphLayout();
                Point2D q = layout.getLocation(vertex);
                Point2D lvc = vv.inverseTransform(vv.getCenter());
                final double dx = (lvc.getX() - q.getX()) / 10;
View Full Code Here

     */
    private void showOrHide(Vertex v, String key, boolean hidden) {
        Set neighbors = v.getNeighbors();
        LinkedList<Vertex> lparents = new LinkedList<Vertex>();
        LinkedList<Vertex> lchilds = new LinkedList<Vertex>();
        Vertex vtmp = null;
        Set inE = v.getInEdges();
        Set outE = v.getOutEdges();
        Boolean hide = null;
        Object tmp = null;
        Edge e = null;
View Full Code Here

            }
        }
    }
   
    public void setEdgeColor(String vertexname1, String vertexname2, String key, Color c) {
        Vertex v1 = getVertex(vertexname1);
        Vertex v2 = getVertex(vertexname2);
        if (v1 != null && v2 != null) {
            Edge e = v1.findEdge(v2);
            e.setUserDatum(userdatumkey + "color", c, UserData.CLONE);
        }
    }
View Full Code Here

     *@param vertexname1 The first vertex name
     *@param vertexname2 The second vertex name
     *@param key The name of the view we want to hide the edge
     */
    public void hideEdge(String vertexname1, String vertexname2, String key) {
        Vertex v1 = getVertex(vertexname1);
        Vertex v2 = getVertex(vertexname2);
        if (v1 != null && v2 != null) {
            hideEdge(v1, v2, key);
        }
    }
View Full Code Here

        return e;
    }
   
    // Adds a real edge
    public Edge addEdge(String parent, String name) throws GraphException{
        Vertex v1, v2 = null;
        Edge e = null;
        if (parent != null && name != null) {
            v1 = getVertex(parent);
            v2 = getVertex(name);
            if (v1 != null && v2 != null) {
View Full Code Here

            }
        } catch(Exception ex) {
            System.err.println("You need some file here for vertex: " + label + " resource name: "+name);
            System.out.println("Exception: " + ex.getStackTrace());
        }
        Vertex vout = _myGraph.addVertex(v);
        _sl.setLabel(vout, label);
        return vout;
    }
View Full Code Here

TOP

Related Classes of edu.uci.ics.jung.graph.Vertex

Copyright © 2018 www.massapicom. 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.