Package: groovy.console.ui.text

## [Java] Class StructuredSyntaxHandler

- groovy.console.ui.text.StructuredSyntaxHandler

-     public class StructuredSyntaxHandler
      extends DefaultHandler

  SAX handler that reads structured syntax definitions into a document filter.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `ALIGNMENT` | Style attribute name for alignment.
    `static String` | `ALIGN_CENTER` | Alignment value name for centered text.
    `static String` | `ALIGN_JUSTIFIED` | Alignment value name for justified text.
    `static String` | `ALIGN_LEFT` | Alignment value name for left-aligned text.
    `static String` | `ALIGN_RIGHT` | Alignment value name for right-aligned text.
    `static String` | `BACKGROUND` | Style attribute name for background color.
    `static String` | `BIDI_LEVEL` | Style attribute name for bidirectional text level.
    `static String` | `BOLD` | Style attribute name for bold text.
    `static String` | `COMPONENT_ATTRIBUTE` | Style attribute name for embedded components.
    `static String` | `COMPONENT_ELEMENT_NAME` | Style attribute name for component element names.
    `static String` | `COMPOSED_TEXT_ATTRIBUTE` | Style attribute name for composed text.
    `static String` | `FIRST_LINE_INDENT` | Style attribute name for first-line indentation.
    `static String` | `FONT_FAMILY` | Style attribute name for font family.
    `static String` | `FONT_SIZE` | Style attribute name for font size.
    `static String` | `FOREGROUND` | Style attribute name for foreground color.
    `static String` | `ICON_ATTRIBUTE` | Style attribute name for embedded icons.
    `static String` | `ICON_ELEMENT_NAME` | Style attribute name for icon element names.
    `static String` | `ITALIC` | Style attribute name for italic text.
    `static String` | `LEFT_INDENT` | Style attribute name for left indentation.
    `static String` | `LINE_SPACING` | Style attribute name for line spacing.
    `static String` | `MODEL_ATTRIBUTE` | Style attribute name for model attributes.
    `static String` | `NAME_ATTRIBUTE` | Style attribute name for named attributes.
    `static String` | `ORIENTATION` | Style attribute name for orientation.
    `static String` | `REGEXP` | XML element name for regular expression entries.
    `static String` | `RESOLVE_ATTRIBUTE` | Style attribute name for resolve attributes.
    `static String` | `RIGHT_INDENT` | Style attribute name for right indentation.
    `static String` | `SPACE_ABOVE` | Style attribute name for space above paragraphs.
    `static String` | `SPACE_BELOW` | Style attribute name for space below paragraphs.
    `static String` | `STRIKE_THROUGH` | Style attribute name for strike-through text.
    `static String` | `STYLE` | XML element name for style entries.
    `static String` | `SUBSCRIPT` | Style attribute name for subscript text.
    `static String` | `SUPERSCRIPT` | Style attribute name for superscript text.
    `static String` | `TAB_SET` | Style attribute name for tab sets.
    `static String` | `UNDERLINE` | Style attribute name for underlined text.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `StructuredSyntaxHandler(StructuredSyntaxDocumentFilter filter)` Creates a handler for the supplied syntax filter.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `characters(char[] ch, int start, int length)` Receive notification of character data inside an element. By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file). throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. Parameters: `ch` - The characters. `start` - The start position in the character array. `length` - The number of characters to use from the character array. See Also: ContentHandler.characters
    `` | `public void` | `endDocument()` Receive notification of the end of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file). throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. See Also: ContentHandler.endDocument
    `` | `public void` | `endElement(String uri, String localName, String qName)` Receive notification of the end of an element. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file). throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. Parameters: `uri` - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed. `localName` - The local name (without prefix), or the empty string if Namespace processing is not being performed. `qName` - The qualified name (with prefix), or the empty string if qualified names are not available. See Also: ContentHandler.endElement
    `` | `public void` | `error(SAXParseException e)` Receive notification of a recoverable parser error. The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console. throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. Parameters: `e` - The error information encoded as an exception. See Also: ErrorHandler.warning SAXParseException
    `` | `public void` | `startDocument()` Receive notification of the beginning of the document. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file). throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. See Also: ContentHandler.startDocument
    `` | `public void` | `startElement(String uri, String localName, String qName, Attributes attributes)` Receive notification of the start of an element. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file). throws: org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception. Parameters: `uri` - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed. `localName` - The local name (without prefix), or the empty string if Namespace processing is not being performed. `qName` - The qualified name (with prefix), or the empty string if qualified names are not available. `attributes` - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. See Also: ContentHandler.startElement

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DefaultHandler` | `characters, declaration, endDocument, endElement, endPrefixMapping, equals, error, fatalError, getClass, hashCode, ignorableWhitespace, notationDecl, notify, notifyAll, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, unparsedEntityDecl, wait, wait, wait, warning`

- - ### Field Detail

    - #### public static final String ALIGNMENT

      Style attribute name for alignment.

    - #### public static final String ALIGN_CENTER

      Alignment value name for centered text.

    - #### public static final String ALIGN_JUSTIFIED

      Alignment value name for justified text.

    - #### public static final String ALIGN_LEFT

      Alignment value name for left-aligned text.

    - #### public static final String ALIGN_RIGHT

      Alignment value name for right-aligned text.

    - #### public static final String BACKGROUND

      Style attribute name for background color.

    - #### public static final String BIDI_LEVEL

      Style attribute name for bidirectional text level.

    - #### public static final String BOLD

      Style attribute name for bold text.

    - #### public static final String COMPONENT_ATTRIBUTE

      Style attribute name for embedded components.

    - #### public static final String COMPONENT_ELEMENT_NAME

      Style attribute name for component element names.

    - #### public static final String COMPOSED_TEXT_ATTRIBUTE

      Style attribute name for composed text.

    - #### public static final String FIRST_LINE_INDENT

      Style attribute name for first-line indentation.

    - #### public static final String FONT_FAMILY

      Style attribute name for font family.

    - #### public static final String FONT_SIZE

      Style attribute name for font size.

    - #### public static final String FOREGROUND

      Style attribute name for foreground color.

    - #### public static final String ICON_ATTRIBUTE

      Style attribute name for embedded icons.

    - #### public static final String ICON_ELEMENT_NAME

      Style attribute name for icon element names.

    - #### public static final String ITALIC

      Style attribute name for italic text.

    - #### public static final String LEFT_INDENT

      Style attribute name for left indentation.

    - #### public static final String LINE_SPACING

      Style attribute name for line spacing.

    - #### public static final String MODEL_ATTRIBUTE

      Style attribute name for model attributes.

    - #### public static final String NAME_ATTRIBUTE

      Style attribute name for named attributes.

    - #### public static final String ORIENTATION

      Style attribute name for orientation.

    - #### public static final String REGEXP

      XML element name for regular expression entries.

    - #### public static final String RESOLVE_ATTRIBUTE

      Style attribute name for resolve attributes.

    - #### public static final String RIGHT_INDENT

      Style attribute name for right indentation.

    - #### public static final String SPACE_ABOVE

      Style attribute name for space above paragraphs.

    - #### public static final String SPACE_BELOW

      Style attribute name for space below paragraphs.

    - #### public static final String STRIKE_THROUGH

      Style attribute name for strike-through text.

    - #### public static final String STYLE

      XML element name for style entries.

    - #### public static final String SUBSCRIPT

      Style attribute name for subscript text.

    - #### public static final String SUPERSCRIPT

      Style attribute name for superscript text.

    - #### public static final String TAB_SET

      Style attribute name for tab sets.

    - #### public static final String UNDERLINE

      Style attribute name for underlined text.

  - ### Constructor Detail

    - #### public StructuredSyntaxHandler(StructuredSyntaxDocumentFilter filter)

      Creates a handler for the supplied syntax filter.

      Parameters:
        `filter` - the filter receiving parsed syntax definitions

  - ### Method Detail

    - #### public void characters(char[] ch, int start, int length)

      Receive notification of character data inside an element.

      By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      Parameters:
        `ch` - The characters.
        `start` - The start position in the character array.
        `length` - The number of characters to use from the character array.
      See Also:
        ContentHandler.characters

    - #### public void endDocument()

      Receive notification of the end of the document.

      By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      See Also:
        ContentHandler.endDocument

    - #### public void endElement(String uri, String localName, String qName)

      Receive notification of the end of an element.

      By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      Parameters:
        `uri` - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        `localName` - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        `qName` - The qualified name (with prefix), or the empty string if qualified names are not available.
      See Also:
        ContentHandler.endElement

    - #### public void error(SAXParseException e)

      Receive notification of a recoverable parser error.

      The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console.

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      Parameters:
        `e` - The error information encoded as an exception.
      See Also:
        ErrorHandler.warning
        SAXParseException

    - #### public void startDocument()

      Receive notification of the beginning of the document.

      By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      See Also:
        ContentHandler.startDocument

    - #### public void startElement(String uri, String localName, String qName, Attributes attributes)

      Receive notification of the start of an element.

      By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

      throws:
        org.xml.sax.SAXException Any SAX exception, possibly wrapping another exception.
      Parameters:
        `uri` - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        `localName` - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        `qName` - The qualified name (with prefix), or the empty string if qualified names are not available.
        `attributes` - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
      See Also:
        ContentHandler.startElement