# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

# oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlTrainPeer

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    org.ecmascript.object.Object
       |
       +--oracle.adf.view.js.base.AdfObject
             |
             +--oracle.adf.view.js.base.AdfUIPeer
                   |
                   +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
                         |
                         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlTrainPeer

    public class AdfDhtmlTrainPeer
    extends AdfRichUIPeer

Peer Implementation for the train - AdfDhtmlTrainPeer derives from AdfRichUIPeer

## Field Summary
`private Object` | `_isVertical`
`private static Object` | `_OVERFLOW_ELEMENT_STYLE_CLASS`
`private static Object` | `_PARENT_END`
`private static Object` | `_PARENT_START`
`private static Object` | `_SELECTED_STOP_STATE`

### Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, CreateSubId, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS, SELECTED_STYLECLASS`

### Fields inherited from oracle.adf.view.js.base.AdfObject
`constructor, superclass`

### Fields inherited from org.ecmascript.object.Object
`prototype`

## Constructor Summary
`public` | `AdfDhtmlTrainPeer()` Peer Implementation for the train - AdfDhtmlTrainPeer derives from AdfRichUIPeer

## Method Summary
`private Object` | `_addJoin(Object element, Object clientId, Object isStart)` adds a join (previous or next join) to an element.
`private Object` | `_addJoins(Object index, Object clientId)` Add start and end joins for a stop.
`protected Object` | `ComponentRemoved(Object component)` Handles the removal of a component.
`protected Object` | `ConvertClientIdToLocator(AdfUIComponent component, Object childComponent, String descComponentClientId, Array<Array<Object>> replaceArray)` Function to replace client id fragments when converting a clientId to an absolute locator.
`public String` | `convertLocatorToClientId(AdfUIComponent component, Number index)` Function to replace client id fragments when converting an absolute locator to clientId.
`private HTMLElement` | `_createOverflowElement(HTMLElement element)` Creates the overflow element.
`private Object` | `_fixTextLinkDivWidth()` In Firefox when text link of train stop is clicked, it forces the text/link has focus and a focus ring is drawn around the text which would mean it needs more space.
`private HTMLElement` | `_getTextElement(Object element)` Gets the text element of the stop.
`protected Object` | `InitDomElement(Object component, Object domElement)` Initialize the associated domElement when the peer is created.
`protected static Object` | `InitSubclass()` Initialize constants used by the peer.
`private static Object` | `_isElementAParentStop(Object element, Object clientId)` Function to find if the element is a parent stop.
`public Object` | `needsResizeNotify()` Override to indicate interest in resize notifications.
`public Object` | `resizeNotify(Object component, Object oldWidth, Object oldHeight, Object newWidth, Object newHeight)` Resize notification callback - we perform geometry management here.
`private Object` | `_trainClick(Object event)` Callback for when a stop inside an overflow is clicked.

### Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, clearDragReadyState, ClearDragReadyState, clearDragSourceState, ClearDragSourceState, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, createComponentEvent, CreateComponentEvent, CreateDraggableNode, createInnerPeerClassWithSubId, createPeerClass, createSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, DispatchUncanceledComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, GetBestMatchSubId, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDomRootNodes, GetDomRootNodes, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, GetElementToReplaceWithSVG, getFallbackDomElement, GetFallbackDomElement, getFirstAncestorComponent, getInlineEditor, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, SimulateMouseOnDescendant, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, UpdateMessageType, visitChildren`

### Methods inherited from oracle.adf.view.js.base.AdfUIPeer
`getDefaultDragRecognizer, getParentPeer, Init, initiateDrag, isVisible`

### Methods inherited from oracle.adf.view.js.base.AdfObject
`adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString`

## Field Detail

### _isVertical

`private Object _isVertical`

### _OVERFLOW_ELEMENT_STYLE_CLASS

`private static Object _OVERFLOW_ELEMENT_STYLE_CLASS`

### _PARENT_END

`private static Object _PARENT_END`

### _PARENT_START

`private static Object _PARENT_START`

### _SELECTED_STOP_STATE

`private static Object _SELECTED_STOP_STATE`

## Constructor Detail

### AdfDhtmlTrainPeer

`public AdfDhtmlTrainPeer()`
  Peer Implementation for the train - AdfDhtmlTrainPeer derives from AdfRichUIPeer

## Method Detail

### _addJoin

