1 33 34 package edu.rice.cs.drjava.model.definitions; 35 36 37 import javax.swing.text.*; 38 import edu.rice.cs.drjava.model.GlobalEventNotifier; 39 46 public class DefinitionsEditorKit extends StyledEditorKit { 47 48 private GlobalEventNotifier _notifier; 49 50 53 public DefinitionsEditorKit(GlobalEventNotifier notifier) { _notifier = notifier; } 54 55 private static ViewFactory _factory = new ViewFactory() { 56 public View create(Element elem) { 57 return new ColoringView(elem); 60 } 61 }; 62 63 79 public DefinitionsDocument createNewDocument() { return _createDefaultTypedDocument(); } 80 81 84 private DefinitionsDocument _createDefaultTypedDocument() { return new DefinitionsDocument(_notifier); } 85 86 89 public String getContentType() { return "text/java"; } 90 91 94 public final ViewFactory getViewFactory() { return _factory; } 95 } 96 97 98 99 100 | Popular Tags |