Print Friendly

# Class YAHOO.widget.OverlayManager

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

OverlayManager is used for maintaining the focus status of multiple Overlays.*

## Public Properties

Property | Defined By
--- | ---
| CSS_FOCUSED<static> : String | OverlayManager
<static> The CSS class representing a focused Overlay
| cfg : YAHOO.util.Config | OverlayManager
The OverlayManager's Config object used for monitoring configuration properties.
| contructor : Function | OverlayManager
The class's constructor function
| overlays : YAHOO.widget.Overlay[] | OverlayManager
The array of Overlays that are currently registered

## Public Methods

Method | Defined By
--- | ---
| OverlayManager(`Array overlays`, `Object userConfig`) | OverlayManager
| blurAll() : void | OverlayManager
Removes focus from all registered Overlays in the manager
| find(`YAHOO.widget.Overlay overlay`, `String overlay`) : YAHOO.widget.Overlay | OverlayManager
Attempts to locate an Overlay by instance or ID.
| focus(`YAHOO.widget.Overlay overlay`, `String overlay`) : void | OverlayManager
Focuses the specified Overlay
| getActive() : YAHOO.widget.Overlay | OverlayManager
Returns the currently focused Overlay
| hideAll() : void | OverlayManager
Hides all Overlays in the manager.
| init(`YAHOO.widget.Overlay[] overlays`, `Object userConfig`) : void | OverlayManager
Initializes the OverlayManager
| initDefaultConfig() : void | OverlayManager
Initializes the default configuration of the OverlayManager
| register(`YAHOO.widget.Overlay overlay`, `YAHOO.widget.Overlay[] overlay`) : Boolean | OverlayManager
Registers an Overlay or an array of Overlays with the manager. Upon registration, the Overlay receives functions for ...
| remove(`YAHOO.widget.Overlay overlay`, `String overlay`) : void | OverlayManager
Removes the specified Overlay from the manager
| showAll() : void | OverlayManager
Shows all Overlays in the manager.
| toString() : String | OverlayManager
Returns a string representation of the object.

## Public Events

This class has no public events.

## Property Details

### CSS_FOCUSED<static>

`public String CSS_FOCUSED<static>`
<static> The CSS class representing a focused Overlay
This property is defined by OverlayManager.

### cfg

`public YAHOO.util.Config cfg`
The OverlayManager's Config object used for monitoring configuration properties.
This property is defined by OverlayManager.

### contructor

`public Function contructor`
The class's constructor function
This property is defined by OverlayManager.

### overlays

`public YAHOO.widget.Overlay[] overlays`
The array of Overlays that are currently registered
This property is defined by OverlayManager.

## Constructor Details

### OverlayManager

`public function OverlayManager(`Array overlays`, `Object userConfig`)`
Parameters:

- `overlays` : Array
  Optional. A collection of Overlays to register with the manager.
- `userConfig` : Object
  The object literal representing the user configuration of the OverlayManager

## Method Details

### blurAll

`public function blurAll()`
Removes focus from all registered Overlays in the manager
Parameters:

- None.

Returns:

- `void`

This method is defined by OverlayManager.

### find

`public function find(`YAHOO.widget.Overlay overlay`, `String overlay`)`
Attempts to locate an Overlay by instance or ID.
Parameters:

- `overlay` : YAHOO.widget.Overlay
  An Overlay to locate within the manager
- `overlay` : String
  An Overlay id to locate within the manager

Returns:

- `YAHOO.widget.Overlay`
  The requested Overlay, if found, or null if it cannot be located.

This method is defined by OverlayManager.

### focus

`public function focus(`YAHOO.widget.Overlay overlay`, `String overlay`)`
Focuses the specified Overlay
Parameters:

- `overlay` : YAHOO.widget.Overlay
  The Overlay to focus
- `overlay` : String
  The id of the Overlay to focus

Returns:

- `void`

This method is defined by OverlayManager.

### getActive

`public function getActive()`
Returns the currently focused Overlay
Parameters:

- None.

Returns:

- `YAHOO.widget.Overlay`
  The currently focused Overlay

This method is defined by OverlayManager.

### hideAll

`public function hideAll()`
Hides all Overlays in the manager.
Parameters:

- None.

Returns:

- `void`

This method is defined by OverlayManager.

### init

`public function init(`YAHOO.widget.Overlay[] overlays`, `Object userConfig`)`
Initializes the OverlayManager
Parameters:

- `overlays` : YAHOO.widget.Overlay[]
  Optional. A collection of Overlays to register with the manager.
- `userConfig` : Object
  The object literal representing the user configuration of the OverlayManager

Returns:

- `void`

This method is defined by OverlayManager.

### initDefaultConfig

`public function initDefaultConfig()`
Initializes the default configuration of the OverlayManager
Parameters:

- None.

Returns:

- `void`

This method is defined by OverlayManager.

### register

`public function register(`YAHOO.widget.Overlay overlay`, `YAHOO.widget.Overlay[] overlay`)`
Registers an Overlay or an array of Overlays with the manager. Upon registration, the Overlay receives functions for focus and blur, along with CustomEvents for each.
Parameters:

- `overlay` : YAHOO.widget.Overlay
  An Overlay to register with the manager.
- `overlay` : YAHOO.widget.Overlay[]
  An array of Overlays to register with the manager.

Returns:

- `Boolean`
  True if any Overlays are registered.

This method is defined by OverlayManager.

### remove

`public function remove(`YAHOO.widget.Overlay overlay`, `String overlay`)`
Removes the specified Overlay from the manager
Parameters:

- `overlay` : YAHOO.widget.Overlay
  The Overlay to remove
- `overlay` : String
  The id of the Overlay to remove

Returns:

- `void`

This method is defined by OverlayManager.

### showAll

`public function showAll()`
Shows all Overlays in the manager.
Parameters:

- None.

Returns:

- `void`

This method is defined by OverlayManager.

### toString

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

- None.

Returns:

- `String`
  The string representation of the OverlayManager

This method is defined by OverlayManager.

Copyright © 2006 Jack Slocum. All rights reserved.