de.hunsicker.jalopy.swing.syntax
Class SyntaxEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--de.hunsicker.jalopy.swing.syntax.SyntaxEditorKit
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, javax.swing.text.ViewFactory

public final class SyntaxEditorKit
extends javax.swing.text.DefaultEditorKit
implements javax.swing.text.ViewFactory

An implementation of EditorKit used for syntax colorizing. It implements a view factory that maps elements to syntax colorizing views.

This editor kit can be plugged into text components to give them colorization features. It can be used in other applications, not just jEdit. The syntax colorizing package doesn't depend on any jEdit classes.

Author:
Slava Pestov, Bruce Quig (BlueJ specific modifications)
See Also:
Serialized Form

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
SyntaxEditorKit()
           
 
Method Summary
 javax.swing.text.View create(javax.swing.text.Element elem)
          Creates a view from an element that can be used for painting that element.
 javax.swing.text.Document createDefaultDocument()
          Creates a new instance of the default document for this editor kit.
 javax.swing.text.ViewFactory getViewFactory()
          Returns an instance of a view factory that can be used for creating views from elements.
 
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, getActions, getContentType, 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

SyntaxEditorKit

public SyntaxEditorKit()
Method Detail

getViewFactory

public javax.swing.text.ViewFactory getViewFactory()
Returns an instance of a view factory that can be used for creating views from elements. This implementation returns the current instance, because this class already implements ViewFactory.

Overrides:
getViewFactory in class javax.swing.text.DefaultEditorKit
Returns:
DOCUMENT ME!

create

public javax.swing.text.View create(javax.swing.text.Element elem)
Creates a view from an element that can be used for painting that element.

Specified by:
create in interface javax.swing.text.ViewFactory
Parameters:
elem - The element
Returns:
a new SyntaxView for an element

createDefaultDocument

public javax.swing.text.Document createDefaultDocument()
Creates a new instance of the default document for this editor kit.

Overrides:
createDefaultDocument in class javax.swing.text.DefaultEditorKit
Returns:
DOCUMENT ME!


Copyright © 1997-2005 Jalopy. All Rights Reserved.