com.japisoft.xmlpad.editor
Class XMLEditorKit

java.lang.Object
  extended byjavax.swing.text.EditorKit
      extended byjavax.swing.text.DefaultEditorKit
          extended bycom.japisoft.xmlpad.editor.XMLEditorKit
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, javax.swing.text.ViewFactory

public class XMLEditorKit
extends javax.swing.text.DefaultEditorKit
implements javax.swing.text.ViewFactory

Here a swing EditorKit for XML

Version:
1.2
Author:
(c) 2002 JAPISoft
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.text.DefaultEditorKit
javax.swing.text.DefaultEditorKit.BeepAction, javax.swing.text.DefaultEditorKit.CopyAction, javax.swing.text.DefaultEditorKit.CutAction, javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction, javax.swing.text.DefaultEditorKit.InsertBreakAction, javax.swing.text.DefaultEditorKit.InsertContentAction, javax.swing.text.DefaultEditorKit.InsertTabAction, javax.swing.text.DefaultEditorKit.PasteAction
 
Field Summary
 boolean wrappedMode
           
 
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(XMLDocument doc)
           
 
Method Summary
 javax.swing.text.View create(javax.swing.text.Element elem)
           
 javax.swing.text.Document createDefaultDocument()
           
 java.lang.String getContentType()
           
 javax.swing.text.ViewFactory getViewFactory()
          View factory for text element
 void setDTDMode(boolean dtdMode)
           
 void setSyntaxColor(boolean syntaxColor)
          Reset it to support XML syntax color.
 void setWrappedMode(boolean wrappedMode)
          Wrapped the line automatically if true
 
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
 

Field Detail

wrappedMode

public boolean wrappedMode
Constructor Detail

XMLEditorKit

public XMLEditorKit(XMLDocument doc)
Method Detail

getViewFactory

public javax.swing.text.ViewFactory getViewFactory()
View factory for text element


setSyntaxColor

public void setSyntaxColor(boolean syntaxColor)
Reset it to support XML syntax color. By default true


setDTDMode

public void setDTDMode(boolean dtdMode)

setWrappedMode

public void setWrappedMode(boolean wrappedMode)
Wrapped the line automatically if true


create

public javax.swing.text.View create(javax.swing.text.Element elem)
Specified by:
create in interface javax.swing.text.ViewFactory
Parameters:
elem - element to draw

createDefaultDocument

public javax.swing.text.Document createDefaultDocument()
Returns:
the default document

getContentType

public java.lang.String getContentType()


Copyright © 2006 JAPISoft. All Rights Reserved.