Examples of EscherTextboxWrapper


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

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

        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

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

     * @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

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

    }

    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

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

        }

    }

    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

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

        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

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

     * @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

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

    }

    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

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

        }

    }

    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

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

        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
Copyright © 2018 www.massapi.com. 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.