OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

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

public class AdfDhtmlElementAnimator
extends AdfObject
A peer utility that simplifies the work needed to perform DOM element animations.
Example:
AdfDhtmlElementAnimator.animate(
AdfDhtmlElementAnimator.FRAME_METHOD_SLOW_FAST_SLOW,
500,
[
{
"element": document.getElementById("div1"),
"properties":
{
"width": 100,
"height": 200,
"alpha": 0
}
},
{
"element": document.getElementById("div2"),
"properties":
{
"width": 200,
"height": 100,
"alpha": 100
}
}
],
animationFrameRenderedFunction,
animationCompleteFunction,
callbackParameters,
component);


See also:
animate(Object, Number, Array, Function, Function, Object, AdfUIComponent)

Field Summary

private Object
_afterAnimate
private Object
_animationFrames
private Object
_callbackParameters
private Object
_component
private static Object
_DEBUG
private Object
_duringAnimate
public static Object
FRAME_METHOD_ACCELERATING
public static Object
FRAME_METHOD_CONSTANT_SPEED
public static Object
FRAME_METHOD_DECELERATING
public static Object
FRAME_METHOD_SLOW_FAST_SLOW
private static Object
_FRAMES_PER_MILLISECOND
private Object
_startTime


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

private
AdfDhtmlElementAnimator(Object animationFrames, Object duringAnimate, Object afterAnimate, Object callbackParameters, Object component)
Use AdfDhtmlElementAnimator.animate() to start an animation and get its instance.


Method Summary

public static AdfDhtmlElementAnimator
animate(Object frameMethod, Number timeLength, Array<Object> items, Function duringAnimate, Function afterAnimate, Object callbackParameters, AdfUIComponent component)
Runs the described animation.
private Object
_animationStep()
Static animation step called by the system.
private static Object
_computeFrameProperty(Object frameNumber, Object initialValue, Object finalValue, Object frameMethod, Object lastFrameNumber)
Computes a frame property.
private Object
_destroy()
private static Object
_gatherSizeState(Object state, Object finalProperties, Object element, Object sizeKey, Object currentSizeProperty, Object borderStartKey, Object borderEndKey)
private static Object
_getElementZIndex(Object agent, Object element)
protected Object
Init(Array animationFrames, Function duringAnimate, Function afterAnimate, Object callbackParameters, AdfUIComponent component)
Initialize the AdfDhtmlElementAnimator.
private static Object
_renderFrame(Object frame, Object duringAnimate, Object callbackParameters)
private Object
_start()
Starts the animation.
public Object
stop()
Stops the animation from rendering any future frames.
private static Object
_subtractBorderSize(Object value, Object borderWidthStyle)


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

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_afterAnimate

private Object _afterAnimate

_animationFrames

private Object _animationFrames

_callbackParameters

private Object _callbackParameters

_component

private Object _component

_DEBUG

private static Object _DEBUG

_duringAnimate

private Object _duringAnimate

FRAME_METHOD_ACCELERATING

public static Object FRAME_METHOD_ACCELERATING

FRAME_METHOD_CONSTANT_SPEED

public static Object FRAME_METHOD_CONSTANT_SPEED

FRAME_METHOD_DECELERATING

public static Object FRAME_METHOD_DECELERATING

FRAME_METHOD_SLOW_FAST_SLOW

public static Object FRAME_METHOD_SLOW_FAST_SLOW

_FRAMES_PER_MILLISECOND

private static Object _FRAMES_PER_MILLISECOND

_startTime

private Object _startTime

Constructor Detail


AdfDhtmlElementAnimator

private AdfDhtmlElementAnimator(Object animationFrames,
                                Object duringAnimate,
                                Object afterAnimate,
                                Object callbackParameters,
                                Object component)

Use AdfDhtmlElementAnimator.animate() to start an animation and get its instance.

Parameters:
animationFrames    
duringAnimate    
afterAnimate    
callbackParameters    
component    

Method Detail


animate

public static AdfDhtmlElementAnimator animate(Object frameMethod,
                                              Number timeLength,
                                              Array<Object> items,
                                              Function duringAnimate,
                                              Function afterAnimate,
                                              Object callbackParameters,
                                              AdfUIComponent component)

Runs the described animation.

