Class TextStyleNavigation
- java.lang.Object
-
- org.odftoolkit.odfdom.incubator.search.Navigation
-
- org.odftoolkit.odfdom.incubator.search.TextStyleNavigation
-
public class TextStyleNavigation extends Navigation
A derived Navigation class used for navigate the mText content it is used to search the document and find the matched style properties and would return TextSelection instance
-
-
Constructor Summary
Constructors Constructor Description TextStyleNavigation(Map<OdfStyleProperty,String> props, OdfTextDocument doc)Construct TextStyleNavigation with style properties condition and navigation scope
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectiongetCurrentItem()get the current Selection resultbooleanhasNext()Return true if document still has more matched Selection when traversing the document(In other words return true if getNextMatchElement() would return an element instance rather than return null)booleanmatch(Node element)check if the element has the specified style properties-
Methods inherited from class org.odftoolkit.odfdom.incubator.search.Navigation
getNextMatchElement, getNextMatchElementInTree
-
-
-
-
Constructor Detail
-
TextStyleNavigation
public TextStyleNavigation(Map<OdfStyleProperty,String> props, OdfTextDocument doc)
Construct TextStyleNavigation with style properties condition and navigation scope- Parameters:
props- the matched style properties conditionsdoc- the navigation search scope
-
-
Method Detail
-
getCurrentItem
public Selection getCurrentItem()
Description copied from class:Navigationget the current Selection result- Specified by:
getCurrentItemin classNavigation- Returns:
- the current Selection result
-
hasNext
public boolean hasNext()
Description copied from class:NavigationReturn true if document still has more matched Selection when traversing the document(In other words return true if getNextMatchElement() would return an element instance rather than return null)- Specified by:
hasNextin classNavigation- Returns:
- true if document still has more matched Selection, and vice versa
-
match
public boolean match(Node element)
check if the element has the specified style properties- Specified by:
matchin classNavigation- Parameters:
element- navigate this element- Returns:
- true if this element has the specified style properties false if not match
-
-