String colorName
src/net/nodebox/graphics/Color.java
// TODO: Implement
public Color(String colorName)
src/net/nodebox/node/Expression.java
Object value = evaluate();
        Object value = evaluate();
        Object value = evaluate();
    public Color asColor() {
        Object value = evaluate();
        if (value instanceof Color) {
            return (Color) value;
int asInt()
Parameter.Type outputType
src/net/nodebox/node/Network.java
public Network(Parameter.Type outputType, String name) {
        super(outputType, name);
public Network(Parameter.Type outputType)
ProcessingContext ctx
src/net/nodebox/node/Network.java
addError("No node to render");
            return false;
        assert (contains(renderedNode));
        // TODO: place output of rendered node into network output.
        return true;
boolean process(ProcessingContext ctx)
NetworkListener l
src/net/nodebox/node/Network.java
listenerList.add(NetworkListener.class, l);
void addNetworkListener(NetworkListener l)
NetworkListener l
src/net/nodebox/node/Network.java
listenerList.remove(NetworkListener.class, l);
void removeNetworkListener(NetworkListener l)
Node node
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, node);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).nodeAdded(e);
void fireNodeAdded(Node node)
Node node
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, node);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).nodeRemoved(e);
void fireNodeRemoved(Node node)
Parameter input  Parameter output
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, input, output);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).connectionAdded(e);
void fireConnectionAdded(Parameter input, Parameter output)
Parameter input  Parameter output
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, input, output);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).connectionRemoved(e);
void fireConnectionRemoved(Parameter input, Parameter output)
Node node  String oldName  String newName
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, node, oldName, newName);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).nodeRenamed(e);
void fireNodeRenamed(Node node, String oldName, String newName)
Node oldNode  Node newNode
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        NetworkEvent e = new NetworkEvent(this, oldNode, newNode);
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == NetworkListener.class) {
                ((NetworkListener) listeners[i + 1]).renderedNodeChanged(e);
void fireRenderedNodeChanged(Node oldNode, Node newNode)
ProcessingListener l
src/net/nodebox/node/Network.java
listenerList.add(ProcessingListener.class, l);
void addProcessingListener(ProcessingListener l)
ProcessingListener l
src/net/nodebox/node/Network.java
listenerList.remove(ProcessingListener.class, l);
void removeProcessingListener(ProcessingListener l)
Network network
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ProcessingListener.class) {
                ((ProcessingListener) listeners[i + 1]).startProcessing(network);
void fireStartProcessing(Network network)
Network network
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == ProcessingListener.class) {
                ((ProcessingListener) listeners[i + 1]).endProcessing(network);
void fireEndProcessing(Network network)
DirtyListener l
src/net/nodebox/node/Network.java
listenerList.add(DirtyListener.class, l);
void addDirtyListener(DirtyListener l)
DirtyListener l
src/net/nodebox/node/Network.java
listenerList.remove(DirtyListener.class, l);
void removeDirtyListener(DirtyListener l)
Network network
src/net/nodebox/node/Network.java
Object[] listeners = listenerList.getListenerList();
        // Process the listeners last to first, notifying
        // those that are interested in this event
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == DirtyListener.class) {
                ((DirtyListener) listeners[i + 1]).networkDirty(network);
void fireNetworkDirty(Network network)
src/net/nodebox/node/Node.java
return level;
MessageLevel getLevel()
src/net/nodebox/node/Node.java
return message;
String getMessage()
src/net/nodebox/node/Node.java
return level == MessageLevel.DEBUG;
boolean isDebug()
src/net/nodebox/node/Node.java
return level == MessageLevel.INFO;
boolean isInfo()
src/net/nodebox/node/Node.java
return level == MessageLevel.WARNING;
boolean isWarning()
src/net/nodebox/node/Node.java
return level == MessageLevel.ERROR;
boolean isError()
Network network  String nodeName
src/net/nodebox/node/Node.java
this.network = network;
            this.nodeName = nodeName;
public NotFound(Network network, String nodeName)
src/net/nodebox/node/Node.java
return network;
Network getNetwork()
src/net/nodebox/node/Node.java
return nodeName;
String getNodeName()
Node node  String name
src/net/nodebox/node/Node.java
this(node, name, "Invalid name \"" + name + "\" for node \"" + node.getName() + "\"");
public InvalidName(Node node, String name)
Node node  String name  String message
src/net/nodebox/node/Node.java
super(message);
            this.node = node;
            this.name = name;
public InvalidName(Node node, String name, String message)
src/net/nodebox/node/Node.java
return node;
Node getNode()
src/net/nodebox/node/Node.java
return name;
String getName()
Parameter.Type outputType
src/net/nodebox/node/Node.java
this(outputType, null);
public Node(Parameter.Type outputType)
Parameter.Type outputType  String name
src/net/nodebox/node/Node.java
outputParameter = new Parameter(this, "output", outputType);
    public void validateName(String name) {
            throw new InvalidName(this, name, "Name does contain other characters than a-z0-9 or underscore, or is longer than 29 characters.");
            throw new InvalidName(this, name, "Names starting with double underscore are reserved for internal use.");
    public void setName(String name) throws InvalidName {
    protected void _setName(String name) {
        this.name = name;
        setChanged();
    public Collection<Parameter> getParameters() {
        return parameters.values();
            return parameters.get(name);
        return parameters.containsKey(name);
    public Parameter addParameter(String name, Parameter.Type type) {
        parameters.put(name, p);
    public void renameParameter(Parameter parameter, String name) {
        String oldName = parameter.getName();
        if (oldName.equals(name)) return;
        if (hasParameter(oldName)) {
            parameters.remove(oldName);
            parameter._setName(name);
            parameters.put(name, parameter);
            setChanged();
public Node(Parameter.Type outputType, String name)
src/net/nodebox/node/Node.java
return outputParameter;
    protected void _setNetwork(Network network) {
    public void setNetwork(Network network) throws InvalidName {
    public Color asColor(String name) {
        return getParameter(name).asColor();
    public Object getValue(String name) {
        return getParameter(name).getValue();
    public void set(String name, String value) {
        getParameter(name).set(value);
    public void set(String name, Color value) {
    public void setValue(String name, Object value) {
        getParameter(name).setValue(value);
    //// Output value shortcuts ////

    public Object getOutputValue() {
        return outputParameter.getValue();
    protected void setOutputValue(Object value) throws ValueError {
        outputParameter.setValue(value);
    public boolean connectTo(Node inputNode, String parameterName) {
        Parameter p = inputNode.getParameter(parameterName);
        Connection c = new Connection(this, inputNode, p);
        downstreams.add(c);
        inputNode.upstreams.put(p, c);
        return true;
Parameter getOutputParameter()
String parameterName
src/net/nodebox/node/Node.java
Parameter p = getParameter(parameterName);
        return isInputConnected(p);
boolean isInputConnected(String parameterName)
Parameter p
src/net/nodebox/node/Node.java
return getInputConnection(p) != null;
     * @param parameterName the name of the parameter
     * @see #isInputConnected(String)
    public Connection getInputConnection(String parameterName) {
        return getInputConnection(getParameter(parameterName));
boolean isInputConnected(Parameter p)
Parameter parameter
src/net/nodebox/node/Node.java
return upstreams.get(parameter);
        return new ArrayList<Connection>(upstreams.values());
     * @param parameterName the name of the parameter you want to disconnect
    public boolean disconnectInput(String parameterName) {
        return disconnectInput(getParameter(parameterName));
Connection getInputConnection(Parameter parameter)
Parameter parameter
src/net/nodebox/node/Node.java
Connection c = getInputConnection(parameter);
        upstreams.remove(parameter);
        for (Connection c : upstreams.values()) {
            removedSomething = disconnectInput(c.getInputParameter()) | removedSomething;
            removedSomething = c.getInputNode().disconnectInput(c.getInputParameter()) | removedSomething;
        // TODO: Implement finer-grained change notification
    //// Error handling ////

    public void addDebug(String msg) {
        messages.add(new Message(MessageLevel.DEBUG, msg));
boolean disconnectInput(Parameter parameter)
String msg
src/net/nodebox/node/Node.java
messages.add(new Message(MessageLevel.DEBUG, msg));
void addInfo(String msg)
String msg
src/net/nodebox/node/Node.java
messages.add(new Message(MessageLevel.DEBUG, msg));
void addWarning(String msg)
String msg
src/net/nodebox/node/Node.java
messages.add(new Message(MessageLevel.DEBUG, msg));
void addError(String msg)
src/net/nodebox/node/Node.java
for (Message msg : messages) {
            if (msg.isError())
                return true;
boolean hasError()
src/net/nodebox/node/Node.java
for (Message msg : messages) {
            if (msg.isWarning())
                return true;
boolean hasWarning()
src/net/nodebox/node/Node.java
return update(new ProcessingContext());
boolean update()
ProcessingContext ctx
src/net/nodebox/node/Node.java
if (!dirty) return true;
        for (Parameter p : parameters.values()) {
            p.update();
boolean update(ProcessingContext ctx)
src/net/nodebox/node/Node.java
StringBuffer name = new StringBuffer("/");
        Network parent = getNetwork();
        while (parent != null) {
            name.insert(1, parent.getName() + "/");
            parent = parent.getNetwork();
String getAbsolutePath()
String key  String label
src/net/nodebox/node/Parameter.java
this.key = key;
            this.label = label;
public MenuEntry(String key, String label)
src/net/nodebox/node/Parameter.java
return key;
String getKey()
src/net/nodebox/node/Parameter.java
return label;
String getLabel()
Node node  String name  Type type
src/net/nodebox/node/Parameter.java
setType(type); // this sets the core type, default values, and value.
        if (node.hasParameter(name) && node.getParameter(name) != this) return false;
            node.renameParameter(this, name);
    public void _setName(String name) {
        this.name = name;
public Parameter(Node node, String name, Type type)
src/net/nodebox/node/Parameter.java
public void setType(Type type) {
        if (this.type == type) return;
        this.type = type;
        assert(TYPE_REGISTRY.containsKey(type));
        this.coreType = TYPE_REGISTRY.get(type);
        this.defaultValue = CORE_TYPE_DEFAULTS.get(this.coreType);
        // TODO: Change the value to something reasonable.
        this.value = this.defaultValue;
        node.setChanged();
        markDirty();
Type getType()
src/net/nodebox/node/Parameter.java
public void setBoundingMethod(BoundingMethod boundingMethod) {
        this.boundingMethod = boundingMethod;
        if (boundingMethod == BoundingMethod.HARD) {
        node.setChanged();
        if (boundingMethod == BoundingMethod.HARD) {
        node.setChanged();
        if (boundingMethod == BoundingMethod.HARD) {
        node.setChanged();
        if (boundingMethod != BoundingMethod.HARD) {
        if (coreType == CoreType.INT) {
            int v = (Integer) value;
            if (v < minimum) {
                set((int) minimum);
CoreType getCoreType()
v > maximum
src/net/nodebox/node/Parameter.java
set((int) maximum);
else if (v > maximum)
coreType == CoreType.FLOAT
src/net/nodebox/node/Parameter.java
double v = (Double) value;
            if (v < minimum) {
                set(minimum);
else if (coreType == CoreType.FLOAT)
v > maximum
src/net/nodebox/node/Parameter.java
set(maximum);

    public void setDisplayLevel(DisplayLevel displayLevel) {
        node.setChanged();

    public void addMenuItem(String key, String label) {
        menuItems.add(new MenuEntry(key, label));
        node.setChanged();

        node.setChanged();
        node.setChanged();
    public int asInt() {
        if (coreType == CoreType.INT) {
            return (Integer) value;
else if (v > maximum)
coreType == CoreType.FLOAT
src/net/nodebox/node/Parameter.java
double v = (Double) value;
        if (coreType == CoreType.FLOAT) {
            return (Double) value;
else if (coreType == CoreType.FLOAT)
coreType == CoreType.INT
src/net/nodebox/node/Parameter.java
int v = (Integer) value;
        if (coreType == CoreType.STRING) {
            return (String) value;
            return value.toString();
    public Color asColor() {
        if (coreType == CoreType.COLOR) {
            return (Color) value;
else if (coreType == CoreType.INT)
src/net/nodebox/node/Parameter.java
return value;
        if (coreType != CoreType.INT) {
        if (asInt() == value) return;
        this.value = value;
        markDirty();
        if (coreType != CoreType.FLOAT) {
        if (asFloat() == value) return;
        this.value = value;
        markDirty();
        if (value == null) return;
        if (coreType != CoreType.STRING) {
        if (asString().equals(value)) return;
        this.value = value;
        markDirty();
    public void set(Color value) {
        if (value == null) return;
        if (coreType != CoreType.COLOR) {
            throw new ValueError("Tried setting color value on parameter with type " + type);
Object getValue()
coreType == CoreType.FLOAT
src/net/nodebox/node/Parameter.java
if (value instanceof Float) {
                set((Float)value);
else if (coreType == CoreType.FLOAT)
value instanceof Double
src/net/nodebox/node/Parameter.java
set((Double)value);
else if (value instanceof Double)
coreType == CoreType.STRING
src/net/nodebox/node/Parameter.java
if (value instanceof String) {
                set((String)value);
else if (coreType == CoreType.STRING)
coreType == CoreType.COLOR
src/net/nodebox/node/Parameter.java
if (value instanceof Color) {
                set((Color)value);
else if (coreType == CoreType.COLOR)
String value
src/net/nodebox/node/Parameter.java
switch (coreType) {
            case INT:
                return Integer.parseInt(value);
             case FLOAT:
                 return Float.parseFloat(value);
            case STRING:
                return value;
            case COLOR:
                return new Color(value);
            default:
                return value;
        return hasExpression() ? expression.getExpression() : "";
        if (hasExpression() && expression.equals(getExpression())) {
            return;
        if (expression == null || expression.trim().length() == 0) {
            this.expression = null;
            setExpressionEnabled(false);
Object parseValue(String value)
test/net/nodebox/node/ConnectTest.java
void testValuePropagation()
test/net/nodebox/node/ConnectTest.java
void testDisconnect()
Node inputNode  String inputParameter  Node outputNode  String message
test/net/nodebox/node/ConnectTest.java
void assertConnectionError(Node inputNode, String inputParameter, Node outputNode, String message)
test/net/nodebox/node/ParameterTest.java
Node n = new TestNode();
        Parameter angle = n.addParameter("angle", Parameter.Type.ANGLE);
        assertEquals(Parameter.CoreType.FLOAT, angle.getCoreType());
void testType()
src/net/nodebox/node/Expression.java
return asInt(0);
int asInt()
int channel
src/net/nodebox/node/Expression.java
Object value = evaluateForChannel(channel);
        return asFloat(0);
int asInt(int channel)
int channel
src/net/nodebox/node/Expression.java
Object value = evaluateForChannel(channel);
        return asString(0);
double asFloat(int channel)
int channel
src/net/nodebox/node/Expression.java
Object value = evaluateForChannel(channel);
    public Object asData() {
        return asData(0);
    public Object asData(int channel) {
        return evaluateForChannel(channel);
String asString(int channel)
src/net/nodebox/node/Expression.java
return MVEL.executeExpression(compiledExpression);
Object evaluate()
src/net/nodebox/node/Node.java
this(null);
    public Node(String name) {
        notifyObservers();
        notifyObservers();
    public static void validateName(String name) {
            throw new ValueError("Name does contain other characters than a-z0-9 or underscore, or is longer than 29 characters.");
            throw new ValueError("Names starting with double underscore are reserved for internal use.");
    public void setName(String name) {
            notifyObservers();
    //// Ports ////

    public int getMinimumInputs() {
        return minimumInputs;
public Node()
src/net/nodebox/node/Node.java
return maximumInputs;
int getMaximumInputs()
int minimumInputs
src/net/nodebox/node/Node.java
this.minimumInputs = minimumInputs;
        // TODO: Check the amount of connections, and disconnect if necessary.
void setMinimumInputs(int minimumInputs)
int maximumInputs
src/net/nodebox/node/Node.java
this.maximumInputs = maximumInputs;
        // TODO: Check the amount of connections, and disconnect if necessary.
    public List<Parameter> getParameters() {
        return parameters;
            return parameterMap.get(name);
        return parameterMap.containsKey(name);
    public Parameter addParameter(String name, String type) {
        parameterMap.put(name, p);
        parameters.add(p);
    public Parameter addParameter(String name, String type, ParameterGroup g) {
        Parameter p = new Parameter(this, name, type);
        parameterMap.put(name, p);
        g.addParameter(p);
        return p;
    public void _setNetwork(Network network) {
    public void setNetwork(Network network) {
    public int asInt(String name, int channel) {
        return getParameter(name).asInt(channel);
void setMaximumInputs(int maximumInputs)
String name  int channel
src/net/nodebox/node/Node.java
return getParameter(name).asFloat(channel);
double asFloat(String name, int channel)
String name  int channel
src/net/nodebox/node/Node.java
return getParameter(name).asString(channel);
    public Object asData(String name) {
        return getParameter(name).asData();
String asString(String name, int channel)
String name  int channel
src/net/nodebox/node/Node.java
return getParameter(name).asData(channel);
    public void set(String name, int value, int channel) {
        getParameter(name).set(value, channel);
Object asData(String name, int channel)
String name  double value  int channel
src/net/nodebox/node/Node.java
getParameter(name).set(value, channel);
    public void set(String name, String value) {
    public void set(String name, String value, int channel) {
        getParameter(name).set(value, channel);
    public void set(String name, Object value) {
        getParameter(name).set(value);
    public void set(String name, Object value, int channel) {
        getParameter(name).set(value, channel);
     * @param port the port index
    public boolean isInputConnected(int port) {
        return getInputConnection(port) != null;
     * @param port the port index for this connection
     * @see #isInputConnected(int)
    public Connection getInputConnection(int port) {
        if (port < 0 | port > maximumInputs) return null;
        for (Connection c : upstreams) {
            if (c.getInputPort() == port)
                return c;
void set(String name, double value, int channel)
Node node  String name  String type
src/net/nodebox/node/Parameter.java
this.type = type;

        if (type.equals(TYPE_ANGLE)) {
            coreType = CORE_TYPE_FLOAT;
            channelCount = 1;
public Parameter(Node node, String name, String type)
src/net/nodebox/node/Parameter.java
return channelCount;
int getChannelCount()
src/net/nodebox/node/Parameter.java
int getCoreType() {
    public void setBoundingType(int boundingType) {
        this.boundingType = boundingType;
        if (boundingType == BOUNDING_HARD) {
        if (boundingType == BOUNDING_HARD) {
        if (boundingType == BOUNDING_HARD) {
        if (boundingType != BOUNDING_HARD) {
        if (coreType == CORE_TYPE_INT) {
            for (int i = 0; i < channelCount; i++) {
                int v = (Integer) channels[i];
                if (v < minimum) {
                    set((int) minimum, i);
String getType()
v > maximum
src/net/nodebox/node/Parameter.java
set((int) maximum, i);
else if (v > maximum)
coreType == CORE_TYPE_FLOAT
src/net/nodebox/node/Parameter.java
for (int i = 0; i < channelCount; i++) {
                double v = (Double) channels[i];
                if (v < minimum) {
                    set(minimum, i);
else if (coreType == CORE_TYPE_FLOAT)
v > maximum
src/net/nodebox/node/Parameter.java
set(maximum, i);
else if (v > maximum)
int displayLevel
src/net/nodebox/node/Parameter.java
// TODO: notify
    public void addMenuItem(int key, String label) {
        // TODO: implement
    public int asInt() {
        return asInt(0);
void setDisplayLevel(int displayLevel)
int channel
src/net/nodebox/node/Parameter.java
if (coreType == CORE_TYPE_INT) {
            return (Integer) channels[channel];
int asInt(int channel)
coreType == CORE_TYPE_FLOAT
src/net/nodebox/node/Parameter.java
double v = (Double) channels[channel];
        return asFloat(0);
else if (coreType == CORE_TYPE_FLOAT)
int channel
src/net/nodebox/node/Parameter.java
if (coreType == CORE_TYPE_FLOAT) {
            return (Double) channels[channel];
double asFloat(int channel)
coreType == CORE_TYPE_INT
src/net/nodebox/node/Parameter.java
int v = (Integer) channels[channel];
        return asString(0);
else if (coreType == CORE_TYPE_INT)
int channel
src/net/nodebox/node/Parameter.java
if (coreType == CORE_TYPE_STRING) {
            return (String) channels[channel];
            return "";
    public Object asData() {
        return asData(0);
    public Object asData(int channel) {
        return channels[channel];
        set(value, 0);
String asString(int channel)
int value  int channel
src/net/nodebox/node/Parameter.java
if (channel < 0 || channel > channelCount) {
            throw new ValueError("Invalid channel " + channel);
void set(int value, int channel)
double value  int channel
src/net/nodebox/node/Parameter.java
if (channel < 0 || channel >= channelCount) {
            throw new ValueError("Invalid channel " + channel);
void set(double value, int channel)
String value  int channel
src/net/nodebox/node/Parameter.java
if (channel < 0 || channel > channelCount) {
            throw new ValueError("Invalid channel " + channel);
void set(String value, int channel)
Object value
src/net/nodebox/node/Parameter.java
set(value, 0);
    public void set(Object value, int channel) {
        if (channel < 0 || channel > channelCount) {
            throw new ValueError("Invalid channel " + channel);
        if (coreType != CORE_TYPE_DATA) {
            throw new ValueError("Tried setting object value on parameter with type " + type);
        // TODO: lazy setting
        preSet();
        channels[channel] = value;
        postSet();
        return hasExpression() ? expression.getExpression() : null;
        if (coreType == CORE_TYPE_DATA) {
            throw new ValueError("Cannot set expression on data type");
        if (hasExpression()) {
            if (expression.equals(getExpression())) {
                return;
void set(Object value)
src/net/nodebox/node/Parameter.java
if (expressionEnabled) {
void evaluate()
coreType == CORE_TYPE_FLOAT
src/net/nodebox/node/Parameter.java
channels[i] = new Double(0);
else if (coreType == CORE_TYPE_FLOAT)
coreType == CORE_TYPE_STRING
src/net/nodebox/node/Parameter.java
channels[i] = new String();
else if (coreType == CORE_TYPE_STRING)
test/net/nodebox/node/ConnectTest.java
void testValuePropagation()
test/net/nodebox/node/ConnectTest.java
void testDisconnect()
Node inputNode  String inputParameter  Node outputNode  String message
test/net/nodebox/node/ConnectTest.java
void assertConnectionError(Node inputNode, String inputParameter, Node outputNode, String message)
test/net/nodebox/node/ParameterTest.java
Node n = new Node(Parameter.TYPE_INT);
        Parameter color = n.addParameter("color", Parameter.TYPE_COLOR);
        assertEquals(4, color.channelCount());
        checkValidSet(color, 0.2, 0);
        checkValidSet(color, 0.4, 1);
        checkValidSet(color, 0.7, 2);
        checkValidSet(color, 1.0, 3);

        checkInvalidSet(color, 0.5, 4);
        checkInvalidSet(color, 0.5, -1);
void testChannels()
Parameter p  double value  int channel
test/net/nodebox/node/ParameterTest.java
p.set(value, channel);
            fail("Value " + value + " on channel " + channel + " should have been accepted.");
        checkInvalidSet(p, value, 0);
void checkValidSet(Parameter p, double value, int channel)