Class ShapeTextVisitor

  extended by org.apache.poi.xdgf.usermodel.shape.ShapeVisitor
      extended by org.apache.poi.xdgf.usermodel.shape.ShapeTextVisitor

public class ShapeTextVisitor
extends ShapeVisitor

Only visits text nodes, accumulates text content into a string The text is returned in arbitrary order, with no regards to the location of the text on the page. This may change in the future.

Nested Class Summary
static class ShapeTextVisitor.TextAcceptor
Field Summary
protected  java.lang.StringBuilder text
Fields inherited from class org.apache.poi.xdgf.usermodel.shape.ShapeVisitor
Constructor Summary
Method Summary
protected  ShapeVisitorAcceptor getAcceptor()
          Is only called on construction of the visitor, allows mixing visitors and acceptors
 java.lang.String getText()
          Call this after visitation has completed
 void visit(XDGFShape shape, java.awt.geom.AffineTransform globalTransform, int level)
Methods inherited from class org.apache.poi.xdgf.usermodel.shape.ShapeVisitor
accept, setAcceptor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected java.lang.StringBuilder text
Constructor Detail


public ShapeTextVisitor()
Method Detail


protected ShapeVisitorAcceptor getAcceptor()
Description copied from class: ShapeVisitor
Is only called on construction of the visitor, allows mixing visitors and acceptors

getAcceptor in class ShapeVisitor


public void visit(XDGFShape shape,
                  java.awt.geom.AffineTransform globalTransform,
                  int level)
Specified by:
visit in class ShapeVisitor
shape - Current shape
globalTransform - A transform that can convert the shapes points to global coordinates
level - Level in the tree (0 is topmost, 1 is next level...


public java.lang.String getText()
Call this after visitation has completed