Print Friendly

# Class Ext.Shadow

Package: | Ext
Class: | Shadow
Extends: | Object
Defined In: | Shadow.js

Simple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned, and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced functionality that can also provide the same shadow effect, see the Ext.Layer class.
Properties - Methods - Events - Config Options

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| Shadow(`Object config`) | Shadow
Create a new Shadow
| hide() : void | Shadow
Hides this shadow
| isVisible() : void | Shadow
Returns true if the shadow is visible, else false
| realign(`Number left`, `Number top`, `Number width`, `Number height`) : void | Shadow
Direct alignment when values are already available. Show must be called at least once before calling this method to e...
| setZIndex(`Number zindex`) : void | Shadow
Adjust the z-index of this shadow
| show(`String/HTMLElement/Element targetEl`) : void | Shadow
Displays the shadow under the target element

## Public Events

This class has no public events.

## Config Options

Config Options | Defined By
--- | ---
| mode : String | Shadow
The shadow display mode. Supports the following options: Option Description ------- --------------------------------...
| offset : String | Shadow
The number of pixels to offset the shadow from the element (defaults to 4)

## Constructor Details

### Shadow

`public function Shadow(`Object config`)`
Create a new Shadow
Parameters:

- `config` : Object
  The config object

## Method Details

### hide

`public function hide()`
Hides this shadow
Parameters:

- None.

Returns:

- `void`

This method is defined by Shadow.

### isVisible

`public function isVisible()`
Returns true if the shadow is visible, else false
Parameters:

- None.

Returns:

- `void`

This method is defined by Shadow.

### realign

`public function realign(`Number left`, `Number top`, `Number width`, `Number height`)`
Direct alignment when values are already available. Show must be called at least once before calling this method to ensure it is initialized.
Parameters:

- `left` : Number
  The target element left position
- `top` : Number
  The target element top position
- `width` : Number
  The target element width
- `height` : Number
  The target element height

Returns:

- `void`

This method is defined by Shadow.

### setZIndex

`public function setZIndex(`Number zindex`)`
Adjust the z-index of this shadow
Parameters:

- `zindex` : Number
  The new z-index

Returns:

- `void`

This method is defined by Shadow.

### show

`public function show(`String/HTMLElement/Element targetEl`)`
Displays the shadow under the target element
Parameters:

- `targetEl` : String/HTMLElement/Element
  The id or element under which the shadow should display

Returns:

- `void`

This method is defined by Shadow.

## Config Details

### mode

`mode : String`
The shadow display mode. Supports the following options:

     Option Description ------- ---------------------------------------------- sides Shadow displays on both sides and bottom only frame Shadow displays equally on all four sides drop Traditional bottom-right drop shadow

This config option is defined by Shadow.

### offset

`offset : String`
The number of pixels to offset the shadow from the element (defaults to 4)
This config option is defined by Shadow.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.