Exemple #1
0
  /**
   * Reload the composite nodes of the circuit, this is recursive
   *
   * @param g the graphics that will paint the node
   * @throws CircuitLoadingException if the internal circuit can not be loaded
   */
  public void reloadCompositeNodes(Graphics g) throws CircuitLoadingException {
    for (iterNodes = this.nodes.iterator(); iterNodes.hasNext(); ) {
      Node n = iterNodes.next();

      if (n.getCategoryID() == Node.COMPOSITE) ((CompositeNode) n).reload(g);
    }
  }
Exemple #2
0
  /**
   * Get the outputable nodes of the circuit
   *
   * @return an hashset of the outputable nodes of the circuit
   */
  public HashSet<Outputable> getOutputables() {
    HashSet<Outputable> outputs = new HashSet<Outputable>();

    for (iterNodes = getNodesIterator(); iterNodes.hasNext(); ) {
      Node n = iterNodes.next();

      if (n.getCategoryID() == Node.OUTPUT) outputs.add((Outputable) n);
    }

    return outputs;
  }
Exemple #3
0
  /**
   * Get the inputable nodes of the circuit
   *
   * @return an hashset of the inputable nodes of the circuit
   */
  public HashSet<Inputable> getInputables() {
    HashSet<Inputable> inputs = new HashSet<Inputable>();

    for (iterNodes = getNodesIterator(); iterNodes.hasNext(); ) {
      Node n = iterNodes.next();

      if (n.getCategoryID() == Node.INPUT) inputs.add((Inputable) n);
    }

    return inputs;
  }