var $AdfDhtmlTrainPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlTrainPeer", !1);
$goog$exportSymbol$$("AdfDhtmlTrainPeer", $AdfDhtmlTrainPeer$$);
$AdfDhtmlTrainPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlTrainPeer$$$$$InitDomElement$$($component$$2261$$, $domElement$$572$$) {
  var $i$$inline_4898_table$$67$$ = $domElement$$572$$.getElementsByTagName("table")[0];
  this.$_isVertical$ = "vertical" == $component$$2261$$.getLayout();
  if (null != $i$$inline_4898_table$$67$$) {
    if (this.$_containers$ = this.$_isVertical$ ? $i$$inline_4898_table$$67$$.rows : $i$$inline_4898_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_4897_textdiv$$inline_4901_textrow$$inline_4900$$, $i$$inline_4898_table$$67$$ = -1, $agent$$inline_4899$$ = $AdfAgent$$.$getAgent$();$container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$ = this.$_containers$[++$i$$inline_4898_table$$67$$];) {
        if ($container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$ = $container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$.getElementsByTagName("tr")[1]) {
          if ($container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$ = $container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$.getElementsByTagName("div")[0]) {
            var $style$$inline_4902_widthString$$inline_4903$$ = $agent$$inline_4899$$.getComputedStyle($container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$);
            if ($style$$inline_4902_widthString$$inline_4903$$ = $agent$$inline_4899$$.$getStyleProperty$($style$$inline_4902_widthString$$inline_4903$$, "width")) {
              length = $AdfAgent$$.$getCSSLengthAsInt$($style$$inline_4902_widthString$$inline_4903$$), 0 < length && ($container$$inline_4897_textdiv$$inline_4901_textrow$$inline_4900$$.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$$2262$$) {
  this.$getDomElement$();
  if (!this.$_overflowSupport$) {
    $clientId$$461_component$$2262$$ = $clientId$$461_component$$2262$$.$getClientId$();
    if (!this.$_isOverflowNeeded$ || !$AdfOverflowSupport$$.$needsOverflow$($clientId$$461_component$$2262$$)) {
      return;
    }
    this.$_overflowSupport$ = new $AdfOverflowSupport$$($clientId$$461_component$$2262$$, this, "both", "after", this.$_isVertical$ ? "vertical" : "horizontal");
    for (var $container$$66_overflowElement$$6$$, $i$$671$$ = -1;$container$$66_overflowElement$$6$$ = this.$_containers$[++$i$$671$$];) {
      if (!$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($container$$66_overflowElement$$6$$, $clientId$$461_component$$2262$$)) {
        this.$_overflowSupport$.$createStep$();
        this.$_overflowSupport$.addElement($container$$66_overflowElement$$6$$);
        var $index$$inline_4906$$ = $i$$671$$, $clientId$$inline_4907$$ = $clientId$$461_component$$2262$$;
        0 < $index$$inline_4906$$ && $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4906$$ - 1], $clientId$$inline_4907$$);
        $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4906$$ + 1], $clientId$$inline_4907$$, !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$$2263$$) {
  delete this.$_containers$;
  this.$_overflowSupport$ && (this.$_overflowSupport$.$removeOverflowSupport$(), delete this.$_overflowSupport$);
  $AdfDhtmlTrainPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$2263$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlTrainPeer$$.prototype.$ComponentRemoved$});
function $JSCompiler_StaticMethods__addJoin$$($JSCompiler_StaticMethods__addJoin$self$$, $element$$327_table$$68$$, $clientId$$463$$, $isStart_joinCell$$) {
  $element$$327_table$$68$$ && !$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($element$$327_table$$68$$, $clientId$$463$$) && ($element$$327_table$$68$$ = $element$$327_table$$68$$.getElementsByTagName("table")[0], ($isStart_joinCell$$ = $JSCompiler_StaticMethods__addJoin$self$$.$_isVertical$ ? $element$$327_table$$68$$.rows[$isStart_joinCell$$ ? 0 : 2].cells[1] : $element$$327_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$$329_link$$6$$) {
  var $overflowElement$$7$$ = $element$$329_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$$329_link$$6$$.id, $component$$2264$$ = $AdfPage$$.$PAGE$.$findComponent$($clickStub_id$$368_laf$$132$$);
  $element$$329_link$$6$$ = (this.$_isVertical$ ? $element$$329_link$$6$$.cells[1].getElementsByTagName("a")[0] : $element$$329_link$$6$$.getElementsByTagName("tr")[1].getElementsByTagName("a")[0]).cloneNode(!0);
  $overflowElement$$7$$.appendChild($element$$329_link$$6$$);
  $component$$2264$$.getDisabled() || ($element$$329_link$$6$$.href = "#", $element$$329_link$$6$$.onclick = "return false;", $element$$329_link$$6$$.$_componentId$ = $clickStub_id$$368_laf$$132$$, $clickStub_id$$368_laf$$132$$ = this.$createCallback$(this.$_trainClick$), $AdfAgent$$.$AGENT$.$addBubbleEventListener$($element$$329_link$$6$$, "click", $clickStub_id$$368_laf$$132$$));
  return $overflowElement$$7$$;
};
$AdfDhtmlTrainPeer$$.prototype.$_trainClick$ = function $$AdfDhtmlTrainPeer$$$$$_trainClick$$($component$$2265_event$$319_id$$369$$) {
  $component$$2265_event$$319_id$$369$$ = $AdfAgent$$.$AGENT$.$getEventTarget$($component$$2265_event$$319_id$$369$$).$_componentId$;
  $component$$2265_event$$319_id$$369$$ = $AdfPage$$.$PAGE$.$findComponent$($component$$2265_event$$319_id$$369$$);
  $AdfActionEvent$$.$queue$($component$$2265_event$$319_id$$369$$, $component$$2265_event$$319_id$$369$$.getPartialSubmit());
};
$AdfDhtmlTrainPeer$$.prototype.$ConvertClientIdToLocator$ = function $$AdfDhtmlTrainPeer$$$$$ConvertClientIdToLocator$$($clientIdDepth$$9_component$$2266$$, $childComponent$$27_clientId$$464_endIndex$$14$$, $descComponentClientId$$10_subComponentId$$10$$, $replaceArray$$11$$) {
  $childComponent$$27_clientId$$464_endIndex$$14$$ = $clientIdDepth$$9_component$$2266$$.$getClientId$();
  $clientIdDepth$$9_component$$2266$$ = $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$$2266$$ + 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$$2267$$, $index$$212$$) {
  var $element$$330_parent$$69_root$$26$$ = this.$getDomElement$(), $tbody$$1$$ = $AdfDomUtils$$.$getFirstDescendentElement$($element$$330_parent$$69_root$$26$$, "tbody");
  if (!$tbody$$1$$) {
    return null;
  }
  var $layout$$2$$ = $component$$2267$$.getLayout();
  "string" == typeof $index$$212$$ && ($index$$212$$ = parseInt($index$$212$$));
  0 == $index$$212$$ ? $element$$330_parent$$69_root$$26$$ = "vertical" == $layout$$2$$ ? $AdfDomUtils$$.$getFirstChildElement$($tbody$$1$$) : $AdfDomUtils$$.$getFirstDescendentElement$($element$$330_parent$$69_root$$26$$, "td") : ($element$$330_parent$$69_root$$26$$ = "vertical" == $layout$$2$$ ? $tbody$$1$$ : $AdfDomUtils$$.$getFirstDescendentElement$($tbody$$1$$, "tr"), $element$$330_parent$$69_root$$26$$ = $AdfDomUtils$$.$getChildElementByPosition$($element$$330_parent$$69_root$$26$$, 1, $index$$212$$));
  return $element$$330_parent$$69_root$$26$$ ? $element$$330_parent$$69_root$$26$$.id : null;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.convertLocatorToClientId", {$convertLocatorToClientId$:$AdfDhtmlTrainPeer$$.prototype.$convertLocatorToClientId$});
$AdfDhtmlTrainPeer$$.$_isElementAParentStop$ = function $$AdfDhtmlTrainPeer$$$$_isElementAParentStop$$($element$$331$$, $clientId$$465$$) {
  var $parentStartSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$465$$, $AdfDhtmlTrainPeer$$.$_PARENT_START$), $parentEndSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$465$$, $AdfDhtmlTrainPeer$$.$_PARENT_END$);
  return $element$$331$$.id ? $element$$331$$.id === $parentStartSubId$$ || $element$$331$$.id === $parentEndSubId$$ ? !0 : !1 : !1;
};
