/** * Constructs a plain text document. A default root element is created, and the tab size set to 5. * * @param tmf The <code>TokenMakerFactory</code> for this document. If this is <code>null</code>, * a default factory is used. * @param syntaxStyle The syntax highlighting scheme to use. */ public RSyntaxDocument(TokenMakerFactory tmf, String syntaxStyle) { super(new RGapContent()); putProperty(tabSizeAttribute, new Integer(5)); lastTokensOnLines = new DynamicIntArray(400); lastTokensOnLines.add(Token.NULL); // Initial (empty) line. s = new Segment(); setTokenMakerFactory(tmf); setSyntaxStyle(syntaxStyle); }