Package ca.nengo.ui.configurable

Examples of ca.nengo.ui.configurable.ConfigResult


    @Override
    protected void action() throws ActionException {

        try {
            ConfigResult properties = ConfigManager.configure(zProperties, "Layout bounds",
                    UIEnvironment.getInstance(), ConfigMode.TEMPLATE_NOT_CHOOSABLE);
            completeConfiguration(properties);

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


            public void actionPerformed(ActionEvent e) {
                try {
                    PString pFnName = new PString("Name");
                    PFunction pFunction = new PFunction("New Function", 1, true, null);

                    ConfigResult props = ConfigManager.configure(new Property[] { pFnName,
                            pFunction }, "Register fuction", FunctionDialog.this,
                            ConfigMode.TEMPLATE_NOT_CHOOSABLE);

                    String name = (String) props.getValue(pFnName);
                    Function fn = (Function) props.getValue(pFunction);

                    interpreter.registerFunction(name, fn);
                    registeredFunctionsList.addItem(name);
                } catch (ConfigException e1) {
                    e1.defaultHandleBehavior();
View Full Code Here

    protected void completeConfiguration() throws ConfigException {
        myConfigManager.getConfigurable().completeConfiguration(createConfigResult());
    }

    private ConfigResult createConfigResult() {
        return new ConfigResult(myConfigManager.getProperties());
    }
View Full Code Here

            }

            String configName = getFromSize() + " to " + getToSize() + " Coupling Matrix";

            try {
                ConfigResult result = ConfigManager.configure(
                        new Property[] { pCouplingMatrix }, configName, parent,
                        ConfigManager.ConfigMode.STANDARD);

                setValue(result.getValue(pCouplingMatrix));
            } catch (ConfigException e) {
                e.defaultHandleBehavior();
            }

        } else {
View Full Code Here

     * @throws ConfigException TODO
     */
    public static Object configure(Property prop, String typeName, Container parent)
            throws ConfigException {

        ConfigResult properties = configure(new ConfigSchemaImpl(prop), typeName, null, parent,
                ConfigMode.TEMPLATE_NOT_CHOOSABLE);
        return properties.getValue(prop);
    }
View Full Code Here

        private void configure() {
            try {
                Property pNoiseLevel = new PFloat("Noise level", "Ratio of the noise amplitude to the signal amplitude", noiseLevel);
                Property pNSV = new PInt("Number of Singular Values", NSV);
                ConfigResult result = UserConfigurer.configure(
                        new Property[] { pNoiseLevel, pNSV }, TYPE_NAME, this.getDialogParent(),
                        ConfigMode.STANDARD);

                noiseLevel = (Float) result.getValue(pNoiseLevel);
                NSV = (Integer) result.getValue(pNSV);
                updateApproximator();

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

  @Override
  public void configureAndWait() throws ConfigException {
    loadPropertiesFromFile(configFileName);
    getConfigurable().completeConfiguration(
        new ConfigResult(getProperties()));
  }
View Full Code Here

        try {
            PFloat pTauFilter = new PFloat("Time constant of display filter [0 = off]", tauFilter);
            PInt pSubSampling = new PInt("Subsampling [0 = off]", subSampling);

            if (showUserConfigDialog) {
                ConfigResult result;
                try {
                    result = UserConfigurer.configure(new Property[] { pTauFilter, pSubSampling },
                            "Plot Options",
                            UIEnvironment.getInstance(),
                            ConfigMode.TEMPLATE_NOT_CHOOSABLE);

                    tauFilter = (Float) result.getValue(pTauFilter);
                    subSampling = (Integer) result.getValue(pSubSampling);

                    ProbePlotHelper.getInstance().setDefaultTauFilter(tauFilter);
                    ProbePlotHelper.getInstance().setDefaultSubSampling(subSampling);

                } catch (ConfigException e) {
View Full Code Here

    @Override
    protected void action() throws ActionException {

        try {
            ConfigResult properties = ConfigManager.configure(propD,
                    "Function Node plotter", UIEnvironment.getInstance(),
                    ConfigMode.TEMPLATE_NOT_CHOOSABLE);
            String title = plotName + " - Function Plot";

            float start = (Float) properties.getValue(pStart);
            float end = (Float) properties.getValue(pEnd);
            float increment = (Float) properties.getValue(pIncrement);

            if (increment == 0) {
                throw new ActionException("Please use a non-zero increment");
            }
View Full Code Here

    @Override
    protected void action() throws ActionException {

        try {
            if (!configured) {
                ConfigResult properties = ConfigManager.configure(zProperties, uiNetwork
                        .getTypeName(), "Run " + uiNetwork.getFullName(), UIEnvironment
                        .getInstance(), ConfigMode.TEMPLATE_NOT_CHOOSABLE);

                startTime = (Float) properties.getValue(pStartTime);
                endTime = (Float) properties.getValue(pEndTime);
                stepTime = (Float) properties.getValue(pStepSize);
                showDataViewer = (Boolean) properties.getValue(pShowDataViewer);
            }
           
            RunSimulatorActivity simulatorActivity = new RunSimulatorActivity(startTime, endTime,
                    stepTime, showDataViewer);
            simulatorActivity.doAction();
View Full Code Here

TOP

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

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.