Package org.apache.poi.hslf.record

Examples of org.apache.poi.hslf.record.EscherTextboxWrapper


    if (er instanceof EscherContainerRecord) {
      buf.append(printEscherContainerRecord( (EscherContainerRecord)er ));
    } else if (er instanceof EscherTextboxRecord) {
      buf.append("EscherTextboxRecord:" + nl);

      EscherTextboxWrapper etw = new EscherTextboxWrapper((EscherTextboxRecord)er);
      Record children[] = etw.getChildRecords();
      for (int j=0; j<children.length; j++) {
        if (children[j] instanceof StyleTextPropAtom) {

          // need preceding Text[Chars|Bytes]Atom to initialize the data structure
          if (j > 0 && (children[j-1] instanceof TextCharsAtom ||
View Full Code Here


        this(null);
    }

    public TextRun createTextRun(){
        _txtbox = getEscherTextboxWrapper();
        if(_txtbox == null) _txtbox = new EscherTextboxWrapper();

        _txtrun = getTextRun();
        if(_txtrun == null){
            TextHeaderAtom tha = new TextHeaderAtom();
            tha.setParentRecord(_txtbox);
View Full Code Here

     * @param sh the sheet we are adding to
     */
    protected void afterInsert(Sheet sh){
        super.afterInsert(sh);

        EscherTextboxWrapper _txtbox = getEscherTextboxWrapper();
        if(_txtbox != null){
            PPDrawing ppdrawing = sh.getPPDrawing();
            ppdrawing.addTextboxWrapper(_txtbox);
            // Ensure the escher layer knows about the added records
            try {
                _txtbox.writeOut(null);
            } catch (IOException e){
                throw new HSLFException(e);
            }
            if(getAnchor().equals(new Rectangle()) && !"".equals(getText())) resizeToFitText();
        }
View Full Code Here

    }

    protected EscherTextboxWrapper getEscherTextboxWrapper(){
        if(_txtbox == null){
            EscherTextboxRecord textRecord = (EscherTextboxRecord)Shape.getEscherChild(_escherContainer, EscherTextboxRecord.RECORD_ID);
            if(textRecord != null) _txtbox = new EscherTextboxWrapper(textRecord);
        }
        return _txtbox;
    }
View Full Code Here

        }

    }

    protected void initTextRun(){
        EscherTextboxWrapper txtbox = getEscherTextboxWrapper();
        Sheet sheet = getSheet();

        if(sheet == null || txtbox == null) return;

        OutlineTextRefAtom ota = null;

        Record[] child = txtbox.getChildRecords();
        for (int i = 0; i < child.length; i++) {
            if (child[i] instanceof OutlineTextRefAtom) {
                ota = (OutlineTextRefAtom)child[i];
                break;
            }
View Full Code Here

        this(null);
    }

    public TextRun createTextRun(){
        _txtbox = getEscherTextboxWrapper();
        if(_txtbox == null) _txtbox = new EscherTextboxWrapper();

        _txtrun = getTextRun();
        if(_txtrun == null){
            TextHeaderAtom tha = new TextHeaderAtom();
            tha.setParentRecord(_txtbox);
View Full Code Here

     * @param sh the sheet we are adding to
     */
    protected void afterInsert(Sheet sh){
        super.afterInsert(sh);

        EscherTextboxWrapper _txtbox = getEscherTextboxWrapper();
        if(_txtbox != null){
            PPDrawing ppdrawing = sh.getPPDrawing();
            ppdrawing.addTextboxWrapper(_txtbox);
            // Ensure the escher layer knows about the added records
            try {
                _txtbox.writeOut(null);
            } catch (IOException e){
                throw new HSLFException(e);
            }
            if(getAnchor().equals(new Rectangle()) && !"".equals(getText())) resizeToFitText();
        }
View Full Code Here

    }

    protected EscherTextboxWrapper getEscherTextboxWrapper(){
        if(_txtbox == null){
            EscherTextboxRecord textRecord = (EscherTextboxRecord)Shape.getEscherChild(_escherContainer, EscherTextboxRecord.RECORD_ID);
            if(textRecord != null) _txtbox = new EscherTextboxWrapper(textRecord);
        }
        return _txtbox;
    }
View Full Code Here

        }

    }

    protected void initTextRun(){
        EscherTextboxWrapper txtbox = getEscherTextboxWrapper();
        Sheet sheet = getSheet();

        if(sheet == null || txtbox == null) return;

        OutlineTextRefAtom ota = null;

        Record[] child = txtbox.getChildRecords();
        for (int i = 0; i < child.length; i++) {
            if (child[i] instanceof OutlineTextRefAtom) {
                ota = (OutlineTextRefAtom)child[i];
                break;
            }
View Full Code Here

        shape.setSheet(sheet);
        shape.afterInsert(sheet);

        if (shape instanceof TextShape) {
            TextShape tbox = (TextShape) shape;
            EscherTextboxWrapper txWrapper = tbox.getEscherTextboxWrapper();
            if(txWrapper != null) getSheet().getPPDrawing().addTextboxWrapper(txWrapper);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hslf.record.EscherTextboxWrapper

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.