edu.rice.cs.drjava.model.repl
Class InteractionsEditorKit
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
edu.rice.cs.drjava.model.repl.InteractionsEditorKit
- All Implemented Interfaces:
- Serializable, Cloneable
public class InteractionsEditorKit
- extends StyledEditorKit
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: InteractionsEditorKit.java 5175 2010-01-20 08:46:32Z mgricken $
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.text.DefaultEditorKit |
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, 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 |
_factory
private static ViewFactory _factory
InteractionsEditorKit
public InteractionsEditorKit()
- Creates a new editor kit
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 StyledEditorKit
createDefaultDocument
public InteractionsDJDocument createDefaultDocument()
- Overrides:
createDefaultDocument in class StyledEditorKit
_createColoringView
private static GlyphView _createColoringView(Element elem)
- We only need to re-implement the painter for the GlyphView to modify its behavior. The GlyphView delegates its
paint method to the painter. It also allows the painter to obtain the document to which the element
belongs.
- Parameters:
elem - The Element to pass to the GlyphView
- Returns:
- A GlyphView with modified behavior