Class RichText.Visitor

java.lang.Object
com.codename1.wordprocessing.RichText.Visitor
Enclosing class:
RichText

public abstract static class RichText.Visitor extends Object
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.
  • Constructor Details

    • Visitor

      public Visitor()
  • Method Details

    • run

      public abstract void run(int offset, String text, TextStyle style)

      Called once per text run.

      Parameters
      • offset: the run's first character within the whole text

      • text: the run's characters

      • style: the run's style

    • inline

      public void inline(int offset, Inline object, TextStyle style)

      Called once per inline object. Does nothing unless overridden.

      Parameters
      • offset: the object's character within the whole text

      • object: the object

      • style: the style the object's character has