Package ptolemy.gui

Examples of ptolemy.gui.ComponentDialog


                        throw new InternalErrorException(
                                "Expected attribute attached to entry name: "
                                        + entryName);
                    }

                    _dialog = new ComponentDialog(JOptionPane
                            .getFrameForComponent(PtolemyQuery.this), "Error",
                            _query, null);

                    // The above returns only when the modal
                    // dialog is closing.  The following will
View Full Code Here


        query.setTextWidth(20);
        query.addChoice("choice",
                "Choose a data set, then drag the right mouse button", choices,
                choices[0]);

        ComponentDialog dialog = new ComponentDialog(this, "Select dataset",
                query);
        String buttonPressed = dialog.buttonPressed();

        if (buttonPressed.equals("OK")) {
            int result = query.getIntValue("choice");

            if (result > 0) {
View Full Code Here

                            true);

            // FIXME: Need a frame owner for first arg.
            // Perhaps calling getController(), which returns a GraphController
            // will be a good start.
            ComponentDialog dialog = new ComponentDialog(null,
                    "Specify Refinement", query);

            if (!dialog.buttonPressed().equals("OK")) {
                return;
            }

            final String newName = query.getStringValue("Name");
View Full Code Here

    ////                         public methods                    ////

    /** Create an editor for configuring the specified object.
     */
    public void createEditor(final NamedObj object, Frame parent) {
        ComponentDialog dialog = new ComponentDialog(parent, "Edit Parameter "
                + object.getName(), createEditorPane());

        // If we were canceled, then restore the old value.
        if (dialog.buttonPressed().equals("Cancel")) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    NamedObj parent = object.getContainer();
                    String moml = "<property name=\"" + object.getName()
                            + "\" value=\""
View Full Code Here

                    false);

            // FIXME: Need a frame owner for first arg.
            // Perhaps calling getController(), which returns a GraphController
            // will be a good start.
            ComponentDialog dialog = new ComponentDialog(null,
                    "Specify Refinement", query);

            if (!dialog.buttonPressed().equals("OK")) {
                return;
            }

            String refinementName = query.getStringValue("Refinement");
            StringBuffer newRefinements = new StringBuffer();
View Full Code Here

            super.actionPerformed(e);
            // Dialog to ask for a case name.
            Query query = new Query();
            query.addLine("case", "Pattern that the control input must match",
                    "");
            ComponentDialog dialog = new ComponentDialog(CaseGraphFrame.this,
                    "Add Case", query);
            if (dialog.buttonPressed().equals("OK")) {
                final String pattern = query.getStringValue("case");
                // NOTE: We do not use a TransitionRefinement because we don't
                // want the sibling input ports that come with output ports.
                String moml = "<entity name=\""
                        + StringUtilities.escapeForXML(pattern) + "\" class=\""
View Full Code Here

                        caseNames[i] = name;
                        i++;
                    }
                }
                query.addChoice("case", "Remove case", caseNames, caseNames[0]);
                ComponentDialog dialog = new ComponentDialog(
                        CaseGraphFrame.this, "Remove Case", query);
                if (dialog.buttonPressed().equals("OK")) {
                    final String name = query.getStringValue("case");
                    String moml = "<deleteEntity name=\""
                            + StringUtilities.escapeForXML(name) + "\"/>";

                    // The following is, regrettably, copied from ModalTransitionController.
View Full Code Here

    ////                         public methods                    ////

    /** Create an editor for configuring the specified object.
     */
    public void createEditor(NamedObj object, Frame parent) {
        ComponentDialog dialog = new ComponentDialog(parent, "Edit Annotation",
                createEditorPane());

        String button = dialog.buttonPressed();

        if (!button.equals("OK")) {
            return;
        }

View Full Code Here

                            true);

            // FIXME: Need a frame owner for first arg.
            // Perhaps calling getController(), which returns a GraphController
            // will be a good start.
            ComponentDialog dialog = new ComponentDialog(null,
                    "Specify Refinement", query);

            if (!dialog.buttonPressed().equals("OK")) {
                return;
            }

            final String newName = query.getStringValue("Name");
View Full Code Here

                    false);

            // FIXME: Need a frame owner for first arg.
            // Perhaps calling getController(), which returns a GraphController
            // will be a good start.
            ComponentDialog dialog = new ComponentDialog(null,
                    "Specify Refinement", query);

            if (!dialog.buttonPressed().equals("OK")) {
                return;
            }

            String refinementName = query.getStringValue("Refinement");
            StringBuffer newRefinements = new StringBuffer();
View Full Code Here

TOP

Related Classes of ptolemy.gui.ComponentDialog

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.