Class: StatusWidget

StatusWidget

This class is a simple implementation of the ClientListener interface that will display a small widget containing informations about the status of the connection.
Note that the widget is generated using some features not available on old browsers but as long as the "data" URL scheme is supported the minimal functions of the widget will work (for instance, IE<=7 does not have support for the "data" URL scheme).
Also note that on IE if "Quirks Mode" is activated the widget will not be displayed correctly. Specify a doctype on the document where the widget is going to be shown to prevent IE from entering the "Quirks Mode".

new StatusWidget(attachToBorder, distance, fromTop, initialDisplay)

Creates an object to be used to listen to events from a LightstreamerClient instance. The new object will create a small visual widget to display the status of the connection. The created widget will have a fixed position so that it will not move when the page is scrolled.
Parameters:
Name Type Description
attachToBorder String "left" "right" or "no" to specify if the generated widget should be attached to the left border, right border or should not be attached to any border. In the latter case, it should be immediately positioned manually, by acting on the DOM element obtained through StatusWidget#getDomNode.
distance String The distance of the widget from the top/bottom (depending on the fromTop parameter). The specified distance must also contain the units to be used: all and only the units supported by CSS are accepted.
fromTop boolean true or false to specify if the distance is related to the top or to the bottom of the page.
initialDisplay String "open" "closed" or "dyna" to specify if the generated widget should be initialized open, closed or, in the "dyna" case, open and then immediately closed. By default "dyna" is used. If attachToBorder is set to "no" then this setting has no effects.
Throws:
if an invalid value was passed as attachToBorder parameter.
Type
IllegalArgumentException

Extends

Method Summary

getDomNode
Inquiry method that gets the DOM element that makes the widget container.

Inherited Methods

Method Detail

getDomNode() → {DOMElement}

Inquiry method that gets the DOM element that makes the widget container. It may be necessary to extract it to specify some extra styles or to position it in case "no" was specified as the attachToBorder constructor parameter.
Returns:
The widget DOM element.
Type
DOMElement