edu.rice.cs.drjava.model.definitions
Class DefinitionsEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--edu.rice.cs.drjava.model.definitions.DefinitionsEditorKit
All Implemented Interfaces:
Cloneable, Serializable

public class DefinitionsEditorKit
extends DefaultEditorKit

This is an editor kit for editing Java source files. It functions as the controller in the MVC arrangement. It implements a factory for new documents, and it also has a factory for Views (the things that render the document).

Version:
$Id: DefinitionsEditorKit.java,v 1.21 2002/06/17 22:58:47 jhsia Exp $
See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.BeginAction, DefaultEditorKit.BeginLineAction, DefaultEditorKit.BeginParagraphAction, DefaultEditorKit.BeginWordAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.DeleteNextCellAction, DefaultEditorKit.DeleteNextCharAction, DefaultEditorKit.DeletePrevCharAction, DefaultEditorKit.DumpModelAction, DefaultEditorKit.EndAction, DefaultEditorKit.EndLineAction, DefaultEditorKit.EndParagraphAction, DefaultEditorKit.EndWordAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.NextVisualPositionAction, DefaultEditorKit.NextWordAction, DefaultEditorKit.PageAction, DefaultEditorKit.PageDownAction, DefaultEditorKit.PageUpAction, DefaultEditorKit.PasteAction, DefaultEditorKit.PreviousWordAction, DefaultEditorKit.ReadOnlyAction, DefaultEditorKit.SelectAllAction, DefaultEditorKit.SelectLineAction, DefaultEditorKit.SelectParagraphAction, DefaultEditorKit.SelectWordAction, DefaultEditorKit.ToggleComponentOrientationAction, DefaultEditorKit.UnselectAction, DefaultEditorKit.WritableAction
 
Field Summary
private static ViewFactory _factory
           
 
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultActions, defaultKeyTypedAction, deleteNextCellAction, 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, selectionPageDownAction, selectionPageLeftAction, selectionPageRightAction, selectionPageUpAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, toggleComponentOrientationAction, unselectAction, upAction, writableAction
 
Constructor Summary
DefinitionsEditorKit()
           
 
Method Summary
private static DefinitionsDocument _createDefaultTypedDocument()
          Creates a new DefinitionsDocument.
 Document createDefaultDocument()
          Factory method to make this view create correct model objects.
 String getContentType()
          Get the MIME content type of the document.
 ViewFactory getViewFactory()
          We want to use our ColoringView to render text, so here we return a factory that creates ColoringViews.
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

_factory

private static ViewFactory _factory
Constructor Detail

DefinitionsEditorKit

public DefinitionsEditorKit()
Method Detail

createDefaultDocument

public Document createDefaultDocument()
Factory method to make this view create correct model objects.
Overrides:
createDefaultDocument in class DefaultEditorKit

_createDefaultTypedDocument

private static DefinitionsDocument _createDefaultTypedDocument()
Creates a new DefinitionsDocument.
Returns:
a new DefinitionsDocument.

getContentType

public String getContentType()
Get the MIME content type of the document.
Overrides:
getContentType in class DefaultEditorKit
Returns:
"text/java"

getViewFactory

public final ViewFactory getViewFactory()
We want to use our ColoringView to render text, so here we return a factory that creates ColoringViews.
Overrides:
getViewFactory in class DefaultEditorKit