public void setVariable(String name, String value) {
        if (name.charAt(0) == '_') {
            if (name.equals("_vertex_color")) {
                String parts[] = value.split(",", 3);
                setColor(new Color(Integer.parseInt(parts[0].trim()), Integer.parseInt(parts[1]
                        .trim()), Integer.parseInt(parts[2].trim())));
            }
            if (name.equals("_vertex_size")) {
                setRadius(CONST.vertexSize * Math.sqrt(Integer.parseInt(value.trim()) * 0.01));
            }
            if (name.equals("_parent_port")) {
                setParentPort(program.ports.indexOf(Integer.parseInt(value.trim())));
            }
        } else {
            watchVariables.remove(name);
            watchVariables.put(name, value);
        }
        GUI.gRepaint();
    }