Package javax.swing.text.StyleContext

Examples of javax.swing.text.StyleContext.NamedStyle


        assertTrue(withName.containsAttribute(AttributeSet.NameAttribute, "styleName"));
        assertTrue(withName.containsAttributes(as));
    }

    public void testNameNotString() {
        ns = StyleContext.getDefaultStyleContext().new NamedStyle();
        ns.addAttribute(AttributeSet.NameAttribute, new Integer(15));
        assertEquals(new Integer(15), ns.getAttribute(AttributeSet.NameAttribute));
        assertEquals((new Integer(15)).toString(), ns.getName());
    }
View Full Code Here


        assertEquals(ns, ns.changeEvent.getSource());
    }

    public void testSerializable() throws Exception {
        ns.setName("styleName");
        NamedStyle read = (NamedStyle) BasicSwingTestCase.serializeObject(ns);
        assertTrue(ns.isEqual(read));
    }
View Full Code Here

TOP

Related Classes of javax.swing.text.StyleContext.NamedStyle

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.