<SCRIPT LANGUAGE="JavaScript1.2" SRC="scripts/rl_layer.js"</SCRIPT>
RelativeLayer |
getRelativeLayer |
( |
|
Object |
normalizeEvent |
( |
|
function RelativeLayer |
|||
|
new |
( |
|
void |
addEventListener |
( |
|
void |
availableMoveBy |
( |
|
void |
availableMoveTo |
( |
|
void |
availableResizeBy |
( |
|
void |
availableResizeTo |
( |
|
integer |
calculateAvailableHandleHorizOffset |
( |
); |
integer |
calculateAvailableHandleVertOffset |
( |
); |
integer |
calculateAvailableHeight |
( |
|
integer |
calculateAvailableHorizOffset |
( |
|
integer |
calculateAvailableVertOffset |
( |
|
integer |
calculateAvailableWidth |
( |
|
integer |
calculateVisibleHandleHorizOffset |
( |
); |
integer |
calculateVisibleHandleVertOffset |
( |
); |
integer |
calculateVisibleHeight |
( |
); |
integer |
calculateVisibleHorizOffset |
( |
|
integer |
calculateVisibleVertOffset |
( |
|
integer |
calculateVisibleWidth |
( |
); |
void |
createLayer |
( |
); |
void |
destroyLayer |
( |
); |
void |
fireEvent |
( |
|
void |
fireEventObject |
( |
|
integer |
getAbsoluteHeight |
( |
); |
integer |
getAbsolutePageX |
( |
); |
integer |
getAbsolutePageY |
( |
); |
integer |
getAbsoluteWidth |
( |
); |
integer |
getAbsoluteX |
( |
); |
integer |
getAbsoluteY |
( |
); |
String |
getAvailableHandleHorizOffset |
( |
); |
String |
getAvailableHandleVertOffset |
( |
); |
String |
getAvailableHeight |
( |
); |
constant |
getAvailableHorizBorder |
( |
); |
String |
getAvailableHorizOffset |
( |
); |
constant |
getAvailableVertBorder |
( |
); |
String |
getAvailableVertOffset |
( |
); |
String |
getAvailableWidth |
( |
); |
String |
getBgColor |
( |
); |
String |
getBgImage |
( |
); |
String |
getId |
( |
); |
RelativeLayer |
getParentLayer |
( |
); |
String |
getVisibleHandleHorizOffset |
( |
); |
String |
getVisibleHandleVertOffset |
( |
); |
String |
getVisibleHeight |
( |
); |
integer |
getVisibleHorizBorder |
( |
); |
String |
getVisibleHorizOffset |
( |
); |
String |
getVisibleHorizOffsetReferenceId |
( |
); |
constant |
getVisibleVertBorder |
( |
); |
String |
getVisibleVertOffset |
( |
); |
String |
getVisibleVertOffsetReferenceId |
( |
); |
String |
getVisibleWidth |
( |
); |
integer |
getZIndex |
( |
); |
boolean |
intersects |
( |
|
boolean |
isVisible |
( |
); |
Object |
makeEventObject |
( |
|
void |
position |
( |
|
void |
raise |
( |
); |
void |
refresh |
( |
); |
void |
removeEventListener |
( |
|
void |
setAutoReposition |
( |
|
void |
setBgColor |
( |
|
void |
setBgImage |
( |
|
void |
setHtml |
( |
|
void |
setVisible |
( |
|
void |
setZIndex |
( |
|
boolean |
startScroll |
( |
|
boolean |
stopScroll |
( |
); |
void |
visibleMoveBy |
( |
|
void |
visibleMoveTo |
( |
|
void |
visibleResizeBy |
( |
|
void |
visibleResizeTo |
( |
|
}; |
Following is a detailed description of the elements listed in the synopsis.
getRelativeLayer |
Retrieves the RelativeLayer Object that corresponds to a given layer id.
Parameters
Returns
|
normalizeEvent |
Transforms a browser specific event object into a 'standard' format. The following event types are currently supported :
Parameters
Returns
|
All event objects contain the following members :
absoluteclip |
This event is fired when the layer's clipping rectangle is changed through the use of browser-specific functions. The values are in pixels and are taken directly from the layer's properties. The generated event Object has the following members :
|
absolutemoveby |
This event is fired when the layer's position is changed through the use of browser-specific functions. The values are in pixels and are taken directly from the layer's properties. The generated event Object has the following members :
|
absolutemoveto |
This event is fired when the layer's position is moved to a new position through the use of browser-specific functions. The values are in pixels and are taken directly from the layer's properties. The generated event Object has the following members :
|
absoluteresize |
This event is fired when the layer is resized through the use of browser-specific functions. The values are in pixels and are taken directly from the layer's properties. The generated event Object has the following members :
|
availablemoveby |
This event is fired when the position of the available area has been changed through the use of the availableMoveBy() method. The generated event Object has the following members :
|
availablemoveto |
This event is fired when the position of the available area has been changed through the use of the availableMoveTo() method. The generated event Object has the following members :
|
availableresizeby |
This event is fired when the size of the available area has been changed through the use of the availableResizeBy() method. The generated event Object has the following members :
|
availableresizeto |
This event is fired when the size of the available area has been changed through the use of the availableResizeTo() method. The generated event Object has the following members :
|
click |
This event is fired when a mouse button was clicked on the layer. The generated event Object has the following members :
|
create |
This event is fired when a layer has been dynamically created through the use of the createLayer() method or implicitely, by not providing a suitable DIV tag in the HTML body. The generated event Object contains no additional members.
|
init |
This event is fired when the layer's datastructure has been fully initialized and is ready for positioning. The generated event Object contains no additional members.
|
mousedown |
This event is fired when a mouse button is pressed on a layer. The generated event Object has the following members :
|
mousemove |
This event is fired when the mouse is moved over a layer. The generated event Object has the following members :
|
mouseover |
This event is fired when the mouse first moves into a layer's area. The generated event Object has the following members :
|
mouseup |
This event is fired when a mouse button is released on a layer. The generated event Object has the following members :
|
position |
This event is fired when the layer has been repositioned without calling a movement or resize method, but by for example calling the position() method. The generated event Object contains no additional members.
|
raise |
This event is fired when the layer has been raised above all the other layers by calling the raise() method. The generated event Object contains no additional members.
|
visiblemoveby |
This event is fired when the position of the visible area has been changed through the use of the visibleMoveBy() method. The generated event Object has the following members :
|
visiblemoveto |
This event is fired when the position of the visible area has been changed through the use of the visibleMoveTo() method. The generated event Object has the following members :
|
visibleresizeby |
This event is fired when the size of the visible area has been changed through the use of the visibleResizeBy() method. The generated event Object has the following members :
|
visibleresizeto |
This event is fired when the size of the visible area has been changed through the use of the visibleResizeTo() method. The generated event Object has the following members :
|
new |
The constructor of a RelativeLayer object makes it possible to define its shape, position and background. It will be automatically positioned when the page has finished loading. Below are schematic drawings to visually show what all the parameters for the constructor are used for :
Parameters
Returns
|
addEventListener |
Registers a listener for a specific event type. The event type can either internally supported by RelativeLayers or any other type for the creation of custom events.
Parameters
|
availableMoveBy |
Moves the available area by the specified offsets.
Parameters
|
availableMoveTo |
Moves the available area to the specified offset.
Parameters
|
availableResizeBy |
Resizes the available area by the specified offsets.
Parameters
|
availableResizeTo |
Changes the size of the available area to the one specified by the provided width and height.
Parameters
|
calculateAvailableHandleHorizOffset |
Calculates the number of pixels of the horizontal distance from the absolute center of the available area to its positioning handle.
Returns
|
calculateAvailableHandleVertOffset |
Calculates the number of pixels of the vertical distance from the absolute center of the available area to its positioning handle.
Returns
|
calculateAvailableHeight |
Calculates the number of pixels of the available area's height.
Parameters
Returns
|
calculateAvailableHorizOffset |
Calculates the number of pixels of the available area's horizontal offset from the border of the horizontal reference layer.
Parameters
Returns
|
calculateAvailableVertOffset |
Calculates the number of pixels of the available area's vertical offset from the border of the vertical reference layer.
Parameters
Returns
|
calculateAvailableWidth |
Calculates the number of pixels of the available area's width.
Parameters
Returns
|
calculateVisibleHandleHorizOffset |
Calculates the number of pixels of the horizontal distance from the absolute center of the visible area to its positioning handle.
Returns
|
calculateVisibleHandleVertOffset |
Calculates the number of pixels of the vertical distance from the absolute center of the visible area to its positioning handle.
Returns
|
calculateVisibleHeight |
Calculates the number of pixels of the visible area's height.
Returns
|
calculateVisibleHorizOffset |
Calculates the number of pixels of the visible area's horizontal offset from the border of the horizontal reference layer.
Parameters
Returns
|
calculateVisibleVertOffset |
Calculates the number of pixels of the visible area's vertical offset from the border of the vertical reference layer.
Parameters
Returns
|
calculateVisibleWidth |
Calculates the number of pixels of the visible area's width.
Returns
|
createLayer |
Dynamically creates the layer instead of relying on correct DIV tag in the HTML document. Don't call this function if a DIV tag with this layer's id is already present in the document, the behavior will be unpredictable. This function has no effect when the layer already exists.
|
destroyLayer |
Destroys the layer completely. It will not be retrievable in any way. Be sure that this is what you want to do. If you just want to make the layer invisible, use the setVisible() method instead.
|
fireEvent |
This is a shorthand function to quickly fire an event that is defined by a series of parameters. The parameters are passed directly to makeEventObject() and the generated event object is passed to fireEventObject(). See these methods for more information.
Parameters
|
fireEventObject |
Calls all the event listeners according to the provided event object. This object will be passed straight on to the listeners and needs to have at least the type member to make it possible to detect the event type.
Parameters
|
getAbsolutePageX |
Calculates the absolute x position of the layer in the page. This just adds all the x properties of the parent layers and this layer together and has thus nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAbsolutePageY |
Calculates the absolute y position of the layer in the page. This just adds all the y properties of the parent layers and this layer together and has thus nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAbsoluteHeight |
Retrieves the height property of the layer. This provides direct access to this layer property and has nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAbsoluteWidth |
Retrieves the width property of the layer. This provides direct access to this layer property and has nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAbsoluteX |
Retrieves the x property of the layer. This provides direct access to this layer property and has nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAbsoluteY |
Retrieves the y property of the layer. This provides direct access to this layer property and has nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
getAvailableHandleHorizOffset |
Retrieves the expression that defines the horizontal offset from the center of the available area to its positioning handle.
Returns
|
getAvailableHandleVertOffset |
Retrieves the expression that defines the vertical offset from the center of the available area to its positioning handle.
Returns
|
getAvailableHeight |
Retrieves the expression that defines the height of the available area.
Returns
|
getAvailableHorizBorder |
Retrieves the constant that defines the border of the visible area from which the available horizontal offset is measured.
constant
|
getAvailableHorizOffset |
Retrieves the expression that defines the horizontal offset of the available area from the horizontal border of the visible area.
Returns
|
getAvailableVertBorder |
Retrieves the constant that defines the border of the visible area from which the available vertical offset is measured.
Returns
|
getAvailableVertOffset |
Retrieves the expression that defines the vertical offset of the available area from the vertical border of the visible area.
Returns
|
getAvailableWidth |
Retrieves the expression that defines the width of the available area.
constant
|
getBgColor |
Returns the layer's background color that was set through RelativeLayers. This will not give access to the layer's style background color property.
Returns
|
getBgImage |
Returns the layer's background image url that was set through RelativeLayers. This will not give access to the layer's style background image property.
Returns
|
getId |
Returns the id of this RelativeLayer.
Returns
|
getParentLayer |
Retrieves the parent RelativeLayer object of this layer.
Returns
|
getVisibleHandleHorizOffset |
Retrieves the expression that defines the horizontal offset from the center of the visible area to its positioning handle.
Returns
|
getVisibleHandleVertOffset |
Retrieves the expression that defines the vertical offset from the center of the visible area to its positioning handle.
Returns
|
getVisibleHeight |
Retrieves the expression that defines the height of the visible area.
Returns
|
getVisibleHorizBorder |
Retrieves the constant that defines the border of the parent layer from which the visible horizontal offset is measured.
Returns
|
getVisibleHorizOffset |
Retrieves the expression that defines the horizontal offset of the visible area from the horizontal border of the parent layer.
Returns
|
getVisibleHorizOffsetReferenceId |
Retrieves the id of the RelativeLayer from which the horizontal offset of the visible area is measured.
Returns
|
getVisibleVertBorder |
Retrieves the constant that defines the border of the parent layer from which the visible vertical offset is measured.
Returns
|
getVisibleVertOffset |
Retrieves the expression that defines the vertical offset of the visible area from the vertical border of the parent layer.
Returns
|
getVisibleVertOffsetReferenceId |
Retrieves the id of the RelativeLayer from which the vertical offset of the visible area is measured.
Returns
|
getVisibleWidth |
Retrieves the expression that defines the width of the visible area.
Returns
|
getZIndex |
Retrieves the z-index property of the layer. This provides direct access to this layer property and has nothing do to with the internal positioning mechanism of RelativeLayers.
Returns
|
intersects |
Verifies if this layer intersects with another RelativeLayer.
Parameters
Returns
|
isVisible |
Returns this layer's visibility.
Returns
|
makeEventObject |
Creates an event object from an variable number of parameters. It will contain at least the type member. The other members will be created dynamically according to the remaining parameters that are passed. These parameters work in pairs, the first one defines the name of the member and the second one defines its value.
Parameters
Returns
|
position |
Explicitly recalculates the layer's position and dimension. The calculated properties will also be applied and shown. This should normally never be called since every method that requires recalculations, triggers them automatically. The parameters function in a similar manner as those of the fireEvent() method.
Parameters
|
raise |
Moves this layer to the top of the z-index stack, putting it above all other layers.
|
refresh |
Explicitly refreshes global layer properties such as background and visibility. This should normally never be called since every method that requires these refreshes, triggers them automatically.
|
removeEventListener |
Unregisters a listener for a specific event type. See addEventListener() for the internally supported event types. This method of course also works effortlessly with custom event types.
Parameters
|
setAutoReposition |
Toggles the automatic repositioning of this layer when the window has been resized.
Parameters
|
setBgColor |
Changes the background color of the layer.
Parameters
|
setBgImage |
Changes the background image of the layer.
Parameters
|
setHtml |
Replaces the html of the layer with completely new content.
Parameters
|
setVisible |
Toggles the visibility of the layer.
Parameters
|
setZIndex |
Modifies the position of the layer in the z-index stack.
Parameters
|
startScroll |
Initiates the scrolling of the available area in a certain direction and speed. The scrolling will automatically stop when the available area's extremities have been reached.
Parameters
Returns
|
stopScroll |
Stops the scrolling of the available area.
Returns
|
visibleMoveBy |
Moves the visible area by the specified offsets.
Parameters
|
visibleMoveTo |
Moves the visible area to the specified offset.
Parameters
|
visibleResizeBy |
Resizes the visible area by the specified offsets.
Parameters
|
visibleResizeTo |
Changes the size of the visible area to the one specified by the provided width and height.
Parameters
|