Examples of DotShape


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

   // (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()); }
   public DotShape shape       (AlloyAtom a, AlloyInstance i) { for(AlloySet s:i.atom2sets(a)) {DotShape v=shape.get(s);     if (v!=null) return v;} return shape.resolve     (a.getType()); }
View Full Code Here

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

            || (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="";
      boolean showLabelByDefault = view.showAsLabel.get(null);
View Full Code Here

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

   /** Helper for nodeShape(). */
   private void assignNodeShape(final AlloyType t, final Set<AlloyType> subTypes, final boolean isTvisible, final List<DotShape> shapeFamily) {
      int index = 0;
      // shape for t, if visible
      if (isTvisible) {
         final DotShape shape = shapeFamily.get(index++);
         //log("AssignNodeShape " + t + " " + shape);
         vizState.shape.put(t, shape);
      }
      // shapes for visible subtypes
      for (final AlloyType subt : subTypes) {
         final DotShape shape = shapeFamily.get(index++);
         //log("AssignNodeShape " + subt + " " + shape);
         vizState.shape.put(subt, shape);
      }
   }
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.