39 lines
540 B
JavaScript
Executable File
39 lines
540 B
JavaScript
Executable File
Htk.Label = new Class
|
|
({
|
|
Extends: Htk.Field
|
|
,Tag: 'htk-label'
|
|
,Properties:
|
|
{
|
|
/**
|
|
* Format that applies to the value.
|
|
**/
|
|
format:
|
|
{
|
|
type: String
|
|
,set: function (x)
|
|
{
|
|
this._format = _(x);
|
|
this.putValue (this._value);
|
|
}
|
|
,get: function ()
|
|
{
|
|
return this._format;
|
|
}
|
|
}
|
|
}
|
|
|
|
,_format: null
|
|
|
|
,initialize: function (props)
|
|
{
|
|
this.parent (props);
|
|
this.createElement ('label');
|
|
}
|
|
|
|
,putValue: function (value)
|
|
{
|
|
Vn.Node.setText (this.node,
|
|
Vn.Value.format (value, this._format));
|
|
}
|
|
});
|