Examples of Tableau


Examples of ptolemy.actor.gui.Tableau

                    // NOTE: Used to use for the first argument the following,
                    // but it seems to not work for relative file references:
                    // new URL("file", null, _directory.getAbsolutePath()
                    Configuration configuration = getConfiguration();
                    Tableau newAutomatonTableau = configuration.openModel(url,
                            url, url.toExternalForm());

                    // compose the two interface automata and show result
                    InterfaceAutomaton model1 = (InterfaceAutomaton) getFrame()
                            .getModel();
                    InterfaceAutomatonGraphFrame graphFrame2 = (InterfaceAutomatonGraphFrame) newAutomatonTableau
                            .getFrame();
                    InterfaceAutomaton model2 = (InterfaceAutomaton) graphFrame2
                            .getModel();

                    InterfaceAutomaton composition = model1.compose(model2);
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

                // one that agrees to open the model.
                while (factories.hasNext() && (factory == null)) {
                    factory = (TableauFactory) factories.next();

                    try {
                        Tableau tableau = factory.createTableau(effigy);

                        if (tableau != null) {
                            // The first tableau is a master if the container
                            // of the containing effigy is the model directory.
                            // Used to do this:
                            // if (effigy.getContainer() instanceof ModelDirectory) {
                            if (effigy.masterEffigy() == effigy) {
                                tableau.setMaster(true);
                            }

                            tableau.setEditable(effigy.isModifiable());

                            //THALES MODIF
                            catchTableau(tableau);
                            tableau.show();
                            return tableau;
                        }
                    } catch (Exception ex) {
                        // Ignore so we keep trying.
                        factory = null;
                    }
                }
            }
        }

        // Defer to the configuration.
        // Create a tableau if there is a tableau factory.
        factory = (TableauFactory) getAttribute("tableauFactory");

        if (factory != null) {
            // If this fails, we do not want the effigy to linger
            try {
                Tableau tableau = factory.createTableau(effigy);

                if (tableau == null) {
                    throw new Exception("Tableau factory returns null.");
                }

                // The first tableau is a master if the container
                // of the containing effigy is the model directory.
                if (effigy.getContainer() instanceof ModelDirectory) {
                    tableau.setMaster(true);
                }

                tableau.setEditable(effigy.isModifiable());

                //THALES MODIF
                catchTableau(tableau);
                tableau.show();
                return tableau;
            } catch (Exception ex) {
                // Note that we can't rethrow the exception here
                // because removing the effigy may result in
                // the application exiting.
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

    /** Add a Build menu item.
     */
    protected void _addMenus() {
        super._addMenus();

        Tableau tableau = getTableau();
        if (tableau != null) {
            Effigy tableauContainer = (Effigy) tableau.getContainer();
            if (tableauContainer != null) {
                JMenu buildMenu = new JMenu("Build");
                buildMenu.setMnemonic(KeyEvent.VK_B);
                _menubar.add(buildMenu);

View Full Code Here

Examples of ptolemy.actor.gui.Tableau

     */
    public boolean closeTabbedPane(Component aComp) {
        boolean answer = true;

        String name = aComp.getName();
        Tableau tableau = findComponentTableau(name);

        if (tableau != null) {
            answer = tableau.close();

            if (answer) {
                tableau.getFrame().dispose();
                removeTab(name);
            }
        }

        return answer;
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

     * Removes the corresponding Tab according to the Component name
     * @param tableauFullName
     */
    public void removeTab(String tableauFullName) {
        int idx = findComponentIndex(tableauFullName);
        Tableau tab = findComponentTableau(tableauFullName);

        if (tab != null) {
            Frame frame = tab.getFrame();

            if (frame instanceof NavigableActorGraphFrame) {
                NavigableActorGraphFrame navFrame = (NavigableActorGraphFrame) frame;
                NavigationPTree aTree = navFrame.getTree();

                Nameable effigy = tab.getContainer();

                if (effigy instanceof NavigableEffigy) {
                    NavigableEffigy navEff = (NavigableEffigy) effigy;
                    navEff.getNavigationModel().unRegister(aTree);
                }
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

    public void initialize() throws IllegalActionException {
        super.initialize();
        if (_table == null) {
            Effigy containerEffigy = Configuration.findEffigy(toplevel());
            try {
                _tableau = new Tableau(containerEffigy, "tableau");
            } catch (NameDuplicationException e) {
                throw new IllegalActionException(this, e,
                        "Failed to create tableau.");
            }
            _frame = new TableauFrame(_tableau);
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

        for (int i = 0; i < _viewsTabbedPane.getComponentCount(); ++i) {
            String name = _viewsTabbedPane.getComponentAt(i).getName();

            if (name != null) { //Not using

                Tableau tableau = findComponentTableau(name);

                if (tableau == null) {
                    removeTab(name);
                    --i;
                }
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

            if (aComp != null) {
                String name = aComp.getName();

                if ((name != null) && !name.equals("Start")) {
                    Tableau tableau = findComponentTableau(name);

                    if (tableau != null) {
                        fillMainFrame(tableau.getFrame().getJMenuBar());
                        _statusBar.setVisible(false);
                    }
                } else {
                    //on est dans le cas du start tabbedPane
                    fillMainFrame(_originalMenuBar);
View Full Code Here

Examples of ptolemy.actor.gui.Tableau

     * Component contained by a Tab.
     * @param tableauFullName
     * @return the corresponding Tableau.
     */
    protected Tableau findComponentTableau(String tableauFullName) {
        Tableau answer = null;

        if (tableauFullName != null) {
            tableauFullName = tableauFullName.substring(15, tableauFullName
                    .length());

View Full Code Here

Examples of ptolemy.actor.gui.Tableau

    /** Listener for build menu commands. */
    private class BuildMenuListener implements ActionListener {
        public void actionPerformed(ActionEvent e) {
            try {
                Effigy effigy = (Effigy) getTableau().getContainer();
                Tableau tableau = new DocBuilderTableau(effigy,
                        "DocBuilderTableau");
                tableau.show();
            } catch (Throwable throwable) {
                MessageHandler.error("Cannot create build", throwable);
            }
        }
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.