OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfConveyorBeltSupport

Warning:

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

public class AdfConveyorBeltSupport
extends AdfObject
Support class for handling conveyor belt layout for a component. Note that if you use AdfConveyorBeltSupport, you will: Need to make sure your container has at least 1 element. Need to call removeConveyorBeltSupport from your component's ComponentRemoved method. If you support truncating tabs (actual tabs that can shrink), you need to have these tabs fully truncated to their minimum size before initializing AdfConveyorBeltSupport. Have the direct children of the conveyor belt container use the p_AFSelected style to mark selection. If you have a second conveyor belt for the element (panelTabbed position both), you must register the other conveyorBeltSupport via the #registerAdditionalConveyorBeltSupport() method. Elements to display in the droplist popup need to be added via the #addDropListElements() method.



Field Summary

private Object
_container
private Object
_contentContainer
private Object
_conveyorBeltButtonWidth
private static Object
_DEPRESSED_STYLE_CLASS
private static Object
_DROPLIST_ID
private Object
_droplistContainer
private Object
_droplistIndicator
private Object
_endIndicator
private Object
_firstItemDisplayed
private Object
_initDroplistButtonEventHandling
private Object
_initEndButtonEventHandling
private Object
_initialRender
private Object
_initStartButtonEventHandling
private Object
_itemOffsetLeftArray
private Object
_keepRollingLeft
private Object
_keepRollingRight
private Object
_peer
private Object
_startIndicator


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfConveyorBeltSupport(String conveyorBeltId, AdfRichUIPeer peer)
Support class for handling conveyor belt layout for a component.


Method Summary

public Object
addDropListElements(Array elementArray)
Adds the elements to display in the conveyor belt droplist popup
private Object
_animateRollConveyor(Integer newScrollLeft)
Animate a conveyor belt roll.
private static Object
_animateRollConveyorComplete(AdfConveyorBeltSupport myInstance)
Called when animated roll is complete.
private Boolean
_areConveyorBeltIconsDisplayed()
Returns true if conveyor belt icons are currently displayed.
private Integer
_calculateFirstItemToDisplay()
Calculates the first item to be displayed, looking for a desired first item displayed and also making sure that the currently selected item will be visible within the display.
private Object
_createConveyorBeltPopupHints()
Initializes the hints used for showing the droplist popups.
private Boolean
_doesContentRollLeft()
Returns true if content rolls off on the left.
private Boolean
_doesContentRollRight()
Returns true if content rolls off on the right.
private Object
_droplistButtonMouseOut(Event event)
Callback for when the droplist button receives mouse out event.
private Object
_droplistButtonMouseUp(Event event)
Callback for when the droplist button receives mouse up event.
private Object
_droplistButtonPressed(Event event)
Callback for when the droplist button is pressed.
private Object
_endConveyorBeltButtonMouseOut(Event event)
Callback for when the end conveyor belt button receives mouse out event.
private Object
_endConveyorBeltButtonMouseUp(Event event)
Callback for when the end conveyor belt button receives mouse over event.
private Object
_endConveyorBeltButtonPressed(Event event)
Callback for when the end conveyor belt button is pressed.
private Integer
_getConveyorBeltButtonWidth()
Get the width of the conveyor belt buttons.
public Integer
getFirstItemDisplayed()
Call to get the current first item displayed.
private static Integer
_getInnerWidth(DOMElement element)
Return the inner width of an element without padding or margin.
public Object
handleResize()
Handles the conveyor belt on resize.
private Object
_hideDroplistContainer()
Callback invoked when the droplist popup is hidden
protected Object
Init(String conveyorBeltId, AdfRichUIPeer peer)
Initializes an AdfConveyorBeltSupport instance.
protected static Object
InitClass()
Initializes the AdfConveyorBeltSupport class
private Object
_initDroplistButtonEventHandling()
Adds eventListeners to the droplist button.
private Object
_initEndButtonEventHandling()
Adds eventListeners for the end conveyor belt button
private Object
_initStartButtonEventHandling()
Adds eventListeners for the start conveyor belt button
private Boolean
_isConveyorBeltNeeded()
See if layout is compressed enough so that conveyor belt buttons are needed.
public Object
registerAdditionalConveyorBeltSupport(Object otherCBSupport)
If a component has multiple conveyor belts (panel Tabbed with position both) then the 'other' conveyor belt needs to be registered as well, so on button press both conveyor belts will move.
public Object
removeConveyorBeltSupport()
Removes all callbacks and references to DOMElements that were created by conveyor belt support instance.
private Object
_rollConveyor(Boolean immediate)
Roll conveyor to start at first item displayed.
private Object
_rollLeft()
Roll conveyor to the left.
private Object
_rollMultipleLeft()
Roll multiple conveyors to the left.
private Object
_rollMultipleRight()
Roll multiple conveyors to the right.
private Object
_rollRight()
Roll conveyor to the right.
public Object
scrollNewSelectedItemIntoView(Integer newSelectedItemIndex)
Scroll the newly selected item into view.
private Object
_setButtonDisplay(Boolean isVisible)
Set the display (visible/invisible) of the conveyor belt buttons.
private Object
_setButtonState()
Set the state (enabled/disabled) of the conveyor belt buttons.
private Object
_setDepressedStyle(HTMLElement targetElement, Boolean depressed)
Conveyor belt buttons use the depressed pseudo state instead of active.
public Object
setFirstItemDisplayed(Integer firstItemDisplayed)
Call to set the desired first item displayed.
public static Boolean
shouldUseConveyorBelt(String conveyorBeltId)
Checks if conveyor belt layout should be used.
private Object
_startConveyorBeltButtonMouseOut(Event event)
Callback for when the start conveyor belt button receives mouse out event.
private Object
_startConveyorBeltButtonMouseUp(Event event)
Callback for when the start conveyor belt button receives mouse over event.
private Object
_startConveyorBeltButtonPressed(Event event)
Callback for when the start conveyor belt button is pressed.
private Object
_stopRollingLeft()
Stop rolling to the left.
private Object
_stopRollingRight()
Stop rolling to the right.


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


