/** * Created by TonyJiang on 16/8/10. */ import {TextEditor} from "../../design/ui/property-editor/TextEditor"; //属性定义 export class Property { private _name:string; private _defaultValue:any; private _label:string; private _editor:any; private _enumValue:Map; /** * * @param name 属性字段名 * @param defaultValue 默认值 * @param label 属性显示名 * @param editor 属性编辑器 * @param enumValue */ constructor(name:string, defaultValue:any, label:string = "", editor:any = TextEditor, enumValue:Map = null) { this._name = name; this._defaultValue = defaultValue; this._label = label; this._editor = editor; this._enumValue = enumValue; } get name():string { return this._name; } get label():string { return this._label; } get defaultValue():any { if (typeof (this._defaultValue) === 'function') { return this._defaultValue(); } return this._defaultValue; } get editor():any { return this._editor; } get enumValue():any { return this._enumValue; } }