public class TextStyleNavigation extends Navigation
Navigation
class used to navigate the text content,
which can search the document and find matched style properties and return
TextSelection
instance(s).Constructor and Description |
---|
TextStyleNavigation(Map<OdfStyleProperty,String> props,
TextDocument doc)
Construct
TextStyleNavigation with style properties condition and
navigation scope. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Check if has next
TextSelection with satisfied style. |
boolean |
match(Node element)
Check if the element has specified style properties, which are stated
when the
TextStyleNavigation created. |
Selection |
nextSelection()
Get next
TextSelection . |
getNextMatchElement, getNextMatchElementInTree
public TextStyleNavigation(Map<OdfStyleProperty,String> props, TextDocument doc)
TextStyleNavigation
with style properties condition and
navigation scope.props
- the matched style properties conditionsdoc
- the navigation search scopepublic boolean hasNext()
TextSelection
with satisfied style.hasNext
in class Navigation
Navigation.hasNext()
public Selection nextSelection()
TextSelection
.nextSelection
in class Navigation
Selection
resultNavigation.nextSelection()
public boolean match(Node element)
TextStyleNavigation
created.match
in class Navigation
element
- navigate this elementCopyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.