Package org.apache.poi.ddf

Examples of org.apache.poi.ddf.EscherChildAnchorRecord


            return anchor;
        }
        else
        {
            HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
            EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
            anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
            anchor.setOptions( (short) 0x0000 );
            anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
            anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
            anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
            anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
            return anchor;
        }
    }
View Full Code Here


            return anchor;
        }
        else
        {
            HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
            EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
            anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
            anchor.setOptions( (short) 0x0000 );
            anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
            anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
            anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
            anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
            return anchor;
        }
    }
View Full Code Here

            return anchor;
        }
        else
        {
            HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
            EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
            anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
            anchor.setOptions( (short) 0x0000 );
            anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
            anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
            anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
            anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
            return anchor;
        }
    }
View Full Code Here

            return anchor;
        }
        else
        {
            HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
            EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
            anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
            anchor.setOptions( (short) 0x0000 );
            anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
            anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
            anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
            anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
            return anchor;
        }
    }
View Full Code Here

            EscherClientAnchorRecord anchorRecord = (EscherClientAnchorRecord) getEscherChild(
                shapeContainer,
                EscherClientAnchorRecord.RECORD_ID );

            EscherChildAnchorRecord childRecord = (EscherChildAnchorRecord) getEscherChild(
                shapeContainer,
                EscherChildAnchorRecord.RECORD_ID );

            if (anchorRecord!=null && childRecord!=null){
              log.log( POILogger.WARN, "Picture with both CLIENT and CHILD anchor: "+ type );
View Full Code Here

    public HSSFChildAnchor(EscherChildAnchorRecord escherChildAnchorRecord) {
        this._escherChildAnchor = escherChildAnchorRecord;
    }

    public HSSFChildAnchor() {
        _escherChildAnchor = new EscherChildAnchorRecord();
    }
View Full Code Here

        return _escherChildAnchor;
    }

    @Override
    protected void createEscherAnchor() {
        _escherChildAnchor = new EscherChildAnchorRecord();
    }
View Full Code Here

            return anchor;
        }
        else
        {
            HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
            EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
            anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
            anchor.setOptions( (short) 0x0000 );
            anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
            anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
            anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
            anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
            return anchor;
        }
    }
View Full Code Here

            anchor.setRow2( (short) Math.max(a.getRow1(), a.getRow2()) );
            anchor.setDy2( (short) a.getDy2() );
            return anchor;
        }
        HSSFChildAnchor a = (HSSFChildAnchor) userAnchor;
        EscherChildAnchorRecord anchor = new EscherChildAnchorRecord();
        anchor.setRecordId( EscherChildAnchorRecord.RECORD_ID );
        anchor.setOptions( (short) 0x0000 );
        anchor.setDx1( (short) Math.min(a.getDx1(), a.getDx2()) );
        anchor.setDy1( (short) Math.min(a.getDy1(), a.getDy2()) );
        anchor.setDx2( (short) Math.max(a.getDx2(), a.getDx1()) );
        anchor.setDy2( (short) Math.max(a.getDy2(), a.getDy1()) );
        return anchor;
    }
View Full Code Here

        EscherContainerRecord spContainer = (EscherContainerRecord)_escherContainer.getChild(0);
        EscherClientAnchorRecord clientAnchor = (EscherClientAnchorRecord)getEscherChild(spContainer, EscherClientAnchorRecord.RECORD_ID);
        Rectangle2D.Float anchor = new Rectangle2D.Float();
        if(clientAnchor == null){
            logger.log(POILogger.INFO, "EscherClientAnchorRecord was not found for shape group. Searching for EscherChildAnchorRecord.");
            EscherChildAnchorRecord rec = (EscherChildAnchorRecord)getEscherChild(spContainer, EscherChildAnchorRecord.RECORD_ID);
            anchor = new Rectangle2D.Float(
                (float)rec.getDx1()*POINT_DPI/MASTER_DPI,
                (float)rec.getDy1()*POINT_DPI/MASTER_DPI,
                (float)(rec.getDx2()-rec.getDx1())*POINT_DPI/MASTER_DPI,
                (float)(rec.getDy2()-rec.getDy1())*POINT_DPI/MASTER_DPI
            );
        } else {
            anchor.x = (float)clientAnchor.getCol1()*POINT_DPI/MASTER_DPI;
            anchor.y = (float)clientAnchor.getFlag()*POINT_DPI/MASTER_DPI;
            anchor.width = (float)(clientAnchor.getDx1() - clientAnchor.getCol1())*POINT_DPI/MASTER_DPI ;
View Full Code Here

TOP

Related Classes of org.apache.poi.ddf.EscherChildAnchorRecord

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.