Uses of Class
org.strassburger.tui4j.formatting.StyledText
Packages that use StyledText
Package
Description
-
Uses of StyledText in org.strassburger.tui4j.formatting
Methods in org.strassburger.tui4j.formatting that return StyledTextModifier and TypeMethodDescriptionAppend a plain string to this StyledTextAppend a string with the given style to this StyledTextStyledText.append(StyledText other) Append another StyledText to this oneStyledText.bg(org.strassburger.colorlab4j.color.Color color) Set the background color of the last spanStyledText.bold()Make the last span boldStyledText.fg(org.strassburger.colorlab4j.color.Color color) Set the foreground color of the last spanPrepend a plain string to this StyledTextPrepend a string with the given style to this StyledTextStyledText.prepend(StyledText other) Prepend another StyledText to this oneStyledText.repeat(int count) Repeat the entire StyledText a specified number of timesReplace occurrences of a target string with a replacement string in all spansStyledText.reversed()Inverse the colors of the last spanstatic StyledTextCreate a StyledText with a single span of plain textstatic StyledTextCreate a StyledText with a single span of text and the given styleStyledText.underline()Make the last span italicMethods in org.strassburger.tui4j.formatting with parameters of type StyledTextModifier and TypeMethodDescriptionStyledText.append(StyledText other) Append another StyledText to this oneStyledText.prepend(StyledText other) Prepend another StyledText to this onePlainTextRenderer.render(StyledText styledText) Render the given StyledText to plain text (without styles)StyledTextRenderer.render(StyledText styledText) Render the given StyledText to a string -
Uses of StyledText in org.strassburger.tui4j.formatting.ansi
Methods in org.strassburger.tui4j.formatting.ansi with parameters of type StyledTextModifier and TypeMethodDescriptionAnsiRenderer.render(StyledText styledText) Render the given StyledText to a string with ANSI escape codes -
Uses of StyledText in org.strassburger.tui4j.formatting.layout
Methods in org.strassburger.tui4j.formatting.layout that return StyledTextMethods in org.strassburger.tui4j.formatting.layout that return types with arguments of type StyledTextMethods in org.strassburger.tui4j.formatting.layout with parameters of type StyledTextModifier and TypeMethodDescriptionFlexText.addPart(StyledText part) static FlexTextFlexText.keyValue(StyledText key, StyledText value) Creates a FlexText representing a key-value pair with a clear line separationFlexText.setSeparatorChar(StyledText separatorChar) Sets the character(s) used for spacing between partsMethod parameters in org.strassburger.tui4j.formatting.layout with type arguments of type StyledTextConstructors in org.strassburger.tui4j.formatting.layout with parameters of type StyledText -
Uses of StyledText in org.strassburger.tui4j.input
Methods in org.strassburger.tui4j.input that return StyledTextMethods in org.strassburger.tui4j.input with parameters of type StyledTextModifier and TypeMethodDescriptionInput.setCursor(StyledText cursor) Input.setErrorMessage(StyledText errorMessage) Set the error message for invalid inputInput.setLabel(StyledText label) Set the label for the inputSelectInput.setOptionsStyle(StyledText optionsStyle) Sets the style of the options -
Uses of StyledText in org.strassburger.tui4j.input.exceptions
Methods in org.strassburger.tui4j.input.exceptions that return StyledTextModifier and TypeMethodDescriptionInputValidationException.getStyledMessage()RetryInputException.getStyledMessage()Constructors in org.strassburger.tui4j.input.exceptions with parameters of type StyledTextModifierConstructorDescriptionInputValidationException(StyledText styledMessage) RetryInputException(StyledText styledMessage) -
Uses of StyledText in org.strassburger.tui4j.input.validationrules
Methods in org.strassburger.tui4j.input.validationrules that return StyledTextMethods in org.strassburger.tui4j.input.validationrules with parameters of type StyledTextModifier and TypeMethodDescriptionstatic ValidationRule<Date>DateValidationRules.after(Date date, StyledText errorMessage) Returns a validation rule that checks if the date is after a specified date with a custom styled error message.static ValidationRule<String>TextValidationRules.alphanumeric(StyledText errorMessage) Returns a validation rule that checks if the input is alphanumeric with a custom error message.static ValidationRule<Date>DateValidationRules.before(Date date, StyledText errorMessage) Returns a validation rule that checks if the date is before a specified date with a custom styled error message.static ValidationRule<String>TextValidationRules.disallowEmpty(StyledText errorMessage) Returns a validation rule that checks if the input is not empty with a custom error message.static ValidationRule<Date>DateValidationRules.futureDate(StyledText errorMessage) Returns a validation rule that checks if the date is in the future with a custom styled error message.static <T extends Number & Comparable<T>>
ValidationRule<T>NumberValidationRules.greaterThan(T value, StyledText errorMessage) Validates that the input is greater than the given value with a custom error message.static <T extends Number & Comparable<T>>
ValidationRule<T>NumberValidationRules.greaterThanOrEqualTo(T value, StyledText errorMessage) Validates that the input is greater than or equal to the given value with a custom error message.static <T extends Number & Comparable<T>>
ValidationRule<T>NumberValidationRules.lessThan(T value, StyledText errorMessage) Validates that the input is equal to the given value with a custom error message.static <T extends Number & Comparable<T>>
ValidationRule<T>NumberValidationRules.lessThanOrEqualTo(T value, StyledText errorMessage) Validates that the input is less than or equal to the given value with a custom error message.static ValidationRule<String>TextValidationRules.maxLength(int length, StyledText errorMessage) Returns a validation rule that checks if the input is at most a certain length with a custom error message.static ValidationRule<String>TextValidationRules.minLength(int length, StyledText errorMessage) Returns a validation rule that checks if the input is at least a certain length with a custom error message.static ValidationRule<String>TextValidationRules.noNumbers(StyledText errorMessage) Returns a validation rule that checks if the input does not contain numbers with a custom error message.static ValidationRule<String>TextValidationRules.noSpaces(StyledText errorMessage) Returns a validation rule that checks if the input contains spaces with a custom error message.static ValidationRule<Date>DateValidationRules.pastDate(StyledText errorMessage) Returns a validation rule that checks if the date is in the past with a custom styled error message.static ValidationRule<String>TextValidationRules.regex(String regex, StyledText errorMessage) Returns a validation rule that checks if the input matches a certain regex with a custom error message. -
Uses of StyledText in org.strassburger.tui4j.printer
Methods in org.strassburger.tui4j.printer with parameters of type StyledTextModifier and TypeMethodDescriptionvoidConsolePrinter.print(StyledText text) voidPrinter.print(StyledText text) Print styled text to the outputvoidConsolePrinter.printf(StyledText format, Object... args) voidPrinter.printf(StyledText format, Object... args) Format and print styled text to the outputvoidConsolePrinter.printfln(StyledText format, Object... args) voidPrinter.printfln(StyledText format, Object... args) Format and print styled text to the output with a newlinevoidConsolePrinter.println(StyledText text) voidPrinter.println(StyledText text) Print styled text to the output with a newline