Package com.google.gwt.event.dom.client

Examples of com.google.gwt.event.dom.client.ClickEvent


        assertNotNull(event);
        assertEquals(UnifiedEventType.CLICK_EVENT, event.getEventType());
        assertNull(event.getClickEvent());
        assertNull(event.getContext());

        ClickEvent clickEvent = mock(ClickEvent.class);
        event = new UnifiedEventWithContext<String>(clickEvent, "hello");
        assertNotNull(event);
        assertEquals(UnifiedEventType.CLICK_EVENT, event.getEventType());
        assertSame(clickEvent, event.getClickEvent());
        assertEquals("hello", event.getContext());
View Full Code Here


        assertEquals("hello", event.getContext());
    }

    /** Test equals(). */
    @Test public void testEquals() {
        ClickEvent clickEvent1 = mock(ClickEvent.class);
        ClickEvent clickEvent2 = mock(ClickEvent.class);

        UnifiedEventWithContext<String> event1;
        UnifiedEventWithContext<String> event2;

        event1 = new UnifiedEventWithContext<String>(UnifiedEventType.MENU_EVENT, "hello");
View Full Code Here

        assertFalse(event2.equals(event1));
    }

    /** Test hashCode(). */
    @Test public void testHashCode() {
        ClickEvent clickEvent1 = mock(ClickEvent.class);
        ClickEvent clickEvent2 = mock(ClickEvent.class);

        UnifiedEventWithContext<String> event1 = new UnifiedEventWithContext<String>(UnifiedEventType.MENU_EVENT, "hello");
        UnifiedEventWithContext<String> event2 = new UnifiedEventWithContext<String>(UnifiedEventType.MENU_EVENT, "blech");
        UnifiedEventWithContext<String> event3 = new UnifiedEventWithContext<String>(UnifiedEventType.BUTTON_EVENT, "hello");
        UnifiedEventWithContext<String> event4 = new UnifiedEventWithContext<String>(clickEvent1, "hello");
View Full Code Here

        event = new UnifiedEvent((ClickEvent) null);
        assertNotNull(event);
        assertEquals(UnifiedEventType.CLICK_EVENT, event.getEventType());
        assertNull(event.getClickEvent());

        ClickEvent clickEvent = mock(ClickEvent.class);
        event = new UnifiedEvent(clickEvent);
        assertNotNull(event);
        assertEquals(UnifiedEventType.CLICK_EVENT, event.getEventType());
        assertSame(clickEvent, event.getClickEvent());
    }
View Full Code Here

        assertSame(clickEvent, event.getClickEvent());
    }

    /** Test equals(). */
    @Test public void testEquals() {
        ClickEvent clickEvent1 = mock(ClickEvent.class);
        ClickEvent clickEvent2 = mock(ClickEvent.class);

        UnifiedEvent event1;
        UnifiedEvent event2;

        event1 = new UnifiedEvent(UnifiedEventType.MENU_EVENT);
View Full Code Here

        assertFalse(event2.equals(event1));
    }

    /** Test hashCode(). */
    @Test public void testHashCode() {
        ClickEvent clickEvent1 = mock(ClickEvent.class);
        ClickEvent clickEvent2 = mock(ClickEvent.class);

        UnifiedEvent event1 = new UnifiedEvent(UnifiedEventType.MENU_EVENT);
        UnifiedEvent event2 = new UnifiedEvent(UnifiedEventType.BUTTON_EVENT);
        UnifiedEvent event3 = new UnifiedEvent(clickEvent1);
        UnifiedEvent event4 = new UnifiedEvent(clickEvent2);
View Full Code Here

    /** Test AbstractClickHandler. */
    @Test public void testAbstractClickHandler() {
        EventHandler handler = new EventHandler("parent");
        assertEquals("parent", handler.getParent());
        ClickEvent clickEvent = mock(ClickEvent.class);
        handler.onClick(clickEvent);
        assertSame(clickEvent, handler.event);
    }
View Full Code Here

*/
public class AbstractViewEventClickHandlerTest extends StubbedClientTestCase {

    /** Test AbstractViewEventClickHandler. */
    @Test public void testAbstractViewEventClickHandler() {
        ClickEvent event = mock(ClickEvent.class);

        View view = mock(View.class);
        ClickHandler handler = new ClickHandler(view);
        assertSame(view, handler.getParent());

View Full Code Here

    }
  }

  void fireClickListeners(@SuppressWarnings("unused") Event nativeEvent) {
    // TODO(ecc) Once event triggering is committed, should fire a native click event instead.
    fireEvent(new ClickEvent() {
    });
  }
View Full Code Here

    }
  }

  void fireClickListeners(@SuppressWarnings("unused") Event nativeEvent) {
    // TODO(ecc) Once event triggering is committed, should fire a native click event instead.
    fireEvent(new ClickEvent() {
    });
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.ClickEvent

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.