Package org.docx4j.finders
Class TableFinder
java.lang.Object
org.docx4j.TraversalUtil.CallbackImpl
org.docx4j.finders.TableFinder
- All Implemented Interfaces:
TraversalUtil.Callback
public class TableFinder extends TraversalUtil.CallbackImpl
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TableFinder() -
Method Summary
Modifier and Type Method Description java.util.List<java.lang.Object>apply(java.lang.Object o)Visits a node in pre order (before its children have been visited).voidsetTraverseTables(boolean traveseTables)Defaults to false; set this to true unless you don't want to traverse a table (eg a nested table).booleanshouldTraverse(java.lang.Object o)Decide whether this node's children should be traversed.Methods inherited from class org.docx4j.TraversalUtil.CallbackImpl
getChildren, walkJAXBElementsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
tblList
-
-
Constructor Details
-
TableFinder
public TableFinder()
-
-
Method Details
-
setTraverseTables
public void setTraverseTables(boolean traveseTables)Defaults to false; set this to true unless you don't want to traverse a table (eg a nested table). NB: If traversing from body level, you'll need to set it to true!- Parameters:
traveseNestedTable-
-
apply
public java.util.List<java.lang.Object> apply(java.lang.Object o)Description copied from class:TraversalUtil.CallbackImplVisits a node in pre order (before its children have been visited). A node is visited only if all its parents have been traversed (TraversalUtil.CallbackImpl.shouldTraverse(Object)).Implementations can have side effects.
- Specified by:
applyin interfaceTraversalUtil.Callback- Specified by:
applyin classTraversalUtil.CallbackImpl
-
shouldTraverse
public boolean shouldTraverse(java.lang.Object o)Description copied from class:TraversalUtil.CallbackImplDecide whether this node's children should be traversed.- Specified by:
shouldTraversein interfaceTraversalUtil.Callback- Overrides:
shouldTraversein classTraversalUtil.CallbackImpl- Returns:
- whether the children of this node should be visited
-