_container

private Object _container

_contentContainer

private Object _contentContainer

_conveyorBeltButtonWidth

private Object _conveyorBeltButtonWidth

_DEPRESSED_STYLE_CLASS

private static Object _DEPRESSED_STYLE_CLASS

_DROPLIST_ID

private static Object _DROPLIST_ID

_droplistContainer

private Object _droplistContainer

_droplistIndicator

private Object _droplistIndicator

_endIndicator

private Object _endIndicator

_firstItemDisplayed

private Object _firstItemDisplayed

_initDroplistButtonEventHandling

private Object _initDroplistButtonEventHandling

_initEndButtonEventHandling

private Object _initEndButtonEventHandling

_initialRender

private Object _initialRender

_initStartButtonEventHandling

private Object _initStartButtonEventHandling

_itemOffsetLeftArray

private Object _itemOffsetLeftArray

_keepRollingLeft

private Object _keepRollingLeft

_keepRollingRight

private Object _keepRollingRight

_peer

private Object _peer

_startIndicator

private Object _startIndicator

Constructor Detail


AdfConveyorBeltSupport

public AdfConveyorBeltSupport(String conveyorBeltId,
                              AdfRichUIPeer peer)

Support class for handling conveyor belt layout for a component. Note that if you use AdfConveyorBeltSupport, you will: Need to make sure your container has at least 1 element. Need to call removeConveyorBeltSupport from your component's ComponentRemoved method. If you support truncating tabs (actual tabs that can shrink), you need to have these tabs fully truncated to their minimum size before initializing AdfConveyorBeltSupport. Have the direct children of the conveyor belt container use the p_AFSelected style to mark selection. If you have a second conveyor belt for the element (panelTabbed position both), you must register the other conveyorBeltSupport via the #registerAdditionalConveyorBeltSupport() method. Elements to display in the droplist popup need to be added via the #addDropListElements() method.

Parameters:
conveyorBeltId  -  The id of the element in the component that will function with the conveyor belt. This may be the rootElement of a component.
peer  -  The peer of the component that needs conveyor belt layout support

