If you have an immutable object, you must set whatever state it will contain in the constructor.
如果您有一个不可变对象,则必须要在构造函数中设置该对象将包含的任何状态。
Only the parent and style are set in the constructor; all other properties are set on the created object.
只有父控件和样式是在构造函数中设置的,其他所有属性都是在已创建的对象上设置的。
This parameter is passed on the object constructor to mandate that it is set.
此参数在对象构造函数上传递,以强制设置该参数。
应用推荐