var $AdfDhtmlTrainPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlTrainPeer", $JSCompiler_alias_FALSE$$);
$goog$exportSymbol$$("AdfDhtmlTrainPeer", $AdfDhtmlTrainPeer$$);
$AdfDhtmlTrainPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlTrainPeer$$$$$InitDomElement$$($component$$1702$$, $domElement$$500$$) {
  var $i$$inline_4381_table$$64$$ = $domElement$$500$$.getElementsByTagName("table")[0];
  this.$_isVertical$ = "vertical" == $component$$1702$$.getLayout();
  if($i$$inline_4381_table$$64$$ != $JSCompiler_alias_NULL$$) {
    if(this.$_containers$ = this.$_isVertical$ ? $i$$inline_4381_table$$64$$.rows : $i$$inline_4381_table$$64$$.rows[0].cells, this.$_isOverflowNeeded$ = $JSCompiler_alias_TRUE$$, !this.$_isVertical$ && $AdfAgent$$.$AGENT$.$getPlatform$() == $AdfAgent$$.$GECKO_PLATFORM$ && 1.9 > $AdfAgent$$.$AGENT$.$getVersion$()) {
      for(var $container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$, $i$$inline_4381_table$$64$$ = -1, $agent$$inline_4382$$ = $AdfAgent$$.$getAgent$();$container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$ = this.$_containers$[++$i$$inline_4381_table$$64$$];) {
        if($container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$ = $container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$.getElementsByTagName("tr")[1]) {
          if($container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$ = $container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$.getElementsByTagName("div")[0]) {
            var $style$$inline_4385_widthString$$inline_4386$$ = $agent$$inline_4382$$.getComputedStyle($container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$);
            if($style$$inline_4385_widthString$$inline_4386$$ = $agent$$inline_4382$$.$getStyleProperty$($style$$inline_4385_widthString$$inline_4386$$, "width")) {
              length = $AdfAgent$$.$getCSSLengthAsInt$($style$$inline_4385_widthString$$inline_4386$$), 0 < length && ($container$$inline_4380_textdiv$$inline_4384_textrow$$inline_4383$$.style.width = length + 4 + "px")
            }
          }
        }
      }
    }
  }else {
    this.$_isOverflowNeeded$ = $JSCompiler_alias_FALSE$$
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlTrainPeer$$.prototype.$InitDomElement$});
$AdfDhtmlTrainPeer$$.$InitSubclass$ = function $$AdfDhtmlTrainPeer$$$$InitSubclass$$() {
  this.$_SELECTED_STOP_STATE$ = "p_AFSelected";
  this.$_OVERFLOW_ELEMENT_STYLE_CLASS$ = "AFOverflowElement";
  this.$_PARENT_START$ = "parentStart";
  this.$_PARENT_END$ = "parentEnd"
};
$goog$exportSymbol$$("AdfDhtmlTrainPeer.InitSubclass", $AdfDhtmlTrainPeer$$.$InitSubclass$);
$AdfDhtmlTrainPeer$$.prototype.$needsResizeNotify$ = $JSCompiler_returnArg$$($JSCompiler_alias_TRUE$$);
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.needsResizeNotify", {$needsResizeNotify$:$AdfDhtmlTrainPeer$$.prototype.$needsResizeNotify$});
$AdfDhtmlTrainPeer$$.prototype.$resizeNotify$ = function $$AdfDhtmlTrainPeer$$$$$resizeNotify$$($clientId$$402_component$$1703$$) {
  this.$getDomElement$();
  if(!this.$_overflowSupport$) {
    $clientId$$402_component$$1703$$ = $clientId$$402_component$$1703$$.$getClientId$();
    if(!this.$_isOverflowNeeded$ || !$AdfOverflowSupport$$.$needsOverflow$($clientId$$402_component$$1703$$)) {
      return
    }
    this.$_overflowSupport$ = new $AdfOverflowSupport$$($clientId$$402_component$$1703$$, this, "both", "after", this.$_isVertical$ ? "vertical" : "horizontal");
    for(var $container$$36_overflowElement$$6$$, $i$$553$$ = -1;$container$$36_overflowElement$$6$$ = this.$_containers$[++$i$$553$$];) {
      if(!$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($container$$36_overflowElement$$6$$, $clientId$$402_component$$1703$$)) {
        this.$_overflowSupport$.$createStep$();
        this.$_overflowSupport$.addElement($container$$36_overflowElement$$6$$);
        var $index$$inline_4389$$ = $i$$553$$, $clientId$$inline_4390$$ = $clientId$$402_component$$1703$$;
        0 < $index$$inline_4389$$ && $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4389$$ - 1], $clientId$$inline_4390$$);
        $JSCompiler_StaticMethods__addJoin$$(this, this.$_containers$[$index$$inline_4389$$ + 1], $clientId$$inline_4390$$, $JSCompiler_alias_TRUE$$);
        $container$$36_overflowElement$$6$$ = this.$_createOverflowElement$($container$$36_overflowElement$$6$$);
        this.$_overflowSupport$.$addOverflowElement$($container$$36_overflowElement$$6$$)
      }
    }
  }
  this.$_overflowSupport$.$handleResize$()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.resizeNotify", {$resizeNotify$:$AdfDhtmlTrainPeer$$.prototype.$resizeNotify$});
$AdfDhtmlTrainPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlTrainPeer$$$$$ComponentRemoved$$($component$$1704$$) {
  delete this.$_containers$;
  this.$_overflowSupport$ && (this.$_overflowSupport$.$removeOverflowSupport$(), delete this.$_overflowSupport$);
  $AdfDhtmlTrainPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$1704$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlTrainPeer$$.prototype.$ComponentRemoved$});
function $JSCompiler_StaticMethods__addJoin$$($JSCompiler_StaticMethods__addJoin$self$$, $element$$290_table$$65$$, $clientId$$404$$, $isStart_joinCell$$) {
  $element$$290_table$$65$$ && !$AdfDhtmlTrainPeer$$.$_isElementAParentStop$($element$$290_table$$65$$, $clientId$$404$$) && ($element$$290_table$$65$$ = $element$$290_table$$65$$.getElementsByTagName("table")[0], ($isStart_joinCell$$ = $JSCompiler_StaticMethods__addJoin$self$$.$_isVertical$ ? $element$$290_table$$65$$.rows[$isStart_joinCell$$ ? 0 : 2].cells[1] : $element$$290_table$$65$$.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$$292_link$$6$$) {
  var $overflowElement$$7$$ = $element$$292_link$$6$$.ownerDocument.createElement("div"), $clickStub_id$$353_laf$$97$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
  $AdfDomUtils$$.$addCSSClassName$($overflowElement$$7$$, $clickStub_id$$353_laf$$97$$.getStyleClass($AdfDhtmlTrainPeer$$.$_OVERFLOW_ELEMENT_STYLE_CLASS$));
  var $clickStub_id$$353_laf$$97$$ = $element$$292_link$$6$$.id, $component$$1705$$ = $AdfPage$$.$PAGE$.$findComponent$($clickStub_id$$353_laf$$97$$);
  $element$$292_link$$6$$ = (this.$_isVertical$ ? $element$$292_link$$6$$.cells[1].getElementsByTagName("a")[0] : $element$$292_link$$6$$.getElementsByTagName("tr")[1].getElementsByTagName("a")[0]).cloneNode($JSCompiler_alias_TRUE$$);
  $overflowElement$$7$$.appendChild($element$$292_link$$6$$);
  $component$$1705$$.getDisabled() || ($element$$292_link$$6$$.href = "#", $element$$292_link$$6$$.onclick = "return false;", $element$$292_link$$6$$.$_componentId$ = $clickStub_id$$353_laf$$97$$, $clickStub_id$$353_laf$$97$$ = this.$createCallback$(this.$_trainClick$), $AdfAgent$$.$AGENT$.$addBubbleEventListener$($element$$292_link$$6$$, "click", $clickStub_id$$353_laf$$97$$));
  return $overflowElement$$7$$
};
$AdfDhtmlTrainPeer$$.prototype.$_trainClick$ = function $$AdfDhtmlTrainPeer$$$$$_trainClick$$($component$$1706_event$$256_id$$354$$) {
  $component$$1706_event$$256_id$$354$$ = $AdfAgent$$.$AGENT$.$getEventTarget$($component$$1706_event$$256_id$$354$$).$_componentId$;
  $component$$1706_event$$256_id$$354$$ = $AdfPage$$.$PAGE$.$findComponent$($component$$1706_event$$256_id$$354$$);
  $AdfActionEvent$$.$queue$($component$$1706_event$$256_id$$354$$, $component$$1706_event$$256_id$$354$$.getPartialSubmit())
};
$AdfDhtmlTrainPeer$$.prototype.$ConvertClientIdToLocator$ = function $$AdfDhtmlTrainPeer$$$$$ConvertClientIdToLocator$$($clientIdDepth$$9_component$$1707$$, $childComponent$$24_clientId$$405_endIndex$$11$$, $descComponentClientId$$10_subComponentId$$9$$, $replaceArray$$11$$) {
  $childComponent$$24_clientId$$405_endIndex$$11$$ = $clientIdDepth$$9_component$$1707$$.$getClientId$();
  $clientIdDepth$$9_component$$1707$$ = $AdfStrings$$.count($childComponent$$24_clientId$$405_endIndex$$11$$, ":");
  $AdfAssert$$.assert(0 <= $descComponentClientId$$10_subComponentId$$9$$.indexOf($childComponent$$24_clientId$$405_endIndex$$11$$));
  $descComponentClientId$$10_subComponentId$$9$$ = $descComponentClientId$$10_subComponentId$$9$$.substring($childComponent$$24_clientId$$405_endIndex$$11$$.length + 1);
  $childComponent$$24_clientId$$405_endIndex$$11$$ = $descComponentClientId$$10_subComponentId$$9$$.indexOf(":");
  0 < $childComponent$$24_clientId$$405_endIndex$$11$$ && $replaceArray$$11$$.push([$clientIdDepth$$9_component$$1707$$ + 1, $descComponentClientId$$10_subComponentId$$9$$.substring(0, $childComponent$$24_clientId$$405_endIndex$$11$$)])
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.ConvertClientIdToLocator", {$ConvertClientIdToLocator$:$AdfDhtmlTrainPeer$$.prototype.$ConvertClientIdToLocator$});
$AdfDhtmlTrainPeer$$.prototype.$convertLocatorToClientId$ = function $$AdfDhtmlTrainPeer$$$$$convertLocatorToClientId$$($component$$1708$$, $index$$177$$) {
  var $element$$293_parent$$66_root$$24$$ = this.$getDomElement$(), $tbody$$1$$ = $AdfDomUtils$$.$getFirstDescendentElement$($element$$293_parent$$66_root$$24$$, "tbody");
  if(!$tbody$$1$$) {
    return $JSCompiler_alias_NULL$$
  }
  var $layout$$2$$ = $component$$1708$$.getLayout();
  "string" == typeof $index$$177$$ && ($index$$177$$ = parseInt($index$$177$$));
  0 == $index$$177$$ ? $element$$293_parent$$66_root$$24$$ = "vertical" == $layout$$2$$ ? $AdfDomUtils$$.$getFirstChildElement$($tbody$$1$$) : $AdfDomUtils$$.$getFirstDescendentElement$($element$$293_parent$$66_root$$24$$, "td") : ($element$$293_parent$$66_root$$24$$ = "vertical" == $layout$$2$$ ? $tbody$$1$$ : $AdfDomUtils$$.$getFirstDescendentElement$($tbody$$1$$, "tr"), $element$$293_parent$$66_root$$24$$ = $AdfDomUtils$$.$getChildElementByPosition$($element$$293_parent$$66_root$$24$$, 1, $index$$177$$));
  return $element$$293_parent$$66_root$$24$$ ? $element$$293_parent$$66_root$$24$$.id : $JSCompiler_alias_NULL$$
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlTrainPeer.prototype.convertLocatorToClientId", {$convertLocatorToClientId$:$AdfDhtmlTrainPeer$$.prototype.$convertLocatorToClientId$});
$AdfDhtmlTrainPeer$$.$_isElementAParentStop$ = function $$AdfDhtmlTrainPeer$$$$_isElementAParentStop$$($element$$294$$, $clientId$$406$$) {
  var $parentStartSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$406$$, $AdfDhtmlTrainPeer$$.$_PARENT_START$), $parentEndSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$406$$, $AdfDhtmlTrainPeer$$.$_PARENT_END$);
  return $element$$294$$.id ? $element$$294$$.id === $parentStartSubId$$ || $element$$294$$.id === $parentEndSubId$$ ? $JSCompiler_alias_TRUE$$ : $JSCompiler_alias_FALSE$$ : $JSCompiler_alias_FALSE$$
};