Method Detail


addDropListElements

public Object addDropListElements(Array elementArray)

Adds the elements to display in the conveyor belt droplist popup

Parameters:
elementArray  -  an array of elements to display in the conveyor belt droplist popup.
Return:
Object

_animateRollConveyor

private Object _animateRollConveyor(Integer newScrollLeft)

Animate a conveyor belt roll.

Parameters:
newScrollLeft  -  new scrollLeft position
Return:
Object

_animateRollConveyorComplete

private static Object _animateRollConveyorComplete(AdfConveyorBeltSupport myInstance)

Called when animated roll is complete.

Parameters:
myInstance  -  class instance
Return:
Object

_areConveyorBeltIconsDisplayed

private Boolean _areConveyorBeltIconsDisplayed()

Returns true if conveyor belt icons are currently displayed.

Return:
Boolean - returns true if conveyor belt icons are currently displayed.

_calculateFirstItemToDisplay

private Integer _calculateFirstItemToDisplay()

Calculates the first item to be displayed, looking for a desired first item displayed and also making sure that the currently selected item will be visible within the display.

Return:
Integer - the first item to display

_createConveyorBeltPopupHints

private Object _createConveyorBeltPopupHints()

Initializes the hints used for showing the droplist popups.

Return:
Object - hints for the droplist popup

_doesContentRollLeft

private Boolean _doesContentRollLeft()

Returns true if content rolls off on the left.

Return:
Boolean - true if content rolls off on the left.

_doesContentRollRight

private Boolean _doesContentRollRight()

Returns true if content rolls off on the right.

Return:
Boolean - true if content rolls off on the right.

_droplistButtonMouseOut

private Object _droplistButtonMouseOut(Event event)

Callback for when the droplist button receives mouse out event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_droplistButtonMouseUp

private Object _droplistButtonMouseUp(Event event)

Callback for when the droplist button receives mouse up event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_droplistButtonPressed

private Object _droplistButtonPressed(Event event)

Callback for when the droplist button is pressed.

Parameters:
event  -  The event received
Return:
Object

_endConveyorBeltButtonMouseOut

private Object _endConveyorBeltButtonMouseOut(Event event)

Callback for when the end conveyor belt button receives mouse out event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_endConveyorBeltButtonMouseUp

private Object _endConveyorBeltButtonMouseUp(Event event)

Callback for when the end conveyor belt button receives mouse over event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_endConveyorBeltButtonPressed

private Object _endConveyorBeltButtonPressed(Event event)

Callback for when the end conveyor belt button is pressed.

Parameters:
event  -  The event received
Return:
Object

_getConveyorBeltButtonWidth

private Integer _getConveyorBeltButtonWidth()

Get the width of the conveyor belt buttons. Called during init before buttons are displayed.

Return:
Integer - width of conveyor belt buttons.

getFirstItemDisplayed

public Integer getFirstItemDisplayed()

Call to get the current first item displayed. Used so that on destroy/recreate of conveyor belt, the first display item can be retrieved and then restored.

Return:
Integer - the current first item displayed

_getInnerWidth

private static Integer _getInnerWidth(DOMElement element)

Return the inner width of an element without padding or margin.

Parameters:
element    
Return:
Integer - the inner width

handleResize

public Object handleResize()

Handles the conveyor belt on resize.

Return:
Object

_hideDroplistContainer

private Object _hideDroplistContainer()

Callback invoked when the droplist popup is hidden

Return:
Object

Init

protected Object Init(String conveyorBeltId,
                      AdfRichUIPeer peer)

Initializes an AdfConveyorBeltSupport instance.

Parameters:
conveyorBeltId  -  The id of the element in the component that will function with the conveyor belt. This may be the rootElement of a component.
peer  -  The peer of the component that needs conveyor belt layout support
Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Initializes the AdfConveyorBeltSupport class

Return:
Object

_initDroplistButtonEventHandling

private Object _initDroplistButtonEventHandling()

Adds eventListeners to the droplist button.

Return:
Object

_initEndButtonEventHandling

private Object _initEndButtonEventHandling()

