// .ui.xml template last modified: 1765192153794
package org.silverpeas.mobile.client.apps.tasks.pages.widgets;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.safehtml.shared.SafeUri;
import com.google.gwt.safehtml.shared.UriUtils;
import com.google.gwt.uibinder.client.UiBinderUtil;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiBinderUtil;
import com.google.gwt.user.client.ui.Widget;

public class TaskItem_ContactItemUiBinderImpl implements UiBinder<com.google.gwt.user.client.ui.Widget, org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem>, org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem.ContactItemUiBinder {

  interface Template extends SafeHtmlTemplates {
    @Template("<span id='{0}'></span> (<span class='task-priority' id='{1}'></span>) <br><span id='{2}'></span><span class='endDate' id='{3}'></span> <br><span class='percentCompleted' id='{4}'></span><input class='task-percent-range' id='{5}' type='range'>")
    SafeHtml html1(String arg0, String arg1, String arg2, String arg3, String arg4, String arg5);
     
    @Template("<span id='{0}'></span>")
    SafeHtml html2(String arg0);
     
  }

  Template template = GWT.create(Template.class);


  public com.google.gwt.user.client.ui.Widget createAndBindUi(final org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem owner) {


    return new Widgets(owner).get_container();
  }

  /**
   * Encapsulates the access to all inner widgets
   */
  class Widgets {
    private final org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem owner;


    final com.google.gwt.event.dom.client.TouchStartHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1 = new com.google.gwt.event.dom.client.TouchStartHandler() {
      public void onTouchStart(com.google.gwt.event.dom.client.TouchStartEvent event) {
        owner.startTouch((com.google.gwt.event.dom.client.TouchStartEvent) event);
      }
    };

    final com.google.gwt.event.dom.client.TouchEndHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2 = new com.google.gwt.event.dom.client.TouchEndHandler() {
      public void onTouchEnd(com.google.gwt.event.dom.client.TouchEndEvent event) {
        owner.endTouch((com.google.gwt.event.dom.client.TouchEndEvent) event);
      }
    };

    public Widgets(final org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem owner) {
      this.owner = owner;
      build_msg();  // no getter call detected but must bind to ui:field. Type: IMPORTED, precedence: 1
      build_domId1();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId2();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId3();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId4();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId5();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId6();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 3
      build_domId0();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId0Element();  // more than one getter call detected. Type: DEFAULT, precedence: 2
    }

    SafeHtml template_html1() {
      return template.html1(get_domId1(), get_domId2(), get_domId3(), get_domId4(), get_domId5(), get_domId6());
    }
    SafeHtml template_html2() {
      return template.html2(get_domId0());
    }

    /**
     * Getter for clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay called 0 times. Type: GENERATED_BUNDLE. Build precedence: 1.
     */
    private org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem_ContactItemUiBinderImpl_GenBundle get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay() {
      return build_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay();
    }
    private org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem_ContactItemUiBinderImpl_GenBundle build_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay() {
      // Creation section.
      final org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem_ContactItemUiBinderImpl_GenBundle clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay = (org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem_ContactItemUiBinderImpl_GenBundle) GWT.create(org.silverpeas.mobile.client.apps.tasks.pages.widgets.TaskItem_ContactItemUiBinderImpl_GenBundle.class);
      // Setup section.

      return clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay;
    }

    /**
     * Getter for msg called 0 times. Type: IMPORTED. Build precedence: 1.
     */
    private org.silverpeas.mobile.client.apps.tasks.resources.TasksMessages get_msg() {
      return build_msg();
    }
    private org.silverpeas.mobile.client.apps.tasks.resources.TasksMessages build_msg() {
      // Creation section.
      final org.silverpeas.mobile.client.apps.tasks.resources.TasksMessages msg = owner.msg;
      assert msg != null : "UiField msg with 'provided = true' was null";
      // Setup section.

      return msg;
    }

    /**
     * Getter for container called 1 times. Type: DEFAULT. Build precedence: 1.
     */
    private com.google.gwt.user.client.ui.HTMLPanel get_container() {
      return build_container();
    }
    private com.google.gwt.user.client.ui.HTMLPanel build_container() {
      // Creation section.
      final com.google.gwt.user.client.ui.HTMLPanel container = new com.google.gwt.user.client.ui.HTMLPanel("li", template_html2().asString());
      // Setup section.
      container.setStyleName("task readonly");

      {
        // Attach section.
        UiBinderUtil.TempAttachment __attachRecord__ = UiBinderUtil.attachToDom(container.getElement());

        get_domId0Element().get();

        // Detach section.
        __attachRecord__.detach();
      }
      container.addAndReplaceElement(get_link(), get_domId0Element().get());

      this.owner.container = container;

      return container;
    }

    /**
     * Getter for domId0 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 2.
     */
    private java.lang.String domId0;
    private java.lang.String get_domId0() {
      return domId0;
    }
    private java.lang.String build_domId0() {
      // Creation section.
      domId0 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId0;
    }

