Package org.apache.tuscany.sca.diagram.artifacts

Examples of org.apache.tuscany.sca.diagram.artifacts.PropertyArtifact


        int propLen = ent.getPropWidth();
        int x = ent.getX() + Constant.SPACING_FOR_COMPONENT_OF_PROPERTY;
        int y = ent.getY() - propLen / 2;

        for (String prop : ent.getProperties()) {
            PropertyArtifact pro = new PropertyArtifact();
            Element property = pro.addElement(doc, svgNS, x, y, propLen);
            Element text = Text.addTextElement(doc, svgNS, x, y - Constant.SPACING_FOR_TEXT, prop);

            Element child = property;
            if (baseURL != null) {
                String url = baseURL + "/components/" + ent.getName() + "/properties/" + prop;
                child = createLink(property, url);
            }

            svgRoot.appendChild(child);
            svgRoot.appendChild(text);

            x += (propLen + Constant.SPACING_FOR_COMPONENT_OF_PROPERTY);

            pro.setName(prop);
            pro.setContainerName(ent.getName());
        }
    }
View Full Code Here


                .getProperties().size());
        //int x= comp.getX() + Constant.SPACING_FOR_COMPOSITE_OF_PROPERTY;
        int y = comp.getY() - propLen / 2;

        for (String prop : comp.getProperties()) {
            PropertyArtifact pro = new PropertyArtifact();
            Element property = pro.addElement(doc, svgNS, x, y, propLen);
            Element text = Text.addTextElement(doc, svgNS, x, y - Constant.SPACING_FOR_TEXT, prop);

            svgRoot.appendChild(property);
            svgRoot.appendChild(text);

            x += (propLen + Constant.SPACING_FOR_COMPOSITE_OF_PROPERTY);

            pro.setName(prop);
            pro.setContainerName(comp.getName());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.diagram.artifacts.PropertyArtifact

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.