Adds eventListeners for the end conveyor belt button

Return:
Object

_initStartButtonEventHandling

private Object _initStartButtonEventHandling()

Adds eventListeners for the start conveyor belt button

Return:
Object

_isConveyorBeltNeeded

private Boolean _isConveyorBeltNeeded()

See if layout is compressed enough so that conveyor belt buttons are needed.

Return:
Boolean - true if there is space available

registerAdditionalConveyorBeltSupport

public Object registerAdditionalConveyorBeltSupport(Object otherCBSupport)

If a component has multiple conveyor belts (panel Tabbed with position both) then the 'other' conveyor belt needs to be registered as well, so on button press both conveyor belts will move.

Parameters:
otherCBSupport  -  {AdfConveyorBeltSupport} A secondary conveyor belt support on the same element.
Return:
Object

removeConveyorBeltSupport

public Object removeConveyorBeltSupport()

Removes all callbacks and references to DOMElements that were created by conveyor belt support instance.

Return:
Object

_rollConveyor

private Object _rollConveyor(Boolean immediate)

Roll conveyor to start at first item displayed.

Parameters:
immediate  -  if true, do not animate
Return:
Object

_rollLeft

private Object _rollLeft()

Roll conveyor to the left.

Return:
Object

_rollMultipleLeft

private Object _rollMultipleLeft()

Roll multiple conveyors to the left.

Return:
Object

_rollMultipleRight

private Object _rollMultipleRight()

Roll multiple conveyors to the right.

Return:
Object

_rollRight

private Object _rollRight()

Roll conveyor to the right.

Return:
Object

scrollNewSelectedItemIntoView

public Object scrollNewSelectedItemIntoView(Integer newSelectedItemIndex)

Scroll the newly selected item into view.

Parameters:
newSelectedItemIndex  -  new selected item index
Return:
Object

_setButtonDisplay

private Object _setButtonDisplay(Boolean isVisible)

Set the display (visible/invisible) of the conveyor belt buttons.

Parameters:
isVisible    
Return:
Object

_setButtonState

private Object _setButtonState()

Set the state (enabled/disabled) of the conveyor belt buttons.

Return:
Object

_setDepressedStyle

private Object _setDepressedStyle(HTMLElement targetElement,
                                  Boolean depressed)

Conveyor belt buttons use the depressed pseudo state instead of active. This method sets the depressed style state.

Parameters:
targetElement  -  the dom element to set the style on
depressed  -  the new depressed state
Return:
Object

setFirstItemDisplayed

public Object setFirstItemDisplayed(Integer firstItemDisplayed)

Call to set the desired first item displayed. This method should be called before the initial resize of the conveyor belt.

Parameters:
firstItemDisplayed  -  the desired first item displayed
Return:
Object

shouldUseConveyorBelt

public static Boolean shouldUseConveyorBelt(String conveyorBeltId)

Checks if conveyor belt layout should be used. This method should be called before initializing the convey belt support class, so we can avoid creating this class when it is not needed. This method will always return false when in screen reader mode.

Parameters:
conveyorBeltId  -  The id of the conveyor belt layout element.
Return:
Boolean - true If the element should use conveyor belt layout.

_startConveyorBeltButtonMouseOut

private Object _startConveyorBeltButtonMouseOut(Event event)

Callback for when the start conveyor belt button receives mouse out event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_startConveyorBeltButtonMouseUp

private Object _startConveyorBeltButtonMouseUp(Event event)

Callback for when the start conveyor belt button receives mouse over event. Make sure depressed style is removed.

Parameters:
event  -  The event received
Return:
Object

_startConveyorBeltButtonPressed

private Object _startConveyorBeltButtonPressed(Event event)

Callback for when the start conveyor belt button is pressed.

Parameters:
event  -  The event received
Return:
Object

_stopRollingLeft

private Object _stopRollingLeft()

Stop rolling to the left.

Return:
Object

_stopRollingRight

private Object _stopRollingRight()

Stop rolling to the right.

Return:
Object

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

 

Generated on 2014.03.27 12:59 UTC
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.