1 21 22 package bluej.editor.moe; 23 24 import javax.swing.text.*; 25 26 35 public class MoeSyntaxEditorKit extends DefaultEditorKit 36 implements ViewFactory 37 { 38 private boolean isTextEval; 39 40 47 public MoeSyntaxEditorKit(boolean textEval) 48 { 49 super(); 50 isTextEval = textEval; 51 } 52 53 59 public ViewFactory getViewFactory() 60 { 61 return this; 62 } 63 64 72 public View create(Element elem) 73 { 74 if(isTextEval) 75 return new bluej.debugmgr.texteval.TextEvalSyntaxView(elem); 76 else 77 return new MoeSyntaxView(elem); 78 } 79 80 86 public Document createDefaultDocument() 87 { 88 return new MoeSyntaxDocument(); 89 } 90 } 91 | Popular Tags |