Package ca.nengo.ui.lib.actions

Examples of ca.nengo.ui.lib.actions.ActionException


        if (node instanceof SpikePatternNode) {
            fileExporter.export((((SpikePatternNode) node).getUserObject()), file);
        } else if (node instanceof TimeSeriesNode) {
            fileExporter.export((((TimeSeriesNode) node).getUserObject()), file);
        } else {
            throw new ActionException("Could not export node type: "
                    + node.getClass().getSimpleName());
        }
    }
View Full Code Here


        ArrayList<DataPath> dataPaths = new ArrayList<DataPath>();
        findDataItemsRecursive(getRootNode(), new ArrayList<String>(), dataPaths);

        if (dataPaths.size() == 0) {
            throw new ActionException("Nothing to export");
        } else {
            for (DataPath dataPath : dataPaths) {

                Collection<String> path = dataPath.getPath();
                DataTreeNode dataNode = dataPath.getDataNode();

                StringBuilder name = new StringBuilder(200);
                boolean first = true;
                for (String nodeName : path) {
                    if (first) {
                        first = false;
                    } else {
                        name.append(".");
                    }

                    name.append(nodeName);
                }

                addNode(dataNode, name.toString());
            }

            try {
                matlabExporter.write(file);
            } catch (IOException e) {
                throw new ActionException("Error writing file: " + e.getMessage(), e);
            }
        }

    }
View Full Code Here

            matlabExporter.add(name, spikePattern);
        } else if (node instanceof TimeSeriesNode) {
            TimeSeries spikePattern = ((TimeSeriesNode) node).getUserObject();
            matlabExporter.add(name, spikePattern);
        } else {
            throw new ActionException("Could not export node type: "
                    + node.getClass().getSimpleName());
        }
    }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.actions.ActionException

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.