Package ca.nengo.ui.configurable

Examples of ca.nengo.ui.configurable.ConfigException


    NetworkImpl network = new NetworkImpl();

    try {
      network.setName(name);
    } catch (StructuralException e) {
      throw new ConfigException(e.getMessage());
    }

    return network;
  }
View Full Code Here


    try {
      // setName((String) getProperty(pName));
      return new FunctionInput(name, functions, Units.UNK);
    } catch (StructuralException e) {
      throw new ConfigException(e.getMessage());

    }

  }
View Full Code Here

    public void completeConfiguration(ConfigResult props) throws ConfigException {
        try {
            Function function = createFunction(props);
            setFunction(function);
        } catch (Exception e) {
            throw new ConfigException("Error creating function");
        }
    }
View Full Code Here

            return (Function) retobj;

        } catch (SecurityException e) {
            e.printStackTrace();
            throw new ConfigException("Could not configure function: " + e.getMessage());
        } catch (NoSuchMethodException e) {
            throw new ConfigException("Could not configure function, no suitable constructor found");
        }
    }
View Full Code Here

        Function function;
        try {
            function = interpreter.parse(expression, dimensions);
        } catch (Exception e) {
            throw new ConfigException(e.getMessage());
        }

        return function;
    }
View Full Code Here

                    private static final long serialVersionUID = 1L;

                    @Override
                    protected void action() throws ActionException {
                        ConfigException configException = null;

                        try {
                            completeConfiguration();
                        } catch (ConfigException e) {
                            configException = e;                           
                        } catch (RuntimeException e) {
                          Throwable cause=e;
                          while (cause.getCause()!=null) cause=cause.getCause();
                          configException = new ConfigException(cause.getMessage());
                        }
                       
                        if (configException!=null) {
                          JOptionPane.showMessageDialog(NengoGraphics.getInstance(), configException.getMessage());
                        }

                        myConfigManager.dialogConfigurationFinished(configException);

                    }
View Full Code Here

    try {
      origin = enfEnsembleParent.addDecodedOrigin(uniqueName, (Function[]) configuredProperties
          .getValue(pFunctions), "AXON");//(String) configuredProperties.getValue(pNodeOrigin));

    } catch (StructuralException e) {
      throw new ConfigException(e.getMessage());
    }

    return origin;
  }
View Full Code Here

    protected final Object configureModel(ConfigResult configuredProperties) throws ConfigException {
        NodeFactory nodeFactory = createNodeFactory(configuredProperties);

        if (!getType().isInstance(nodeFactory)) {
            throw new ConfigException("Expected type: " + getType().getSimpleName() + " Got: "
                    + nodeFactory.getClass().getSimpleName());
        } else {
            return nodeFactory;
        }
    }
View Full Code Here

        try {
            Constructor<?> ct = type.getConstructor();
            try {
                return ct.newInstance();
            } catch (Exception e) {
                throw new ConfigException("Error constructing " + type.getSimpleName() + ": "
                        + e.getMessage());
            }
        } catch (SecurityException e1) {
            e1.printStackTrace();
            throw new ConfigException("Security Exception");
        } catch (NoSuchMethodException e1) {
            throw new ConfigException("Cannot find zero-arg constructor for: "
                    + type.getSimpleName());
        }
    }
View Full Code Here

            try {
                plotter.doPlot(function, start, increment, end, title + " ("
                        + function.getClass().getSimpleName() + ")");
            } catch (Exception e) {
                throw new ConfigException(e.getMessage());
            }

        } catch (ConfigException e) {
            e.defaultHandleBehavior();
        }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.configurable.ConfigException

Copyright © 2018 www.massapicom. 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.