Print Friendly

# Class YAHOO.widget.ContainerEffect

Package: | YAHOO.widget
Class: | ContainerEffect
Extends: | Object
Defined In: | container_core.js

ContainerEffect encapsulates animation transitions that are executed when an Overlay is shown or hidden.

## Public Properties

Property | Defined By
--- | ---
| animClass : class | ContainerEffect
The animation class to use for animating the overlay
| attrIn : Object | ContainerEffect
The animation attributes to use when transitioning into view
| attrOut : Object | ContainerEffect
The animation attributes to use when transitioning out of view
| overlay : YAHOO.widget.Overlay | ContainerEffect
The overlay to animate
| targetElement : HTMLElement | ContainerEffect
The target element to be animated

## Public Methods

Method | Defined By
--- | ---
| ContainerEffect(`YAHOO.widget.Overlay overlay`, `Object attrIn`, `Object attrOut`, `HTMLElement targetElement`, `class Optional.`) | ContainerEffect
| FADE(`Overlay The`, `Number The`) : ContainerEffect | ContainerEffect
<static> A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
| SLIDE(`Overlay The`, `Number The`) : ContainerEffect | ContainerEffect
<static> A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
| animateIn() : void | ContainerEffect
Triggers the in-animation.
| animateOut() : void | ContainerEffect
Triggers the out-animation.
| handleCompleteAnimateIn(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onComplete handler for the in-animation.
| handleCompleteAnimateOut(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onComplete handler for the out-animation.
| handleStartAnimateIn(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onStart handler for the in-animation.
| handleStartAnimateOut(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onStart handler for the out-animation.
| handleTweenAnimateIn(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onTween handler for the in-animation.
| handleTweenAnimateOut(`String type`, `Object[] args`, `Object obj`) : void | ContainerEffect
The default onTween handler for the out-animation.
| init() : void | ContainerEffect
Initializes the animation classes and events.
| toString() : String | ContainerEffect
Returns a string representation of the object.

## Public Events

This class has no public events.

## Property Details

### animClass

`public class animClass`
The animation class to use for animating the overlay
This property is defined by ContainerEffect.

### attrIn

`public Object attrIn`
The animation attributes to use when transitioning into view
This property is defined by ContainerEffect.

### attrOut

`public Object attrOut`
The animation attributes to use when transitioning out of view
This property is defined by ContainerEffect.

### overlay

`public YAHOO.widget.Overlay overlay`
The overlay to animate
This property is defined by ContainerEffect.

### targetElement

`public HTMLElement targetElement`
The target element to be animated
This property is defined by ContainerEffect.

## Constructor Details

### ContainerEffect

`public function ContainerEffect(`YAHOO.widget.Overlay overlay`, `Object attrIn`, `Object attrOut`, `HTMLElement targetElement`, `class Optional.`)`
Parameters:

- `overlay` : YAHOO.widget.Overlay
  The Overlay that the animation should be associated with
- `attrIn` : Object
  The object literal representing the animation arguments to be used for the animate-in transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
- `attrOut` : Object
  The object literal representing the animation arguments to be used for the animate-out transition. The arguments for this literal are: attributes(object, see YAHOO.util.Anim for description), duration(Number), and method(i.e. YAHOO.util.Easing.easeIn).
- `targetElement` : HTMLElement
  Optional. The target element that should be animated during the transition. Defaults to overlay.element.
- `Optional.` : class
  The animation class to instantiate. Defaults to YAHOO.util.Anim. Other options include YAHOO.util.Motion.

## Method Details

### FADE

`public function FADE(`Overlay The`, `Number The`)`
<static> A pre-configured ContainerEffect instance that can be used for fading an overlay in and out.
Parameters:

- `The` : Overlay
  Overlay object to animate
- `The` : Number
  duration of the animation

Returns:

- `ContainerEffect`
  The configured ContainerEffect object

This method is defined by ContainerEffect.

### SLIDE

`public function SLIDE(`Overlay The`, `Number The`)`
<static> A pre-configured ContainerEffect instance that can be used for sliding an overlay in and out.
Parameters:

- `The` : Overlay
  Overlay object to animate
- `The` : Number
  duration of the animation

Returns:

- `ContainerEffect`
  The configured ContainerEffect object

This method is defined by ContainerEffect.

### animateIn

`public function animateIn()`
Triggers the in-animation.
Parameters:

- None.

Returns:

- `void`

This method is defined by ContainerEffect.

### animateOut

`public function animateOut()`
Triggers the out-animation.
Parameters:

- None.

Returns:

- `void`

This method is defined by ContainerEffect.

### handleCompleteAnimateIn

`public function handleCompleteAnimateIn(`String type`, `Object[] args`, `Object obj`)`
The default onComplete handler for the in-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### handleCompleteAnimateOut

`public function handleCompleteAnimateOut(`String type`, `Object[] args`, `Object obj`)`
The default onComplete handler for the out-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### handleStartAnimateIn

`public function handleStartAnimateIn(`String type`, `Object[] args`, `Object obj`)`
The default onStart handler for the in-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### handleStartAnimateOut

`public function handleStartAnimateOut(`String type`, `Object[] args`, `Object obj`)`
The default onStart handler for the out-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### handleTweenAnimateIn

`public function handleTweenAnimateIn(`String type`, `Object[] args`, `Object obj`)`
The default onTween handler for the in-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### handleTweenAnimateOut

`public function handleTweenAnimateOut(`String type`, `Object[] args`, `Object obj`)`
The default onTween handler for the out-animation.
Parameters:

- `type` : String
  The CustomEvent type
- `args` : Object[]
  The CustomEvent arguments
- `obj` : Object
  The scope object

Returns:

- `void`

This method is defined by ContainerEffect.

### init

`public function init()`
Initializes the animation classes and events.
Parameters:

- None.

Returns:

- `void`

This method is defined by ContainerEffect.

### toString

`public function toString()`
Returns a string representation of the object.
Parameters:

- None.

Returns:

- `String`
  The string representation of the ContainerEffect

This method is defined by ContainerEffect.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.