Examples of CompositeEntity


Examples of org.apache.tuscany.sca.diagram.layout.CompositeEntity

                DocumentBuilder db = dbf.newDocumentBuilder();
                Document doc = db.parse(str);

                EntityBuilder eb = new EntityBuilder(doc);
                CompositeEntity comp = eb.buildCompositeEntity();

                DiagramGenerator dg = new DiagramGenerator(comp, isHtml, baseURL);
                Document svg = dg.buildSVGDocument();

                if (isJpeg) {
                    String jpgFileName = comp.getName() + comp.getFileNameSuffix() + ".jpg";
                    svgToJPEG(svg, new File(dir, jpgFileName));
                }

                String svgContent = extractSvg(svg);
View Full Code Here

Examples of org.eurekastreams.server.domain.CompositeEntity

    @Test
    public void represent() throws ResourceException, IOException
    {
        final Variant variant = context.mock(Variant.class);

        final CompositeEntity cmpEntity = context.mock(CompositeEntity.class);

        final String overview = "Entity overview";

        final Set<Person> coordinators = new HashSet<Person>();
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

        //         prnPanel.setBackground(null);
        //         prnPanel.setLayout(new BorderLayout());
        //         prnPanel.add(new JLabel("SNR (dB)"), BorderLayout.NORTH);
        //         displayPanel.add(prnPanel, BorderLayout.SOUTH);

        CompositeEntity toplevel = (CompositeEntity) _toplevel;
        ImageDisplay consumer = (ImageDisplay) toplevel.getEntity("Compressed");
        compressedPanel.add(new JLabel("Compressed"), BorderLayout.NORTH);
        consumer.place(compressedPanel);
        displayPanel.add(compressedPanel, BorderLayout.EAST);
        consumer.setBackground(null);

        ImageDisplay original = (ImageDisplay) toplevel.getEntity("Original");
        originalPanel.add(new JLabel("Original"), BorderLayout.NORTH);
        original.place(originalPanel);
        displayPanel.add(originalPanel, BorderLayout.WEST);
        original.setBackground(null);

        SequencePlotter plot = (SequencePlotter) toplevel
                .getEntity("Signal To Noise Ratio");

        JPanel plotPanel = new JPanel();
        plot.place(plotPanel);
        plotPanel.setBackground(null);
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

     *  indicates that the user has canceled the action.
     *  @return False if the user cancels the clear.
     */
    protected boolean _clear() {
        if (super._clear()) {
            setModel(new CompositeEntity());
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

     *   using the same channel.
     */
    private List _findSubscribers() throws IllegalActionException {
        LinkedList result = new LinkedList();
        // Find the nearest opaque container above in the hierarchy.
        CompositeEntity container = (CompositeEntity) getContainer();
        while (container != null && !container.isOpaque()) {
            container = (CompositeEntity) container.getContainer();
        }
        if (container != null) {
            Iterator actors = container.deepEntityList().iterator();
            while (actors.hasNext()) {
                Object actor = actors.next();
                if (actor instanceof Subscriber) {
                    if (((Subscriber) actor).channelMatches(_channel)) {
                        result.add(actor);
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

     @return A unique channel name.
     */
    private String _uniqueChannelName() {
        int suffix = 1;
        // Find the nearest opaque container above in the hierarchy.
        CompositeEntity container = (CompositeEntity) getContainer();
        while (container != null && !container.isOpaque()) {
            container = (CompositeEntity) container.getContainer();
        }
        if (container != null) {
            Iterator actors = container.deepEntityList().iterator();
            while (actors.hasNext()) {
                Object actor = actors.next();
                if (actor instanceof Publisher && actor != this) {
                    String nameInUse = ((Publisher) actor)._channel;
                    if (nameInUse != null && nameInUse.startsWith("channel")) {
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

     @return A list of publishers.
     */
    private List _findPublishers() {
        List result = new LinkedList();
        // Find the nearest opaque container above in the hierarchy.
        CompositeEntity container = (CompositeEntity) getContainer();
        while (container != null && !container.isOpaque()) {
            container = (CompositeEntity) container.getContainer();
        }
        if (container != null) {
            Iterator actors = container.deepEntityList().iterator();
            while (actors.hasNext()) {
                Object actor = actors.next();
                if (actor instanceof Publisher) {
                    if (channelMatches(((Publisher) actor)._channel)) {
                        result.add(actor);
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

        super.invalidateSchedule();

        // Kill the firing counts, which may be invalid.  If we don't
        // kill them, then the manager might complain that they cannot
        // be evaluated.
        CompositeEntity container = (CompositeEntity) getContainer();

        if (container != null) {
            for (Iterator entities = container.deepEntityList().iterator(); entities
                    .hasNext();) {
                Entity actor = (Entity) entities.next();
                Variable parameter = (Variable) actor
                        .getAttribute("firingCount");
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

        super.initialize();

        _isOff = Boolean.TRUE;

        // Get the channel specified by the channelName parameter.
        CompositeEntity container = (CompositeEntity) getContainer();
        Entity channel = container.getEntity(channelName.stringValue());

        if (channel instanceof WirelessChannel) {
            _channel = (WirelessChannel) channel;
            ((WirelessChannel) channel).addChannelListener(this);
        } else {
View Full Code Here

Examples of ptolemy.kernel.CompositeEntity

        super.preinitialize();

        // Check that no relation has multiple sources of data connected to it.
        // FIXME: This only detects the error at this level of the hierarchy.
        // Probably need to recursively descend into composite actors.
        CompositeEntity container = (CompositeEntity) getContainer();
        Iterator relations = container.relationList().iterator();

        while (relations.hasNext()) {
            IORelation relation = (IORelation) relations.next();

            if (relation.linkedSourcePortList().size() > 1) {
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.