- 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
Modifier and TypeInterfaceDescriptionstatic final record
A generic block record.static class
BBCodeHandler.Default<T extends javafx.scene.layout.Pane>
static final record
Generic tag record. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Notifies about the end of the tag.void
startDocument
(char[] doc) Notifies that parsing has started.void
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
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
Notifies about the end of the tag. In case of self-closing tag onlystartTag(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.
-