Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.StringAttribute


     *   editor.
     */
    public void createEditor(NamedObj object, Frame parent) {
        if (_editor == null) {
            try {
                StringAttribute attributeToEdit = (StringAttribute) getContainer()
                        .getAttribute(attributeName.getExpression(),
                                StringAttribute.class);
                int numberOfRows = ((IntToken) rowsDisplayed.getToken())
                        .intValue();
                int numberOfColumns = ((IntToken) columnsDisplayed.getToken())
View Full Code Here


     */
    public SingleWindowHTMLViewerTableau(Effigy container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        url = new StringAttribute(this, "url");

        SingleWindowHTMLViewer frame = new SingleWindowHTMLViewer();
        setFrame(frame);
        frame.setTableau(this);
    }
View Full Code Here

                    if (modified == null) {
                        modified = new TypedIOPort(this, "modified", false,
                                true);
                        modified.setTypeEquals(BaseType.BOOLEAN);
                        modified.setPersistent(false);
                        new StringAttribute(modified, "_cardinal")
                                .setExpression("SOUTH");
                    }
                } catch (KernelException e) {
                    throw new InternalErrorException(this, e,
                            "Cannot remove port.");
                }
            } else if (modeString.equals(Mode.EXPERT.toString())) {
                try {
                    boolean repeat = ((BooleanToken) repeatUntilFixpoint
                            .getToken()).booleanValue();
                    if (repeat) {
                        // Repeat is not supported in EXPERT mode, so do not
                        // modify the ports; otherwise, the links to the
                        // original ports will be lost after cancellation.
                        return;
                    }
                } catch (IllegalActionException e) {
                    throw new InternalErrorException(e);
                }
                try {
                    if (modified != null) {
                        modified.setContainer(null);
                        modified = null;
                    }
                    if (matchInput == null) {
                        matchInput = new TypedIOPort(this, "matchInput", true,
                                false);
                        matchInput.setTypeEquals(BaseType.OBJECT);
                        matchInput.setPersistent(false);
                    }
                    if (matchOutput == null) {
                        matchOutput = new TypedIOPort(this, "matchOutput",
                                false, true);
                        matchOutput.setTypeEquals(BaseType.OBJECT);
                        matchOutput.setPersistent(false);
                    }
                    if (trigger == null) {
                        trigger = new TypedIOPort(this, "trigger", true, false);
                        trigger.setTypeEquals(BaseType.BOOLEAN);
                        trigger.setPersistent(false);
                        new StringAttribute(trigger, "_cardinal")
                                .setExpression("SOUTH");
                    }
                    if (remaining == null) {
                        remaining = new TypedIOPort(this, "remaining", false,
                                true);
                        remaining.setTypeEquals(BaseType.INT);
                        remaining.setPersistent(false);
                        new StringAttribute(remaining, "_cardinal")
                                .setExpression("SOUTH");
                    }
                } catch (KernelException e) {
                    throw new InternalErrorException(this, e,
                            "Cannot create port.");
View Full Code Here

     *   actor with the specified name.
     */
    public ClassWrapper(CompositeEntity container, String name)
            throws NameDuplicationException, IllegalActionException {
        super(container, name);
        className = new StringAttribute(this, "className");
    }
View Full Code Here

        String version = VersionAttribute.majorCurrentVersion();

        String applicationName = "Ptolemy II";

        try {
            StringAttribute applicationNameAttribute = (StringAttribute) configuration
                    .getAttribute("_applicationName", StringAttribute.class);

            if (applicationNameAttribute != null) {
                applicationName = applicationNameAttribute.getExpression();
            }
        } catch (Throwable throwable) {
            // Ignore and use the default applicationName
        }
View Full Code Here

    }

    private String _momlAnnotate(NamedObj entity, String color,
            String expression) {
        String colorProperty = null;
        StringAttribute currentColor = (StringAttribute) (entity
                .getAttribute("_color"));

        if ((currentColor != null) && (color == null)) {
            colorProperty = "<deleteProperty _name=_color/>";
        } else if (color != null) {
View Full Code Here

     */
    public FileEditorTableauFactory(NamedObj container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);

        attributeName = new StringAttribute(this, "attributeName");
    }
View Full Code Here

        selectedA = new TypedIOPort(this, "selectedA", false, true);
        selectedA.setTypeEquals(BaseType.BOOLEAN);

        // Add an attribute to get the port placed on the bottom.
        StringAttribute channelCardinal = new StringAttribute(selectedA,
                "_cardinal");
        channelCardinal.setExpression("SOUTH");

        _attachText("_iconDescription", "<svg>\n"
                + "<polygon points=\"-10,20 10,10 10,-10, -10,-20\" "
                + "style=\"fill:blue\"/>\n" + "</svg>\n");
    }
View Full Code Here

        precision = new Parameter(this, "precision");
        precision.setTypeEquals(BaseType.INT_MATRIX);
        precision.setExpression("[16, 2]");

        rounding = new StringAttribute(this, "rounding");
        rounding.setExpression("nearest");

        overflow = new StringAttribute(this, "overflow");
        overflow.setExpression("saturate");
    }
View Full Code Here

        helpFile = "ptolemy/vergil/actor/docViewerHelp.htm";

        // We handle the applicationName specially so that we open
        // only the docs for the app we are running.
        try {
            StringAttribute applicationNameAttribute = (StringAttribute) configuration
                    .getAttribute("_applicationName", StringAttribute.class);

            if (applicationNameAttribute != null) {
                _applicationName = applicationNameAttribute.getExpression();
            }
        } catch (Throwable throwable) {
            // Ignore and use the default applicationName: "",
            // which means we look in doc.codeDoc.
        }
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.