Checkbox
类:Checkbox组件类
Constructor
new Glodon.Bimface.Tiles.UI.Checkbox(option)
构造Checkbox组件对象
Parameters:
| Name | Type | Description | 
|---|---|---|
| option | Object | 构造多选框的配置项 | 
Methods
addClass(class)
对组件增加CSS样式
Parameters:
| Name | Type | Description | 
|---|---|---|
| class | String | CSS类名 | 
getDimensions()
获取组件的尺寸信息
Returns:
| Type | Description | 
|---|---|
| Object | 组件的尺寸信息 | 
getId()
获取ID
Returns:
| Type | Description | 
|---|---|
| String | ID | 
getLabel()
获取多选框文字内容
Returns:
| Type | Description | 
|---|---|
| String | 多选框文字内容 | 
getPosition()
获取组件的位置信息
Returns:
| Type | Description | 
|---|---|
| Object | 组件的位置信息 | 
getValue()
获取多选框的返回值
Returns:
| Type | Description | 
|---|---|
| String | 多选框的返回值 | 
hide()
隐藏
isChecked()
获取多选框的选中状态
Returns:
| Type | Description | 
|---|---|
| Boolean | 多选框的选中状态 | 
isEnabled()
获取多选框的启用状态
Returns:
| Type | Description | 
|---|---|
| Boolean | 多选框的启用状态 | 
isVisible()
获取可见性状态
Returns:
| Type | Description | 
|---|---|
| Boolean | 可见性状态 | 
onChange(event)
多选框选中状态发生变化的事件
Parameters:
| Name | Type | Description | 
|---|---|---|
| event | Function | 多选框选中状态发生变化时执行的函数 | 
removeClass(class)
对组件移除CSS样式
Parameters:
| Name | Type | Description | 
|---|---|---|
| class | String | CSS类名 | 
setChecked(checked)
设置多选框的选中状态
Parameters:
| Name | Type | Description | 
|---|---|---|
| checked | Boolean | 多选框的选中状态 | 
setEnabled(isEnabled)
设置多选框的启用状态
Parameters:
| Name | Type | Description | 
|---|---|---|
| isEnabled | Boolean | 多选框的启用状态 | 
setLabel(text)
设置多选框文字内容
Parameters:
| Name | Type | Description | 
|---|---|---|
| text | String | 多选框文字内容 | 
setPosition(position)
设置组件的位置信息
Parameters:
| Name | Type | Description | 
|---|---|---|
| position | Object | 组件的位置信息 | 
setValue(value)
设置多选框的返回值
Parameters:
| Name | Type | Description | 
|---|---|---|
| value | String | 多选框的返回值 | 
show()
显示