public interface ItsNatModalLayer extends ItsNatElementComponent, ItsNatFreeComponent
A modal layer is an absolute positioned element usually opaque or translucent with a z-index greater than the elements being covered and covering the complete area of the web page.
The modal layer is added as a direct child of the root element (<body> in HTML documents) added in the end. This way any mouse click is not dispatched to any covered element in the document.
By default there is no markup content contained by the modal layer, new markup can be added "on top" of the modal layer specifing a greater z-index. This new markup should be added in the end of the root element (<body> in HTML).
The component automatically removes the modal layer element when the component is disposed, markup with greater z-index should be removed before.
ItsNat default implementation supports several stacked modal layers and automatically fixes the problem of HTML SELECT elements of MSIE v6, in this case HTML SELECT elements are hidden when covered by a modal layer (stacked layers are supported too).
If no element is provided when the component is created, the default implementation creates one used internally.
In pure SVG documents behavior is very similar to X/HTML, the main difference is z-index is ignored in SVG because z-order in SVG follows the rendering order, this order coincides with document order. More info.
In XUL documents z-index is ignored because XUL ignores the z-index CSS property.
By default uses a <panel> element as layer, this element must be used as the container
of any user markup shown "on top" of the layer. If popuphidden
event is enabled
calling ItsNatComponent.enableEventListener(String)
or adding an
event listener listening to the component for this event (calling ItsNatComponent.addEventListener(String,EventListener,boolean)
),
the component will be automatically disposed when an event is received
(in XUL the popuphidden event closes the panel, by this way the component
is "closed" in server too).
Modifier and Type | Method and Description |
---|---|
void |
addUnexpectedEventListener(org.w3c.dom.events.EventListener listener)
Registers an event listener to catch events received by
elements "hidden" by this modal layer.
|
int |
getZIndex()
Returns the z-index associated to the modal layer.
|
void |
removeUnexpectedEventListener(org.w3c.dom.events.EventListener listener)
Unregisters the specified event listener used for catching events received by
elements "hidden" by this modal layer.
|
getElement, getItsNatElementComponentUI
addEventListener, addEventListener, addEventListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, disableEventListener, disableEventListener, dispose, enableEventListener, enableEventListener, getArtifact, getArtifact, getItsNatComponentManager, getItsNatComponentUI, getItsNatDocument, getNode, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, isDisposed, isEnabled, registerArtifact, removeArtifact, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setEnabled, setEventListenerParams, setEventListenerParams, setNode
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
int getZIndex()
void addUnexpectedEventListener(org.w3c.dom.events.EventListener listener)
Modal layers try to be modal, in a web environment this is not fully accomplished, for instance, in desktop browsers the end user can navigate through hidden form elements and links using the TAB key, and "click" them by pressing ENTER.
This event listener may be used to alert the end user about this unwanted circumstance.
listener
- the listenerremoveUnexpectedEventListener(EventListener)
void removeUnexpectedEventListener(org.w3c.dom.events.EventListener listener)
listener
- addUnexpectedEventListener(EventListener)
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.