Parameters:
frameMethod  -  the AdfDhtmlElementAnimator.FRAME_METHOD_* choice for how frames are spaced on the timeline
timeLength  -  milliseconds for how long the animation will last
items  -  an array of animation item Objects whose properties are:
"element"
the element to animate
"properties"
an Object listing the element's properties in the desired final state (no initial state is necessary since the element already has such properties defined on it), valid property names are:
"width"
a non-negative integer representing the number of pixels wide the element is
"height"
a non-negative integer representing the number of pixels wide the element is
"top"
an integer representing the number of pixels that AdfAgent.AGENT.getElementTop(element) returns
"left"
an integer representing the number of pixels that AdfAgent.AGENT.getElementLeft(element) returns
"offsetTop"
an integer representing the number of pixels that element.offsetTop returns
"offsetLeft"
an integer representing the number of pixels that element.offsetLeft returns
"scrollTop"
an integer representing the number of pixels that element.scrollTop returns
"scrollLeft"
an integer representing the number of pixels that element.scrollLeft returns
"alpha"
an integer between 0 and 100 (inclusive) where representing how opaque the element is where a value of 0 means the element is completely transparent and a value of 100 means the element is completely opaque
"zIndex"
an integer representing a z-axis location in the positioned element's stacking order
duringAnimate  -  the function to be executed at each processed animation frame (if a frame is skipped, the function won't be called); you may specify null if no execution is needed
afterAnimate  -  the function to be executed after animation is complete or null if no execution is needed
callbackParameters  -  an optional object containing key-value pairs that will be passed to the duringAnimate and the afterAnimate function if applicable
component  -  the component being animated; used to ensure descendant resize notifications get invoked after animations are complete
Return:
AdfDhtmlElementAnimator - the animator that has been started (so you can stop it)

_animationStep

private Object _animationStep()

Static animation step called by the system. This is not an API.

Return:
Object

_computeFrameProperty

private static Object _computeFrameProperty(Object frameNumber,
                                            Object initialValue,
                                            Object finalValue,
                                            Object frameMethod,
                                            Object lastFrameNumber)

Computes a frame property.

Parameters:
frameNumber    
initialValue    
finalValue    
frameMethod    
lastFrameNumber    
Return:
Object

_destroy

private Object _destroy()

Return:
Object

_gatherSizeState

private static Object _gatherSizeState(Object state,
                                       Object finalProperties,
                                       Object element,
                                       Object sizeKey,
                                       Object currentSizeProperty,
                                       Object borderStartKey,
                                       Object borderEndKey)

Parameters:
state    
finalProperties    
element    
sizeKey    
currentSizeProperty    
borderStartKey    
borderEndKey    
Return:
Object

_getElementZIndex

private static Object _getElementZIndex(Object agent,
                                        Object element)

Parameters:
agent    
element    
Return:
Object

Init

protected Object Init(Array animationFrames,
                      Function duringAnimate,
                      Function afterAnimate,
                      Object callbackParameters,
                      AdfUIComponent component)

Initialize the AdfDhtmlElementAnimator. Use AdfDhtmlElementAnimator.animate() to start an animation and get its instance.

Parameters:
animationFrames  -  an Array of internal frame details for the animation
duringAnimate  -  the function to be executed at each processed animation frame (if a frame is skipped, the function won't be called); you may specify null if no execution is needed
afterAnimate  -  the function to be executed after animation is complete or null if no execution is needed
callbackParameters  -  an optional object containing key-value pairs that will be passed to the duringAnimate and the afterAnimate function if applicable
component  -  the component being animated; used to ensure descendant resize notifications get invoked after animations are complete
Return:
Object
See also:
animate(Object, Number, Array, Function, Function, Object, AdfUIComponent)
Overrides:
AdfObject.Init()

_renderFrame

private static Object _renderFrame(Object frame,
                                   Object duringAnimate,
                                   Object callbackParameters)

Parameters:
frame    
duringAnimate    
callbackParameters    
Return:
Object

_start

private Object _start()

Starts the animation.

Return:
Object

stop

public Object stop()

Stops the animation from rendering any future frames. Stopping will not invoke any more during or after animate functions associated with the animator.

Return:
Object - the callback parameters originally passed into the animator (if provided)

_subtractBorderSize

private static Object _subtractBorderSize(Object value,
                                          Object borderWidthStyle)

Parameters:
value    
borderWidthStyle    
Return:
Object

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

 

Generated on 2009.04.27 01:06 UTC
Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.