|
STools | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--SProtectLayer
Version: 1.0
Author: deltapositive (deltapositive@yahoo.fr)
Defined in SProtectLayer.js
Requires:
Field Summary | |
Object |
event
|
Constructor Summary | |
SProtectLayer
()
SProtectLayer is part of the STools. Copyright 2005 STools Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SProtectLayer is a class that can create an invisible layer you can put over background stuffs. While the protection layer is displayed, only foreground stuffs will be accessible. Basic usage: This class is usefull when you open a menu, and want to know when the user clic outsite the menu (to close it). Idem for modal dialog boxes, that can blink when user clicks outside. Idem for tips that will diseapears when user click outside. Works with:
Limitations:
|
Method Summary | |
void
|
hide()
Hide the protection. Fire the onhide event. |
void
|
setEventListener(<string> event, <function> listener)
Set a listener for an event. |
void
|
setLevel(<int> level)
Set the z index of the protection (default is 10). Applyed only at show time. |
void
|
setOpacity(<int> value)
Dynamicaly change the opacity. |
void
|
setStyle(<string> attribute, <string> value)
Dynamicaly set a style attribute. |
void
|
show()
Display the protection. Fires the onshow event. When displayed the layer is resized. The focus is given to the layer. |
Field Detail |
Object event
Constructor Detail |
SProtectLayer()
Method Detail |
void hide()
void setEventListener(<string> event, <function> listener)
event
- The name of the event to listen among: listener
- The function to call if corresponding event is fired
void setLevel(<int> level)
level
- The level to set
void setOpacity(<int> value)
value
- The opacity value between 0 and 100. 0 is default
void setStyle(<string> attribute, <string> value)
attribute
- The javascript name of a css attribute. Javascript name means no space or -: z-index becomes zIndex.value
- The value to set.
void show()
|
STools | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |