Example usage for org.apache.poi.xdgf.usermodel XDGFShape getSymbolName

List of usage examples for org.apache.poi.xdgf.usermodel XDGFShape getSymbolName

Introduction

In this page you can find the example usage for org.apache.poi.xdgf.usermodel XDGFShape getSymbolName.

Prototype

public String getSymbolName() 

Source Link

Usage

From source file:com.bbn.poi.xdgf.parsers.ShapeData.java

License:Apache License

public static boolean isInteresting(XDGFShape shape) {
    return !shape.getSymbolName().isEmpty() || shape.isShape1D() || shape.hasMaster() || shape.hasText();
}

From source file:com.bbn.poi.xdgf.parsers.VisioPageParser.java

License:Apache License

protected void collectShapes() {

    pageContents.visitShapes(new ShapeVisitor() {

        @Override//from   w ww. j a  v a  2  s.  c o  m
        public org.apache.poi.xdgf.usermodel.shape.ShapeVisitorAcceptor getAcceptor() {
            return new ShapeDataAcceptor();
        };

        @Override
        public void visit(XDGFShape shape, AffineTransform globalTransform, int level) {

            ShapeData shapeData = new ShapeData(shape, globalTransform);

            if (shapeData.hasText && reassignTextNodeToParent(shape, shapeData)) {
                return;
            }

            String id = pageId + ": " + shape.getID();
            Vertex vertex = graph.addVertex(id);

            shapeData.vertex = vertex;

            // useful properties for later... 
            vertex.setProperty("label", shape.getTextAsString());
            vertex.setProperty("shapeId", shape.getID());

            vertex.setProperty("group", "");
            vertex.setProperty("groupId", "");
            vertex.setProperty("inSecondaryGroup", false);
            vertex.setProperty("is1d", shape.isShape1D());
            vertex.setProperty("name", shape.getName());
            vertex.setProperty("pageName", pageName);
            vertex.setProperty("symbolName", shape.getSymbolName());
            vertex.setProperty("type", shape.getShapeType());

            // this isn't actually accurate
            //vertex.setProperty("visible", shape.isVisible());

            // local coordinates
            vertex.setProperty("x", shapeData.getCenterX());
            vertex.setProperty("y", shapeData.getCenterY());

            helper.onCreate(shapeData, shape);

            shapesMap.put(shape.getID(), shapeData);
            shapes.add(shapeData);
        }
    });
}