Class LabelWidget

Defined in widgetsBasic.js

The LabelWidget is primarily the simplest possible usable widget. (This is also why methods I'd normally leave undocumented are documented here, for educational purposes.) It is simply a text span on the screen; due to the way HTML works and how simple this Widget is the text inside can not even be styled; the label widget is simply a <span> with a text node.) However, due to how hard/annoying the DOM makes it to have this sort of "label", I find myself using this in real code all the time, since it integrates so well with the rest of XBLinJS; trivial, yes, useless, no.

The widget does assume you aren't going to muck around with the insides directly; if you fragment the internal text node or do any other crazy DOM things, the value you retrieve from it will be wrong.

Relevant Parameters:

Inheritances:

The LabelWidget is a <span> that inherits everything ("*").


Field Summary
 Object content
          Defines the content of the LabelWidget, a <span> tag.
 
Constructor Summary
LabelWidget ()
            LabelWidget - simple demo widget showing constant text, surprisingly useful
 
Method Summary
 Object get_value()
           Retrieves the current text of the LabelWidget and returns it.
 void set_value(val)
           Sets the current value of the widget to the given text, removing any text that may currently be there.

Field Detail

content

Object content

Constructor Detail

LabelWidget

LabelWidget()

Method Detail

get_value

Object get_value()

set_value

void set_value(val)


Documentation generated by JSDoc on Tue May 3 17:16:26 2005