Examples of containsUserDatumKey()


Examples of edu.uci.ics.jung.graph.Edge.containsUserDatumKey()

    DirectedSparseGraph gr = DifferenceVisualiser.ChangesToGraph.computeVisualisationParameters(grAerlang, difference);
    Map<String,String> edgeToColours = new TreeMap<String,String>();
    for(Object edgeObj:gr.getEdges())
    {
      Edge edge = (Edge)edgeObj;
      if (edge.containsUserDatumKey(JUConstants.DIFF))
        edgeToColours.put(edge.toString(), edge.getUserDatum(JUConstants.DIFF).toString());
    }
    Assert.assertEquals("{P1000-[a]->P1000=java.awt.Color[r=255,g=0,b=0], P1000-[b]->P1002=java.awt.Color[r=255,g=0,b=0], P1000-[c]->N1000=java.awt.Color[r=255,g=0,b=0], P1001-[a]->P1000=java.awt.Color[r=0,g=255,b=0], P1001-[b]->P1003=java.awt.Color[r=0,g=255,b=0], P1001-[d]->P1001=java.awt.Color[r=0,g=255,b=0], P1002-[c, d]->P1002=java.awt.Color[r=255,g=0,b=0], P1003-[a, c]->P1001=java.awt.Color[r=0,g=255,b=0]}",
        edgeToColours.toString());
  }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

        throw new IllegalArgumentException("Cannot clone vertex which is neither a CmpVertex nor Vertex, what was passed is "+vertToClone);
      if (!conf.isAllowedToCloneNonCmpVertex())
        throw new IllegalArgumentException("Cannot clone a non-CmpVertex - prohibited using configuration");
     
      Vertex srcVert = (Vertex)vertToClone;
      if (!srcVert.containsUserDatumKey(JUConstants.LABEL))
        throw new IllegalArgumentException("vertex "+srcVert+" is not labelled");
     
      // Copying the attributes associated with the vertex
      Object label = srcVert.getUserDatum(JUConstants.LABEL);
      if (label instanceof VertexID)
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

          result = generateNewCmpVertex(VertexID.parseID((String)label), conf);
        else
          throw new IllegalArgumentException("vertex with label "+label+" has an unsupported type");

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

          throw new IllegalArgumentException("vertex with label "+label+" has an unsupported type");

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
      if (srcVert.containsUserDatumKey(JUConstants.DEPTH))
        result.setDepth((Integer)srcVert.getUserDatum(JUConstants.DEPTH));
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
      if (srcVert.containsUserDatumKey(JUConstants.DEPTH))
        result.setDepth((Integer)srcVert.getUserDatum(JUConstants.DEPTH));
    }
    return result;
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
      if (srcVert.containsUserDatumKey(JUConstants.DEPTH))
        result.setDepth((Integer)srcVert.getUserDatum(JUConstants.DEPTH));
    }
    return result;
  }
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

        throw new IllegalArgumentException("Cannot clone vertex which is neither a CmpVertex nor Vertex, what was passed is "+vertToClone);
      if (!conf.isAllowedToCloneNonCmpVertex())
        throw new IllegalArgumentException("Cannot clone a non-CmpVertex - prohibited using configuration");
     
      Vertex srcVert = (Vertex)vertToClone;
      if (!srcVert.containsUserDatumKey(JUConstants.LABEL))
        throw new IllegalArgumentException("vertex "+srcVert+" is not labelled");
     
      // Copying the attributes associated with the vertex
      Object label = srcVert.getUserDatum(JUConstants.LABEL);
      if (label instanceof VertexID)
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

          result = generateNewCmpVertex(VertexID.parseID((String)label), conf);
        else
          throw new IllegalArgumentException("vertex with label "+label+" has an unsupported type");

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

          throw new IllegalArgumentException("vertex with label "+label+" has an unsupported type");

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
      if (srcVert.containsUserDatumKey(JUConstants.DEPTH))
        result.setDepth((Integer)srcVert.getUserDatum(JUConstants.DEPTH));
View Full Code Here

Examples of edu.uci.ics.jung.graph.Vertex.containsUserDatumKey()

      result.setAccept(DeterministicDirectedSparseGraph.isAccept(srcVert));
      if (srcVert.containsUserDatumKey(JUConstants.COLOUR))
        result.setColour((JUConstants)srcVert.getUserDatum(JUConstants.COLOUR));
      if (srcVert.containsUserDatumKey(JUConstants.HIGHLIGHT))
        result.setHighlight(true);
      if (srcVert.containsUserDatumKey(JUConstants.ORIGSTATE))
        result.setOrigState((VertexID)srcVert.getUserDatum(JUConstants.ORIGSTATE));
      if (srcVert.containsUserDatumKey(JUConstants.DEPTH))
        result.setDepth((Integer)srcVert.getUserDatum(JUConstants.DEPTH));
    }
    return result;
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.