Interface BBCodeHandler

All Known Implementing Classes:
BBCodeHandler.Default

public interface BBCodeHandler
The basic handler interface for the BBCodeParser that will receive notifications while processing user input text.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A generic block record.
    static class 
    BBCodeHandler.Default<T extends javafx.scene.layout.Pane>
    A basic BBCodeHandler implementation.

    static final record 
    Generic tag record.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    characters(int start, int length)
    Notifies about characters data that doesn't belong to any tag, i.e.
    void
    Notifies that parsing has finished.
    void
    endTag(String name, int start, int length)
    Notifies about the end of the tag.
    void
    startDocument(char[] doc)
    Notifies that parsing has started.
    void
    startTag(String name, @Nullable Map<String,String> params, int start, int length)
    Notifies about the start of the tag.
  • Method Details

    • startDocument

      void startDocument(char[] doc)
      Notifies that parsing has started.
      Parameters:
      doc - parser input string
    • endDocument

      void endDocument()
      Notifies that parsing has finished.
    • startTag

      void startTag(String name, @Nullable @Nullable Map<String,String> params, int start, int length)
      Notifies about the start of the tag. In case of self-closing tag this also notifies about the end of the tag.
      Parameters:
      name - The tag name.
      params - The tag params.
      start - The tag start position, i.e. the position of open square bracket (not the tag name start).
      length - The tag length, including closing bracket.
    • endTag

      void endTag(String name, int start, int length)
      Notifies about the end of the tag. In case of self-closing tag only startTag(String, Map, int, int) method is called.
      Parameters:
      name - The tag name.
      start - The tag start position, i.e. the position of open square bracket (not the tag name start).
      length - The tag length, including closing bracket.
    • characters

      void characters(int start, int length)
      Notifies about characters data that doesn't belong to any tag, i.e. leading, intermediate or trailing text.
      Parameters:
      start - The text start position.
      length - The text length.