Class AbstractTextStyleChooser
java.lang.Object
org.netbeans.jemmy.util.AbstractTextStyleChooser
- All Implemented Interfaces:
JTextComponentOperator.TextChooser
- Direct Known Subclasses:
TextStyleChooser
public abstract class AbstractTextStyleChooser
extends Object
implements JTextComponentOperator.TextChooser
Makes easier to implement searching criteria for
javax.swing.text.StyledDocument
JTextComponentOperator.getPositionByText(String, JTextComponentOperator.TextChooser, int).- Author:
- Alexandre Iline (alexandre.iline@sun.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancheckElement(StyledDocument doc, Element element, int offset) Should return true if position fulfils criteria.final booleancheckPosition(Document document, int offset) Checkes if position fits the criteria.abstract StringReturns a printable description of the criteria.
-
Constructor Details
-
AbstractTextStyleChooser
public AbstractTextStyleChooser()Constructor.
-
-
Method Details
-
checkElement
Should return true if position fulfils criteria.- Parameters:
doc- a styled document to be searched.element- an element to be checked.offset- checked position.- Returns:
- true if position fits the criteria.
-
getDescription
Description copied from interface:JTextComponentOperator.TextChooserReturns a printable description of the criteria.- Specified by:
getDescriptionin interfaceJTextComponentOperator.TextChooser- Returns:
- a description of this chooser.
-
checkPosition
Description copied from interface:JTextComponentOperator.TextChooserCheckes if position fits the criteria.- Specified by:
checkPositionin interfaceJTextComponentOperator.TextChooser- Parameters:
document- a document to be checked.offset- a checked position- Returns:
- true if the position fits the criteria.
-