Package org.testfx.matcher.control
Class TextMatchers
- java.lang.Object
-
- org.testfx.matcher.control.TextMatchers
-
public class TextMatchers extends java.lang.ObjectTestFX matchers forTextnodes.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTextMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.hamcrest.Matcher<javafx.scene.text.Text>hasFont(javafx.scene.text.Font font)Creates a matcher that matches allTexts that have the givenfont.static org.hamcrest.Matcher<javafx.scene.text.Text>hasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)Creates a matcher that matches allTexts that have the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).static org.hamcrest.Matcher<javafx.scene.text.Text>hasStrikethrough(boolean strikethrough)Creates a matcher that matches allTexts that have strikethrough (that is, they should be drawn with a line through them).static org.hamcrest.Matcher<javafx.scene.text.Text>hasText(java.lang.String text)Creates a matcher that matches allTexts whose text equals the giventext.static org.hamcrest.Matcher<javafx.scene.text.Text>hasText(org.hamcrest.Matcher<java.lang.String> matcher)Creates a matcher that matches allTexts whose text matches the givenmatcher.static org.hamcrest.Matcher<javafx.scene.text.Text>isUnderlined(boolean underlined)Creates a matcher that matches allTexts that are underlined (that is, they should be drawn with a line below them).private static java.lang.StringtoText(javafx.scene.text.Font font)
-
-
-
Method Detail
-
hasText
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasText(java.lang.String text)
Creates a matcher that matches allTexts whose text equals the giventext.- Parameters:
text- theStringthe matched Texts should have as their text
-
hasText
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasText(org.hamcrest.Matcher<java.lang.String> matcher)
Creates a matcher that matches allTexts whose text matches the givenmatcher.- Parameters:
matcher- theMatcher<String>the Texts text should match
-
hasFont
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasFont(javafx.scene.text.Font font)
Creates a matcher that matches allTexts that have the givenfont.- Parameters:
font- theFontthat matched Texts should have as their font
-
hasFontSmoothingType
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)
Creates a matcher that matches allTexts that have the givensmoothingType(eitherFontSmoothingType.GRAYorFontSmoothingType.LCD).- Parameters:
smoothingType- theFontSmoothingTypethat matched Texts should have
-
hasStrikethrough
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasStrikethrough(boolean strikethrough)
Creates a matcher that matches allTexts that have strikethrough (that is, they should be drawn with a line through them).- Parameters:
strikethrough- whether or not the matched Texts should have strikethrough
-
isUnderlined
public static org.hamcrest.Matcher<javafx.scene.text.Text> isUnderlined(boolean underlined)
Creates a matcher that matches allTexts that are underlined (that is, they should be drawn with a line below them).- Parameters:
underlined- whether or not the matched Texts should be underlined
-
toText
private static java.lang.String toText(javafx.scene.text.Font font)
-
-