Package kiyut.swing.text.xml

## Class XMLContext

- java.lang.Object
- - javax.swing.text.StyleContext
  - - kiyut.swing.text.xml.XMLContext

- All Implemented Interfaces:
    `Serializable`, `AbstractDocument.AttributeContext`

      public class XMLContext
      extends StyleContext

  A pool of styles and their associated resources
  Author:
    KIYUT
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.text.StyleContext

      `StyleContext.NamedStyle, StyleContext.SmallAttributeSet`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `ATTRIBUTE_NAME_STYLE` |
    `static String` | `ATTRIBUTE_VALUE_STYLE` |
    `static String` | `CDATA_STYLE` |
    `static String` | `CHARACTER_DATA_STYLE` |
    `static String` | `COMMENT_STYLE` |
    `static String` | `DOCTYPE_STYLE` |
    `static String` | `ELEMENT_STYLE` |
    `protected Map<String,​Font>` | `syntaxFontMap` | syntax font map
    `protected Map<String,​Color>` | `syntaxForegroundMap` | syntax foreground map
    `protected int` | `tabWidth` |
    `static String` | `XML_DECLARATION_STYLE` |

    - ### Fields inherited from class javax.swing.text.StyleContext

      `DEFAULT_STYLE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XMLContext()` |
    `XMLContext​(Map<String,​Font> syntaxFontMap, Map<String,​Color> syntaxForegroundMap)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Font` | `getSyntaxFont​(int ctx)` |
    `Font` | `getSyntaxFont​(String name)` |
    `Color` | `getSyntaxForeground​(int ctx)` |
    `Color` | `getSyntaxForeground​(String name)` |
    `String` | `getSyntaxName​(int ctx)` |
    `int` | `getTabWidth()` |
    `void` | `setSyntaxFont​(Map<String,​Font> syntaxFontMap)` |
    `void` | `setSyntaxForeground​(Map<String,​Color> syntaxForegroundMap)` |
    `void` | `setTabWidth​(int width)` |

    - ### Methods inherited from class javax.swing.text.StyleContext

      `addAttribute, addAttributes, addChangeListener, addStyle, createLargeAttributeSet, createSmallAttributeSet, getBackground, getChangeListeners, getCompressionThreshold, getDefaultStyleContext, getEmptySet, getFont, getFont, getFontMetrics, getForeground, getStaticAttribute, getStaticAttributeKey, getStyle, getStyleNames, readAttributes, readAttributeSet, reclaim, registerStaticAttributeKey, removeAttribute, removeAttributes, removeAttributes, removeChangeListener, removeStyle, toString, writeAttributes, writeAttributeSet`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### XML_DECLARATION_STYLE

          public static final String XML_DECLARATION_STYLE

      See Also:
        Constant Field Values

    - #### DOCTYPE_STYLE

          public static final String DOCTYPE_STYLE

      See Also:
        Constant Field Values

    - #### COMMENT_STYLE

          public static final String COMMENT_STYLE

      See Also:
        Constant Field Values

    - #### ELEMENT_STYLE

          public static final String ELEMENT_STYLE

      See Also:
        Constant Field Values

    - #### CHARACTER_DATA_STYLE

          public static final String CHARACTER_DATA_STYLE

      See Also:
        Constant Field Values

    - #### ATTRIBUTE_NAME_STYLE

          public static final String ATTRIBUTE_NAME_STYLE

      See Also:
        Constant Field Values

    - #### ATTRIBUTE_VALUE_STYLE

          public static final String ATTRIBUTE_VALUE_STYLE

      See Also:
        Constant Field Values

    - #### CDATA_STYLE

          public static final String CDATA_STYLE

      See Also:
        Constant Field Values

    - #### syntaxForegroundMap

          protected Map<String,​Color> syntaxForegroundMap

      syntax foreground map

    - #### syntaxFontMap

          protected Map<String,​Font> syntaxFontMap

      syntax font map

    - #### tabWidth

          protected int tabWidth

  - ### Constructor Detail

    - #### XMLContext

          public XMLContext()

    - #### XMLContext

          public XMLContext​(Map<String,​Font> syntaxFontMap,
                            Map<String,​Color> syntaxForegroundMap)

  - ### Method Detail

    - #### setSyntaxForeground

          public void setSyntaxForeground​(Map<String,​Color> syntaxForegroundMap)

    - #### setSyntaxFont

          public void setSyntaxFont​(Map<String,​Font> syntaxFontMap)

    - #### getSyntaxForeground

          public Color getSyntaxForeground​(int ctx)

    - #### getSyntaxForeground

          public Color getSyntaxForeground​(String name)

    - #### getSyntaxFont

          public Font getSyntaxFont​(int ctx)

    - #### getSyntaxFont

          public Font getSyntaxFont​(String name)

    - #### getSyntaxName

          public String getSyntaxName​(int ctx)

    - #### setTabWidth

          public void setTabWidth​(int width)

    - #### getTabWidth

          public int getTabWidth()