Examples of buttonPressed()


Examples of ptolemy.gui.ComponentDialog.buttonPressed()

                    "Delete a argument for " + _target.getFullName(), query,
                    null);

            // If the OK button was pressed, then queue a mutation
            // to delete the argument.
            if (dialog.buttonPressed().equals("OK")) {
                String argumentName = query.getStringValue("delete");

                if (argumentName != null) {
                    Argument argument = _target.getArgument(argumentName);
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

        // A blank property name is interpreted as a cancel.
        String newName = _query.getStringValue(name + " Name");
        String newCType = _query.getStringValue(name + " CType");
        String newKind = _query.getStringValue(name + " Kind");

        if (dialog.buttonPressed().equals("OK") && !newName.equals("")
                && !newCType.equals("") && !newKind.equals("")) {
            //set name
            Argument argument = _target.getArgument(newName);

            if (argument == null) {
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

     */
    public void createEditor(NamedObj object, Frame parent) {
        ComponentDialog dialog = new ComponentDialog(parent,
                "Configure JNI Actor", createEditorPane(), _moreButtons);

        String button = dialog.buttonPressed();

        if (button.equals("Cancel")) {
            return;
        }

View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

            // If the OK button was pressed, then queue a mutation
            // to delete the parameter.
            String deleteName = query.getStringValue("delete");

            if (dialog.buttonPressed().equals("OK") && !deleteName.equals("")) {
                String moml = "<deleteProperty name=\"" + deleteName + "\"/>";
                _target.addChangeListener(this);

                MoMLChangeRequest request = new MoMLChangeRequest(this,
                        _target, moml);
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

            try {
                StyleConfigurer panel = new StyleConfigurer(target);
                ComponentDialog dialog = new ComponentDialog(_owner,
                        "Edit preferences for " + target.getName(), panel);

                if (!(dialog.buttonPressed().equals("OK"))) {
                    // Restore original parameter values.
                    panel.restore();
                }

                new EditParametersDialog(_owner, _target);
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

                        + "\n\nPlease enter a new default value:", newName,
                        _query.getStringValue("default"), _query
                                .getStringValue("class"));
                _target.removeChangeListener(EditParametersDialog.this);

                if (!dialog.buttonPressed().equals("OK")) {
                    // Remove the parameter, since it seems to be erroneous
                    // and the user hit cancel or close.
                    String moml = "<deleteProperty name=\"" + newName + "\"/>";
                    MoMLChangeRequest request = new MoMLChangeRequest(this,
                            _target, moml);
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

        // Need to escape quotes in default value.
        String newDefValue = StringUtilities.escapeForXML(_query
                .getStringValue("default"));

        if (dialog.buttonPressed().equals("OK") && !newName.equals("")) {
            String moml = "<property name=\"" + newName + "\" value=\""
                    + newDefValue + "\" class=\""
                    + _query.getStringValue("class") + "\"/>";
            _target.addChangeListener(this);
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

        }

        ComponentDialog dialog = new ComponentDialog(frame, "Set plot format",
                this, buttons);

        if (dialog.buttonPressed().equals("Apply")) {
            apply();
        } else {
            restore();
        }
    }
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

            if (directoryFile == null) {
                ComponentDialog dialog = new ComponentDialog(
                        TransformationEditor.this, "Select Model Directory",
                        new Configurer(_attribute));
                if (dialog.buttonPressed().equalsIgnoreCase("OK")) {
                    try {
                        directoryFile = _attribute.directory.asFile();
                        fileFilter = _attribute.fileFilter.getExpression();
                        subdirs = ((BooleanToken) _attribute.subdirs.getToken())
                                .booleanValue();
View Full Code Here

Examples of ptolemy.gui.ComponentDialog.buttonPressed()

                            Long.toString(_lastDelayTime));

                    ComponentDialog dialog = new ComponentDialog(
                            FSMGraphFrame.this, "Delay for Animation", query);

                    if (dialog.buttonPressed().equals("OK")) {
                        try {
                            _lastDelayTime = Long.parseLong(query
                                    .getStringValue("delay"));
                            _controller.setAnimationDelay(_lastDelayTime);
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.