    /**
     * Getter for link called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private com.google.gwt.user.client.ui.Anchor get_link() {
      return build_link();
    }
    private com.google.gwt.user.client.ui.Anchor build_link() {
      // Creation section.
      final com.google.gwt.user.client.ui.Anchor link = (com.google.gwt.user.client.ui.Anchor) GWT.create(com.google.gwt.user.client.ui.Anchor.class);
      // Setup section.
      link.setHTML(template_html1().asString());
      link.setStyleName("ui-btn ui-icon-carat-r");
      link.addTouchStartHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1);
      link.addTouchEndHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2);

      {
        // Attach section.
        UiBinderUtil.TempAttachment __attachRecord__ = UiBinderUtil.attachToDom(link.getElement());

        get_name();
        get_priority();
        get_delegator();
        get_endDate();
        get_percentCompleted();
        get_range();

        // Detach section.
        __attachRecord__.detach();
      }

      this.owner.link = link;

      return link;
    }

    /**
     * Getter for name called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.SpanElement get_name() {
      return build_name();
    }
    private com.google.gwt.dom.client.SpanElement build_name() {
      // Creation section.
      final com.google.gwt.dom.client.SpanElement name = new com.google.gwt.uibinder.client.LazyDomElement(get_domId1()).get().cast();
      // Setup section.

      this.owner.name = name;

      return name;
    }

    /**
     * Getter for domId1 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId1;
    private java.lang.String get_domId1() {
      return domId1;
    }
    private java.lang.String build_domId1() {
      // Creation section.
      domId1 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId1;
    }

    /**
     * Getter for priority called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.SpanElement get_priority() {
      return build_priority();
    }
    private com.google.gwt.dom.client.SpanElement build_priority() {
      // Creation section.
      final com.google.gwt.dom.client.SpanElement priority = new com.google.gwt.uibinder.client.LazyDomElement(get_domId2()).get().cast();
      // Setup section.

      this.owner.priority = priority;

      return priority;
    }

    /**
     * Getter for domId2 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId2;
    private java.lang.String get_domId2() {
      return domId2;
    }
    private java.lang.String build_domId2() {
      // Creation section.
      domId2 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId2;
    }

    /**
     * Getter for delegator called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.SpanElement get_delegator() {
      return build_delegator();
    }
    private com.google.gwt.dom.client.SpanElement build_delegator() {
      // Creation section.
      final com.google.gwt.dom.client.SpanElement delegator = new com.google.gwt.uibinder.client.LazyDomElement(get_domId3()).get().cast();
      // Setup section.

      this.owner.delegator = delegator;

      return delegator;
    }

    /**
     * Getter for domId3 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId3;
    private java.lang.String get_domId3() {
      return domId3;
    }
    private java.lang.String build_domId3() {
      // Creation section.
      domId3 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId3;
    }

    /**
     * Getter for endDate called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.SpanElement get_endDate() {
      return build_endDate();
    }
    private com.google.gwt.dom.client.SpanElement build_endDate() {
      // Creation section.
      final com.google.gwt.dom.client.SpanElement endDate = new com.google.gwt.uibinder.client.LazyDomElement(get_domId4()).get().cast();
      // Setup section.

      this.owner.endDate = endDate;

      return endDate;
    }

    /**
     * Getter for domId4 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId4;
    private java.lang.String get_domId4() {
      return domId4;
    }
    private java.lang.String build_domId4() {
      // Creation section.
      domId4 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId4;
    }

    /**
     * Getter for percentCompleted called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.SpanElement get_percentCompleted() {
      return build_percentCompleted();
    }
    private com.google.gwt.dom.client.SpanElement build_percentCompleted() {
      // Creation section.
      final com.google.gwt.dom.client.SpanElement percentCompleted = new com.google.gwt.uibinder.client.LazyDomElement(get_domId5()).get().cast();
      // Setup section.

      this.owner.percentCompleted = percentCompleted;

      return percentCompleted;
    }

    /**
     * Getter for domId5 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId5;
    private java.lang.String get_domId5() {
      return domId5;
    }
    private java.lang.String build_domId5() {
      // Creation section.
      domId5 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId5;
    }

    /**
     * Getter for range called 1 times. Type: DEFAULT. Build precedence: 3.
     */
    private com.google.gwt.dom.client.InputElement get_range() {
      return build_range();
    }
    private com.google.gwt.dom.client.InputElement build_range() {
      // Creation section.
      final com.google.gwt.dom.client.InputElement range = new com.google.gwt.uibinder.client.LazyDomElement(get_domId6()).get().cast();
      // Setup section.

      this.owner.range = range;

      return range;
    }

    /**
     * Getter for domId6 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 3.
     */
    private java.lang.String domId6;
    private java.lang.String get_domId6() {
      return domId6;
    }
    private java.lang.String build_domId6() {
      // Creation section.
      domId6 = com.google.gwt.dom.client.Document.get().createUniqueId();
      // Setup section.

      return domId6;
    }

    /**
     * Getter for domId0Element called 2 times. Type: DEFAULT. Build precedence: 2.
     */
    private com.google.gwt.uibinder.client.LazyDomElement domId0Element;
    private com.google.gwt.uibinder.client.LazyDomElement get_domId0Element() {
      return domId0Element;
    }
    private com.google.gwt.uibinder.client.LazyDomElement build_domId0Element() {
      // Creation section.
      domId0Element = new com.google.gwt.uibinder.client.LazyDomElement<Element>(get_domId0());
      // Setup section.

      return domId0Element;
    }
  }
}
