var $AdfDhtmlTrainPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlTrainPeer", !1);
$goog$exportSymbol$$("AdfDhtmlTrainPeer", $AdfDhtmlTrainPeer$$);
$AdfDhtmlTrainPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlTrainPeer$$$$$InitDomElement$$($component$$2258$$, $domElement$$572$$) {
  var $i$$inline_4893_table$$67$$ = $domElement$$572$$.getElementsByTagName("table")[0];
  this.$_isVertical$ = "vertical" == $component$$2258$$.getLayout();
  if (null != $i$$inline_4893_table$$67$$) {
    if (this.$_containers$ = this.$_isVertical$ ? $i$$inline_4893_table$$67$$.rows : $i$$inline_4893_table$$67$$.rows[0].cells, this.$_isOverflowNeeded$ = !0, !this.$_isVertical$ && $AdfAgent$$.$AGENT$.$getPlatform$() == $AdfAgent$$.$GECKO_PLATFORM$ && 1.9 > $AdfAgent$$.$AGENT$.$getVersion$()) {
      for (var $container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$, $i$$inline_4893_table$$67$$ = -1, $agent$$inline_4894$$ = $AdfAgent$$.$getAgent$();$container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$ = this.$_containers$[++$i$$inline_4893_table$$67$$];) {
        if ($container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$ = $container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$.getElementsByTagName("tr")[1]) {
          if ($container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$ = $container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$.getElementsByTagName("div")[0]) {
            var $style$$inline_4897_widthString$$inline_4898$$ = $agent$$inline_4894$$.getComputedStyle($container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$);
            if ($style$$inline_4897_widthString$$inline_4898$$ = $agent$$inline_4894$$.$getStyleProperty$($style$$inline_4897_widthString$$inline_4898$$, "width")) {
              length = $AdfAgent$$.$getCSSLengthAsInt$($style$$inline_4897_widthString$$inline_4898$$), 0 < length && ($container$$inline_4892_textdiv$$inline_4896_textrow$$inline_4895$$.style.width = length + 4 + "px");
            }
          }
        }
      }
    }
  } else {
    this.$_isOverflowNeeded$ = !1;
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlTrainPeer$$.prototype.$InitDomElement$});
$AdfDhtmlTrainPeer$$.$InitSubclass$ = function $$AdfDhtmlTrainPeer$$$$InitSubclass$$() {
  this.$_OVERFLOW_ELEMENT_STYLE_CLASS$ = "AFOverflowElement";
  this.$_PARENT_START$ = "parentStart";
  this.$_PARENT_END$ = "parentEnd";
};
$goog$exportSymbol$$("AdfDhtmlTrainPeer.InitSubclass", $AdfDhtmlTrainPeer$$.$InitSubclass$);
$AdfDhtmlTrainPeer$$.prototype.$needsResizeNotify$ = function $$AdfDhtmlTrainPeer$$$$$needsResizeNotify$$() {
  return !0;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.needsResizeNotify", {$needsResizeNotify$:$AdfDhtmlTrainPeer$$.prototype.$needsResizeNotify$});
$AdfDhtmlTrainPeer$$.prototype.$resizeNotify$ = function $$AdfDhtmlTrainPeer$$$$$resizeNotify$$($clientId$$461_component$$2259$$) {
  this.$getDomElement$();
  if (!this.$_overflowSupport$) {
    $clientId$$461_component$$2259$$ = $clientId$$461_component$$2259$$.$getClientId$();
    if (!this.$_isOverflowNeeded$ || !$AdfOverflowSupport$$.$needsOverflow$($clientId$$461_component$$2259$$)) {
      return;
    }
    this.$_overflowSupport$ = new $AdfOverflowSupport$$($clientId$$461_component$$2259$$, this, "both", "after", this.$_isVertical$ ? "vertical" : "horizontal");
    for (var $container$$66_overflowElement$$6$$, $i$$668$$ = -1;$container$$66_overflowElement$$6$$ = this.$_containers$[++$i$$668$$];) {
      if (!$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($container$$66_overflowElement$$6$$, $clientId$$461_component$$2259$$)) {
        this.$_overflowSupport$.$createStep$();
        this.$_overflowSupport$.addElement($container$$66_overflowElement$$6$$);
        var $index$$inline_4901$$ = $i$$668$$, $clientId$$inline_4902$$ = $clientId$$461_component$$2259$$;
        0 < $index$$inline_4901$$ && $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4901$$ - 1], $clientId$$inline_4902$$);
        $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4901$$ + 1], $clientId$$inline_4902$$, !0);
        $container$$66_overflowElement$$6$$ = this.$_createOverflowElement$($container$$66_overflowElement$$6$$);
        this.$_overflowSupport$.$addOverflowElement$($container$$66_overflowElement$$6$$);
      }
    }
  }
  this.$_overflowSupport$.$handleResize$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.resizeNotify", {$resizeNotify$:$AdfDhtmlTrainPeer$$.prototype.$resizeNotify$});
$AdfDhtmlTrainPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlTrainPeer$$$$$ComponentRemoved$$($component$$2260$$) {
  delete this.$_containers$;
  this.$_overflowSupport$ && (this.$_overflowSupport$.$removeOverflowSupport$(), delete this.$_overflowSupport$);
  $AdfDhtmlTrainPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$2260$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlTrainPeer$$.prototype.$ComponentRemoved$});
function $JSCompiler_StaticMethods__addJoin$$($JSCompiler_StaticMethods__addJoin$self$$, $element$$325_table$$68$$, $clientId$$463$$, $isStart_joinCell$$) {
  $element$$325_table$$68$$ && !$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($element$$325_table$$68$$, $clientId$$463$$) && ($element$$325_table$$68$$ = $element$$325_table$$68$$.getElementsByTagName("table")[0], ($isStart_joinCell$$ = $JSCompiler_StaticMethods__addJoin$self$$.$_isVertical$ ? $element$$325_table$$68$$.rows[$isStart_joinCell$$ ? 0 : 2].cells[1] : $element$$325_table$$68$$.rows[0].cells[$isStart_joinCell$$ ? 0 : 2]) && $isStart_joinCell$$.firstChild && $JSCompiler_StaticMethods__addJoin$self$$.$_overflowSupport$.addElement($JSCompiler_StaticMethods__addJoin$self$$.$_isVertical$ ? 
  $isStart_joinCell$$ : $isStart_joinCell$$.firstChild));
}
$AdfDhtmlTrainPeer$$.prototype.$_createOverflowElement$ = function $$AdfDhtmlTrainPeer$$$$$_createOverflowElement$$($element$$327_link$$6$$) {
  var $overflowElement$$7$$ = $element$$327_link$$6$$.ownerDocument.createElement("div"), $clickStub_id$$368_laf$$132$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
  $AdfDomUtils$$.$addCSSClassName$($overflowElement$$7$$, $clickStub_id$$368_laf$$132$$.getStyleClass($AdfDhtmlTrainPeer$$.$_OVERFLOW_ELEMENT_STYLE_CLASS$));
  var $clickStub_id$$368_laf$$132$$ = $element$$327_link$$6$$.id, $component$$2261$$ = $AdfPage$$.$PAGE$.$findComponent$($clickStub_id$$368_laf$$132$$);
  $element$$327_link$$6$$ = (this.$_isVertical$ ? $element$$327_link$$6$$.cells[1].getElementsByTagName("a")[0] : $element$$327_link$$6$$.getElementsByTagName("tr")[1].getElementsByTagName("a")[0]).cloneNode(!0);
  $overflowElement$$7$$.appendChild($element$$327_link$$6$$);
  $component$$2261$$.getDisabled() || ($element$$327_link$$6$$.href = "#", $element$$327_link$$6$$.onclick = "return false;", $element$$327_link$$6$$.$_componentId$ = $clickStub_id$$368_laf$$132$$, $clickStub_id$$368_laf$$132$$ = this.$createCallback$(this.$_trainClick$), $AdfAgent$$.$AGENT$.$addBubbleEventListener$($element$$327_link$$6$$, "click", $clickStub_id$$368_laf$$132$$));
  return $overflowElement$$7$$;
};
$AdfDhtmlTrainPeer$$.prototype.$_trainClick$ = function $$AdfDhtmlTrainPeer$$$$$_trainClick$$($component$$2262_event$$311_id$$369$$) {
  $component$$2262_event$$311_id$$369$$ = $AdfAgent$$.$AGENT$.$getEventTarget$($component$$2262_event$$311_id$$369$$).$_componentId$;
  $component$$2262_event$$311_id$$369$$ = $AdfPage$$.$PAGE$.$findComponent$($component$$2262_event$$311_id$$369$$);
  $AdfActionEvent$$.$queue$($component$$2262_event$$311_id$$369$$, $component$$2262_event$$311_id$$369$$.getPartialSubmit());
};
$AdfDhtmlTrainPeer$$.prototype.$ConvertClientIdToLocator$ = function $$AdfDhtmlTrainPeer$$$$$ConvertClientIdToLocator$$($clientIdDepth$$9_component$$2263$$, $childComponent$$27_clientId$$464_endIndex$$14$$, $descComponentClientId$$10_subComponentId$$10$$, $replaceArray$$11$$) {
  $childComponent$$27_clientId$$464_endIndex$$14$$ = $clientIdDepth$$9_component$$2263$$.$getClientId$();
  $clientIdDepth$$9_component$$2263$$ = $AdfStrings$$.count($childComponent$$27_clientId$$464_endIndex$$14$$, ":");
  $AdfAssert$$.assert(0 <= $descComponentClientId$$10_subComponentId$$10$$.indexOf($childComponent$$27_clientId$$464_endIndex$$14$$));
  $descComponentClientId$$10_subComponentId$$10$$ = $descComponentClientId$$10_subComponentId$$10$$.substring($childComponent$$27_clientId$$464_endIndex$$14$$.length + 1);
  $childComponent$$27_clientId$$464_endIndex$$14$$ = $descComponentClientId$$10_subComponentId$$10$$.indexOf(":");
  0 < $childComponent$$27_clientId$$464_endIndex$$14$$ && $replaceArray$$11$$.push([$clientIdDepth$$9_component$$2263$$ + 1, $descComponentClientId$$10_subComponentId$$10$$.substring(0, $childComponent$$27_clientId$$464_endIndex$$14$$)]);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.ConvertClientIdToLocator", {$ConvertClientIdToLocator$:$AdfDhtmlTrainPeer$$.prototype.$ConvertClientIdToLocator$});
$AdfDhtmlTrainPeer$$.prototype.$convertLocatorToClientId$ = function $$AdfDhtmlTrainPeer$$$$$convertLocatorToClientId$$($component$$2264$$, $index$$212$$) {
  var $element$$328_parent$$69_root$$26$$ = this.$getDomElement$(), $tbody$$1$$ = $AdfDomUtils$$.$getFirstDescendentElement$($element$$328_parent$$69_root$$26$$, "tbody");
  if (!$tbody$$1$$) {
    return null;
  }
  var $layout$$2$$ = $component$$2264$$.getLayout();
  "string" == typeof $index$$212$$ && ($index$$212$$ = parseInt($index$$212$$));
  0 == $index$$212$$ ? $element$$328_parent$$69_root$$26$$ = "vertical" == $layout$$2$$ ? $AdfDomUtils$$.$getFirstChildElement$($tbody$$1$$) : $AdfDomUtils$$.$getFirstDescendentElement$($element$$328_parent$$69_root$$26$$, "td") : ($element$$328_parent$$69_root$$26$$ = "vertical" == $layout$$2$$ ? $tbody$$1$$ : $AdfDomUtils$$.$getFirstDescendentElement$($tbody$$1$$, "tr"), $element$$328_parent$$69_root$$26$$ = $AdfDomUtils$$.$getChildElementByPosition$($element$$328_parent$$69_root$$26$$, 1, $index$$212$$));
  return $element$$328_parent$$69_root$$26$$ ? $element$$328_parent$$69_root$$26$$.id : null;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.convertLocatorToClientId", {$convertLocatorToClientId$:$AdfDhtmlTrainPeer$$.prototype.$convertLocatorToClientId$});
$AdfDhtmlTrainPeer$$.$_isElementAParentStop$ = function $$AdfDhtmlTrainPeer$$$$_isElementAParentStop$$($element$$329$$, $clientId$$465$$) {
  var $parentStartSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$465$$, $AdfDhtmlTrainPeer$$.$_PARENT_START$), $parentEndSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$465$$, $AdfDhtmlTrainPeer$$.$_PARENT_END$);
  return $element$$329$$.id ? $element$$329$$.id === $parentStartSubId$$ || $element$$329$$.id === $parentEndSubId$$ ? !0 : !1 : !1;
};
