org.apache.batik.util.gui.xmleditor

Class XMLEditorKit

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.
Nested Class Summary
protected classXMLEditorKit.XMLViewFactory
A simple view factory implementation.
Field Summary
protected XMLContextcontext
protected ViewFactoryfactory
static StringXML_MIME_TYPE
Constructor Summary
XMLEditorKit()
Creates a new instance of XMLEditorKit
XMLEditorKit(XMLContext context)
Creates a new instance of XMLEditorKit
Method Summary
Objectclone()
DocumentcreateDefaultDocument()
StringgetContentType()
Get the MIME type of the data that this kit represents support for.
XMLContextgetStylePreferences()
ViewFactorygetViewFactory()
voidinstall(JEditorPane c)
Overriden to set the JEditorPane font to match with the XMLContext

Field Detail

context

protected XMLContext context

factory

protected ViewFactory factory

XML_MIME_TYPE

public static final String XML_MIME_TYPE

Constructor Detail

XMLEditorKit

public XMLEditorKit()
Creates a new instance of XMLEditorKit

XMLEditorKit

public XMLEditorKit(XMLContext context)
Creates a new instance of XMLEditorKit

Parameters: context XMLContext

Method Detail

clone

public Object clone()
{@inheritDoc }

createDefaultDocument

public Document createDefaultDocument()
{@inheritDoc }

getContentType

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

getStylePreferences

public XMLContext getStylePreferences()

Returns: XMLContext

getViewFactory

public ViewFactory getViewFactory()
{@inheritDoc }

install

public void install(JEditorPane c)
Overriden to set the JEditorPane font to match with the XMLContext {@inheritDoc }
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.