Example #1
0
  public void bang() {
    sketch.send("reset");

    sweep.update();
    sweep.draw();

    for (SeqNode n : nodes) {
      n.update(mousecoord, sweep.getRad());
      n.draw();
    }
  }
Example #2
0
 // recursively initialize nodeDests from start node
 private void initNodeDests(SeqPhase phase, SeqNode n) throws Xcept {
   if (nodeDests.get(n) != null) return;
   if (stopAtFFTs && n.fft() != null) return;
   LinkedHashSet<SeqNode> dests = new LinkedHashSet<SeqNode>();
   nodeDests.put(n, dests);
   Iterator<SeqEdge> es = graph.getEdgesFrom(n);
   while (es.hasNext()) {
     SeqEdge e = es.next();
     SeqNode n1 = e.dest();
     dests.add(n1);
     if (phase != graph.getPhase(n1)) continue;
     if (stopAtFFTs && n1.fft() != null) continue;
     initNodeDests(phase, n1);
   }
 }
Example #3
0
 public void mouseup(Atom[] args) {
   // do nothing as of yet.
   if (dragging) {
     dragging = false;
     if (activeNode.stopdrag(mousecoord)) {
       nodes.remove(activeNode);
     }
     ;
   }
 }
Example #4
0
  public void drag(Atom[] args) {
    // do nothing yet
    // nodes.add(new SeqNode(args[0].toFloat(), args[1].toFloat(), args[2].toFloat(), 0.05f));

    if (dragging == false) {

      for (SeqNode n : nodes) {
        if (n.dragselect(mousecoord)) {
          dragging = true;
          activeNode = n;
        }
        ;
      }
    } else {
      String mouseOption = args[3].toString();
      if (mouseOption.equals("null")) {
        activeNode.drag(mousecoord);
      } else if (mouseOption.equals("option")) {
        activeNode.resize(mousecoord);
      }
    }
  }