Package javax.swing.text.AbstractDocument

Examples of javax.swing.text.AbstractDocument.Content


    /*
     * Class under test for void PlainDocument()
     */
    public void testPlainDocument() {
        doc = new PlainDocument();
        Content content = doc.getContent();
        assertTrue(content instanceof GapContent);
        GapContent gapContent = (GapContent) content;
        assertEquals(9, gapContent.getGapEnd() - gapContent.getGapStart());
        Object tabSize = doc.getProperty(PlainDocument.tabSizeAttribute);
        assertEquals(8, ((Integer) tabSize).intValue());
View Full Code Here


    public void testHTMLDocumentStyleSheet() throws BadLocationException, MalformedURLException {
        StyleSheet styles = new StyleSheet();
        htmlDoc = new PublicHTMLDocument(styles);
        assertSame(styles, htmlDoc.getAttributeContextPublicly());
        final Content content = htmlDoc.getContentPublicly();
        assertTrue(content instanceof GapContent);
       
        URL u1 = new URL("http://www.apache.org");
        styles.setBase(u1);
        htmlDoc = new PublicHTMLDocument(styles);
View Full Code Here

    /*
     * Class under test for void PlainDocument(AbstractDocument.Content)
     */
    public void testPlainDocumentContent() {
        doc = new PlainDocument(new GapContent(30));
        Content content = doc.getContent();
        assertTrue(content instanceof GapContent);
        GapContent gapContent = (GapContent) content;
        assertEquals(29, gapContent.getGapEnd() - gapContent.getGapStart());
        Object tabSize = doc.getProperty(PlainDocument.tabSizeAttribute);
        assertEquals(8, ((Integer) tabSize).intValue());
View Full Code Here

    /*
     * Class under test for void PlainDocument()
     */
    public void testPlainDocument() {
        doc = new PlainDocument();
        Content content = doc.getContent();
        assertTrue(content instanceof GapContent);
        GapContent gapContent = (GapContent) content;
        assertEquals(9, gapContent.getGapEnd() - gapContent.getGapStart());
        Object tabSize = doc.getProperty(PlainDocument.tabSizeAttribute);
        assertEquals(8, ((Integer) tabSize).intValue());
View Full Code Here

    public void testHTMLDocumentStyleSheet() throws BadLocationException, MalformedURLException {
        StyleSheet styles = new StyleSheet();
        htmlDoc = new PublicHTMLDocument(styles);
        assertSame(styles, htmlDoc.getAttributeContextPublicly());
        final Content content = htmlDoc.getContentPublicly();
        assertTrue(content instanceof GapContent);
       
        URL u1 = new URL("http://www.apache.org");
        styles.setBase(u1);
        htmlDoc = new PublicHTMLDocument(styles);
View Full Code Here

TOP

Related Classes of javax.swing.text.AbstractDocument.Content

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.