Package kiyut.swing.text.xml

## Class XMLEditorKit

- java.lang.Object
- - javax.swing.text.EditorKit
  - - javax.swing.text.DefaultEditorKit
    - - kiyut.swing.text.xml.XMLEditorKit

- All Implemented Interfaces:
    `Serializable`, `Cloneable`

      public class XMLEditorKit
      extends DefaultEditorKit

  This is the set of things needed by a text component to be a reasonably functioning editor for xml type document.
  Author:
    KIYUT
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `XMLEditorKit.XMLViewFactory` | A simple view factory implementation.

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

      `DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected XMLContext` | `context` |
    `protected ViewFactory` | `factory` |
    `static String` | `XML_MIME_TYPE` |

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

      `backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `XMLEditorKit()` | Creates a new instance of XMLEditorKit
    `XMLEditorKit​(XMLContext context)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Object` | `clone()` |
    `Document` | `createDefaultDocument()` |
    `String` | `getContentType()` | Get the MIME type of the data that this kit represents support for.
    `XMLContext` | `getStylePreferences()` |
    `ViewFactory` | `getViewFactory()` |
    `void` | `install​(JEditorPane c)` | Overriden to set the JEditorPane font to match with the XMLContext

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

      `createCaret, getActions, read, read, write, write`

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

      `deinstall`

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

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

- - ### Field Detail

    - #### XML_MIME_TYPE

          public static final String XML_MIME_TYPE

      See Also:
        Constant Field Values

    - #### context

          protected XMLContext context

    - #### factory

          protected ViewFactory factory

  - ### Constructor Detail

    - #### XMLEditorKit

          public XMLEditorKit()

      Creates a new instance of XMLEditorKit

    - #### XMLEditorKit

          public XMLEditorKit​(XMLContext context)

  - ### Method Detail

    - #### getStylePreferences

          public XMLContext getStylePreferences()

      Returns:
        XMLContext

    - #### install

          public void install​(JEditorPane c)

      Overriden to set the JEditorPane font to match with the XMLContext
      Overrides:
        `install` in class `EditorKit`

    - #### getContentType

          public String getContentType()

      Get the MIME type of the data that this kit represents support for. This kit supports the type `text/xml`.
      Overrides:
        `getContentType` in class `DefaultEditorKit`

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `EditorKit`

    - #### createDefaultDocument

          public Document createDefaultDocument()

      Overrides:
        `createDefaultDocument` in class `DefaultEditorKit`

    - #### getViewFactory

          public ViewFactory getViewFactory()

      Overrides:
        `getViewFactory` in class `DefaultEditorKit`