Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.StringAttribute


                "tokenConsumptionRate");
        control_tokenConsumptionRate.setVisibility(Settable.NOT_EDITABLE);
        control_tokenConsumptionRate.setTypeEquals(BaseType.INT);

        // Put the control input on the bottom of the actor.
        StringAttribute controlCardinal = new StringAttribute(control,
                "_cardinal");
        controlCardinal.setExpression("SOUTH");
    }
View Full Code Here


     */
    public Rotate2D(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        angleType = new StringAttribute(this, "angleType");
        angleType.setExpression("radians");

        initialTheta = new Parameter(this, "initialTheta", new DoubleToken(0.0));
        initialTheta.setTypeEquals(BaseType.DOUBLE);

View Full Code Here

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

        impulse = new TypedIOPort(this, "impulse", true, false);
        impulse.setTypeEquals(BaseType.DOUBLE);
        StringAttribute cardinality = new StringAttribute(impulse, "_cardinal");
        cardinality.setExpression("SOUTH");

        derivative = new TypedIOPort(this, "derivative", true, false);
        derivative.setTypeEquals(BaseType.DOUBLE);

        state = new TypedIOPort(this, "state", false, true);
        state.setTypeEquals(BaseType.DOUBLE);

        initialState = new PortParameter(this, "initialState", new DoubleToken(
                0.0));
        initialState.setTypeEquals(BaseType.DOUBLE);
        cardinality = new StringAttribute(initialState.getPort(), "_cardinal");
        cardinality.setExpression("SOUTH");
    }
View Full Code Here

        super(container, name);

        preferred = new TypedIOPort(this, "preferred", true, false);
        alternate = new TypedIOPort(this, "alternate", true, false);

        StringAttribute controlCardinal = new StringAttribute(alternate,
                "_cardinal");
        controlCardinal.setExpression("SOUTH");

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

        // Default type constraints are the right ones, so we need not
        // explicitly declare them here.
View Full Code Here

        // Set the displayed name.  "_displayedName" is a specially
        // named attribute that is used in {@link
        // ptolemy.vergil.icon.ActorNameIcon} to display the value of
        // the attribute on the actor icon.
        displayedName = new StringAttribute(this, "_displayedName");
        displayedName.setExpression(name);
    }
View Full Code Here

    public State(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        incomingPort = new ComponentPort(this, "incomingPort");
        outgoingPort = new ComponentPort(this, "outgoingPort");
        refinementName = new StringAttribute(this, "refinementName");

        _attachText("_iconDescription", "<svg>\n"
                + "<circle cx=\"0\" cy=\"0\" r=\"20\" style=\"fill:white\"/>\n"
                + "</svg>\n");
View Full Code Here

        // FIXME: Put in a name change from newServiceTime to serviceTime in MoML filters.
        serviceTime = new PortParameter(this, "serviceTime");
        serviceTime.setExpression("1.0");
        serviceTime.setTypeEquals(BaseType.DOUBLE);
        // Put the delay port at the bottom of the icon by default.
        StringAttribute cardinality = new StringAttribute(
                serviceTime.getPort(), "_cardinal");
        cardinality.setExpression("SOUTH");

        _queue = new FIFOQueue();

        size = new TypedIOPort(this, "size", false, true);
        size.setTypeEquals(BaseType.INT);
        // Put it at the bottom of the icon by default.
        cardinality = new StringAttribute(size, "_cardinal");
        cardinality.setExpression("SOUTH");

        capacity = new Parameter(this, "capacity");
        capacity.setTypeEquals(BaseType.INT);
        capacity.setExpression("0");
    }
View Full Code Here

    }

    /** Create the controllerName attribute. */
    private void _createAttribute() {
        try {
            controllerName = new StringAttribute(this, "controllerName");
        } catch (NameDuplicationException ex) {
            throw new InternalErrorException(getName() + "Cannot create "
                    + "controllerName attribute.");
        } catch (IllegalActionException ex) {
            throw new InternalErrorException(getName() + "Cannot create "
View Full Code Here

     */
    public EventButton(CompositeEntity container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        text = new StringAttribute(this, "text");
        text.setExpression("Click!");

        output.setTypeEquals(BaseType.GENERAL);

        _self = this;
View Full Code Here

        trigger = new TypedIOPort(this, "trigger", true, false);
        trigger.setMultiport(true);
        // Leave trigger type undeclared.
        // Put it at the bottom of the icon by default.
        StringAttribute cardinality = new StringAttribute(trigger, "_cardinal");
        cardinality.setExpression("SOUTH");

        size = new TypedIOPort(this, "size", false, true);
        size.setTypeEquals(BaseType.INT);
        // Put it at the bottom of the icon by default.
        cardinality = new StringAttribute(size, "_cardinal");
        cardinality.setExpression("SOUTH");

        _queue = new FIFOQueue();

        capacity = new Parameter(this, "capacity");
        capacity.setTypeEquals(BaseType.INT);
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.StringAttribute

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.