SMACS

smacs.xngr.browser.editor
Class XmlEditorKit

java.lang.Object
  extended byjavax.swing.text.EditorKit
      extended byjavax.swing.text.DefaultEditorKit
          extended bysmacs.xngr.browser.editor.XmlEditorKit
All Implemented Interfaces:
Cloneable, Serializable

public class XmlEditorKit
extends DefaultEditorKit

The XML editor kit supports handling of editing XML content. It supports syntax highlighting, tab replacements and automatic indents.

Note: The XML Editor package is based on the JavaEditorKit example as described in the article 'Customizing a Text Editor' by Timothy Prinzing. See: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/

Author:
Edwin Dankert
See Also:
Serialized Form

Nested Class Summary
 
Nested classes 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 inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, 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
XmlEditorKit(XmlEditorPane editor)
          Constructs the view factory and the Context.
 
Method Summary
 Document createDefaultDocument()
          Creates an uninitialized xml document.
 String getContentType()
          Get the MIME type of the data that this kit represents support for.
 Font getFont()
          Get the Font type for this kit.
 ViewFactory getViewFactory()
          Fetches the XML factory that can produce views for XML Documents.
 void setFont(Font font)
           
 
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, getActions, read, read, write, write
 
Methods inherited from class javax.swing.text.EditorKit
clone, deinstall, install
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlEditorKit

public XmlEditorKit(XmlEditorPane editor)
Constructs the view factory and the Context.

Method Detail

getContentType

public String getContentType()
Get the MIME type of the data that this kit represents support for. This kit supports the type text/xml.

Returns:
the type.

setFont

public void setFont(Font font)

getFont

public Font getFont()
Get the Font type for this kit.

Returns:
the font.

createDefaultDocument

public Document createDefaultDocument()
Creates an uninitialized xml document.

Returns:
the document

getViewFactory

public final ViewFactory getViewFactory()
Fetches the XML factory that can produce views for XML Documents.

Returns:
the XML factory

SMACS