2015-01-23 13:09:30 +00:00
|
|
|
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);
|
2015-03-09 08:36:54 +00:00
|
|
|
this.putValue (this._value);
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
,get: function ()
|
|
|
|
{
|
|
|
|
return this._format;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,_format: null
|
|
|
|
|
|
|
|
,initialize: function (props)
|
|
|
|
{
|
|
|
|
this.createElement ('label');
|
2015-11-09 08:14:33 +00:00
|
|
|
this.parent (props);
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
,putValue: function (value)
|
|
|
|
{
|
|
|
|
Vn.Node.setText (this.node,
|
|
|
|
Vn.Value.format (value, this._format));
|
|
|
|
}
|
|
|
|
});
|