Package ptolemy.data.expr

Examples of ptolemy.data.expr.FileParameter


     *  that the file or URL given by that attribute is opened.  Otherwise,
     *  a built-in generic help file is opened.
     */
    protected void _help() {
        try {
            FileParameter helpAttribute = (FileParameter) getModel()
                    .getAttribute("_help", FileParameter.class);
            URL doc = helpAttribute.asURL();
            getConfiguration().openModel(null, doc, doc.toExternalForm());
        } catch (Exception ex) {
            super._help();
        }
    }
View Full Code Here


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

            codeDirectory = new FileParameter(this, "codeDirectory");
            codeDirectory.setExpression("$HOME/codegen/");

            // FIXME: This should not be necessary, but if we don't
            // do it, then getBaseDirectory() thinks we are in the current dir.
            codeDirectory.setBaseDirectory(codeDirectory.asFile().toURI());
View Full Code Here

    ////                         private methods                   ////

    /** Initialize the actor. */
    private void _init() throws IllegalActionException,
            NameDuplicationException {
        source = new FileParameter(this, "source");
        source.setExpression(
                "$PTII/ptolemy/domains/ptinyos/lib/NCComponent.nc");
        source.setVisibility(Settable.EXPERT);

        // Set port orientation so that input ports are on top.
View Full Code Here

                    + "style=\"font-size:20; font-family:SansSerif; fill:white\">"
                    + "PtinyOS</text></svg>");

            // Set the code generation output directory to the current
            // working directory.
            destinationDirectory = new FileParameter(this,
                    "destinationDirectory");
            new Parameter(destinationDirectory, "allowFiles",
                    BooleanToken.FALSE);
            new Parameter(destinationDirectory, "allowDirectories",
                    BooleanToken.TRUE);
            destinationDirectory.setExpression("$CWD");

            // Set so that user must confirm each file that will be
            // overwritten.
            // Note: Default to overwrite w/o asking.
            confirmOverwrite = new Parameter(this, "confirmOverwrite",
                    BooleanToken.FALSE);
            confirmOverwrite.setTypeEquals(BaseType.BOOLEAN);

            // Set path to tinyos-1.x directory.
            tosRoot = new FileParameter(this, "TOSROOT");
            new Parameter(tosRoot, "allowFiles", BooleanToken.FALSE);
            new Parameter(tosRoot, "allowDirectories", BooleanToken.TRUE);
            String tosRootProperty = StringUtilities
                    .getProperty("ptolemy.ptII.tosroot");
            if (tosRootProperty != null) {
                tosRoot.setExpression(tosRootProperty);
            } else {
                tosRoot.setExpression("$PTII/vendors/ptinyos/tinyos-1.x");
            }

            // Set path to tinyos-1.x/tos directory.
            tosDir = new FileParameter(this, "TOSDIR");
            new Parameter(tosDir, "allowFiles", BooleanToken.FALSE);
            new Parameter(tosDir, "allowDirectories", BooleanToken.TRUE);
            String tosDirProperty = StringUtilities
                    .getProperty("ptolemy.ptII.tosdir");
            if (tosDirProperty != null) {
View Full Code Here

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

        fileOrURL = new FileParameter(this, "fileOrURL");

        sceneGraphOut = new TypedIOPort(this, "sceneGraphOut");
        sceneGraphOut.setOutput(true);
        sceneGraphOut.setTypeEquals(Scene2DToken.TYPE);
    }
View Full Code Here

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

        fileName = new FileParameter(this, "fileName");
        fileName.setExpression("System.out");

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

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

        specularColor = new ColorAttribute(this, "specularColor");
        specularColor.setExpression("{1.0, 1.0, 1.0, 1.0}");

        texture = new FileParameter(this, "texture");

        // The following ensures that revert to defaults works properly.
        texture.setExpression("");

        shininess = new DoubleRangeParameter(this, "shininess");
View Full Code Here

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

        fileName = new FileParameter(this, "fileName");
        fileName.setExpression("System.out");

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

     *   an attribute already in the container.
     */
    public ParameterSet(NamedObj container, String name)
            throws IllegalActionException, NameDuplicationException {
        super(container, name);
        fileOrURL = new FileParameter(this, "fileOrURL");
        fileOrURL.setExpression("");

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

        super(container, name);

        _icon = new ImageIcon(this, "_icon");
        _icon.setPersistent(false);

        source = new FileParameter(this, "source");

        // Put the gif in the local directory so that it stays with this actor.
        source
                .setExpression("$CLASSPATH/ptolemy/vergil/kernel/attributes/ptIIplanetIcon.gif");
View Full Code Here

TOP

Related Classes of ptolemy.data.expr.FileParameter

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.