Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public abstract static class RichText.Visitor
- Object
- RichText.Visitor
Receives the runs of a text in order. Subclass it and override what you need; methods may
be added here for new kinds of inline content, and they will do nothing unless overridden.
Constructors
public Visitor() |
Methods
public abstract void run(int offset, String text, TextStyle style) | Called once per text run. |
public void inline(int offset, Inline object, TextStyle style) | Called once per inline object. |
Inherited methods
Constructor details
Visitor
public Visitor()Method details
run
public abstract void run(int offset, String text, TextStyle style)Called once per text run.
Parameters
offsetint- the run’s first character within the whole text
textString- the run’s characters
styleTextStyle- the run’s style
inline
public void inline(int offset, Inline object, TextStyle style)Called once per inline object. Does nothing unless overridden.
Parameters
offsetint- the object’s character within the whole text
objectInline- the object
styleTextStyle- the style the object’s character has