Examples of DotColor


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

   // If x==null, then we guarantee the return value is nonnull
   // 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()); }
View Full Code Here

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

      else if (view.getEdgePalette() == DotPalette.STANDARD) colors = colorsStandard;
      else if (view.getEdgePalette() == DotPalette.MARTHA) colors = colorsMartha;
      else colors = colorsNeon;
      int ci = 0;
      for (AlloyRelation rel: model.getRelations()) {
         DotColor c = view.edgeColor.resolve(rel);
         Color cc = (c==DotColor.MAGIC) ? colors.get(ci) : c.getColor(view.getEdgePalette());
         int count = ((hidePrivate && rel.isPrivate) || !view.edgeVisible.resolve(rel)) ? 0 : edgesAsArcs(hidePrivate, hideMeta, rel, colors.get(ci));
         rels.put(rel, count);
         magicColor.put(rel, cc);
         if (count>0) ci = (ci+1)%(colors.size());
      }
View Full Code Here

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

      if (node!=null) return node;
      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="";
      boolean showLabelByDefault = view.showAsLabel.get(null);
      for (AlloySet set: instance.atom2sets(atom)) {
         String x = view.label.get(set); if (x.length()==0) continue;
View Full Code Here

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

         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);
      e.set(dir!=DotDirection.FORWARD, dir!=DotDirection.BACK);
      e.set(weight<1 ? 1 : (weight>100 ? 10000 : 100*weight));
      edges.put(e, tuple);
      return true;
View Full Code Here

Examples of nl.topicus.onderwijs.dashboard.datatypes.DotColor

  private void retrieveDataFromApplication(Map<String, DotColor> ret) {
    for (Project curProject : WicketApplication.get().getProjects()) {
      ProjectAlerts alerts = WicketApplication.get().getRepository()
          .getData(ProjectAlerts.class).get(curProject);
      DotColor max = null;
      for (Alert curAlert : alerts.getValue()) {
        if (DotColor.RED.equals(curAlert.getColor())) {
          max = DotColor.RED;
          break;
        } else if (DotColor.YELLOW.equals(curAlert.getColor()))
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.