Examples of PortParameter


Examples of ptolemy.actor.parameters.PortParameter

     *   CompositeActor and the name collides with an entity in the container.
     */
    public MovableViewScreen3D(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        viewerPosition = new PortParameter(this, "viewerPosition",
                new ArrayToken("{0.0, 0.0, 2.4}"));
        viewerRotationAxis = new PortParameter(this, "viewerRotationAxis",
                new ArrayToken("{0.0, 0.0, -1.0}"));
        viewerRotationAngle = new PortParameter(this, "viwerRoationAngle",
                new DoubleToken("0.0"));

        viewerPosition.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        viewerRotationAxis.setTypeEquals(new ArrayType(BaseType.DOUBLE));
        viewerRotationAngle.setTypeEquals(BaseType.DOUBLE);
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

     *   actor with this name.
     */
    public TextString3D(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        text = new PortParameter(this, "text");
        text.setStringMode(true);
        text.setExpression("Ptolemy");

        fontFamily = new StringParameter(this, "fontFamily");
        fontFamily.setExpression("SansSerif");
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        input.setTypeEquals(ActorToken.TYPE);

        title = new PortParameter(this, "title");
        title.setStringMode(true);
        title.setExpression("");

        Parameter NONE = new Parameter(this, "NONE");
        NONE.setToken("{x=-1, y=-1}");
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

            // portParameter to get a reference to the ParameterPort.
            if (port instanceof ParameterPort) {
                updateCreatedSet(entity.getFullName() + "." + port.getName(),
                        port, port, objectNameToCreatorName);

                PortParameter parameter = ((ParameterPort) port).getParameter();
                Local parameterLocal = Jimple.v().newLocal("parameter",
                        RefType.v(PtolemyUtilities.portParameterClass));
                body.getLocals().add(parameterLocal);
                body.getUnits().add(
                        Jimple.v().newAssignStmt(
                                parameterLocal,
                                Jimple.v().newVirtualInvokeExpr(
                                        contextLocal,
                                        PtolemyUtilities.getAttributeMethod
                                                .makeRef(),
                                        StringConstant.v(parameter
                                                .getName(context)))));

                // If the class for the object already creates the
                // port, then get a reference to the existing port.
                // First assign to temp
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

            // reference to the ParameterPort.
            if (port instanceof ParameterPort) {
                updateCreatedSet(entity.getFullName() + "." + port.getName(),
                        port, port, objectNameToCreatorName);

                PortParameter parameter = ((ParameterPort) port).getParameter();
                Local parameterLocal = Jimple.v().newLocal("parameter",
                        RefType.v(PtolemyUtilities.portParameterClass));
                body.getLocals().add(parameterLocal);
                body.getUnits().add(
                        Jimple.v().newAssignStmt(
                                parameterLocal,
                                Jimple.v().newVirtualInvokeExpr(
                                        contextLocal,
                                        PtolemyUtilities.getAttributeMethod
                                                .makeRef(),
                                        StringConstant.v(parameter
                                                .getName(context)))));

                // If the class for the object already creates the
                // port, then get a reference to the existing port.
                // First assign to temp
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

        // Hide the directorClass parameter.
        directorClass.setVisibility(Settable.EXPERT);

        // Create the control port.
        control = new PortParameter(this, "control");
        // FIXME: This is awkward... If I provide some
        // non-boolean control input, I get obscure type
        // conflict error messages and have to change this
        // to match.
        control.setExpression("true");
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

            throws NameDuplicationException, IllegalActionException {
        super(container, name);

        output.setTypeEquals(BaseType.DOUBLE);

        mode = new PortParameter(this, "mode", new DoubleToken(0.5));
        mode.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(mode.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        min = new PortParameter(this, "min", new DoubleToken(0.0));
        min.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(min.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);

        max = new PortParameter(this, "max", new DoubleToken(1.0));
        max.setTypeEquals(BaseType.DOUBLE);
        new SingletonParameter(max.getPort(), "_showName")
                .setToken(BooleanToken.TRUE);
    }
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

        // set type constraints.
        output.setTypeAtLeast(ArrayType.elementType(input));

        // Set parameters.
        index = new PortParameter(this, "index");
        index.setTypeEquals(BaseType.INT);
        index.setExpression("0");
    }
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

        array = new TypedIOPort(this, "array", true, false);
        new Parameter(array, "_showName", BooleanToken.TRUE);
        output = new TypedIOPort(this, "output", false, true);

        // Set parameters.
        element = new PortParameter(this, "element");
        new Parameter(element.getPort(), "_showName", BooleanToken.TRUE);

        array.setTypeAtLeast(ArrayType.arrayOf(element));
        output.setTypeAtLeast(array);
    }
View Full Code Here

Examples of ptolemy.actor.parameters.PortParameter

        array = new TypedIOPort(this, "array", true, false);
        new Parameter(array, "_showName", BooleanToken.TRUE);
        output = new TypedIOPort(this, "output", false, true);

        // Set parameters.
        element = new PortParameter(this, "element");
        new Parameter(element.getPort(), "_showName", BooleanToken.TRUE);

        // set type constraints.
        array.setTypeAtLeast(ArrayType.arrayOf(element));
        output.setTypeEquals(BaseType.BOOLEAN);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.