Package ptolemy.data.expr

Examples of ptolemy.data.expr.StringParameter


     */
    public ActorRecursion(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        new DDFDirector(this, uniqueName("DDFDirector"));
        recursionActor = new StringParameter(this, "recursionActor");
    }
View Full Code Here


    }

    // Initialize the variables of this transition.
    private void _init() throws IllegalActionException,
            NameDuplicationException {
        annotation = new StringParameter(this, "annotation");
        annotation.setExpression("");
        // Add a hint to indicate to the PtolemyQuery class to open with a text style.
        Variable variable = new Variable(annotation, "_textHeightHint");
        variable.setExpression("5");
        variable.setPersistent(false);
View Full Code Here

    public Sensor(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        // Create and configure the parameters.
        messageChannelName = new StringParameter(this, "messageChannelName");
        messageChannelName.setExpression("MessageChannel");

        signalChannelName = new StringParameter(this, "signalChannelName");
        signalChannelName.setExpression("SignalChannel");

        outputChannelName = new StringParameter(this, "outputChannelName");
        outputChannelName.setExpression("OutputChannel");

        range = new Parameter(this, "range");
        range.setToken("50.0");
        range.setTypeEquals(BaseType.DOUBLE);
View Full Code Here

                + "<rect x=\"-50\" y=\"-20\" width=\"100\" height=\"40\" "
                + "style=\"fill:blue\"/>" + "<text x=\"-40\" y=\"-5\" "
                + "style=\"font-size:12; font-family:SansSerif; fill:white\">"
                + "Double click to\ngenerate code.</text></svg>");

        initialParametersURL = new StringParameter(this, "initialParametersURL");
        initialParametersURL.setToken(new StringToken(
                "ptolemy/copernicus/kernel/Generator.xml"));
    }
View Full Code Here

        checkForFileUpdates = new Parameter(this, "checkForFileUpdates");
        checkForFileUpdates.setExpression("false");
        checkForFileUpdates.setTypeEquals(BaseType.BOOLEAN);

        StringParameter initialDefaultContents = new StringParameter(this,
                "initialDefaultContents");
        initialDefaultContents
                .setExpression("# This file defines parameters in the current container.\n# Each non-comment line in the file is interpreted as a separate assignment.\n# The lines are of the form:\n# attributeName = value\n# where variableName is the name of the attribute\n# in a format suitable for ptolemy.kernel.util.NamedObj.setName()\n# (i.e., does not contain periods) and value is\n# the expression in the Ptolemy expression language.\n# Comments are lines that begin with the # character.\n# FIXME: After saving, you need to update the fileOrURLParameter by hand.\n# Sample line (remove the leading #):\n# foo = \"bar\"\n");
        initialDefaultContents.setPersistent(false);
        initialDefaultContents.setVisibility(Settable.EXPERT);
    }
View Full Code Here

            da.author.setExpression(author);
            da.version = new StringAttribute(da, "version");
            da.version.setExpression(version);
            da.since = new StringAttribute(da, "since");
            da.since.setExpression("");
            da.description = new StringParameter(da, "description");
            da.description.setExpression(userLevelDocumentation);

            //add ports and params
            Enumeration portItt = portHash.keys();
            while (portItt.hasMoreElements()) {
                String name = (String) portItt.nextElement();
                String desc = (String) portHash.get(name);
                StringAttribute sa = new StringAttribute(da, name + " (port)");
                sa.setExpression(desc);
            }

            Enumeration propItt = propertyHash.keys();
            while (propItt.hasMoreElements()) {
                String name = (String) propItt.nextElement();
                String desc = (String) propertyHash.get(name);
                StringParameter sp = new StringParameter(da, name
                        + " (parameter)");
                sp.setExpression(desc);
            }

            return da;
        } catch (Exception e) {
            System.out
View Full Code Here

        textColor.setExpression("{0.0, 0.0, 1.0, 1.0}");

        // Get font family names from the Font class in Java.
        // This includes logical font names, per Font class in Java:
        // Dialog, DialogInput, Monospaced, Serif, SansSerif, or Symbol.
        fontFamily = new StringParameter(this, "fontFamily");
        fontFamily.setExpression("SansSerif");

        String[] families = GraphicsEnvironment.getLocalGraphicsEnvironment()
                .getAvailableFontFamilyNames();
View Full Code Here

    public Expression(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output = new TypedIOPort(this, "output", false, true);
        expression = new StringParameter(this, "expression");

        _dataParameters = new Engine.ConversionParameters();

        get1x1asScalars = new Parameter(this, "get1x1asScalars",
                new BooleanToken(_dataParameters.getScalarMatrices));
View Full Code Here

        // For example, if the user changes ptIIUserDirectory, then
        // we need to change ptIIUserDirectoryAsURL.
        _generatorAttribute.sanityCheckAndUpdateParameters(_modelPath);

        // See if we are redirecting the output.
        StringParameter output = (StringParameter) _generatorAttribute
                .getAttribute("output");

        if ((output != null) && (output.getToken() != null)) {
            String fileName = output.stringValue();

            if (!fileName.equals("")) {
                File outputFile = new File(fileName);
                OutputStream outputStream = new FileOutputStream(outputFile);
                System.setOut(new PrintStream(outputStream));
View Full Code Here

        // controller it likes (or has it configured) and returned it
        // (zk 2002/09/11)
        _controller = new ModalController(this, "_Controller");

        // configure the directorClass parameter
        directorClass = new StringParameter(this, "directorClass");

        // Set the director to the default. Note that doing
        // this manually rather than in attributeChanged() prevents
        // attributeChanged() from issuing a change request
        // (because the director class matches the default).
View Full Code Here

TOP

Related Classes of ptolemy.data.expr.StringParameter

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.