StyleConstants.setLeftIndent(whiteAttributes, NumberedParagraphView.NUMBERS_WIDTH);
	public JavaSourceDocument(String title, Reader in) throws IOException  {		doc = new DefaultStyledDocument();		try {			dek.read(in, doc, 0);		} catch (BadLocationException e) {			throw new RuntimeException(e);		}		in.close();		doc.putProperty(Document.TitleProperty, title);		root = doc.getDefaultRootElement();		Toolkit toolkit = Toolkit.getDefaultToolkit();		FontMetrics fontMetrics = toolkit.getFontMetrics(sourceFont);		TabStop[] tabs = new TabStop[50];		float width = fontMetrics.stringWidth(" ");					for (int i = 0; i < tabs.length; i++)			tabs[i] = new TabStop(width * (4 + 4 * i));		TAB_SET = new TabSet(tabs);		StyleConstants.setTabSet(commentAttributes, TAB_SET);		StyleConstants.setTabSet(javadocAttributes, TAB_SET);		StyleConstants.setTabSet(quotesAttributes, TAB_SET);		StyleConstants.setTabSet(keywordsAttributes, TAB_SET);		StyleConstants.setTabSet(commentAttributes, TAB_SET);		StyleConstants.setTabSet(whiteAttributes, TAB_SET);		StyleConstants.setFontFamily(whiteAttributes, sourceFont.getFamily());		StyleConstants.setFontSize(whiteAttributes, sourceFont.getSize());				doc.setParagraphAttributes(0, doc.getLength(), whiteAttributes, true);		JavaScanner parser = new JavaScanner(new DocumentCharacterIterator(doc));		while (parser.next() != JavaScanner.EOF) {			int kind = parser.getKind();			switch (kind) {			case JavaScanner.COMMENT:				doc.setCharacterAttributes(parser.getStartPosition(), parser						.getLength(), commentAttributes, true);				break;			case JavaScanner.KEYWORD:				doc.setCharacterAttributes(parser.getStartPosition(), parser						.getLength(), keywordsAttributes, true);				break;			case JavaScanner.JAVADOC:				doc.setCharacterAttributes(parser.getStartPosition(), parser						.getLength(), javadocAttributes, true);				break;			case JavaScanner.QUOTE:				doc.setCharacterAttributes(parser.getStartPosition(), parser						.getLength(), quotesAttributes, true);				break;			}		}	}