public class TextMatchers
extends java.lang.Object
Text nodes.| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<javafx.scene.text.Text> |
hasFont(javafx.scene.text.Font font)
Creates a matcher that matches all
Texts that have the given font. |
static org.hamcrest.Matcher<javafx.scene.text.Text> |
hasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)
Creates a matcher that matches all
Texts that have the given smoothingType
(either FontSmoothingType.GRAY or FontSmoothingType.LCD). |
static org.hamcrest.Matcher<javafx.scene.text.Text> |
hasStrikethrough(boolean strikethrough)
Creates a matcher that matches all
Texts that have strikethrough (that is, they
should be drawn with a line through them). |
static org.hamcrest.Matcher<javafx.scene.text.Text> |
hasText(org.hamcrest.Matcher<java.lang.String> matcher)
Creates a matcher that matches all
Texts whose text matches the given matcher. |
static org.hamcrest.Matcher<javafx.scene.text.Text> |
hasText(java.lang.String text)
Creates a matcher that matches all
Texts whose text equals the given text. |
static org.hamcrest.Matcher<javafx.scene.text.Text> |
isUnderlined(boolean underlined)
Creates a matcher that matches all
Texts that are underlined (that is, they
should be drawn with a line below them). |
public static org.hamcrest.Matcher<javafx.scene.text.Text> hasText(java.lang.String text)
Texts whose text equals the given text.text - the String the matched Texts should have as their textpublic static org.hamcrest.Matcher<javafx.scene.text.Text> hasText(org.hamcrest.Matcher<java.lang.String> matcher)
Texts whose text matches the given matcher.matcher - the Matcher<String> the Texts text should matchpublic static org.hamcrest.Matcher<javafx.scene.text.Text> hasFont(javafx.scene.text.Font font)
Texts that have the given font.font - the Font that matched Texts should have as their fontpublic static org.hamcrest.Matcher<javafx.scene.text.Text> hasFontSmoothingType(javafx.scene.text.FontSmoothingType smoothingType)
Texts that have the given smoothingType
(either FontSmoothingType.GRAY or FontSmoothingType.LCD).smoothingType - the FontSmoothingType that matched Texts should havepublic static org.hamcrest.Matcher<javafx.scene.text.Text> hasStrikethrough(boolean strikethrough)
Texts that have strikethrough (that is, they
should be drawn with a line through them).strikethrough - whether or not the matched Texts should have strikethroughpublic static org.hamcrest.Matcher<javafx.scene.text.Text> isUnderlined(boolean underlined)
Texts that are underlined (that is, they
should be drawn with a line below them).underlined - whether or not the matched Texts should be underlined