Package javax.swing.text.StyleContext

Examples of javax.swing.text.StyleContext.SmallAttributeSet


     * SmallAttributeSet(Object[])
     */
    public void testSmallAttributeSetObjectArray() {
        Object[] array = new Object[] { keys[0], values[0], keys[1], values[1], keys[2],
                values[2] };
        attrSet = sc.new SmallAttributeSet(array);
        assertEquals(keys.length, attrSet.getAttributeCount());
        for (int i = 0; i < keys.length; i++) {
            assertTrue(attrSet.containsAttribute(keys[i], values[i]));
        }
        // AttributeSet must not depend on the passed array
        array[0] = "justKey";
        if (BasicSwingTestCase.isHarmony()) {
            assertFalse(attrSet.isDefined(array[0]));
        }
        array = new Object[] { "key", "value" };
        assertEquals(3, attrSet.getAttributeCount());
        // Empty array
        array = new Object[0];
        attrSet = sc.new SmallAttributeSet(array);
        emptyTest(attrSet);
    }
View Full Code Here


        assertEquals(keys.length, attrSet.getAttributeCount());
        for (int i = 0; i < keys.length; i++) {
            assertTrue(attrSet.containsAttribute(keys[i], values[i]));
        }
        // Empty attribute set
        attrSet = sc.new SmallAttributeSet(SimpleAttributeSet.EMPTY);
        emptyTest(attrSet);
    }
View Full Code Here

    }

    @Override
    public void testGetResolveParent() {
        assertNull(attrSet.getResolveParent());
        AttributeSet parent = sc.new SmallAttributeSet(new Object[] { "key", "value" });
        Object[] array = new Object[] { keys[0], values[0], keys[1], values[1],
                AttributeSet.ResolveAttribute, parent };
        attrSet = sc.new SmallAttributeSet(array);
        assertEquals(parent, attrSet.getResolveParent());
    }
View Full Code Here

TOP

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

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.