Package org.mcarthur.sandy.gwt.event.list.client

Examples of org.mcarthur.sandy.gwt.event.list.client.AbstractEventList


        assertEquals(l, bel);
    }

    public void testOtherListEventIsResourced() {
        final EventList el = new AbstractEventList() {
            public Object get(final int index) {
                fireListEvent(ListEvent.createOther(this));
                return null;
            }

            public int size() {
                return 0;
            }
        };
        final EventList bel = createBackedEventList(el);

        final ListEventListener lel = new ListEventListener() {
            private int count = 0;
            public void listChanged(final ListEvent listEvent) {
                switch (count++) {
                    case 0:
                        assertEquals(ListEvent.createOther(bel), listEvent);
                        break;
                    case 1:
                        assertNull(listEvent);
                        break;
                    default:
                        fail("Unexpected: " + listEvent);
                }
            }
        };
        bel.addListEventListener(lel);
        el.get(0);
        lel.listChanged(null);
        bel.removeListEventListener(lel);
    }
View Full Code Here

TOP

Related Classes of org.mcarthur.sandy.gwt.event.list.client.AbstractEventList

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.