Package ptolemy.data

Examples of ptolemy.data.StringToken.stringValue()


            try {
                str = (StringToken) modelString.get(0);

                _parser.reset();

                CompositeActor model = (CompositeActor) _parser.parse(str
                        .stringValue());
                StringWriter writer = new StringWriter();

                try {
                    model.exportMoML(writer, 1);
View Full Code Here


                } else {
                    _moml = "<group>\n" + modelMoML + "</group>";
                }
            } catch (Exception ex) {
                if (_debugging) {
                    _debug("Problem parsing " + str.stringValue());
                }

                throw new IllegalActionException(this, ex, "Problem parsing "
                        + str.stringValue());
            }
View Full Code Here

                if (_debugging) {
                    _debug("Problem parsing " + str.stringValue());
                }

                throw new IllegalActionException(this, ex, "Problem parsing "
                        + str.stringValue());
            }
        }

        super.fire();
    }
View Full Code Here

                Director director = getDirector();
                if (director != null) {
                    if (director instanceof PtinyOSDirector) {
                        ((PtinyOSDirector)director).receivePacket(
                                token.stringValue());

                    } else {
                        throw new IllegalActionException(
                                "Local director was not of type "
                                + "PtinyOSDirector");
View Full Code Here

            StringToken endsWithToken = (StringToken) endsWith.getToken();

            if (endsWithToken == null) {
                _endsWithValue = null;
            } else {
                _endsWithValue = endsWithToken.stringValue();
            }
        }

        super.attributeChanged(attribute);
    }
View Full Code Here

        StringToken generatorToken = ((StringToken) generatorClass.getToken());
        String generatorClassValue = null;

        if (generatorToken != null) {
            generatorClassValue = generatorToken.stringValue();
        }

        _generatorClassName = generatorClassValue;

        if ((generatorClassValue == null)
View Full Code Here

                if (urlToken == null) {
                    _source = null;
                    _setURLReader(null);
                } else {
                    _source = urlToken.stringValue();

                    if (_source.equals("")) {
                        _setURLReader(null);
                    } else {
                        URL url = new URL(_source);
View Full Code Here

    public void fire() throws IllegalActionException {
        super.fire();
        StringToken urlToken = (StringToken) input.get(0);

        try {
            URL url = new URL(urlToken.stringValue());
            Image image = new ImageIcon(url).getImage();
            output.send(0, new AWTImageToken(image));
        } catch (MalformedURLException ex) {
            throw new IllegalActionException("'" + urlToken.stringValue()
                    + "' is malformed: " + ex);
View Full Code Here

        try {
            URL url = new URL(urlToken.stringValue());
            Image image = new ImageIcon(url).getImage();
            output.send(0, new AWTImageToken(image));
        } catch (MalformedURLException ex) {
            throw new IllegalActionException("'" + urlToken.stringValue()
                    + "' is malformed: " + ex);
        }
    }

    /** Return false if the input port has no token, otherwise return
View Full Code Here

                    StringToken nameToken = (StringToken) (((RecordToken) environmentTokens
                            .getElement(i)).get("name"));
                    StringToken valueToken = (StringToken) (((RecordToken) environmentTokens
                            .getElement(i)).get("value"));
                    environmentArray[i] = nameToken.stringValue() + "="
                            + valueToken.stringValue();

                    if (_debugging) {
                        _debug("  " + i + ". \"" + environmentArray[i] + "\"");
                    }
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.