2016-09-26 09:28:47 +00:00
|
|
|
|
|
|
|
module.exports = new Class
|
2015-03-09 08:36:54 +00:00
|
|
|
({
|
|
|
|
Extends: Htk.Field
|
|
|
|
,Tag: 'htk-text'
|
|
|
|
,Properties:
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Format that applies to the value.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2015-03-09 08:36:54 +00:00
|
|
|
format:
|
|
|
|
{
|
|
|
|
type: String
|
2022-05-26 06:08:31 +00:00
|
|
|
,set: function(x) {
|
2015-03-09 08:36:54 +00:00
|
|
|
this._format = _(x);
|
2022-05-26 06:08:31 +00:00
|
|
|
this.putValue(this._value);
|
2015-03-09 08:36:54 +00:00
|
|
|
}
|
2022-05-26 06:08:31 +00:00
|
|
|
,get: function() {
|
2015-03-09 08:36:54 +00:00
|
|
|
return this._format;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,_format: null
|
|
|
|
|
2022-05-26 06:08:31 +00:00
|
|
|
,render: function() {
|
|
|
|
this._node = this.createTextNode('');
|
2015-03-09 08:36:54 +00:00
|
|
|
}
|
|
|
|
|
2022-05-26 06:08:31 +00:00
|
|
|
,putValue: function(value) {
|
|
|
|
this._node.nodeValue = Vn.Value.format(value, this._format);
|
2015-03-09 08:36:54 +00:00
|
|
|
}
|
|
|
|
});
|