Skip to content

ITextConverter

interface ITextConverter
Package: dev.joid.lib.font.converter · Module: core · Source: ITextConverter.java

Turns a value of a type of yours into the string that a text shows.

Register one with TextConverter.register: every text, tooltip and text setter that takes an Object goes through it.

ReturnsSignatureSummary
booleansupports(Object text) abstractIf true, this converter turns text into a string; JOID asks the converters from the last registered to the first and uses the first that answers true.
Stringconvert(Object text) abstractReturns the string that a text shows for text; JOID calls it only when supports returned true.

boolean supports(Object text) abstract

If true, this converter turns text into a string; JOID asks the converters from the last registered to the first and uses the first that answers true.

String convert(Object text) abstract

Returns the string that a text shows for text; JOID calls it only when supports returned true.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page