예제 #1
0
 /** Simulates a click event on the widget with the given index inside a ComplexPanel. */
 public static void click(ComplexPanel panel, int index) {
   Widget target = panel.getWidget(index);
   Event clickEvent = EventBuilder.create(Event.ONCLICK).setTarget(target.getElement()).build();
   assertCanApplyEvent(target, clickEvent);
   dispatchEventInternal(panel, clickEvent);
 }
예제 #2
0
 /** Simulates a click event on a particular MenuItem of a SuggestBox. */
 public static void click(SuggestBox parent, MenuItem clickedItem) {
   Event clickEvent =
       EventBuilder.create(Event.ONCLICK).setTarget(clickedItem.getElement()).build();
   assertCanApplyEvent(clickedItem, clickEvent);
   dispatchEventInternal(parent, clickEvent);
 }
예제 #3
0
 /** Simulates a click event on the Grid cell with the given indexes. */
 public static void click(Grid grid, int row, int column) {
   Widget target = grid.getWidget(row, column);
   Event clickEvent = EventBuilder.create(Event.ONCLICK).setTarget(target.getElement()).build();
   assertCanApplyEvent(target, clickEvent);
   dispatchEventInternal(grid, clickEvent);
 }
예제 #4
0
 /** Simulates an occurring of the given event due to an interaction with the target widget. */
 public static void dispatchEvent(Widget target, Event event) {
   assertCanApplyEvent(target, event);
   dispatchEventInternal(target, event);
 }