Package ptolemy.kernel

Examples of ptolemy.kernel.CompositeEntity


    public Object getChild(Object parent, int index) {
        if (index > getChildCount(parent)) {
            return null;
        }

        CompositeEntity entity = (CompositeEntity) parent;
        return entity.entityList().get(index);
    }
View Full Code Here


    public int getChildCount(Object parent) {
        if (!(parent instanceof CompositeEntity)) {
            return 0;
        }

        CompositeEntity entity = (CompositeEntity) parent;
        return entity.numberOfEntities();
    }
View Full Code Here

    public int getIndexOfChild(Object parent, Object child) {
        if (!(parent instanceof CompositeEntity)) {
            return -1;
        }

        CompositeEntity entity = (CompositeEntity) parent;
        return entity.entityList().indexOf(child);
    }
View Full Code Here

    public void show() {
        JFrame frame = getFrame();

        if (frame == null) {
            PtolemyEffigy container = (PtolemyEffigy) getContainer();
            CompositeEntity model = (CompositeEntity) container.getModel();

            frame = new TreeFrame(model);
            frame.setBackground(BACKGROUND_COLOR);

            // Give a reasonable default size.
View Full Code Here

                        || _isOpaque((CompositeEntity) child)) {
                    if (!excludedObjects.contains(child)) {
                        return (NamedObj) child;
                    }
                } else {
                    CompositeEntity compositeEntity = (CompositeEntity) child;
                    NamedObj childObject = findFirstChild(compositeEntity,
                            indexedLists, excludedObjects);
                    if (childObject != null
                            && !excludedObjects.contains(childObject)) {
                        return childObject;
View Full Code Here

                            || _isOpaque((CompositeEntity) child)) {
                        if (!excludedObjects.contains(child)) {
                            return child;
                        }
                    } else {
                        CompositeEntity compositeEntity = (CompositeEntity) child;
                        NamedObj childObject = findFirstChild(compositeEntity,
                                indexedLists, excludedObjects);
                        if (childObject != null) {
                            return childObject;
                        }
View Full Code Here

            private int _findNextMatch(int index) throws MalformedURLException,
                    Exception {
                for (int i = index + 1; i < _files.length; i++) {
                    List<MatchResult> currentResult = _allResults[i];
                    if (currentResult == null) {
                        CompositeEntity model = _getModel(_files[i]);
                        currentResult = _getMatchResult(model);

                        _models[i] = model;
                        _allResults[i] = currentResult;
View Full Code Here

                return null;
            }

            _parser.reset();
            InputStream stream = file.toURI().toURL().openStream();
            CompositeEntity model = (CompositeEntity) _parser.parse(null,
                    stream);
            return model;
        }
View Full Code Here

                    File file = _getModelFile();
                    if (file == null) {
                        return;
                    }

                    CompositeEntity model = _getModel(file);
                    if (model == null) {
                        return;
                    }

                    List<MatchResult> results = _getMatchResult(model);
View Full Code Here

    public JTabbedPane getTabbedPane() {
        return _tabbedPane;
    }

    public TransformationRule getTransformationRule() {
        CompositeEntity model = getActiveModel();
        NamedObj parent = model.getContainer();
        while (!(parent instanceof TransformationRule)) {
            parent = parent.getContainer();
        }
        return (TransformationRule) parent;
    }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.CompositeEntity

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.