// .ui.xml template last modified: 1772444277897
package org.silverpeas.mobile.client.components.base;

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 PageHeader_PageHeaderUiBinderImpl implements UiBinder<com.google.gwt.user.client.ui.Widget, org.silverpeas.mobile.client.components.base.PageHeader>, org.silverpeas.mobile.client.components.base.PageHeader.PageHeaderUiBinder {

  interface Template extends SafeHtmlTemplates {
    @Template("<span></span> <span></span> <span></span>")
    SafeHtml html1();
     
    @Template("<div class='box'> <span id='{0}'></span> </div> <span id='{1}'></span> <h1 class='ui-title' id='{2}'>Silverpeas</h1> <span id='{3}'></span> <span id='{4}'></span>")
    SafeHtml html2(String arg0, String arg1, String arg2, String arg3, String arg4);
     
  }

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


  public com.google.gwt.user.client.ui.Widget createAndBindUi(final org.silverpeas.mobile.client.components.base.PageHeader owner) {


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

  /**
   * Encapsulates the access to all inner widgets
   */
  class Widgets {
    private final org.silverpeas.mobile.client.components.base.PageHeader owner;


    final com.google.gwt.event.dom.client.ClickHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1 = new com.google.gwt.event.dom.client.ClickHandler() {
      public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
        owner.onMenu((com.google.gwt.event.dom.client.ClickEvent) event);
      }
    };

    final com.google.gwt.event.dom.client.ClickHandler handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2 = new com.google.gwt.event.dom.client.ClickHandler() {
      public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {
        owner.onBack((com.google.gwt.event.dom.client.ClickEvent) event);
      }
    };

    public Widgets(final org.silverpeas.mobile.client.components.base.PageHeader owner) {
      this.owner = owner;
      build_msg();  // no getter call detected but must bind to ui:field. Type: IMPORTED, precedence: 1
      build_domId0();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId1();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId2();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId3();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId4();  // more than one getter call detected. Type: DOM_ID_HOLDER, precedence: 2
      build_domId0Element();  // more than one getter call detected. Type: DEFAULT, precedence: 2
      build_domId1Element();  // more than one getter call detected. Type: DEFAULT, precedence: 2
      build_domId3Element();  // more than one getter call detected. Type: DEFAULT, precedence: 2
      build_domId4Element();  // more than one getter call detected. Type: DEFAULT, precedence: 2
    }

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

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

      return clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay;
    }

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

      return msg;
    }

    /**
     * Getter for header called 1 times. Type: DEFAULT. Build precedence: 1.
     */
    private com.google.gwt.user.client.ui.HTMLPanel get_header() {
      return build_header();
    }
    private com.google.gwt.user.client.ui.HTMLPanel build_header() {
      // Creation section.
      final com.google.gwt.user.client.ui.HTMLPanel header = new com.google.gwt.user.client.ui.HTMLPanel(template_html2().asString());
      // Setup section.

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

        get_domId0Element().get();
        get_domId1Element().get();
        get_title();
        get_domId3Element().get();
        get_domId4Element().get();

        // Detach section.
        __attachRecord__.detach();
      }
      header.addAndReplaceElement(get_menu(), get_domId0Element().get());
      header.addAndReplaceElement(get_back(), get_domId1Element().get());
      header.addAndReplaceElement(get_actionsShortcuts(), get_domId3Element().get());
      header.addAndReplaceElement(get_actionsMenu(), get_domId4Element().get());

      this.owner.header = header;

      return header;
    }

    /**
     * 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 menu called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private com.google.gwt.user.client.ui.HTML get_menu() {
      return build_menu();
    }
    private com.google.gwt.user.client.ui.HTML build_menu() {
      // Creation section.
      final com.google.gwt.user.client.ui.HTML menu = (com.google.gwt.user.client.ui.HTML) GWT.create(com.google.gwt.user.client.ui.HTML.class);
      // Setup section.
      menu.setHTML(template_html1().asString());
      menu.setStylePrimaryName("not-active");
      menu.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames1);

      this.owner.menu = menu;

      return menu;
    }

    /**
     * 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;
    }

    /**
     * Getter for domId1 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 2.
     */
    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 back called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private com.google.gwt.user.client.ui.Anchor get_back() {
      return build_back();
    }
    private com.google.gwt.user.client.ui.Anchor build_back() {
      // Creation section.
      final com.google.gwt.user.client.ui.Anchor back = (com.google.gwt.user.client.ui.Anchor) GWT.create(com.google.gwt.user.client.ui.Anchor.class);
      // Setup section.
      back.setStyleName("ui-btn-right back");
      back.setText("");
      back.addClickHandler(handlerMethodWithNameVeryUnlikelyToCollideWithUserFieldNames2);

      this.owner.back = back;

      return back;
    }

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

      return domId1Element;
    }

    /**
     * Getter for title called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private com.google.gwt.dom.client.HeadingElement get_title() {
      return build_title();
    }
    private com.google.gwt.dom.client.HeadingElement build_title() {
      // Creation section.
      final com.google.gwt.dom.client.HeadingElement title = new com.google.gwt.uibinder.client.LazyDomElement(get_domId2()).get().cast();
      // Setup section.

      this.owner.title = title;

      return title;
    }

    /**
     * Getter for domId2 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 2.
     */
    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 domId3 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 2.
     */
    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 actionsShortcuts called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private org.silverpeas.mobile.client.components.base.ActionsList get_actionsShortcuts() {
      return build_actionsShortcuts();
    }
    private org.silverpeas.mobile.client.components.base.ActionsList build_actionsShortcuts() {
      // Creation section.
      final org.silverpeas.mobile.client.components.base.ActionsList actionsShortcuts = (org.silverpeas.mobile.client.components.base.ActionsList) GWT.create(org.silverpeas.mobile.client.components.base.ActionsList.class);
      // Setup section.

      this.owner.actionsShortcuts = actionsShortcuts;

      return actionsShortcuts;
    }

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

      return domId3Element;
    }

    /**
     * Getter for domId4 called 2 times. Type: DOM_ID_HOLDER. Build precedence: 2.
     */
    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 actionsMenu called 1 times. Type: DEFAULT. Build precedence: 2.
     */
    private org.silverpeas.mobile.client.components.base.ActionsMenu get_actionsMenu() {
      return build_actionsMenu();
    }
    private org.silverpeas.mobile.client.components.base.ActionsMenu build_actionsMenu() {
      // Creation section.
      final org.silverpeas.mobile.client.components.base.ActionsMenu actionsMenu = (org.silverpeas.mobile.client.components.base.ActionsMenu) GWT.create(org.silverpeas.mobile.client.components.base.ActionsMenu.class);
      // Setup section.

      this.owner.actionsMenu = actionsMenu;

      return actionsMenu;
    }

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

      return domId4Element;
    }
  }
}
