Package edu.mit.csail.sdg.alloy4graph

Examples of edu.mit.csail.sdg.alloy4graph.DotStyle


   // If x!=null, then it may return null (which means "inherited")
   // (Note: "label" and "weight" will never return null)

   // Reads the value for that atom based on an existing AlloyInstance; return value is never null.
   public DotColor nodeColor   (AlloyAtom a, AlloyInstance i) { for(AlloySet s:i.atom2sets(a)) {DotColor v=nodeColor.get(s); if (v!=null) return v;} return nodeColor.resolve (a.getType()); }
   public DotStyle nodeStyle   (AlloyAtom a, AlloyInstance i) { for(AlloySet s:i.atom2sets(a)) {DotStyle v=nodeStyle.get(s); if (v!=null) return v;} return nodeStyle.resolve (a.getType()); }
View Full Code Here


      if ( (hidePrivate && atom.getType().isPrivate)
            || (hideMeta    && atom.getType().isMeta)
            || !view.nodeVisible(atom, instance)) return null;
      // Make the node
      DotColor color = view.nodeColor(atom, instance);
      DotStyle style = view.nodeStyle(atom, instance);
      DotShape shape = view.shape(atom, instance);
      String label = atomname(atom, false);
      node = new GraphNode(graph, atom, label).set(shape).set(color.getColor(view.getNodePalette())).set(style);
      // Get the label based on the sets and relations
      String setsLabel="";
View Full Code Here

         }
         if (label.length()==0) { /* label=moreLabel.toString(); */ }
         else { label=label+(" ["+moreLabel+"]"); }
      }
      DotDirection dir = bidirectional ? DotDirection.BOTH : (layoutBack ? DotDirection.BACK : DotDirection.FORWARD);
      DotStyle style = view.edgeStyle.resolve(rel);
      DotColor color = view.edgeColor.resolve(rel);
      int weight = view.weight.get(rel);
      GraphEdge e = new GraphEdge((layoutBack ? end : start), (layoutBack ? start : end), tuple, label, rel);
      if (color == DotColor.MAGIC && magicColor != null) e.set(magicColor); else e.set(color.getColor(view.getEdgePalette()));
      e.set(style);
View Full Code Here

TOP

Related Classes of edu.mit.csail.sdg.alloy4graph.DotStyle

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.