Examples of UIEvent


Examples of com.google.speedtracer.client.model.UiEvent

  public void testEventHasUserLogs() {
    EventFilter filter = new EventFilter();

    filter.setMinDuration(10);
    filter.setFilterUserLogs(true);
    UiEvent uiEvent = createUiEventDuration(LayoutEvent.TYPE, 11.0);
    assertFalse("user logs 1", filter.shouldFilter(uiEvent));
    setHasUserLogs(uiEvent);
    assertFalse("user logs 2", filter.shouldFilter(uiEvent));
    filter.setMinDuration(20);
    assertTrue("user logs 3", filter.shouldFilter(uiEvent));
View Full Code Here

Examples of com.google.speedtracer.client.model.UiEvent

  private void calcSelfTime(UiEvent uiEvent) {
    AggregateTimeVisitor.apply(uiEvent);
  }

  private UiEvent createUiEventDuration(int eventType, double duration) {
    UiEvent uiEvent = createUiEventDurationNative(eventType, duration);
    calcSelfTime(uiEvent);
    return uiEvent;
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.UiEvent

    'duration':duration,'time':694.3199999928474,'type':eventType};
  }-*/;

  private UiEvent createUiEventTypePercentDuration(int outerType,
      double durationOuter, int childType, double durationChild) {
    UiEvent uiEvent = createUiEventTypePercentNative(outerType, durationOuter,
        childType, durationChild);
    calcSelfTime(uiEvent);
    return uiEvent;
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.UiEvent

  }

  private UiEvent createUiEventTypePercentDuration(int outerType,
      double durationOuter, int childType, double durationChild,
      int grandChildType, double durationGrandChild) {
    UiEvent uiEvent = createUiEventTypePercentNative(outerType, durationOuter,
        childType, durationChild, grandChildType, durationGrandChild);
    calcSelfTime(uiEvent);
    return uiEvent;
  }
View Full Code Here

Examples of ehistory.web.server.model.UIEvent

        eventsResponse = clientBean.getBackendBean().getEvents(filter);

        GregorianCalendar fromDate = eventsResponse.getFrom().getGregorianCalendar();
        events = new LinkedHashMap<String, UIEvent>(eventsResponse.getEvents().size());
        for (Event event : eventsResponse.getEvents()) {
            UIEvent uiEvent = new UIEvent(event.getUid(), event.getTitle());
            uiEvent.setFrom(TimeModel.daysBetween(fromDate, event.getTime().getFrom().getGregorianCalendar()));
            uiEvent.setTo(TimeModel.daysBetween(fromDate, event.getTime().getTo().getGregorianCalendar()));
            events.put(event.getUid(), uiEvent);
        }
        periods = eventsResponse.getPeriods();

        setLevels();
View Full Code Here

Examples of ehistory.web.server.model.UIEvent

            event.setLevel(null);
        }
        int periodsSize = periods.size();
        for (int periodIndex = 0; periodIndex < periodsSize; periodIndex++) {
            Period period = periods.get(periodIndex);
            UIEvent fromEvent = events.get(period.getFrom().getUid());
            UIEvent toEvent = events.get(period.getTo().getUid());
            int from = fromEvent.getFrom();
            int to = toEvent.getTo();
            for (int level = 0; level < MAX_LEVEL; level++) {
                // try to put period on the "level" level
                boolean canPlaceOnLevel = true;
                for (int i = 0; i < periodIndex; i++) {
                    Period period1 = periods.get(i);
                    if (events.get(period1.getFrom().getUid()).getLevel() != level) {
                        continue;
                    }
                    int from1 = events.get(period1.getFrom().getUid()).getFrom();
                    int to1 = events.get(period1.getTo().getUid()).getTo();
                    if (to + DELTA > from1 &&
                            from - DELTA < to1) {
                        canPlaceOnLevel = false;
                        break;
                    }
                }
                if (canPlaceOnLevel) {
                    fromEvent.setLevel(level);
                    toEvent.setLevel(level);
                    break;
                }
            }
            if (fromEvent.getLevel() == null) {
                throw new RuntimeException("That's finally happened - we need to update algorithm");
            }
        }

        List<UIEvent> eventList = new ArrayList<UIEvent>();
        eventList.addAll(events.values());
        int eventsSize = eventList.size();
        for (int eventIndex = 0; eventIndex < eventsSize; eventIndex++) {
            UIEvent event = eventList.get(eventIndex);
            if (event.getLevel() != null) {
                continue;
            }
            int from = event.getFrom();
            int to = event.getTo();
            for (int level = 0; level < MAX_LEVEL; level++) {
                // try to place event on the level
                boolean canPlaceOnLevel = true;
                for (Period period1 : periods) {
                    if (events.get(period1.getFrom().getUid()).getLevel() != level) {
                        continue;
                    }
                    int from1 = events.get(period1.getFrom().getUid()).getFrom();
                    int to1 = events.get(period1.getTo().getUid()).getTo();
                    if (to + DELTA > from1 &&
                            from - DELTA < to1) {
                        canPlaceOnLevel = false;
                        break;
                    }
                }
                if (canPlaceOnLevel) {
                    for (int i = 0; i < eventIndex; i++) {
                        UIEvent event1 = eventList.get(i);
                        if (event1.getLevel() != level) {
                            continue;
                        }
                        int from1 = event1.getFrom();
                        int to1 = event1.getTo();
                        if (to + DELTA > from1 &&
                                from - DELTA < to1) {
                            canPlaceOnLevel = false;
                            break;
                        }
View Full Code Here

Examples of ehistory.web.server.model.UIEvent

        }

        StringBuilder periodsBuilder = new StringBuilder();
        StringBuilder periodTitlesBuilder = new StringBuilder();
        for (Period period : periods) {
            UIEvent from = events.get(period.getFrom().getUid());
            UIEvent to = events.get(period.getTo().getUid());

            if (periodTitlesBuilder.length() > 0) {
                periodTitlesBuilder.append(";");
            }
            periodTitlesBuilder.append(period.getTitle());

            if (periodsBuilder.length() > 0) {
                periodsBuilder.append(";");
            }
            periodsBuilder.append(from.getX2()).append(",").append(to.getX1()).append(",").append(height - from.getY());
        }
        eventsToIntArray = eventsBuilder.toString();
        eventTitles = eventTitlesBuilder.toString();
        periodsToIntArray = periodsBuilder.toString();
        periodTitles = periodTitlesBuilder.toString();
View Full Code Here

Examples of js.dom.UIEvent

     */
    private static final void type(Input input, Key key) {
        UIAction[] actions = {UIAction.KeyDown, UIAction.KeyPress, UIAction.KeyUp};

        for (UIAction action : actions) {
            UIEvent event = new UIEventMockForInput(input);
            event.action = action;
            event.which = key.code;

            input.event().publish(event);
        }
View Full Code Here

Examples of js.dom.UIEvent

     * @param delete
     */
    public static void click(Button button) {
        Objects.nonNull(button);

        UIEvent event = new UIEvent();
        event.action = UIAction.Click;

        button.event().publish(event);
    }
View Full Code Here

Examples of js.dom.UIEvent

     * @param delete
     */
    public static void click(Input button) {
        Objects.nonNull(button);

        UIEvent event = new UIEvent();
        event.action = UIAction.Click;

        button.event().publish(event);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.