Example usage for org.apache.poi.xdgf.usermodel XDGFConnection visBegin

List of usage examples for org.apache.poi.xdgf.usermodel XDGFConnection visBegin

Introduction

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

Prototype

int visBegin

To view the source code for org.apache.poi.xdgf.usermodel XDGFConnection visBegin.

Click Source Link

Usage

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

License:Apache License

protected void collectConnections() {

    if (!helper.useRealConnections())
        return;//from w  ww .  j  a va2s  .co  m

    for (XDGFConnection conn : pageContents.getConnections()) {
        // if we get the connection point, then it has to be in real coordinates

        Double x = null, y = null;
        XDGFShape from = conn.getFromShape();
        XDGFShape to = conn.getToShape();

        ShapeData fromShapeData = findShapeOrParent(from.getID());

        switch (conn.getFromPart()) {
        case XDGFConnection.visBegin:
            x = fromShapeData.path1Dstart.getX();
            y = fromShapeData.path1Dstart.getY();
            break;
        case XDGFConnection.visEnd:
            x = fromShapeData.path1Dend.getX();
            y = fromShapeData.path1Dend.getY();
            break;
        default:
            break;
        }

        createEdge(from, to, "real", x, y);
    }
}