`private Object _addJoin(Object element,
Object clientId,
Object isStart)`
  adds a join (previous or next join) to an element.
  Parameters:

    `element` |  |
    `clientId` | - | of the component
    `isStart` | - | a boolean indicating that it's a start join (iow, the join before the end element)

  Return:
    `Object`

### _addJoins

`private Object _addJoins(Object index,
Object clientId)`
  Add start and end joins for a stop.
  Parameters:

    `index` | - | of the current stop.
    `clientId` | - | of the component

  Return:
    `Object`

### ComponentRemoved

`protected Object ComponentRemoved(Object component)`
  Handles the removal of a component.
  Parameters:

    `component` | - | component that this peer will be associated with.

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.componentRemoved(AdfUIComponent)`

### ConvertClientIdToLocator

`protected Object ConvertClientIdToLocator(AdfUIComponent component,
Object childComponent,
String descComponentClientId,
Array<Array<Object>> replaceArray)`
  Function to replace client id fragments when converting a clientId to an absolute locator. It tries to find the rowkey information for the childComponent. If the index exists, skip the first id fragment after the train id and append the index in the format trainId[index] else skip the first id fragment after the train id.

  The peer is not bound when this method is called

  Parameters:

    `component` | - | The train component for this peer
    `childComponent` |  |
    `descComponentClientId` | - | The clientId of the component that the absolute scoped id is being generated for
    `replaceArray` | - | Array of key-value array in format [, ] to either skip or skip and fix the parent id fragment with the item value

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.ConvertClientIdToLocator(Object, Object, Object, Object)`

### convertLocatorToClientId

`public String convertLocatorToClientId(AdfUIComponent component,
Number index)`
  Function to replace client id fragments when converting an absolute locator to clientId.
  Parameters:

    `component` | - | The train component for this peer
    `index` | - | the index of the train stop

  Return:
    `String` - the client id fragment in the format: clientId + ":" + stamped index
  Overrides:
    `AdfUIPeer.convertLocatorToClientId(Object, Object)`

### _createOverflowElement

`private HTMLElement _createOverflowElement(HTMLElement element)`
  Creates the overflow element.
  Parameters:

    `element` | - | the DOM element representing the stop for which the overflow element is being created.

  Return:
    `HTMLElement` - the overflowElement.

### _fixTextLinkDivWidth

`private Object _fixTextLinkDivWidth()`
  In Firefox when text link of train stop is clicked, it forces the text/link has focus and a focus ring is drawn around the text which would mean it needs more space. The width of the container div doesn't change accordingly and forces the link text to go into the next row. This function increases the width of the container div as original width + 2*border width (4px).
  Return:
    `Object`

### _getTextElement

`private HTMLElement _getTextElement(Object element)`
  Gets the text element of the stop.
  Parameters:

    `element` |  |

  Return:
    `HTMLElement` - the text element.

### InitDomElement

`protected Object InitDomElement(Object component,
Object domElement)`
  Initialize the associated domElement when the peer is created. Stateless peers are not bound at the time that this method is called.
  Parameters:

    `component` | - | Component that this peer will be associated with.
    `domElement` | - | Root DOM element of this peer.

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)`

### InitSubclass

`protected static Object InitSubclass()`
  Initialize constants used by the peer.
  Return:
    `Object`

### _isElementAParentStop

`private static Object _isElementAParentStop(Object element,
Object clientId)`
  Function to find if the element is a parent stop.
  Parameters:

    `element` | - | element to be be checked
    `clientId` | - | client id of the component

  Return:
    `Object`

### needsResizeNotify

`public Object needsResizeNotify()`
  Override to indicate interest in resize notifications.
  Return:
    `Object`
  Overrides:
    `AdfUIPeer.needsResizeNotify(Object)`

### resizeNotify

`public Object resizeNotify(Object component,
Object oldWidth,
Object oldHeight,
Object newWidth,
Object newHeight)`
  Resize notification callback - we perform geometry management here.
  Parameters:

    `component` | - | component that this peer will be associated with.
    `oldWidth` | - | old value for the width of the train.
    `oldHeight` | - | old value of the height of the train.
    `newWidth` | - | new Width
    `newHeight` | - | new height

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.resizeNotify(Object, Object, Object, Object, Object)`

### _trainClick

`private Object _trainClick(Object event)`
  Callback for when a stop inside an overflow is clicked.
  Parameters:

    `event` |  |

  Return:
    `Object`

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.